@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3f0e8;
  --paper-2: #e9e4d8;
  --ink: #16161a;
  --ink-2: #4a4944;
  --rule: #cfc8b8;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --olive: #5b6b3a;
  --card: #fbf9f4;
  --focus: #1d4ed8;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --radius: 4px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121214;
    --paper-2: #1b1b1f;
    --ink: #eeebe3;
    --ink-2: #b4b0a6;
    --rule: #34343a;
    --accent: #f97316;
    --accent-ink: #121214;
    --olive: #a3b57a;
    --card: #18181b;
    --focus: #93c5fd;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  font-feature-settings: "ss01", "cv11";
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; color: var(--paper); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 1.05rem/1 var(--body); letter-spacing: -0.01em; text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.nav a { text-decoration: none; font-size: 0.95rem; color: var(--ink-2); padding: 6px 0; display: inline-block; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 0.5em; font-variation-settings: "opsz" 144; }
h1 { font-size: clamp(2.4rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.35rem; line-height: 1.2; font-variation-settings: "opsz" 48; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--ink-2); max-width: 40ch; }
.eyebrow { font: 500 0.78rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin: 0 0 18px; display: flex; gap: 10px; align-items: center; }
.eyebrow .idx { color: var(--accent); }
.muted { color: var(--ink-2); }
.small { font-size: 0.9rem; }

/* Sections */
main { display: block; }
.section { padding: clamp(56px, 9vw, 112px) 0; border-bottom: 1px solid var(--rule); }
.section:last-child { border-bottom: 0; }
.hero { padding: clamp(56px, 10vw, 128px) 0 clamp(48px, 8vw, 96px); }
.hero h1 { max-width: 15ch; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: end; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } }

.split { display: grid; grid-template-columns: 1fr; gap: 32px 64px; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 2fr; } }

.prose { max-width: 68ch; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius);
  font: 600 0.98rem/1 var(--body); text-decoration: none; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); cursor: pointer;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }

/* Status */
.status {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--rule);
  border-radius: 999px; font: 500 0.8rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; background: var(--card);
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.notice { border: 1px solid var(--rule); border-left: 3px solid var(--accent); background: var(--card); padding: 16px 18px; border-radius: var(--radius); margin: 0 0 28px; }
.notice p:last-child { margin-bottom: 0; }

/* Cards and lists */
.grid-3 { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-3 > * { background: var(--paper); padding: 28px; }
.grid-3 .num { font: 500 0.8rem/1 var(--mono); color: var(--accent); display: block; margin-bottom: 28px; }

.product-card { display: grid; grid-template-columns: 1fr; border: 1px solid var(--rule); background: var(--card); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 860px) { .product-card { grid-template-columns: 1.1fr 1fr; } }
.product-card .art { background: var(--paper-2); padding: 28px; display: flex; align-items: center; justify-content: center; }
.product-card .body { padding: clamp(24px, 4vw, 44px); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 24px 0 0; font-size: 0.95rem; }
.facts dt { font: 500 0.78rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.facts dd { margin: 0; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.checklist li { padding: 14px 0 14px 30px; border-top: 1px solid var(--rule); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 22px; width: 12px; height: 2px; background: var(--accent); }
.checklist.cols { grid-template-columns: 1fr; column-gap: 40px; }
@media (min-width: 760px) { .checklist.cols { grid-template-columns: 1fr 1fr; } }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; white-space: nowrap; }
th { font: 500 0.72rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); background: var(--paper-2); }
tr:last-child td { border-bottom: 0; }
td.wrap-cell { white-space: normal; min-width: 220px; }

/* FAQ */
.faq details { border-top: 1px solid var(--rule); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--body); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); max-width: 68ch; }

/* Demo form */
.demo { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .demo { grid-template-columns: 1fr 1fr; } }
.form { display: grid; gap: 16px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.form .row { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .form .row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 600; font-size: 0.92rem; }
.field .hint { font-size: 0.82rem; color: var(--ink-2); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--ink-2);
  border-radius: var(--radius); padding: 10px 12px; min-height: 46px; width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.check input { width: 20px; min-height: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.error { color: var(--accent); font-size: 0.85rem; font-weight: 600; }
[aria-invalid="true"] { border-color: var(--accent); border-width: 2px; }
.output { display: grid; gap: 20px; align-content: start; }
pre { margin: 0; font: 0.82rem/1.55 var(--mono); background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; overflow-x: auto; white-space: pre; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 48px 0 40px; font-size: 0.92rem; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer h2 { font: 500 0.78rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 14px; color: var(--ink); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.figure { border: 1px solid var(--rule); background: var(--card); border-radius: var(--radius); padding: 20px; margin: 0; }
.figure figcaption { font-size: 0.85rem; color: var(--ink-2); margin-top: 12px; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a, a { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
}

@media print {
  .site-header nav, .site-footer, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}

/* Utilities and SVG theme hooks */
.mt-s { margin-top: 18px; }
.lede.wide { max-width: 60ch; }
caption { text-align: left; padding: 10px 12px; caption-side: top; }
.f-card { fill: var(--card); }
.f-accent { fill: var(--accent); }
.f-paper { fill: var(--paper); }
.s-accent { stroke: var(--accent); }
.split > *, .demo > *, .hero-grid > *, .output > * { min-width: 0; }
