/* Artisan PDF Studio, the shell.
   Tokens and components from DESIGN.md. Shell only: header, footer, grids,
   prose, the sheet frame, the chips. Template styles live in the template;
   the customizer's own UI lives in studio.css (Phase 1). */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-italic-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  /* The worktop. Contrast measured 2026-09-17, see DESIGN.md section 2. */
  --desk: #e8e5de;
  --desk-2: #dedad2;
  --sheet: #ffffff;
  --ink: #17181a;
  --ink-2: #4a4d52;
  --pencil: #5c6067;      /* was #6b6f76 in the first draft; that read 4.0:1 on the desk */
  --rule: #cfcbc2;
  --accent: #b3261e;
  --accent-2: #8e1c16;
  --kraft: #c9a97a;
  --kraft-ink: #4a3520;   /* was #6e5330; that read 3.2:1 on kraft */
  --process-c: #00a3e0;
  --process-m: #e5007d;
  --process-y: #ffd400;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: 24px;
  color-scheme: light;
}

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--pencil); }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; margin: 0; }
h1 { font-size: 64px; line-height: 1.02; text-wrap: balance; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pencil);
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  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 { padding: 20px 0 12px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand .word { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; white-space: nowrap; }
.brand .word .pdf { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; font-weight: 500; }
.site-nav { display: flex; gap: 28px; font-size: 15px; }
.site-nav a { text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.site-nav a[aria-current="page"] { text-decoration-color: var(--accent); }

/* ---- sections ---- */
.section { margin-top: 88px; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 26px;
}
.section-head .label { color: var(--ink); }
.bar { display: flex; gap: 2px; }
.bar i { display: block; width: 14px; height: 6px; }
.bar i:nth-child(1) { background: var(--process-c); }
.bar i:nth-child(2) { background: var(--process-m); }
.bar i:nth-child(3) { background: var(--process-y); }
.bar i:nth-child(4) { background: var(--ink); }
.bar i:nth-child(5) { background: #99dbf3; }
.bar i:nth-child(6) { background: #f599cb; }
.bar i:nth-child(7) { background: #ffee99; }
.bar i:nth-child(8) { background: #8c8c8c; }
.bar i:nth-child(9) { background: #cfcfcf; }

/* ---- hero ---- */
.hero { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: start; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero-copy .lede { font-size: 19px; color: var(--ink-2); max-width: 34em; }
.hero-demo { display: grid; gap: 12px; margin-top: 8px; }
.hero-demo .row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--pencil); }
.stage { background: var(--desk-2); padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: center; min-height: 300px; min-width: 0; }
.stage .sheet-frame { width: 100%; max-width: 640px; }
.stage .paper { width: 100%; }

/* ---- fields ---- */
.field { display: grid; gap: 5px; }
.field label { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 12px; }
.field .count { font-family: var(--mono); font-size: 12px; color: var(--pencil); font-variant-numeric: tabular-nums; }
.field input, .field textarea {
  font: 16px/1.4 var(--sans);
  color: var(--ink);
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: var(--sheet);
  border-radius: 0;
  width: 100%;
  min-height: 44px;
}
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.field .warn { font-size: 13px; color: var(--accent); }

/* ---- theme chips ---- */
.chips { display: flex; gap: 12px; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
.chip {
  border: 1px solid var(--rule); background: var(--sheet); padding: 4px; width: 72px;
  display: grid; gap: 4px; text-align: center; cursor: pointer; position: relative; align-content: start;
}
.chip.wide { width: 116px; }
.chip i { display: block; height: 10px; }
.chip i.paper { border: 1px solid #ddd; }
.chip small { font-family: var(--mono); font-size: 10px; color: var(--pencil); line-height: 1.25; display: block; white-space: nowrap; }
.chip[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }
.chip[aria-pressed="true"]::after {
  content: ""; position: absolute; top: -6px; right: -6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- buttons and tags ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; padding: 14px 18px; min-height: 44px;
  background: var(--accent); color: #fff; border: 0; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-2); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn[disabled], .btn.off { background: var(--rule); color: var(--ink-2); cursor: not-allowed; }
.tag {
  display: inline-block; background: var(--kraft); color: var(--kraft-ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; padding: 4px 8px; text-transform: uppercase;
}
.stamp {
  display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); border: 2px solid var(--accent); padding: 4px 8px; transform: rotate(-3deg);
}

/* ---- the sheet frame ---- */
.sheet-frame { position: relative; }
.sheet-frame .paper {
  position: relative; background: var(--sheet); overflow: hidden;
  box-shadow: 0 1px 0 rgba(23, 24, 26, 0.06), 0 14px 30px -16px rgba(23, 24, 26, 0.35);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.sheet-frame.lift:hover .paper { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(23, 24, 26, 0.06), 0 22px 40px -18px rgba(23, 24, 26, 0.45); }
.sheet-frame .crop { position: absolute; width: 12px; height: 12px; border: 0 solid var(--pencil); opacity: 0.8; pointer-events: none; }
.sheet-frame .crop.tl { top: -13px; left: -13px; border-right-width: 1px; border-bottom-width: 1px; }
.sheet-frame .crop.tr { top: -13px; right: -13px; border-left-width: 1px; border-bottom-width: 1px; }
.sheet-frame .crop.bl { bottom: -13px; left: -13px; border-right-width: 1px; border-top-width: 1px; }
.sheet-frame .crop.br { bottom: -13px; right: -13px; border-left-width: 1px; border-top-width: 1px; }
/* A live sheet: the template in an iframe at its true pixel size, scaled to fit. */
.sheet-frame .paper iframe { border: 0; display: block; transform-origin: 0 0; background: #fff; }

/* ---- the drawers ---- */
.drawers-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 56px; align-items: start; }
.drawers-intro { display: flex; flex-direction: column; gap: 12px; }
.drawers-intro h2 { font-size: 34px; }
.drawers-intro p { color: var(--ink-2); font-size: 15px; }
.drawers-hint { display: none; }
@media (hover: hover) and (pointer: fine) { .drawers-hint { display: block; } }
.drawer-list { list-style: none; margin: 0; padding: 8px 28px; background: var(--sheet); box-shadow: 0 1px 0 rgba(23, 24, 26, 0.06), 0 14px 30px -16px rgba(23, 24, 26, 0.35); }
.drawer-list li { border-bottom: 1px solid var(--rule); }
.drawer-list li:last-child { border-bottom: 0; }
.drawer-list a { display: flex; align-items: center; gap: 16px; padding: 14px 0; text-decoration: none; color: var(--ink); }
.drawer-list a:hover .name { color: var(--accent); }
.drawer-list .name { font-family: var(--serif); font-weight: 500; font-size: 20px; flex: 1; }
.drawer-list .meta { font-family: var(--mono); font-size: 13px; color: var(--pencil); }
.keycap {
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none;
  border: 1px solid var(--ink); border-bottom-width: 3px; background: var(--sheet);
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink);
}

/* ---- first off the press ---- */
.press-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.press-list li { display: grid; gap: 4px; }
.press-list .name { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.15; }
.press-list .meta { font-family: var(--mono); font-size: 12px; color: var(--pencil); }

/* ---- promises ---- */
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 40px; list-style: none; margin: 0; padding: 0; }
.promises h3 { font-size: 20px; margin-bottom: 4px; }
.promises p { color: var(--ink-2); font-size: 15px; }

/* ---- prose pages (help, legal) ---- */
.page-head { margin-top: 40px; display: grid; gap: 14px; max-width: 46rem; }
.page-head h1 { font-size: 40px; }
.page-head .lede { font-size: 19px; color: var(--ink-2); }
.crumbs { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pencil); }
.crumbs a { color: var(--pencil); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.prose { margin-top: 36px; max-width: 46rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 28px; margin-top: 2em; }
.prose h3 { font-size: 22px; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose code { font-family: var(--mono); font-size: 0.92em; background: var(--desk-2); padding: 1px 5px; }
.prose .addr { font-family: var(--mono); font-size: 0.92em; background: var(--desk-2); padding: 1px 5px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pencil); font-weight: 500; }
.prose td.n, .prose th.n { font-family: var(--mono); white-space: nowrap; }
.short {
  margin-top: 2.4em; max-width: 46rem; background: var(--sheet); padding: 22px 26px;
  box-shadow: 0 1px 0 rgba(23, 24, 26, 0.06), 0 14px 30px -16px rgba(23, 24, 26, 0.35);
}
.short .label { color: var(--accent); margin-bottom: 8px; }
.short p { color: var(--ink); }
.short p + p { margin-top: 0.5em; }
.page-list { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 18px; max-width: 46rem; }
.page-list li { background: var(--sheet); padding: 22px 26px; box-shadow: 0 1px 0 rgba(23, 24, 26, 0.06), 0 14px 30px -16px rgba(23, 24, 26, 0.35); }
.page-list a { font-family: var(--serif); font-weight: 500; font-size: 22px; text-decoration: none; }
.page-list a:hover { color: var(--accent); }
.page-list p { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.page-list .meta { font-family: var(--mono); font-size: 12px; color: var(--pencil); margin-top: 8px; }

/* ---- footer (injected by site.js, one definition) ---- */
.site-footer { background: var(--desk-2); margin-top: 88px; padding: 40px 0 48px; font-size: 14px; color: var(--ink-2); }
.site-footer .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.site-footer .col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.site-footer .col .label { margin-bottom: 4px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .end { align-items: flex-end; gap: 10px; }
.site-footer .madeby { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.site-footer .madeby img { height: 18px; width: auto; }
.site-footer .madeby:hover { text-decoration: none; }
.site-footer .madeby:hover span { text-decoration: underline; }
.site-footer .copy { font-family: var(--mono); font-size: 12px; color: var(--pencil); }

/* ---- 404 ---- */
.notfound { margin-top: 64px; max-width: 46rem; display: grid; gap: 18px; }
.notfound ul { padding-left: 1.3em; margin: 0; columns: 2; }

/* ---- motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- responsive ---- */
@media (max-width: 980px) {
  h1 { font-size: 44px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero > .stage { order: -1; }
  .drawers-grid { grid-template-columns: 1fr; gap: 24px; }
  .press-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .site-footer .end { grid-column: 1 / -1; align-items: flex-start; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  h1 { font-size: 36px; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { gap: 20px; }
  .section { margin-top: 56px; }
  .stage { padding: 16px; min-height: 0; }
  .hero-copy .lede { font-size: 17px; }
  .press-list, .promises { grid-template-columns: 1fr; }
  .drawers-intro h2 { font-size: 26px; }
  .drawer-list { padding: 4px 16px; }
  .drawer-list .name { font-size: 18px; }
  .page-head h1 { font-size: 32px; }
  .prose h2 { font-size: 24px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 28px; }
  .notfound ul { columns: 1; }
}

/* ---- template page ---- */
.tp .crumbs { margin-top: 24px; }
.tp-top { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); gap: 48px; align-items: start; }
.tp-sheet { display: grid; gap: 14px; }
.tp-sheet .stage { padding: 28px; }
.tp-buy { display: grid; gap: 22px; }
.tp-buy h1 { font-size: 40px; }
.tp-buy .lede { font-size: 19px; color: var(--ink-2); }
.ctas { display: grid; gap: 10px; justify-items: start; }
.ctas .btn { min-width: 260px; }
.spec { display: grid; gap: 8px; }
.spec ul { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.spec ul.mono { font-size: 13px; }
.tp-body { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.tp-about .prose { margin-top: 12px; max-width: none; }
.tp-faq { display: grid; gap: 4px; }
.tp-faq .qa { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.tp-faq .qa:last-child { border-bottom: 0; }
.tp-faq h3 { font-size: 20px; margin-bottom: 4px; }
.tp-faq p { color: var(--ink-2); font-size: 15px; }
.tgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.tgrid.small { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 14px; }
.tcard a { display: grid; gap: 10px; text-decoration: none; color: var(--ink); }
.tcard .sheet-frame { display: block; background: var(--desk-2); padding: 16px; }
.tcard .sheet-frame .paper { display: block; width: 100%; }
.tcard .paper img { width: 100%; height: auto; display: block; }
.tcard .name { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.15; }
.tcard a:hover .name { color: var(--accent); }
.tcard .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tcard .meta .mono { font-size: 12px; color: var(--pencil); }
.tp-bottom { display: none; }
@media (max-width: 980px) {
  .tp-top { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .tp-body { grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 44px; }
  .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-buy h1 { font-size: 34px; }
  .ctas .btn { width: 100%; }
  .tp-bottom {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--sheet); border-top: 1px solid var(--rule); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }
  .tp-bottom[hidden] { display: none; }
  .tp-bottom .price { font-size: 18px; }
}
@media (max-width: 600px) {
  .tgrid, .tgrid.small { grid-template-columns: minmax(0, 1fr); }
  .tp-sheet .stage { padding: 16px; }
}
.press-list a.name { text-decoration: none; color: var(--ink); }
.press-list a.name:hover { color: var(--accent); }
