:root {
  --bg: #f3f2f1;
  --surface: #ffffff;
  --ink: #201f1e;
  --muted: #605e5c;
  --line: #edebe9;
  --line-2: #d2d0ce;
  --blue: #0f6cbd;
  --blue-hover: #115ea3;
  --blue-soft: #ebf3fc;
  --pdf: #c4314b;
  --word: #185abd;
  --ok: #0e7c3a;
  --shadow: 0 0.3px 0.9px rgba(0, 0, 0, 0.12), 0 1.6px 3.6px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --font: "Noto Sans", "Segoe UI", "Segoe UI Variable Text", system-ui, sans-serif;
  color-scheme: light;
}

html[data-theme="dark"],
html.dark {
  --bg: #1b1a19;
  --surface: #252423;
  --ink: #f3f2f1;
  --muted: #c8c6c4;
  --line: #3b3a39;
  --line-2: #484644;
  --blue: #4aa1e8;
  --blue-hover: #6cb8f0;
  --blue-soft: #09335c;
  --pdf: #e37c8a;
  --word: #6ea0e8;
  --ok: #54b378;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg: #1b1a19;
    --surface: #252423;
    --ink: #f3f2f1;
    --muted: #c8c6c4;
    --line: #3b3a39;
    --line-2: #484644;
    --blue: #4aa1e8;
    --blue-hover: #6cb8f0;
    --blue-soft: #09335c;
    --pdf: #e37c8a;
    --word: #6ea0e8;
    --ok: #54b378;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
.min-h-screen { min-height: 100vh; }
.antialiased { -webkit-font-smoothing: antialiased; }
h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
h1 { font-size: clamp(1.75rem, 3.2vw, 2.35rem); font-weight: 650; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.9rem; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.wrap { width: min(960px, calc(100% - 32px)); margin-inline: auto; }
.wrap-wide { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.narrow { width: min(720px, calc(100% - 32px)); }
.sr-only, .skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto;
  z-index: 80; background: var(--blue); color: #fff; padding: 8px 12px; border-radius: 4px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.header-inner {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  min-height: 56px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.brand-dot { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.02em; }
.logo-mark { display: block; width: 36px; height: 36px; }

.nav-desk { display: none; align-items: center; gap: 4px; margin-left: auto; }
.nav-desk > a, .nav-btn {
  background: none; border: 0; font: inherit; color: var(--ink);
  cursor: pointer; text-decoration: none; padding: 8px 12px; border-radius: 4px;
}
.nav-desk > a:hover, .nav-btn:hover { background: var(--bg); text-decoration: none; }
.nav-desk > a[aria-current="page"] { color: var(--blue); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-desk + .header-actions { margin-left: 8px; }
.theme-toggle, .menu-toggle {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  border-radius: 4px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer;
}
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; }
.theme-mode-label { color: var(--muted); }

.nav-item { position: relative; }
.mega {
  position: absolute; top: calc(100% + 4px); right: 0; width: min(820px, 86vw);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px 12px; display: grid;
  grid-template-columns: repeat(3, 1fr); gap: 12px 20px; z-index: 30;
}
.mega-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega a { color: var(--ink); font-size: 13px; display: block; padding: 4px 0; }
.mega[hidden],
.drawer[hidden],
.progress[hidden],
.result[hidden],
.file-list[hidden],
.recent-band[hidden] { display: none !important; }
.drawer { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 50; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(300px, 88vw); background: var(--surface); padding: 16px; }
.drawer-top { display: flex; justify-content: space-between; margin-bottom: 16px; }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; }
.drawer-nav a { color: inherit; padding: 10px 8px; border-radius: 4px; }
.drawer-nav a:hover { background: var(--bg); text-decoration: none; }

.hero-google {
  padding: 56px 0 8px;
  text-align: center;
}
.hero-google .logo-mark { margin: 0 auto 16px; width: 64px; height: 64px; display: block; }
.hero-google .lede { color: var(--muted); max-width: 34rem; margin: 0 auto 28px; font-size: 16px; }
.visit-line { color: var(--muted); font-size: 13px; margin: 0 0 8px; min-height: 1.2em; }

.converter { margin: 0 auto; max-width: 680px; }
.dropzone {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
}
.drop-surface {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 196px; border: 1px dashed var(--line-2); border-radius: 4px;
  padding: 28px 20px; cursor: pointer; text-align: center;
}
.drop-surface:hover, .drop-surface.is-over {
  background: var(--blue-soft);
  border-color: var(--blue);
}
.file-pair { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.file-badge {
  width: 40px; height: 48px; border-radius: 3px; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: #fff;
}
.file-badge.pdf { background: var(--pdf); }
.file-badge.word { background: var(--word); }
.file-arrow { color: var(--muted); font-size: 18px; }
.drop-title { font-size: 16px; font-weight: 600; }
.drop-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.drop-sub em { font-style: normal; color: var(--blue); font-weight: 600; }
.file-list { list-style: none; margin: 8px 12px 0; padding: 0; text-align: left; }
.file-list li {
  display: flex; justify-content: space-between; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.convert-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 12px; margin: 12px 8px 8px;
}
.btn-primary {
  background: var(--blue); color: #fff; border: 0; border-radius: 4px;
  padding: 10px 22px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover:not(:disabled) { background: var(--blue-hover); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.hint { margin: 0 0 10px; color: var(--muted); font-size: 12px; text-align: center; }
.trust-inline {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px;
  list-style: none; padding: 0; margin: 18px 0 0; color: var(--muted); font-size: 12px;
}
.progress { margin: 8px 12px 12px; text-align: left; }
.progress-bar { height: 3px; width: 0; background: var(--blue); border-radius: 99px; }
.result {
  margin: 0 8px 8px; padding: 12px 14px; background: var(--blue-soft);
  border-radius: 4px; text-align: left; border: 1px solid var(--line);
}
.result a.dl { font-weight: 600; }

.band { padding: 40px 0; }
.band.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 16px; }
.section-head p { color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tool-card {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  color: inherit; text-decoration: none;
}
.tool-card:hover { border-color: var(--blue); text-decoration: none; }
.tool-icon { color: var(--word); flex-shrink: 0; }
.icon { width: 22px; height: 22px; }
.tool-card-copy { display: flex; flex-direction: column; gap: 2px; }
.tool-card-copy strong { font-size: 13px; font-weight: 600; }
.tool-card-copy span { color: var(--muted); font-size: 12px; }
.center-link { text-align: center; margin-top: 16px; }

.steps { display: grid; gap: 16px; }
.steps article { padding: 4px 0; }
.steps span {
  display: inline-block; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 700;
  text-align: center; line-height: 22px; margin-bottom: 8px;
}
.split { display: grid; gap: 24px; }
.note-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
}
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.faq details p { margin: 8px 0 0; color: var(--muted); }
.crumbs { padding: 14px 0 0; font-size: 12px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 4px; opacity: 0.55; }
.crumbs a { color: inherit; }
.tool-hero { padding: 20px 0 8px; text-align: center; }
.tool-hero .lede { color: var(--muted); max-width: 38rem; margin-inline: auto; }
.plain-ol { padding-left: 1.2rem; color: var(--muted); }
.illust { margin: 0 auto 1.5rem; text-align: center; max-width: 260px; }
.illust svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.illust figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.seo-article h2 { margin-top: 1.75rem; }
.tool-icon-tile {
  width: 36px; height: 36px; border-radius: 4px; background: var(--blue-soft);
  display: grid; place-items: center; flex-shrink: 0; color: var(--word);
}
.seo-article p, .seo-article li { color: var(--ink); }
.seo-article ul { padding-left: 1.15rem; }
.tool-search input {
  width: min(420px, 100%); margin-top: 10px; padding: 10px 12px; border-radius: 24px;
  border: 1px solid var(--line-2); background: var(--surface); color: inherit; font: inherit;
  box-shadow: var(--shadow);
}
.hub-block { margin: 28px 0; }
.prose { padding: 28px 0 56px; max-width: 40rem; }
.recent-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.recent-row a {
  border: 1px solid var(--line-2); border-radius: 16px; padding: 6px 12px;
  text-decoration: none; color: inherit; background: var(--surface); font-size: 13px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 16px;
  margin-top: 24px;
  background: var(--surface);
  font-size: 13px;
}
.footer-grid { display: grid; gap: 20px; width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.footer-brand p { color: var(--muted); }
.footer-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a { color: inherit; }
.footer-legal {
  width: min(1120px, calc(100% - 32px)); margin: 24px auto 0; padding-top: 14px;
  border-top: 1px solid var(--line); display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px;
}
.footer-legal a { color: inherit; margin-right: 12px; }

.portal {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.portal-inner { padding: 10px 0 8px; }
.portal-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px;
}
.portal-title { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0; font-weight: 700; }
.portal-more { font-size: 12px; white-space: nowrap; }
.portal-track {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
}
.portal-chip {
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 100%;
  padding: 5px 9px; border-radius: 14px;
  border: 1px solid var(--line-2); background: var(--bg);
  color: inherit; text-decoration: none; font-size: 12px; line-height: 1.2;
  animation: chip-in 0.45s ease both; animation-delay: var(--d, 0ms);
}
.portal-chip.chip-md,
.portal-chip.chip-lg { display: none; }
.portal-chip:hover { border-color: var(--blue); background: var(--blue-soft); text-decoration: none; }
.portal-rank { font-weight: 700; color: var(--blue); font-size: 11px; flex-shrink: 0; }
.rank-bar {
  background: var(--blue-soft);
  border-bottom: 1px solid var(--line);
  animation: slide-down 0.4s ease both;
}
.rank-bar-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: 8px 0; font-size: 13px;
}
.rank-score { margin: 0; display: flex; align-items: center; gap: 6px; }
.rank-of { color: var(--muted); }
.stars { color: #c9a227; letter-spacing: 1px; animation: star-pop 0.8s ease both; }
.rank-copy { margin: 0; color: var(--muted); min-width: 0; }
.rank-badge {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 10px;
  background: var(--blue); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; vertical-align: middle;
}
.rank-all { font-size: 12px; white-space: nowrap; margin-left: 0; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-row { animation: rise 0.45s ease both; animation-delay: var(--d, 0ms); }
.rank-row a {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px;
  background: var(--surface); color: inherit; text-decoration: none;
}
.rank-row a:hover { border-color: var(--blue); }
.rank-num { font-weight: 700; color: var(--blue); width: 2.2rem; }
.muted { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }

.logo-mark { animation: floaty 4s ease-in-out infinite; }
.hero-google { animation: rise 0.55s ease both; }
.anim-drop { animation: rise 0.6s 0.08s ease both; }
.drop-surface { animation: pulse-line 2.8s ease-in-out infinite; }
.file-pair { animation: floaty 3.5s ease-in-out infinite; }
.btn-primary { transition: transform 0.15s ease, background 0.15s ease; }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); }
.tool-card { transition: transform 0.18s ease, border-color 0.18s ease; }
.tool-card:hover { transform: translateY(-4px); }
.illust svg { animation: rise 0.6s ease both; }
[data-animate].is-in, .tool-card.is-in, .rank-row.is-in { animation-play-state: running; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes pulse-line {
  0%, 100% { border-color: var(--line-2); }
  50% { border-color: var(--blue); }
}
@keyframes chip-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes star-pop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 640px) {
  .portal-chip.chip-md { display: inline-flex; }
  .rank-all { margin-left: auto; }
}
@media (min-width: 880px) {
  .nav-desk { display: flex; }
  .menu-toggle { display: none; }
  .header-actions { margin-left: 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .split { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
  .portal-chip.chip-lg { display: inline-flex; }
}
@media (min-width: 1100px) {
  .footer-grid { grid-template-columns: 1.3fr repeat(6, 1fr); }
}
