/* BookStyle unified site — minimal, neutral, Pretendard + JetBrains Mono (Gene's book-guide standard:
   ink #111827, body #374151, muted #6B7280, rules #E5E7EB). Reuses the kdp-showroom and theme-library look. */
@font-face { font-family: "Pretendard"; font-weight: 400; font-display: swap; src: url("fonts/Pretendard-Regular.subset.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 500; font-display: swap; src: url("fonts/Pretendard-Regular.subset.woff2") format("woff2"); } /* 500 shares the Regular file to save ~190 KB */
@font-face { font-family: "Pretendard"; font-weight: 600; font-display: swap; src: url("fonts/Pretendard-SemiBold.subset.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 700; font-display: swap; src: url("fonts/Pretendard-Bold.subset.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 700; font-display: swap; src: url("fonts/JetBrainsMono.subset.woff2") format("woff2"); }
:root {
  --font: "Pretendard", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ink: #111827; --body: #374151; --muted: #5B6371; --faint: #9CA3AF;
  --rule: #E5E7EB; --rule2: #D1D5DB; --soft: #F9FAFB; --soft2: #F3F4F6;
  --accent: #2563EB; --accent-ink: #1D4ED8; --tint: #EFF6FF;
  --ok: #047857; --ok-bg: #ECFDF5; --warn: #B45309; --warn-bg: #FFFBEB;
  --radius: 12px; --shadow: 0 1px 2px rgba(17,24,39,.05), 0 4px 16px rgba(17,24,39,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--body); background: #fff; font-size: 15px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
html[lang="en"] body { word-break: normal; overflow-wrap: break-word; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0; letter-spacing: -.01em; }
a { color: var(--accent-ink); }
img { max-width: 100%; height: auto; display: block; }
code, .mono { font-family: var(--mono); font-size: .88em; }
p code, li code, td code { background: var(--soft2); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* header */
.top { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 17px; margin-right: auto; white-space: nowrap; }
.brand .mark, .langpick .mark { width: 6px; height: 26px; background: var(--ink); border-radius: 3px; display: inline-block; }
.brand small { font-weight: 500; color: var(--muted); font-size: 13px; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 8px 11px; border-radius: 8px; color: var(--body); text-decoration: none; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--soft2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--soft2); color: var(--ink); font-weight: 600; }
.tools { display: flex; align-items: center; gap: 10px; flex: none; }
.langsw { display: inline-flex; border: 1px solid var(--rule2); border-radius: 999px; overflow: hidden; }
.langsw a { padding: 5px 11px; font: 600 13px var(--font); color: var(--muted); text-decoration: none; }
.langsw a[aria-current="true"] { background: var(--ink); color: #fff; }
.acct { font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.acct:hover { color: var(--ink); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-top: 26px; padding-bottom: 72px; min-height: 70vh; }
main.wide { max-width: 1440px; }

/* footer */
.foot { border-top: 1px solid var(--rule); background: var(--soft); color: var(--muted); font-size: 14px; }
.fgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding-top: 36px; padding-bottom: 24px; }
.fcol { display: flex; flex-direction: column; gap: 6px; }
.fcol h2 { font-size: 13px; color: var(--ink); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.fcol a { color: var(--body); text-decoration: none; } .fcol a:hover { color: var(--ink); text-decoration: underline; }
.fcol p { margin: 4px 0 0; }
.fbrand .brand { margin: 0; }
.fnote { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 14px; padding-bottom: 26px; font-size: 12.5px; }

/* generic */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 4px; color: var(--faint); }
.eyebrow { color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px; }
.code { font: 600 12.5px var(--mono); color: var(--muted); margin: 0 0 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--rule2); background: #fff; color: var(--ink); font: 600 14px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn .ext, .btn .pr { font: 500 12px var(--mono); opacity: .75; }
.btn.unset::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #F59E0B; margin-left: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 9px; border-radius: 999px; background: var(--soft2); color: var(--body); font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.plan { background: var(--soft2); color: var(--muted); border: 1px dashed var(--rule2); } .chip.blue { background: var(--tint); color: var(--accent-ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.section { margin-top: 56px; } .section.first { margin-top: 28px; }
.shead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.shead h2 { font-size: 22px; } .shead p { margin: 4px 0 0; }
.h3 { font-size: 16px; margin: 22px 0 10px; }
.panel { border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; background: #fff; min-width: 0; }
.panel h2 { font-size: 17px; margin-bottom: 12px; }
.panel.full { grid-column: 1 / -1; }
.notice { border: 1px solid #FDE68A; background: var(--warn-bg); color: #78350F; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 0 0 18px; }
.lead2 { font-size: 17px; max-width: 70ch; margin: 12px 0 0; }
.dhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.dhead > div:first-child { flex: 1 1 520px; min-width: 0; }
.dhead h1 { font-size: clamp(28px, 3.6vw, 38px); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.col { flex-direction: column; align-items: stretch; max-width: 340px; }
.actions.col p { margin: 2px 0 0; }
.two, .dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dgrid { margin-top: 28px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.ticks li { padding-left: 24px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 2px; color: var(--ok); font-weight: 700; }
.empty { padding: 30px; text-align: center; border: 1px dashed var(--rule2); border-radius: var(--radius); color: var(--muted); }

/* home */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 18px 0 8px; }
.hero h1 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.15; }
.hero .lead { font-size: 17px; margin: 18px 0 24px; max-width: 58ch; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.fan { position: relative; height: 400px; }
.fan a { position: absolute; width: 42%; top: 0; transition: transform .2s; }
.fan img { width: 100%; border-radius: 4px; box-shadow: 0 14px 40px rgba(17,24,39,.22); border: 1px solid var(--rule); background: #fff; }
.fan a:nth-child(1) { left: 2%; top: 50px; transform: rotate(-6deg); }
.fan a:nth-child(2) { left: 29%; top: 0; z-index: 2; }
.fan a:nth-child(3) { right: 2%; top: 50px; transform: rotate(6deg); }
.fan a:hover { z-index: 3; transform: translateY(-4px); }
.stats { list-style: none; padding: 18px 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stats li { text-align: center; } .stats b { display: block; font-size: 26px; color: var(--ink); font-weight: 700; line-height: 1.2; } .stats span { color: var(--muted); font-size: 13px; }
.axes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.axis { border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.axis h3 { font-size: 20px; } .axis p { margin: 0; }
.minis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; width: 100%; }
.minis img { border: 1px solid var(--rule); border-radius: 3px; box-shadow: 0 2px 6px rgba(17,24,39,.08); }
.catlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; width: 100%; }
.catlist a { text-decoration: none; color: var(--ink); } .catlist a:hover { text-decoration: underline; }
.catlist b { font: 600 12px var(--mono); color: var(--muted); margin-right: 6px; }
.band { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: center; background: var(--soft); border: 1px solid var(--rule); border-radius: var(--radius); padding: 30px; }
.bandtext h2 { font-size: 22px; } .bandtext p { margin: 12px 0 18px; }
.bandimgs { display: flex; gap: 14px; justify-content: center; }
.bandimgs img { width: 30%; max-width: 200px; border: 1px solid var(--rule); box-shadow: 0 8px 24px rgba(17,24,39,.14); background: #fff; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: s; }
.steps li { border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 18px 18px 56px; position: relative; counter-increment: s; display: flex; flex-direction: column; gap: 4px; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 13px/28px var(--font); text-align: center; }
.steps b { color: var(--ink); }
.tiers-mini { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 8px; }
.tiers-mini li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.tiers-mini .amt { font: 700 15px var(--mono); color: var(--ink); text-align: right; }
.tiers-mini .small { grid-column: 1 / -1; }
.links { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.links li { display: flex; flex-direction: column; }
.links a { font-weight: 600; }

/* product cards */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pcard { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; background: #fff; transition: box-shadow .15s, border-color .15s, transform .15s; }
.pcard:hover { box-shadow: var(--shadow); border-color: var(--rule2); transform: translateY(-2px); }
.pcard .thumb { background: var(--soft2); height: 280px; display: flex; align-items: center; justify-content: center; padding: 18px; border-bottom: 1px solid var(--rule); }
.pcard .thumb img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; box-shadow: 0 6px 18px rgba(17,24,39,.18); border-radius: 2px; background: #fff; }
.pcard .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.pcard .code { margin: 0; justify-content: space-between; }
.pcard .ptitle { font-size: 17px; color: var(--ink); }
.pcard .cat { font-size: 13px; color: var(--muted); margin-top: -2px; }
.pcard .dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 6px 0 0; font-size: 13px; }
.pcard .dl span:nth-child(odd) { color: var(--muted); } .pcard .dl span:nth-child(even) { color: var(--ink); font-weight: 500; text-align: right; }
.pcard .theme { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--rule); font-size: 13px; display: flex; align-items: center; gap: 7px; }
.pcard .theme b { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); flex: none; }

/* theme cards */
.tgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.tgrid.small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.tcard a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s; }
.tcard a:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tcard .thumb { display: block; background: var(--soft2); padding: 12px 12px 0; }
.tcard .thumb img { width: 100%; aspect-ratio: 340 / 465; object-fit: cover; object-position: top; box-shadow: 0 4px 12px rgba(17,24,39,.12); border-radius: 2px 2px 0 0; }
.tcard .tbody { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.tcard .code { margin: 0; justify-content: space-between; font-size: 11.5px; }
.tcard .tname { color: var(--ink); font-size: 15px; line-height: 1.3; }
.tcard .fam { color: var(--muted); font-size: 12.5px; }
.small-chip { min-height: 20px; font-size: 11px; padding: 0 7px; }
.sws { display: flex; gap: 3px; margin-top: 4px; }
.sws i { width: 16px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.tcard[hidden] { display: none; }

/* filters */
.tfilters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin: 0 0 20px; padding: 14px; background: var(--soft); border: 1px solid var(--rule); border-radius: var(--radius); }
.tfilters input[type="search"], .tfilters select { height: 38px; border: 1px solid var(--rule2); border-radius: 10px; padding: 0 10px; font: 14px var(--font); color: var(--ink); background: #fff; max-width: 100%; }
.fsearch { flex: 1 1 240px; } .fsearch input { width: 100%; }
.fsel { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.fsel select { min-width: 110px; }
.tfilters .tog { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; cursor: pointer; height: 38px; }
.tfilters .count { margin-left: auto; font-size: 13px; color: var(--muted); align-self: center; }

/* theme detail */
.tpv { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tpv.four { grid-template-columns: repeat(4, 1fr); } .tpv.six { grid-template-columns: repeat(6, 1fr); }
.tpv li { display: flex; flex-direction: column; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.tpv button, .pages button, .wrapbtn { border: 0; padding: 0; background: none; cursor: zoom-in; width: 100%; display: block; }
.tpv img { width: 100%; border: 1px solid var(--rule); box-shadow: 0 4px 14px rgba(17,24,39,.10); background: #fff; }
.specimen { margin: 18px 0 0; border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; background: #fff; }
.specimen img { margin: 0 auto; max-width: 880px; width: 100%; }
.specimen figcaption { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th { text-align: left; font-weight: 500; color: var(--muted); padding: 7px 12px 7px 0; width: 34%; vertical-align: top; border-bottom: 1px solid var(--rule); }
.specs td { padding: 7px 0; color: var(--ink); border-bottom: 1px solid var(--rule); }
.specs td .chip { margin: 0 4px 4px 0; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.palette { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.palette li { display: flex; gap: 10px; align-items: center; }
.palette i { width: 40px; height: 40px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); flex: none; }
.palette span { display: flex; flex-direction: column; font-size: 13px; } .palette b { color: var(--ink); font-weight: 600; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.tbl thead th { background: var(--soft); color: var(--muted); font-weight: 600; font-size: 12px; }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.tbl td.id { font: 600 12.5px var(--mono); white-space: nowrap; } .tbl td.nw { white-space: nowrap; }
.tablewrap { border: 1px solid var(--rule); border-radius: var(--radius); overflow-x: auto; }
.tablewrap .tbl tr:last-child td { border-bottom: 0; }
.buybox { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; background: var(--soft); margin-top: 20px; }
.buybox > div:first-child { flex: 1 1 420px; } .buybox p { margin: 8px 0 0; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 20px; }
.plist li { display: flex; gap: 8px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--rule); padding: 7px 0; font-size: 14px; }
.plist a { color: var(--ink); text-decoration: none; } .plist a:hover { text-decoration: underline; }
.plist code { color: var(--muted); margin-right: 6px; }
.pnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.pnav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.newbook { border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.newbook h2 { font-size: 20px; margin-bottom: 10px; }
.nbsteps { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 4px; }
.nbform { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 16px; }
.nbform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; }
.nbform input, .nbform select, .nbform textarea { font: 14px var(--font); border: 1px solid var(--rule2); border-radius: 8px; padding: 8px 10px; color: var(--ink); background: #fff; width: 100%; }
.nbform .full { grid-column: 1 / -1; } .nbform .check { flex-direction: row; align-items: center; font-weight: 500; grid-column: span 2; }
.nbform .check input { width: auto; } .nbform .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.nbform .help { font-weight: 400; color: var(--muted); font-size: 12px; }
.filelist { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 16px; font-size: 13px; }
.filelist li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--rule); padding: 4px 0; min-width: 0; }
.filelist code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist button { border: 0; background: none; color: var(--accent-ink); cursor: pointer; font: 13px var(--font); padding: 0; white-space: nowrap; }
.pcode summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 12px; }
.pcode pre { max-height: 300px; overflow: auto; background: var(--soft); border: 1px solid var(--rule); border-radius: 8px; padding: 12px; font: 12px/1.5 var(--mono); }
.note { font-size: 13px; color: var(--ok); }

/* templates */
.ctiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ctile { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.ctile:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.cimg { background: var(--soft2); height: 200px; display: flex; align-items: center; justify-content: center; padding: 16px; border-bottom: 1px solid var(--rule); }
.cimg img { max-height: 100%; width: auto; box-shadow: 0 6px 18px rgba(17,24,39,.18); }
.cbody { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cbody b { color: var(--ink); font-size: 16px; } .cbody .code { margin: 0; }
.cnt { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--ok); font-weight: 600; }
.catnav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--rule); }
.catnav a { font-size: 13px; padding: 6px 12px; border: 1px solid var(--rule2); border-radius: 999px; text-decoration: none; color: var(--body); }
.catnav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tbl.plan td { font-size: 13.5px; }

/* product detail */
.wrapbox { background: var(--soft2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px; margin: 0; }
.wrapbox img { margin: 0 auto; width: 100%; box-shadow: 0 10px 30px rgba(17,24,39,.18); background: #fff; }
.wraplab { display: flex; margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }
.wraplab span { border-top: 2px solid var(--rule2); padding-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wraplab span.sp { border-top-color: var(--ink); color: var(--ink); font-weight: 600; overflow: visible; }
.wrapbox figcaption { margin-top: 8px; text-align: center; }
.pages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.pages li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pages img { width: 100%; border: 1px solid var(--rule); box-shadow: 0 2px 8px rgba(17,24,39,.08); background: #fff; }
.pages span { font: 12px var(--mono); color: var(--muted); }
.viewer { width: 100%; height: 760px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--soft2); }
.files { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.files li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "ic fn sz" "ic desc sz"; gap: 0 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.files .ic { grid-area: ic; text-align: center; font: 700 10px var(--mono); padding: 3px 0; border-radius: 5px; background: var(--soft2); color: var(--muted); text-transform: uppercase; }
.files .ic.pdf { background: #FEF2F2; color: #B91C1C; } .files .ic.docx { background: var(--tint); color: var(--accent-ink); }
.files .fn { grid-area: fn; color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .desc { grid-area: desc; color: var(--muted); font-size: 12px; } .files .sz { grid-area: sz; color: var(--muted); font: 12px var(--mono); }
details summary { cursor: pointer; color: var(--muted); padding: 8px 0 0; font-size: 13px; }
.styles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.styles li { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.styles li.cur { border-color: var(--ink); }
.styles a { text-decoration: none; color: var(--ink); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.styles .thumb img { width: 100%; aspect-ratio: 340/465; object-fit: cover; object-position: top; border: 1px solid var(--rule); }
.styles b { font: 600 12px var(--mono); color: var(--muted); }
.listing { margin: 0; } .listing img { border: 1px solid var(--rule); border-radius: 8px; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(17,24,39,.9); display: flex; align-items: center; justify-content: center; padding: 30px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; max-width: 92vw; width: auto; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lbbar { position: absolute; top: 14px; right: 18px; display: flex; gap: 8px; }
.lbbar button { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 8px; height: 40px; min-width: 40px; font: 600 18px var(--font); cursor: pointer; }
.lbcap { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; color: #E5E7EB; font: 13px var(--mono); margin: 0; }

/* textbooks + guide */
.fams { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.famcard { display: flex; flex-direction: column; gap: 6px; height: 100%; border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; text-decoration: none; color: inherit; }
.famcard:hover { box-shadow: var(--shadow); }
.famcard b { color: var(--ink); } .famimgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 4px; }
.famimgs img { border: 1px solid var(--rule); aspect-ratio: 340/465; object-fit: cover; object-position: top; }
.gcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gcard { display: flex; flex-direction: column; gap: 10px; height: 100%; border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--body); }
.gcard:hover { box-shadow: var(--shadow); } .gcard b { font-size: 18px; color: var(--ink); } .gcard .more { margin-top: auto; color: var(--accent-ink); font-weight: 600; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact { border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.fact .k { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .03em; }
.fact .v { font-size: 22px; font-weight: 700; color: var(--ink); }
.fact p { margin: 2px 0 6px; font-size: 13px; } .fact a { font-size: 12px; margin-top: auto; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sources li { display: flex; gap: 12px; align-items: baseline; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 14px; }
.sources b { font-size: 13px; color: var(--ink); flex: none; width: 210px; }
.legal { max-width: 820px; } .lsec { margin-top: 26px; } .lsec h2 { font-size: 18px; margin-bottom: 8px; } .lsec p { margin: 0 0 8px; }
.faq { max-width: 860px; display: grid; gap: 10px; }
.qa { border: 1px solid var(--rule); border-radius: 10px; padding: 0 16px; }
.qa summary { color: var(--ink); font-weight: 600; font-size: 15px; padding: 14px 0; }
.qa p { margin: 0 0 14px; }

/* pricing */
.tiers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tier { border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.tier.best { border: 2px solid var(--ink); }
.tier h2 { font-size: 18px; } .tier p { margin: 0; }
.tier .amt { font-size: 32px; font-weight: 700; color: var(--ink); display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.tier .amt small { font-size: 14px; color: var(--muted); font-weight: 500; }
.tier .amt .chip { font-size: 11px; }
.tier .ticks { font-size: 14px; margin: 8px 0; }
.tcta { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.tbl.cmp th:first-child, .tbl.cmp tbody th { text-align: left; font-weight: 500; color: var(--ink); background: none; font-size: 13.5px; }
.tbl.cmp td { text-align: center; }
.pending { scroll-margin-top: 80px; }
.pending:target { border-color: #F59E0B; box-shadow: 0 0 0 3px #FDE68A; }

/* root + admin */
body.root { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: var(--soft); }
.langpick { text-align: center; padding: 40px 20px; }
.langpick h1 { font-size: 30px; margin: 12px 0 6px; }
.picks { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.picks a { display: flex; flex-direction: column; gap: 4px; min-width: 220px; padding: 22px; border: 1px solid var(--rule2); border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--muted); }
.picks a:hover { border-color: var(--ink); } .picks b { color: var(--ink); font-size: 20px; }
.tstats { list-style: none; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.tstats li { border: 1px solid var(--rule); border-radius: 10px; padding: 10px 16px; min-width: 120px; }
.tstats b { display: block; font-size: 22px; color: var(--ink); line-height: 1.2; } .tstats span { font-size: 12px; color: var(--muted); }
#atable tr.rep td:first-child { color: #D97706; }

/* responsive */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .ctiles { grid-template-columns: repeat(2, 1fr); }
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .fams { grid-template-columns: repeat(3, 1fr); }
  .pages { grid-template-columns: repeat(4, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .tpv.six { grid-template-columns: repeat(3, 1fr); }
  .nbform { grid-template-columns: repeat(2, 1fr); }
  .brand small { display: none; }
}
@media (max-width: 860px) {
  .top .wrap { height: auto; padding-top: 10px; padding-bottom: 8px; flex-wrap: wrap; gap: 6px 12px; }
  .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -6px; }
  .hero, .axes, .two, .dgrid, .band { grid-template-columns: 1fr; }
  .fan { height: 300px; max-width: 480px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .fgrid { grid-template-columns: 1fr 1fr; }
  .tpv, .tpv.four { grid-template-columns: repeat(2, 1fr); }
  .gcards { grid-template-columns: 1fr; }
  .viewer { height: 560px; }
  .wrapbox { padding: 12px; }
  .tfilters .count { margin-left: 0; width: 100%; }
  .actions.col { max-width: none; width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 18px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pcard .thumb { height: 190px; padding: 10px; }
  .pcard .dl { display: none; }
  .pcard .body { padding: 10px 12px 12px; }
  .pcard .ptitle { font-size: 15px; }
  .pcard .theme { font-size: 12px; }
  .tgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tgrid.small { grid-template-columns: repeat(2, 1fr); }
  .minis { grid-template-columns: repeat(3, 1fr); }
  .catlist { grid-template-columns: 1fr; }
  .ctiles, .tiers, .fams, .facts { grid-template-columns: 1fr; }
  .pages { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .tpv.six { grid-template-columns: repeat(2, 1fr); }
  .nbform { grid-template-columns: 1fr; } .nbform .check { grid-column: auto; }
  .fgrid { grid-template-columns: 1fr 1fr; gap: 20px; } .fbrand { grid-column: 1 / -1; }
  .sources li { flex-direction: column; gap: 2px; } .sources b { width: auto; }
  .palette { grid-template-columns: 1fr 1fr; }
  .fsel { flex: 1 1 45%; } .fsel select { width: 100%; min-width: 0; }
  .band { padding: 18px; }
  .stats b { font-size: 22px; }
  .hero h1 { font-size: 32px; }
  .fan { height: 240px; }
  .acct { display: none; }
  .filelist { grid-template-columns: 1fr; }
  .specs th { width: 40%; }
  .buybox .actions .btn { width: 100%; }
}

/* fixes after screenshot review */
.tgrid.five { grid-template-columns: repeat(5, 1fr); }
.plist li > a, .plist li > span:not(.chip) { flex: 1; min-width: 0; }
.sources a { min-width: 0; overflow-wrap: anywhere; word-break: break-all; }
.panel .tablewrap { border: 0; border-radius: 0; }
@media (max-width: 1100px) { .tgrid.five { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) {
  .tgrid.five { grid-template-columns: repeat(3, 1fr); }
  .nav { flex-wrap: wrap; overflow: visible; margin: 0 -8px; gap: 0; }
  .nav a { padding: 6px 8px; font-size: 14px; }
}
@media (max-width: 560px) { .tgrid.five { grid-template-columns: repeat(2, 1fr); } }
.plist li { justify-content: flex-start; }
.plist li > .chip { margin-left: auto; }
.cmp thead th:not(:first-child), .cmp td { text-align: center; }
.wraplab { color: var(--body); }
.cmp { min-width: 600px; } .cmp thead th, .cmp td { white-space: nowrap; }
.tpv img { aspect-ratio: 1000 / 1366; }
.files .ic { color: var(--body); } .files .ic.pdf { color: #991B1B; }
.wrapbox figcaption, .wrapbox figcaption.muted { color: var(--body); }
