/* CV Once site styles. Calm, professional: warm paper, deep teal ink, a terracotta accent used sparingly.
   System fonts only. The CV templates themselves live in cv.css. */
:root {
  --bg: #f6f4ef; --surface: #ffffff; --surface-2: #efece5; --tint: #e3edf0; --ink: #1b2530; --muted: #5a6570; --line: #e0dbd1;
  --brand: #1d4b5c; --brand-2: #2b6b80; --brand-ink: #ffffff; --accent: #c2693e; --accent-ink: #7a3a1b;
  --ok: #2c7a4b; --note: #8a5a00; --issue: #b3261e; --note-bg: #fbf3e2; --issue-bg: #fbe9e7; --ok-bg: #e6f3eb;
  --shadow: 0 1px 2px rgba(20, 30, 40, .06), 0 6px 20px rgba(20, 30, 40, .07);
  --sheet-shadow: 0 1px 3px rgba(20, 30, 40, .12), 0 12px 32px rgba(20, 30, 40, .12);
  --radius: 10px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Charter, "Bitstream Charter", "Iowan Old Style", Georgia, Cambria, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1417; --surface: #172026; --surface-2: #1d272e; --tint: #1f3139; --ink: #e5e9ec; --muted: #9ba8b2; --line: #2a363e;
    --brand: #8cc3d4; --brand-2: #a9d5e2; --brand-ink: #0c1a20; --accent: #e39a72; --accent-ink: #f1b896;
    --ok: #79c99a; --note: #e6b85c; --issue: #ff8f86; --note-bg: #2c2615; --issue-bg: #33191a; --ok-bg: #15291e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --sheet-shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .35);
  }
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: var(--brand-2); text-underline-offset: 2px; }
@media (prefers-color-scheme: light) { a { color: #1f5f75; } }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); margin-top: .4em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.js-only { display: none; }
html.js .js-only { display: revert; }
html.js .no-js { display: none; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand b { color: var(--accent); font-weight: 700; }
.brand .logo { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); padding: 7px 11px; border-radius: 8px; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--tint); }
.nav a.nav-cta { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.nav a.nav-cta:hover { background: var(--brand-2); }
@media (max-width: 560px) {
  .bar { min-height: 54px; gap: 8px; }
  .brand span { display: none; }
  .nav a { padding: 6px 8px; font-size: .9rem; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: .97rem; font-weight: 600; line-height: 1.2;
  padding: 11px 18px; border-radius: 9px; border: 1px solid transparent; background: var(--brand); color: var(--brand-ink); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-2); color: var(--brand-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.small { padding: 6px 11px; font-size: .88rem; border-radius: 7px; }
.btn.warm { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.warm { color: #1b0d05; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* hero */
.hero { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 52px; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.25rem); margin: 0 0 .35em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-bottom: 1.4em; }
.hero-points { list-style: none; padding: 0; margin: 1.6em 0 0; display: grid; gap: 8px; color: var(--muted); font-size: .96rem; }
.hero-points li { padding-left: 26px; position: relative; }
.hero-points li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.hero-stack { position: relative; height: 470px; }
.hero-stack .sheetbox { position: absolute; }
.hero-stack .s1 { left: 0; top: 34px; transform: rotate(-3deg); }
.hero-stack .s2 { right: 0; top: 0; transform: rotate(2.2deg); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 30px; padding-bottom: 30px; gap: 22px; }
  .hero-stack { height: 300px; }
}

/* scaled CV sheets. --s is the scale; JS refines it to fit, CSS gives sane defaults. */
.sheetbox { --pw: 793.7px; --ph: 1122.5px; --s: .4; width: calc(var(--pw) * var(--s)); height: calc(var(--ph) * var(--s)); overflow: hidden;
  background: #fff; box-shadow: var(--sheet-shadow); border-radius: 3px; flex: none; }
.sheetbox.p-letter { --pw: 816px; --ph: 1056px; }
.sheetscale { width: var(--pw); transform: scale(var(--s)); transform-origin: 0 0; }
.sheetscale .cv { min-height: var(--ph); }
.hero-stack .sheetbox { --s: .42; }
@media (max-width: 900px) { .hero-stack .sheetbox { --s: .27; } .hero-stack .s1 { left: 4%; } .hero-stack .s2 { right: 4%; } }
.sheetbox.full { --s: 1; height: auto; overflow: visible; max-width: 100%; }
html.js .sheetbox.full { overflow: hidden; }
.sheetwrap { overflow-x: auto; padding: 4px 4px 14px; }
.sheetbox.thumb { --s: .3; }
.sheetbox a { pointer-events: none; }
.sheetbox.full a { pointer-events: auto; }

/* sections and cards */
.band { padding: 54px 0; }
.band.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band h2 { margin-top: 0; }
.band-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.band-head h2, .band-head p { margin-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.band.alt .step { background: var(--bg); }
.step h3 { margin: 10px 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: .96rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.privacy-panel { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; background: var(--tint); border-radius: 14px; padding: 28px 30px; }
.privacy-panel h2 { margin: 0 0 .4em; }
.privacy-panel p { margin: 0 0 .6em; }
.privacy-panel code { font-family: var(--mono); font-size: .88em; background: var(--surface); padding: 1px 6px; border-radius: 5px; }
@media (max-width: 640px) { .privacy-panel { grid-template-columns: 1fr; padding: 22px; } }

.tgrid { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 22px; }
.tgrid > * { flex: 0 1 calc((100% - 3 * 22px) / 4); min-width: 0; }   /* 4 / 2 columns, short last row centred (PARK-56) */
@media (max-width: 760px) { .tgrid > * { flex-basis: calc((100% - 22px) / 2); } }
.tcard, .excard { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.tcard .sheetbox, .excard .sheetbox { --s: .28; width: 100%; height: auto; aspect-ratio: 210 / 297; transition: transform .18s ease, box-shadow .18s ease; }
.tcard .sheetbox.p-letter, .excard .sheetbox.p-letter { aspect-ratio: 8.5 / 11; }
.tcard:hover .sheetbox, .excard:hover .sheetbox { transform: translateY(-3px); box-shadow: 0 2px 6px rgba(20, 30, 40, .14), 0 18px 40px rgba(20, 30, 40, .16); }
.tcard-body { display: flex; flex-direction: column; gap: 2px; }
.tcard-name { font-weight: 650; font-size: 1.04rem; }
.tcard-tags { font-size: .86rem; color: var(--muted); }
.tcard-best { font-size: .9rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .tcard .sheetbox, .excard .sheetbox { transition: none; } .tcard:hover .sheetbox, .excard:hover .sheetbox { transform: none; } }

.ggrid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.ggrid > * { flex: 0 1 calc((100% - 3 * 14px) / 4); min-width: 0; }   /* 4 / 2 / 1 columns, short last row centred (PARK-56) */
@media (max-width: 900px) { .ggrid > * { flex-basis: calc((100% - 14px) / 2); } }
@media (max-width: 560px) { .ggrid > * { flex-basis: 100%; } }
.gcard { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.band.alt .gcard { background: var(--bg); }
.gcard:hover { border-color: var(--brand-2); color: var(--ink); }
.gcard-t { font-weight: 650; line-height: 1.3; }
.gcard-s { font-size: .9rem; color: var(--muted); line-height: 1.45; }
.ggroup + .ggroup { margin-top: 34px; }
.ggroup h2 { margin: 0 0 4px; }
.ggroup > p { color: var(--muted); }

/* quick check on the home page */
.quick { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.quick label { font-weight: 600; display: block; margin-bottom: 6px; }
.quick textarea { width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); min-height: 74px; resize: vertical; }
.quick-out { margin-top: 12px; min-height: 2em; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
@media (max-width: 820px) { .quick-grid { grid-template-columns: 1fr; } }

/* findings */
.flist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.f { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 10px 12px; border-radius: 8px; background: var(--note-bg); font-size: .93rem; line-height: 1.45; }
.f.issue { background: var(--issue-bg); }
.f .sev { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--note); padding-top: 2px; }
.f.issue .sev { color: var(--issue); }
.f .where { grid-column: 2; font-size: .84rem; color: var(--muted); }
.f q { font-style: italic; }
.f a, .f button.go { color: var(--brand-2); }
.okmsg { background: var(--ok-bg); color: var(--ok); padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; }

/* breadcrumbs */
.crumbs ol { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 6px 0 2px; }
.crumbs a { color: var(--muted); }

/* articles (guides) */
.article { padding-bottom: 40px; }
.article h1 { margin-top: .3em; }
.article h2 { margin-top: 1.7em; }
.article li { margin: .25em 0; }
.article blockquote { margin: 1.1em 0; padding: 12px 16px; border-left: 4px solid var(--line); background: var(--surface); border-radius: 0 8px 8px 0; }
.article blockquote p:last-child { margin-bottom: 0; }
.article .bq-before { border-left-color: var(--issue); background: var(--issue-bg); margin-bottom: 4px; }
.article .bq-after { border-left-color: var(--ok); background: var(--ok-bg); margin-top: 0; }
.article .bq-tip { border-left-color: var(--brand-2); background: var(--tint); }
.article .bq-watch-out { border-left-color: var(--note); background: var(--note-bg); }
.article code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.article a.ext::after { content: " ↗"; font-size: .8em; }
.tablewrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.tbl { border-collapse: collapse; width: 100%; font-size: .93rem; line-height: 1.45; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tbl thead th { background: var(--surface-2); font-weight: 650; white-space: nowrap; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl.small { font-size: .86rem; }
.ok { color: var(--ok); font-weight: 600; }
.bad { color: var(--issue); font-weight: 600; }
.lim { color: var(--note); font-weight: 600; }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.guide-side { position: sticky; top: 80px; display: grid; gap: 18px; padding-top: 28px; }
.sidebox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-size: .93rem; }
.sidebox h2 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.sidebox ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.sidebox a[aria-current] { font-weight: 650; color: var(--ink); text-decoration: none; }
.trybox { background: var(--tint); border-radius: var(--radius); padding: 16px 18px; }
.trybox p { margin: 0 0 10px; font-size: .93rem; }
@media (max-width: 960px) { .guide-layout { grid-template-columns: 1fr; gap: 0; } .guide-side { position: static; padding-top: 0; } }
.verbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 1em 0; }
.verbs details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.verbs summary { cursor: pointer; font-weight: 650; }
.verbs dl { margin: 10px 0 0; font-size: .92rem; }
.verbs dt { font-weight: 650; margin-top: 8px; }
.verbs dd { margin: 0; color: var(--muted); }
.weak-table td:first-child { white-space: nowrap; }

/* template + example pages */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; margin-top: 10px; }
.doc-side { display: grid; gap: 18px; position: sticky; top: 80px; }
@media (max-width: 1000px) { .doc-layout { grid-template-columns: 1fr; } .doc-side { position: static; } }
.paper-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.paper-toggle button { font: inherit; font-size: .9rem; border: 0; background: var(--surface); color: var(--ink); padding: 6px 14px; cursor: pointer; }
.paper-toggle button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.notes { padding-left: 1.2em; }
.notes li { margin-bottom: .6em; }
.plain { white-space: pre-wrap; font-family: var(--mono); font-size: .82rem; line-height: 1.5; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; overflow-x: auto; max-height: 520px; }
details.more { margin: 18px 0; }
details.more > summary { cursor: pointer; font-weight: 600; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .93rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* footer */
.foot { margin-top: 60px; background: var(--surface); border-top: 1px solid var(--line); padding: 36px 0 28px; font-size: .93rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; }
.foot-grid a { display: block; color: var(--ink); text-decoration: none; padding: 3px 0; }
.foot-grid a:hover { color: var(--accent-ink); }
.foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1.05rem; }
.foot-brand b { color: var(--accent); }
.foot-h { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.foot .tm { margin-top: 26px; color: var(--muted); font-size: .84rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }

@media print {
  .top, .foot, .skip, .crumbs, .doc-side, .paper-toggle, .btn { display: none !important; }
  body { background: #fff; }
}

/* ================= builder ================= */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.builder-page main { max-width: none; padding: 0; }
.nojs-box { padding: 40px 20px; }
.app { --top-h: 60px; }
.app-top { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.app-doc { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 320px; }
.cv-name-input { font: inherit; font-weight: 650; font-size: 1rem; border: 1px solid transparent; background: transparent; color: var(--ink); padding: 5px 8px; border-radius: 7px; min-width: 0; flex: 1 1 auto; max-width: 340px; }
.cv-name-input:hover, .cv-name-input:focus { border-color: var(--line); background: var(--bg); }
.save-status { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.app-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tool { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.tool select, .field select { font: inherit; font-size: .9rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; }
.accents { border: 0; margin: 0; padding: 0; display: inline-flex; gap: 5px; }
.swatch { position: relative; display: inline-block; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch span:not(.vh) { display: block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.swatch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: "▾"; font-size: .8em; margin-left: 2px; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; width: 270px; display: grid; }
.menu-list button { display: grid; text-align: left; gap: 1px; font: inherit; background: none; border: 0; color: var(--ink); padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.menu-list button span { font-size: .82rem; color: var(--muted); }
.menu-list button:hover, .menu-list button:focus-visible { background: var(--surface-2); }

.app-tabs { display: flex; gap: 2px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.app-tabs [role="tab"] { font: inherit; font-size: .93rem; font-weight: 600; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 10px 14px 9px; cursor: pointer; white-space: nowrap; }
.app-tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.badge { display: inline-block; min-width: 1.5em; padding: 0 6px; border-radius: 99px; font-size: .78rem; line-height: 1.5; text-align: center; }
.badge.issue { background: var(--issue); color: #fff; }
.badge.note { background: var(--note-bg); color: var(--note); border: 1px solid currentColor; }
@media (prefers-color-scheme: dark) { .badge.issue { color: #1d0b0a; } }

.app-panes { display: grid; grid-template-columns: minmax(420px, 46%) 1fr; }
@media (min-width: 1000px) {
  body.builder-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
  body.builder-page main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  html.js body.builder-page .app { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  body.builder-page .app-panes { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  body.builder-page .pane-preview, body.builder-page .preview-scroll, body.builder-page .pane-left { min-height: 0; }
}
.pane-left { overflow-y: auto; padding: 16px 18px 80px; border-right: 1px solid var(--line); }
.pane-preview { display: flex; flex-direction: column; min-width: 0; background: var(--surface-2); }
.preview-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.page-count { font-size: .88rem; color: var(--muted); }
.preview-scroll { overflow: auto; padding: 18px 12px 60px; flex: 1; }
.preview-box { --s: .6; position: relative; margin: 0 auto; }
#preview { width: 793.7px; transform: scale(var(--s)); transform-origin: 0 0; box-shadow: var(--sheet-shadow); }
.paper-letter#preview, #preview:has(.paper-letter) { width: 816px; }
#preview .cv { min-height: 0; }
#page-guides { position: absolute; inset: 0; pointer-events: none; }
.pg-break { position: absolute; left: -6px; right: -6px; height: 0; border-top: 2px dashed var(--accent); transform: scaleY(1); }
.pg-break span { position: absolute; right: 8px; top: -11px; font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; padding: 1px 7px; border-radius: 99px; }
.measure { position: fixed; left: -12000px; top: 0; visibility: hidden; pointer-events: none; }
.measure .cv { width: auto !important; min-height: 0 !important; padding: 0 !important; }
.tab-preview { display: none; }
@media (max-width: 999px) {
  .app-panes { display: block; height: auto; min-height: 0; }
  .pane-left { border-right: 0; overflow: visible; padding: 14px 14px 40px; }
  .pane-preview { display: none; min-height: 70vh; }
  .app.show-preview .pane-preview { display: flex; }
  .app.show-preview .pane-left { display: none; }
  .tab-preview { display: inline-block; }
  .app-top { padding: 10px 14px; }
  .cv-name-input { max-width: none; }
}
@media (max-width: 560px) {
  .tool { font-size: 0; gap: 0; }
  .tool select { font-size: .88rem; max-width: 128px; }
  .accents { order: 9; width: 100%; }
  .app-tabs [role="tab"] { padding: 10px 10px 9px; font-size: .9rem; }
}

.panel-intro p { margin: 0 0 8px; font-size: .93rem; }
.banner { background: var(--tint); border-radius: 9px; padding: 10px 13px; font-size: .92rem; margin-bottom: 14px; }
.banner.warn { background: var(--issue-bg); color: var(--ink); }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--brand-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; }
.ed-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.ed-card.is-hidden { opacity: .62; border-style: dashed; }
.ed-h { font-family: var(--sans); font-size: 1rem; margin: 0 0 10px; }
.sub-h { font-weight: 650; font-size: .93rem; margin: 14px 0 6px; }
.sub-h small { font-weight: 400; color: var(--muted); }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.field { display: grid; gap: 4px; font-size: .84rem; color: var(--muted); grid-column: 1 / -1; min-width: 0; }
.field.half { grid-column: auto; }
.field.wide { grid-column: 1 / -1; }
.field.inline { display: inline-grid; }
.field input, .field textarea { font: inherit; font-size: .95rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; width: 100%; min-width: 0; }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .tool select:focus { border-color: var(--brand-2); outline: 2px solid color-mix(in srgb, var(--brand-2) 30%, transparent); outline-offset: 0; }
.field small { font-size: .8rem; }
@media (max-width: 560px) { .ed-grid { grid-template-columns: 1fr; } .field.half { grid-column: 1 / -1; } }
.link-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
@media (max-width: 560px) { .link-row { grid-template-columns: 1fr auto; } .link-row .field:nth-child(2) { grid-column: 1; } }
.photo-row { display: flex; gap: 14px; align-items: flex-start; }
.photo-row > div { display: grid; gap: 8px; justify-items: start; }
.photo-thumb { width: 72px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.photo-thumb.empty { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--bg) 6px, var(--bg) 12px); }
.file-btn { position: relative; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--ink); }
.sec-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sec-title { font: inherit; font-weight: 650; font-size: 1.02rem; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 4px 7px; flex: 1 1 160px; min-width: 0; }
.sec-title:hover, .sec-title:focus { border-color: var(--line); background: var(--bg); }
.tag { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.sec-tools, .entry-tools { display: inline-flex; gap: 2px; margin-left: auto; }
.entry-tools { display: flex; justify-content: flex-end; margin-top: 8px; }
.ib { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.ib svg { width: 17px; height: 17px; fill: currentColor; }
.ib:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.ib:disabled { opacity: .3; cursor: default; }
.ib[data-act$="-del"]:hover { color: var(--issue); }
.ib[aria-pressed="true"] { color: var(--accent); }
.grip { cursor: grab; }
.sec-body { margin-top: 10px; }
.entries { display: grid; gap: 8px; margin-bottom: 10px; }
.entry { border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.entry.is-hidden { opacity: .6; border-style: dashed; }
.entry > summary { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 4px; cursor: pointer; list-style: none; min-height: 44px; }
.entry > summary::-webkit-details-marker { display: none; }
.entry > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 auto; flex: none; }
.entry[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.entry[open] > summary { border-bottom: 1px solid var(--line); }
.entry > .ed-grid, .entry > .entry-tools { padding: 0 12px; }
.entry > .ed-grid { padding-top: 10px; }
.entry > .entry-tools { padding-bottom: 8px; }
.sum-t { font-weight: 600; font-size: .93rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-d { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.flag:empty { display: none; }
.flag { font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 0 7px; line-height: 1.6; }
.flag.issue { background: var(--issue); color: #fff; }
.flag.note { background: var(--note-bg); color: var(--note); }
.dragging { opacity: .45; }
.drop-before { box-shadow: 0 -3px 0 var(--accent); }
.drop-after { box-shadow: 0 3px 0 var(--accent); }
.add-sec { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; padding: 6px 2px; }
.check-sum { margin: 6px 0 12px; }
.f .go { font-size: .84rem; }
.stats { font-size: .85rem; margin-top: 14px; }
.chips { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .86rem; padding: 3px 10px; border-radius: 99px; background: var(--note-bg); color: var(--ink); border: 1px solid var(--line); }
.chip.hit { background: var(--ok-bg); }
.chip span { color: var(--muted); font-size: .8em; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: min(560px, calc(100vw - 32px)); font-size: .92rem; }

.dlg { border: 0; border-radius: 14px; padding: 18px 20px 20px; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.dlg::backdrop { background: rgba(10, 16, 20, .45); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2 { margin: 0; font-size: 1.35rem; }
.x { font-size: 1.6rem; line-height: 1; background: none; border: 0; color: var(--muted); cursor: pointer; width: 40px; height: 40px; border-radius: 8px; }
.x:hover { background: var(--surface-2); }
.dlg-note { font-size: .9rem; margin: 6px 0 12px; }
.cv-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.cv-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.cv-row.current { border-color: var(--brand-2); }
.cv-row.child { margin-left: 22px; border-style: dashed; }
.cv-row-main { display: grid; gap: 1px; min-width: 0; }
.cv-row-main .muted { font-size: .82rem; }
.cv-open { font-weight: 650; }
.cv-row-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.btn.danger:hover { color: var(--issue); border-color: var(--issue); }
.dlg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dlg-box { background: var(--bg); border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; align-content: start; }
.dlg-box h3 { margin: 0; font-family: var(--sans); font-size: 1rem; }
.dlg-box p { margin: 0; font-size: .88rem; }
.dlg-box .field select { width: 100%; }
@media (max-width: 600px) { .dlg-grid { grid-template-columns: 1fr; } }
.print-steps li { margin-bottom: 6px; }
.builder-about { padding: 40px 20px 10px; }
.builder-about h2 { margin-top: 0; }

#print-root { display: none; }
@media print {
  body.builder-page > *:not(#print-root) { display: none !important; }
  body.builder-page { background: #fff; }
  body.builder-page #print-root { display: block !important; }
}
@media (max-width: 560px) {
  .tgrid { gap: 20px 14px; }
  .tgrid > * { flex-basis: calc((100% - 14px) / 2); }
  .tcard-best { display: none; }
  .tcard-name { font-size: .95rem; }
  .band { padding: 38px 0; }
}
/* visually-hidden labels are position:absolute: keep them inside their scrolling pane, or they extend the page */
.pane-left, .pane-preview, .app-top, .app, .ed-card, .dlg { position: relative; }

#btn-cvs { white-space: nowrap; }
.tgrid > *, .ggrid > * { min-width: 0; }
@media (prefers-color-scheme: dark) { .swatch span:not(.vh) { box-shadow: 0 0 0 1px var(--muted); } .swatch input:checked + span { box-shadow: 0 0 0 2px var(--ink); } }
