/* ConvertEbooks design system — warm paper, white cards, indigo action, violet AI.
   Deliberately no external fonts or icon CDNs. */
:root {
  --page: #f8f7f4;
  --paper: #fffdf9;
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-sunken: #f2f0ea;
  --bg-hover: #f5f3ee;
  --heading: #18171c;
  --text: #45434a;
  --text-muted: #5f5d66;
  --text-faint: #85828c;
  --border: #e7e3da;
  --border-strong: #d6d1c5;
  --accent: #4f39f6;
  --accent-hover: #432dd7;
  --accent-soft: #eef0ff;
  --accent-ink: #3220a8;
  --violet: #7c3aed;
  --violet-soft: #f4edff;
  --local: #16803c;
  --local-soft: #e8f7ec;
  --ai: #9a3412;
  --ai-soft: #fff1e8;
  --amber: #b45309;
  --amber-soft: #fff7e6;
  --err: #c02626;
  --err-soft: #fff0f0;
  --hero-bg: #f7f4ec;
  --hero-line: #e7e0d2;
  --foot-bg: #f2efe8;
  --shadow: 0 1px 2px rgba(30, 26, 20, .05), 0 6px 20px -14px rgba(30, 26, 20, .18);
  --shadow-lg: 0 18px 50px -26px rgba(30, 26, 20, .32), 0 3px 10px -5px rgba(30, 26, 20, .10);
  --radius: 12px;
  --radius-card: 20px;
  --radius-sm: 8px;
  --pill: 999px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Noto Serif SC", "Songti SC", "STSong", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.8 12.6l4.6 4.6 9.8-10' fill='none' stroke='%23000' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0d0c0b;
    --paper: #151412;
    --bg: #181715;
    --bg-elevated: #1c1b18;
    --bg-sunken: #23211d;
    --bg-hover: #26231f;
    --heading: #f6f3ec;
    --text: #d7d3ca;
    --text-muted: #aaa69d;
    --text-faint: #817d75;
    --border: #2e2b26;
    --border-strong: #423e37;
    --accent: #9f96ff;
    --accent-hover: #b9b1ff;
    --accent-soft: #241f4a;
    --accent-ink: #d7d2ff;
    --violet: #c4a7ff;
    --violet-soft: #2a1f3d;
    --local: #6ee7a0;
    --local-soft: #10281a;
    --ai: #ffb27e;
    --ai-soft: #351d0d;
    --amber: #fbbf24;
    --amber-soft: #3a2a08;
    --err: #ff8f8f;
    --err-soft: #3a1515;
    --hero-bg: #141310;
    --hero-line: #2e2a23;
    --foot-bg: #11100e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -16px rgba(0, 0, 0, .8);
    --shadow-lg: 0 24px 60px -30px rgba(0, 0, 0, .9), 0 4px 14px -8px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  --page: #0d0c0b;
  --paper: #151412;
  --bg: #181715;
  --bg-elevated: #1c1b18;
  --bg-sunken: #23211d;
  --bg-hover: #26231f;
  --heading: #f6f3ec;
  --text: #d7d3ca;
  --text-muted: #aaa69d;
  --text-faint: #817d75;
  --border: #2e2b26;
  --border-strong: #423e37;
  --accent: #9f96ff;
  --accent-hover: #b9b1ff;
  --accent-soft: #241f4a;
  --accent-ink: #d7d2ff;
  --violet: #c4a7ff;
  --violet-soft: #2a1f3d;
  --local: #6ee7a0;
  --local-soft: #10281a;
  --ai: #ffb27e;
  --ai-soft: #351d0d;
  --amber: #fbbf24;
  --amber-soft: #3a2a08;
  --err: #ff8f8f;
  --err-soft: #3a1515;
  --hero-bg: #141310;
  --hero-line: #2e2a23;
  --foot-bg: #11100e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -16px rgba(0, 0, 0, .8);
  --shadow-lg: 0 24px 60px -30px rgba(0, 0, 0, .9), 0 4px 14px -8px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--page); overflow-x: clip; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.18; letter-spacing: -.025em; color: var(--heading); font-weight: 800; }
h1 { font-size: clamp(34px, 5vw, 58px); }
h2 { font-size: clamp(25px, 3.4vw, 38px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }
code, kbd { font-family: var(--mono); font-size: .88em; }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: .08em .38em; background: var(--bg-sunken); }
::selection { background: var(--accent-soft); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 820px; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.grow { flex: 1 1 auto; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 80; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav-in { max-width: 1240px; margin: 0 auto; padding: 0 22px; height: 64px; display: flex; align-items: center; gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); font-weight: 800; font-size: 20px; letter-spacing: -.035em; margin-right: 20px; flex: none; }
.brand:hover { color: var(--heading); }
.brand svg { width: 30px; height: 30px; display: block; flex: none; }
.nav-links { display: flex; align-items: center; gap: 3px; }
.nav-link { display: inline-flex; align-items: center; min-height: 64px; padding: 0 13px; color: var(--text); font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; }
.nav-link:hover { color: var(--accent); }
.nav-link.on { color: var(--accent); border-bottom-color: var(--accent); }
/* PDF Tools opens a menu of the preparation tools instead of navigating to a
   directory page. The card reuses the site's paper surfaces, borders and shadow. */
.pdf-menu-wrap { position: relative; display: flex; align-items: stretch; }
.pdf-menu-btn { border: 0; background: none; font-family: inherit; cursor: pointer; gap: 6px; }
.pdf-menu-btn .pdf-caret { font-size: 9px; line-height: 1; opacity: .55; transition: transform .15s; }
.pdf-menu-btn[aria-expanded="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.pdf-menu-btn[aria-expanded="true"] .pdf-caret { transform: rotate(180deg); opacity: 1; }
.pdf-menu { position: absolute; z-index: 90; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); width: min(620px, calc(100vw - 40px)); padding: 9px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elevated); box-shadow: var(--shadow-lg); display: none; }
.pdf-menu.open { display: block; }
.pdf-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 10px 10px; margin-bottom: 5px; border-bottom: 1px solid var(--border); }
.pdf-menu-head b { color: var(--text-faint); font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.pdf-menu-head span { color: var(--text-faint); background: var(--bg-sunken); border-radius: 999px; padding: 3px 8px; font-size: 11px; white-space: nowrap; }
.pdf-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.pdf-menu-item { display: flex; align-items: flex-start; gap: 11px; padding: 10px 11px; border-radius: 10px; color: var(--text); }
.pdf-menu-item:hover { background: var(--bg-hover); color: var(--text); }
.pdf-mi-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.pdf-mi-ic svg { width: 18px; height: 18px; display: block; }
.pdf-mi-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pdf-mi-body b { color: var(--heading); font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.pdf-mi-body small { color: var(--text-muted); font-size: 11.8px; line-height: 1.45; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--text-muted); width: 36px; height: 36px; border-radius: 9px; cursor: pointer; font: inherit; }
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-btn { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 9px; border: 0; border-radius: 9px; background: none; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.lang-btn .lang-label { white-space: nowrap; }
.lang-btn:hover { background: var(--bg-hover); color: var(--text); }
.sign-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--accent); color: var(--accent); background: transparent; padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 700; white-space: nowrap; cursor: pointer; max-width: 190px; }
.sign-btn:hover { background: var(--accent); color: #fff; }
.sign-btn .acct-name { overflow: hidden; text-overflow: ellipsis; }
.acct-wrap { position: relative; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px; border: 1px solid var(--border); border-radius: 13px; background: var(--bg-elevated); box-shadow: var(--shadow-lg); display: none; }
.acct-menu.open { display: block; }
.acct-menu a, .acct-menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 9px 11px; border: 0; background: none; border-radius: 8px; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--bg-hover); color: var(--heading); }
.acct-menu .danger { color: var(--err); }
.acct-menu .who { padding: 9px 11px 7px; color: var(--text-faint); font-size: 12px; border-bottom: 1px solid var(--border); margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; }
.mobile-menu { display: none; }
@media (max-width: 1020px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-actions .sign-btn { padding: 7px 11px; }
  .mobile-menu.open { display: block; position: fixed; left: 0; right: 0; top: 64px; z-index: 79; max-height: calc(100dvh - 64px); overflow-y: auto; background: var(--bg-elevated); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 10px 20px 18px; }
  .mobile-menu a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 600; }
  .mobile-menu a:last-child { border-bottom: 0; }
  .mobile-pdf-group { border-bottom: 1px solid var(--border); padding-bottom: 5px; }
  .mobile-pdf-head { padding: 13px 4px 5px; color: var(--text-faint); font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-menu a.mobile-pdf-link { padding: 9px 4px 9px 14px; border-bottom: 0; color: var(--text-muted); font-size: 13.5px; font-weight: 500; }
  .mobile-menu a.mobile-pdf-link:hover { color: var(--accent); }
}
@media (max-width: 520px) {
  .brand span { display: none; }
  .brand { margin-right: 4px; }
  .lang-btn .lang-label { display: none; }
}

/* ---------- buttons / badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--bg-elevated); color: var(--text); font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; transition: .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-elevated); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn.violet { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.violet:hover { filter: brightness(1.06); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-hover); border-color: var(--bg-hover); color: var(--text); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13.5px; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: default; transform: none !important; }
.btn .ic, .btn svg { width: 17px; height: 17px; flex: none; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.local { background: var(--local-soft); color: var(--local); }
.badge.ai { background: var(--ai-soft); color: var(--ai); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; letter-spacing: .02em; }
.tag.local { background: var(--local-soft); color: var(--local); }
.tag.ai { background: var(--ai-soft); color: var(--ai); }
.tag.neutral { background: var(--bg-sunken); color: var(--text-muted); }
.tag.warn { background: var(--amber-soft); color: var(--amber); }

/* ---------- hero ---------- */
.hero { background: var(--hero-bg); border-bottom: 1px solid var(--hero-line); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(var(--hero-line) .8px, transparent .8px); background-size: 22px 22px; opacity: .5; mask-image: linear-gradient(to right, transparent 35%, #000 100%); }
.hero__in { position: relative; z-index: 1; display: flex; align-items: center; gap: 48px; padding: 78px 0 86px; }
.hero__text { flex: 1 1 auto; max-width: 630px; }
.hero h1 { font-size: clamp(38px, 4.8vw, 58px); line-height: 1.12; letter-spacing: -.045em; margin: 22px 0 20px; }
.hero h1 .grad { background: linear-gradient(96deg, var(--accent), var(--violet) 62%, #b15cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { font-size: 19px; line-height: 1.72; color: var(--text-muted); max-width: 34em; margin-bottom: 26px; text-wrap: pretty; }
.hero__sub b { color: var(--heading); }
.hero__checks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 30px; padding: 0; list-style: none; }
.hero__checks li { position: relative; padding-left: 25px; font-size: 14.5px; color: var(--text-muted); }
.hero__checks li::before { content: ""; position: absolute; left: 0; top: 1px; width: 17px; height: 17px; border-radius: 50%; background: var(--local-soft); }
.hero__checks li::after { content: ""; position: absolute; left: 4px; top: 5px; width: 9px; height: 9px; background: var(--local); -webkit-mask: var(--check) center/contain no-repeat; mask: var(--check) center/contain no-repeat; }
.hero__cta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.hero__cta .btn { min-height: 50px; padding: 12px 24px; font-size: 16px; }
.hero__art { flex: 0 0 440px; height: 420px; position: relative; display: none; }
@media (min-width: 1040px) { .hero__art { display: block; } }
.hero__glow { position: absolute; inset: 5% 0; background: radial-gradient(closest-side, rgba(124, 58, 237, .13), transparent 72%); }
.book-stack { position: absolute; inset: 0; }
.book-cover { position: absolute; width: 240px; height: 330px; border-radius: 8px 15px 15px 8px; border: 1px solid var(--hero-line); background: var(--paper); box-shadow: var(--shadow-lg); overflow: hidden; }
.book-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: linear-gradient(180deg, var(--accent), var(--violet)); }
.book-cover .bc-kicker { position: absolute; top: 26px; left: 30px; right: 24px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-faint); font-weight: 800; }
.book-cover .bc-title { position: absolute; top: 54px; left: 30px; right: 24px; font-family: var(--serif); font-size: 27px; line-height: 1.18; color: var(--heading); letter-spacing: -.03em; }
.book-cover .bc-rule { position: absolute; top: 148px; left: 30px; width: 46px; height: 3px; background: var(--violet); border-radius: 2px; }
.book-cover .bc-lines { position: absolute; left: 30px; right: 24px; bottom: 28px; display: grid; gap: 8px; }
.bc-lines i { display: block; height: 4px; border-radius: 3px; background: var(--border); }
.bc-lines i:nth-child(2) { width: 76%; }
.bc-lines i:nth-child(3) { width: 54%; }
.book-back { position: absolute; width: 245px; height: 325px; border-radius: 14px; background: linear-gradient(150deg, #e9e2d4, #d8cfbc); top: 42px; left: 96px; transform: rotate(7deg); }
.book-float { position: absolute; z-index: 3; border: 1px solid var(--hero-line); background: var(--bg-elevated); border-radius: 14px; box-shadow: var(--shadow-lg); }
.book-float--ai { right: -6px; bottom: 34px; width: 280px; padding: 14px; }
.book-float--ai .bf-top { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; color: var(--heading); }
.book-float--ai .bf-top .tag { margin-left: auto; }
.bf-preview { margin-top: 12px; border-radius: 9px; border: 1px solid var(--border); background: linear-gradient(150deg, #f8f5ee, #efe9df); height: 110px; position: relative; overflow: hidden; }
.bf-preview .scanline { position: absolute; left: 8%; right: 8%; top: 40%; height: 2px; background: linear-gradient(90deg, transparent, var(--violet), transparent); box-shadow: 0 0 18px rgba(124, 58, 237, .7); }
.bf-preview .pline { position: absolute; left: 8%; right: 8%; height: 5px; background: rgba(24, 23, 28, .13); border-radius: 3px; }
.bf-preview .pline:nth-child(2) { top: 24%; width: 56%; }
.bf-preview .pline:nth-child(3) { top: 56%; }
.bf-preview .pline:nth-child(4) { top: 70%; width: 70%; }
.bf-preview .pline:nth-child(5) { top: 84%; width: 42%; }
.bf-result { margin-top: 11px; font-size: 12px; line-height: 1.5; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.bf-result b { color: var(--local); }
.book-float--fmt { left: -14px; top: 30px; padding: 11px 14px; width: 168px; }
.fmt-row { display: flex; gap: 6px; flex-wrap: wrap; }
.fmt-pill { font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 4px 7px; border-radius: 6px; background: var(--bg-sunken); color: var(--text-muted); }
.fmt-pill.on { background: var(--accent-soft); color: var(--accent); }
.book-float--fmt .bf-foot { margin-top: 9px; font-size: 11px; color: var(--text-faint); display: flex; align-items: center; gap: 6px; }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--local); box-shadow: 0 0 0 3px var(--local-soft); }

/* ---------- sections ---------- */
.sect { padding: 72px 0 10px; }
.sect--tight { padding-top: 48px; }
.sect--alt { background: var(--bg-sunken); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 60px; padding: 64px 0; }
.sect__head { text-align: center; max-width: 700px; margin: 0 auto 38px; }
.sect__head h2 { margin-bottom: 12px; }
.sect__head p { color: var(--text-muted); font-size: 16px; margin: 0; }
.sect h2.center { text-align: center; }
.kicker { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); margin-bottom: 14px; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 26px 24px; box-shadow: var(--shadow); }
.feature .fic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.feature .fic svg { width: 23px; height: 23px; }
.feature h3 { margin-bottom: 7px; }
.feature p { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.step-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px 21px; box-shadow: var(--shadow); }
.step-num { width: 33px; height: 33px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 14px; margin-bottom: 15px; font-variant-numeric: tabular-nums; }
.step-card b { display: block; color: var(--heading); font-size: 16.5px; margin-bottom: 6px; }
.step-card p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.68; }
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); padding: 0 20px; }
.faq summary { list-style: none; cursor: pointer; padding: 17px 0; display: flex; gap: 12px; align-items: center; font-weight: 700; color: var(--heading); font-size: 15.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-size: 21px; font-weight: 400; color: var(--text-faint); transition: transform .16s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 18px; color: var(--text-muted); font-size: 14.5px; line-height: 1.75; }
.faq .answer p:last-child { margin-bottom: 0; }
.cta-band { text-align: center; padding: 74px 0 34px; }
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: var(--text-muted); margin-bottom: 25px; }
.format-table { width: 100%; border-collapse: collapse; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); }
.format-table th, .format-table td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.format-table tr:last-child td { border-bottom: 0; }
.format-table th { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); background: var(--bg-sunken); }
.format-table td:first-child { font-weight: 700; color: var(--heading); font-family: var(--mono); font-size: 13px; }
.note-card { border: 1px solid var(--border); background: var(--bg-elevated); border-radius: var(--radius-card); padding: 22px 24px; box-shadow: var(--shadow); }
.note-card b { color: var(--heading); }
.note-card p { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; line-height: 1.7; }
@media (max-width: 900px) {
  .cards-3, .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .hero__in { padding: 52px 0 58px; }
  .hero__sub { font-size: 17px; }
  .cards-3, .cards-2, .steps { grid-template-columns: 1fr; }
  .sect { padding-top: 52px; }
  .sect--alt { padding: 48px 0; }
}

/* ---------- footer ---------- */
.site-footer { margin-top: 64px; background: var(--foot-bg); border-top: 1px solid var(--border); padding: 42px 0 26px; font-size: 13.5px; color: var(--text-muted); }
.foot-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.foot-brand { display: flex; align-items: center; gap: 9px; color: var(--heading); font-weight: 800; font-size: 18px; letter-spacing: -.03em; margin-bottom: 11px; }
.foot-brand svg { width: 25px; height: 25px; }
.foot-col h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 12px; font-weight: 800; }
.foot-col a { display: block; color: var(--text-muted); padding: 3px 0; }
.foot-col a:hover { color: var(--heading); }
.foot-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 12.5px; color: var(--text-faint); }
.foot-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 820px) { .foot-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-cols { grid-template-columns: 1fr; } }

/* ---------- generic page heading ---------- */
.page-head { padding: 52px 0 8px; text-align: center; }
.page-head .badge { margin-bottom: 16px; }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 12px; }
.page-head p { max-width: 650px; margin: 0 auto; color: var(--text-muted); font-size: 17px; line-height: 1.7; }
.page-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.error-box { padding: 13px 16px; border-radius: 11px; background: var(--err-soft); color: var(--err); border: 1px solid color-mix(in srgb, var(--err) 25%, transparent); font-size: 14px; line-height: 1.65; }
.ok-box { padding: 13px 16px; border-radius: 11px; background: var(--local-soft); color: var(--local); border: 1px solid color-mix(in srgb, var(--local) 25%, transparent); font-size: 14px; line-height: 1.65; }
.warn-box { padding: 13px 16px; border-radius: 11px; background: var(--amber-soft); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent); font-size: 14px; line-height: 1.65; }
.info-box { padding: 13px 16px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); font-size: 14px; line-height: 1.65; }
.error-box a, .warn-box a, .info-box a, .ok-box a { color: inherit; text-decoration: underline; }

/* ---------- converter ---------- */
.tool-page { padding: 34px 0 0; }
.tool-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.tool-head h1 { font-size: clamp(28px, 3.7vw, 40px); margin: 6px 0 7px; }
.tool-head p { margin: 0; color: var(--text-muted); font-size: 15.5px; max-width: 680px; }
.tool-head .head-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.quota-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elevated); color: var(--text-muted); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.quota-chip b { color: var(--heading); font-variant-numeric: tabular-nums; }
.quota-chip .qdot { width: 7px; height: 7px; border-radius: 50%; background: var(--local); }
.quota-chip.low .qdot { background: var(--amber); }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 20px; align-items: start; }
.workspace-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); overflow: hidden; }
.workspace-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.workspace-head h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.workspace-head .grow { flex: 1; }
.workspace-body { padding: 22px; }
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: 16px; background: linear-gradient(180deg, var(--paper), var(--bg-elevated)); min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 34px 22px; cursor: pointer; transition: .16s; position: relative; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-elevated); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--accent); margin-bottom: 15px; }
.dropzone .dz-ic svg { width: 27px; height: 27px; }
.dropzone .dz-title { font-size: 18px; font-weight: 750; color: var(--heading); margin-bottom: 5px; }
.dropzone .dz-sub { font-size: 13.5px; color: var(--text-muted); line-height: 1.65; max-width: 490px; }
.dropzone .dz-formats { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-top: 14px; }
.dz-pill { font-size: 10.5px; font-weight: 800; letter-spacing: .03em; padding: 3px 7px; border-radius: 5px; border: 1px solid var(--border); color: var(--text-faint); background: var(--bg-elevated); }
.dz-note { margin-top: 14px; font-size: 12px; color: var(--text-faint); }
.file-list { display: grid; gap: 10px; margin-top: 16px; }
.file-row { display: flex; gap: 13px; align-items: center; padding: 13px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--bg-elevated); }
.file-row.err { border-color: color-mix(in srgb, var(--err) 45%, var(--border)); }
.file-icon { width: 40px; height: 46px; border-radius: 6px 9px 9px 6px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 850; letter-spacing: .02em; flex: none; position: relative; }
.file-icon::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 6px 0 0 6px; background: currentColor; opacity: .8; }
.file-icon.pdf { color: var(--err); background: var(--err-soft); }
.file-icon.epub { color: var(--local); background: var(--local-soft); }
.file-icon.docx { color: #1d4ed8; background: #e8efff; }
.file-icon.mobi, .file-icon.azw3 { color: var(--amber); background: var(--amber-soft); }
.file-icon.html, .file-icon.txt, .file-icon.md { color: var(--violet); background: var(--violet-soft); }
.file-main { min-width: 0; flex: 1; }
.file-name { font-weight: 700; color: var(--heading); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 12.5px; color: var(--text-faint); display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 3px; align-items: center; }
.file-meta .warn { color: var(--amber); }
.file-meta .ok { color: var(--local); }
.file-actions { display: flex; align-items: center; gap: 5px; flex: none; }
.file-x { border: 0; background: none; color: var(--text-faint); width: 30px; height: 30px; border-radius: 7px; cursor: pointer; font-size: 16px; }
.file-x:hover { background: var(--bg-hover); color: var(--err); }
.file-status { font-size: 12px; font-weight: 700; color: var(--text-faint); }
.file-status.ok { color: var(--local); }
.file-status.fail { color: var(--err); }
.file-progress { height: 4px; background: var(--bg-sunken); border-radius: 99px; overflow: hidden; margin-top: 7px; }
.file-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--violet)); transition: width .18s; }
.section-label { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); margin: 28px 0 12px; }
.section-label .ln { flex: 1; height: 1px; background: var(--border); }
.format-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.fmt-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 12px 11px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-elevated); cursor: pointer; text-align: left; font: inherit; transition: .13s; }
.fmt-card:hover { border-color: var(--accent); }
.fmt-card.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.fmt-card .fmt-ext { font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--accent); letter-spacing: .02em; }
.fmt-card .fmt-name { font-size: 12.5px; color: var(--text); font-weight: 600; line-height: 1.3; }
.fmt-card .fmt-note { font-size: 10.5px; color: var(--text-faint); line-height: 1.35; }
.fmt-card[disabled] { opacity: .45; cursor: default; }
.options-box { margin-top: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-sunken); padding: 15px 16px; }
.options-box summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 750; color: var(--text); display: flex; align-items: center; gap: 8px; }
.options-box summary::-webkit-details-marker { display: none; }
.options-box summary::after { content: "▾"; margin-left: auto; color: var(--text-faint); font-size: 11px; }
.options-box[open] summary::after { content: "▴"; }
.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-top: 14px; }
.opt-field { display: flex; flex-direction: column; gap: 5px; }
.opt-field > span { font-size: 12px; font-weight: 650; color: var(--text-muted); }
.opt-field input, .opt-field select { width: 100%; font: inherit; color: var(--text); background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 9px; font-size: 13px; }
.opt-hint { font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }
.results { margin-top: 22px; }
.result-list { display: grid; gap: 8px; }
.result-row { display: flex; align-items: center; gap: 11px; border: 1px solid var(--border); border-radius: 11px; padding: 11px 13px; background: var(--bg-elevated); }
.result-row .ri { width: 31px; height: 36px; border-radius: 5px 7px 7px 5px; background: var(--local-soft); color: var(--local); display: grid; place-items: center; font-size: 9px; font-weight: 850; flex: none; }
.result-row .rmain { flex: 1; min-width: 0; }
.result-row .rname { font-size: 13.5px; font-weight: 700; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-row .rmeta { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }
.result-row .btn { flex: none; }
.results-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.results-head h3 { font-size: 15px; margin: 0; }
.side-panel { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 18px 18px 16px; position: sticky; top: 82px; }
.side-panel h2 { font-size: 16px; margin: 0 0 4px; letter-spacing: -.01em; }
.side-panel .sp-sub { font-size: 12.5px; color: var(--text-faint); line-height: 1.55; margin-bottom: 15px; }
.side-group { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.side-group:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.side-group > .sg-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.engine-opt { display: flex; gap: 9px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elevated); cursor: pointer; margin-bottom: 7px; }
.engine-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.engine-opt input { margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.engine-opt .eo-main { min-width: 0; }
.engine-opt .eo-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; font-weight: 750; color: var(--heading); line-height: 1.35; }
.engine-opt .eo-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; margin-top: 3px; }
.engine-opt[aria-disabled="true"] { opacity: .5; cursor: default; }
.ai-balance { display: flex; align-items: baseline; gap: 5px; font-size: 12.5px; color: var(--text-muted); margin-top: 8px; }
.ai-balance b { font-size: 20px; color: var(--heading); font-variant-numeric: tabular-nums; line-height: 1; }
.signin-inline { width: 100%; margin-top: 8px; }
.side-note { font-size: 11.5px; line-height: 1.6; color: var(--text-faint); margin-top: 11px; }
.side-note a { text-decoration: underline; text-underline-offset: 2px; }
.convert-wrap { margin-top: 15px; }
.convert-wrap .btn { width: 100%; min-height: 50px; font-size: 16px; }
.convert-hint { text-align: center; font-size: 11.5px; color: var(--text-faint); margin-top: 8px; line-height: 1.5; }
.status-line { margin-top: 14px; padding: 11px 13px; border-radius: 9px; font-size: 13px; line-height: 1.6; display: flex; gap: 8px; align-items: flex-start; }
.status-line.err { background: var(--err-soft); color: var(--err); }
.status-line.ok { background: var(--local-soft); color: var(--local); }
.status-line.warn { background: var(--amber-soft); color: var(--amber); }
.status-line.info { background: var(--accent-soft); color: var(--accent-ink); }
.progress-panel { margin-top: 14px; border: 1px solid var(--border); border-radius: 11px; padding: 12px 13px; background: var(--bg-elevated); }
.progress-top { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--text-muted); }
.progress-top b { color: var(--heading); font-variant-numeric: tabular-nums; }
.progress-bar { height: 6px; border-radius: 99px; background: var(--bg-sunken); overflow: hidden; margin-top: 8px; }
.progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--violet)); transition: width .2s; }
.progress-note { font-size: 11px; color: var(--text-faint); margin-top: 7px; line-height: 1.5; }
.ai-banner { border: 1px solid color-mix(in srgb, var(--violet) 30%, var(--border)); background: linear-gradient(135deg, var(--violet-soft), var(--bg-elevated)); border-radius: 12px; padding: 12px 14px; margin-top: 16px; display: flex; gap: 11px; align-items: flex-start; }
.ai-banner .abic { width: 31px; height: 31px; border-radius: 9px; background: var(--bg-elevated); color: var(--violet); display: grid; place-items: center; flex: none; border: 1px solid var(--border); }
.ai-banner .abic svg { width: 17px; height: 17px; }
.ai-banner b { display: block; color: var(--heading); font-size: 13px; margin-bottom: 2px; }
.ai-banner span { display: block; color: var(--text-muted); font-size: 11.5px; line-height: 1.55; }
.ai-banner a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 940px) {
  .tool-layout { grid-template-columns: 1fr; }
  .side-panel { position: static; }
}
@media (max-width: 640px) {
  .format-grid { grid-template-columns: repeat(3, 1fr); }
  .opt-grid { grid-template-columns: 1fr; }
  .workspace-body { padding: 16px; }
  .workspace-head { padding: 15px 16px; }
  .tool-page { padding-top: 22px; }
  .tool-head { align-items: flex-start; }
}

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-top: 32px; }
.price-card { position: relative; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 23px 20px 20px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 14px 38px -25px rgba(79, 57, 246, .55), var(--shadow); }
.price-card .pc-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: .03em; }
.pc-name { font-size: 14px; font-weight: 750; color: var(--text); }
.pc-pages { font-size: 31px; font-weight: 850; letter-spacing: -.045em; color: var(--heading); line-height: 1.1; margin-top: 8px; }
.pc-pages span { font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--text-muted); margin-left: 4px; }
.pc-price { margin-top: 14px; font-size: 23px; font-weight: 800; color: var(--heading); font-variant-numeric: tabular-nums; }
.pc-per { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.pc-btn { width: 100%; margin-top: 17px; }
.pc-feats { list-style: none; padding: 14px 0 0; margin: 15px 0 0; border-top: 1px solid var(--border); display: grid; gap: 7px; }
.pc-feats li { position: relative; padding-left: 19px; font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.pc-feats li::before { content: "✓"; position: absolute; left: 2px; color: var(--local); font-weight: 800; }
.pricing-note { max-width: 760px; margin: 26px auto 0; text-align: center; font-size: 12.5px; color: var(--text-faint); line-height: 1.7; }
.compare { margin-top: 34px; }
.compare h2 { font-size: 22px; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare-card { padding: 21px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg-elevated); box-shadow: var(--shadow); }
.compare-card .cc-head { display: flex; align-items: center; gap: 9px; font-weight: 800; color: var(--heading); margin-bottom: 9px; }
.compare-card p { margin: 0; font-size: 13.5px; line-height: 1.72; color: var(--text-muted); }
.compare-card ul { margin: 11px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.65; color: var(--text-muted); }
@media (max-width: 1000px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } .compare-grid { grid-template-columns: 1fr; } }

/* ---------- account / login / welcome / legal ---------- */
.narrow-page { padding: 44px 0 10px; }
.auth-card { max-width: 470px; margin: 0 auto; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-lg); padding: 32px 30px 28px; text-align: center; }
.auth-card .auth-logo { width: 46px; height: 46px; margin: 0 auto 14px; }
.auth-card h1 { font-size: 27px; margin-bottom: 8px; }
.auth-card .auth-sub { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin-bottom: 22px; }
.gbtn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 16px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--bg-elevated); color: var(--text); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.gbtn:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-elevated); }
.gbtn svg { width: 19px; height: 19px; flex: none; }
.auth-note { margin: 17px 0 0; font-size: 12px; color: var(--text-faint); line-height: 1.65; }
.auth-note a { text-decoration: underline; text-underline-offset: 2px; }
.account { padding: 42px 0 10px; }
.account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.account-head .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 21px; font-weight: 800; overflow: hidden; }
.account-head .avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-head h1 { font-size: 28px; margin: 0 0 3px; }
.account-head p { margin: 0; color: var(--text-muted); font-size: 13.5px; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 15px 15px 13px; border: 1px solid var(--border); border-radius: 13px; background: var(--bg-elevated); }
.stat .st-label { font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
.stat .st-value { font-size: 29px; font-weight: 850; color: var(--heading); line-height: 1.1; margin-top: 5px; font-variant-numeric: tabular-nums; }
.stat .st-sub { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }
.account-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 20px; }
.account-card h2 { font-size: 16px; margin-bottom: 5px; }
.account-card .ac-sub { font-size: 12.5px; color: var(--text-faint); margin-bottom: 15px; line-height: 1.55; }
.purchase-list { display: grid; gap: 7px; }
.purchase-row { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 9px; background: var(--bg-sunken); font-size: 12.5px; }
.purchase-row .pr-main { flex: 1; }
.purchase-row b { color: var(--heading); }
.purchase-row .pr-date { color: var(--text-faint); font-size: 11px; margin-top: 1px; }
.purchase-row .pr-left { font-weight: 750; color: var(--local); font-variant-numeric: tabular-nums; }
.empty-small { padding: 17px 4px; color: var(--text-faint); font-size: 13px; text-align: center; }
@media (max-width: 760px) { .account-grid { grid-template-columns: 1fr; } .stat-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 480px) { .stat-grid { grid-template-columns: 1fr 1fr; } }

.legal { padding: 46px 0 20px; }
.legal h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 8px; }
.legal .lede { color: var(--text-muted); font-size: 16px; margin-bottom: 28px; }
.legal h2 { font-size: 20px; margin: 34px 0 8px; }
.legal h3 { font-size: 15.5px; margin: 22px 0 6px; }
.legal p, .legal li { font-size: 14.5px; line-height: 1.8; color: var(--text-muted); }
.legal ul { padding-left: 20px; }
.legal strong { color: var(--heading); }
.legal .updated { font-size: 12.5px; color: var(--text-faint); margin-bottom: 26px; }
.contact-card { max-width: 620px; margin: 0 auto; text-align: center; padding: 36px 30px; }
.contact-card .cic { width: 54px; height: 54px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 15px; }
.contact-card .cic svg { width: 26px; height: 26px; }
.contact-card h1 { font-size: 29px; }
.contact-card p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.contact-mail { display: inline-flex; margin: 8px 0 4px; padding: 13px 22px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 700; }
.contact-mail:hover { background: var(--accent-hover); color: #fff; }

/* ---------- login modal / global UI ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(20, 18, 14, .48); backdrop-filter: blur(3px); display: none; padding: 8vh 16px 20px; }
.modal-backdrop.open { display: block; }
.modal-card { max-width: 440px; margin: 0 auto; position: relative; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 28px 26px 24px; text-align: center; }
.modal-card h2 { font-size: 24px; margin-bottom: 8px; }
.modal-card .m-sub { color: var(--text-muted); font-size: 13.5px; line-height: 1.7; margin-bottom: 19px; }
.modal-x { position: absolute; right: 11px; top: 9px; border: 0; background: none; color: var(--text-faint); width: 33px; height: 33px; border-radius: 8px; cursor: pointer; font-size: 19px; }
.modal-x:hover { background: var(--bg-hover); color: var(--text); }
.modal-foot { margin-top: 16px; font-size: 12px; color: var(--text-faint); line-height: 1.65; }
.modal-foot a { text-decoration: underline; text-underline-offset: 2px; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.toast { padding: 11px 14px; border-radius: 10px; background: var(--bg-elevated); border: 1px solid var(--border); box-shadow: var(--shadow-lg); color: var(--text); font-size: 13px; line-height: 1.55; animation: toastin .2s ease-out; }
.toast.ok { border-color: color-mix(in srgb, var(--local) 35%, var(--border)); }
.toast.err { border-color: color-mix(in srgb, var(--err) 40%, var(--border)); color: var(--err); }
@keyframes toastin { from { opacity: 0; transform: translateY(6px); } }

/* ---------- misc ---------- */
.lang-dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 5px; display: none; }
.lang-dropdown.open { display: block; }
.lang-dropdown a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 7px; color: var(--text); font-size: 13px; }
.lang-dropdown a:hover { background: var(--bg-hover); }
.lang-dropdown a.on { color: var(--accent); font-weight: 700; }
.lang-dropdown .check { width: 14px; }
.lang-wrap { position: relative; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Converter-specific small screens: the two-column tool header and the
   format section label need to stack rather than squeeze. */
@media (max-width: 700px) {
  .tool-head { display: block; }
  .tool-head .head-actions { margin-top: 14px; }
  .tool-head p { max-width: 100%; }
  .tool-head h1 { font-size: 30px; }
  .section-label { flex-wrap: wrap; }
  #targetHint { flex-basis: 100%; margin-top: 2px; font-size: 10px; letter-spacing: .04em; }
  .format-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .file-row { align-items: flex-start; }
  .file-actions { align-self: center; }
}

/* PDF preparation hub */
.pdf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pdf-grid .feature { display: flex; flex-direction: column; }
.pdf-grid .feature p { flex: 1 1 auto; }
.pdf-grid .feature .btn { align-self: flex-start; margin-top: 15px; }
@media (max-width: 1000px) { .pdf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pdf-grid { grid-template-columns: 1fr; } }

/* PDF single-tool page */
.page-crumbs { margin-bottom: 16px; font-size: 13px; color: var(--text-faint); }
.page-crumbs a { color: var(--text-muted); font-weight: 600; }
.page-crumbs a:hover { color: var(--accent); }
#options .opt-grid { margin-top: 0; }
#options .opt-field + .opt-field { margin-top: 0; }
#options .engine-opt { margin-bottom: 7px; }
.file-arrow { border: 0; background: none; color: var(--text-faint); width: 27px; height: 27px; border-radius: 6px; cursor: pointer; font-size: 14px; line-height: 1; }
.file-arrow:hover { background: var(--bg-hover); color: var(--text); }
.file-arrow[disabled] { opacity: .25; cursor: default; }
