/* ShopBench — print-shop job ticket aesthetic. No external dependencies. */
:root {
  --paper: #f3eee4;
  --paper-deep: #e8e0d0;
  --card: #fffdf8;
  --ink: #161410;
  --ink-2: #2c281f;
  --muted: #5e584c;
  --line: #d4cbb8;
  --line-strong: #b9ae97;
  --stamp: #9c2f2a;
  --stamp-ink: #7f241f;
  --stamp-soft: #f4e3dd;
  --press: #1d4a3a;
  --press-soft: #dceae3;
  --amber: #8a5a10;
  --amber-soft: #f5ead2;
  --blue: #243f5c;
  --shadow: 0 1px 0 rgba(22, 20, 16, 0.04), 0 10px 28px rgba(22, 20, 16, 0.07);
  --radius: 12px;
  --header-h: 4rem;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: "Avenir Next", "Segoe UI", Candara, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --content: 72rem;
  --focus: 2px solid var(--stamp);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(22, 20, 16, 0.03), transparent 12rem),
    radial-gradient(ellipse at top, rgba(156, 47, 42, 0.04), transparent 32rem);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--stamp-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: var(--focus); outline-offset: 3px; }

.wrap { width: min(var(--content), calc(100% - 2rem)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, white);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; color: inherit; text-decoration: none; min-width: 0; }
.brand img, .brand svg { width: 2rem; height: 2rem; border-radius: 0.4rem; }
.brand-name { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-tag { display: block; font-family: var(--font-sans); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 0.2rem 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 0.92rem; font-weight: 550; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--stamp-ink); }
.nav .nav-pro { color: var(--stamp-ink); }

.nav-toggle {
  display: none; border: 1px solid var(--line-strong); background: var(--card);
  border-radius: 8px; padding: 0.4rem 0.6rem; font: inherit; font-size: 0.85rem; cursor: pointer;
}

/* Hero & typography */
.hero { padding: 3rem 0 2.2rem; }
.kicker {
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--stamp); font-weight: 700; margin: 0 0 0.7rem;
}
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); margin: 0 0 0.8rem; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.2rem; margin: 1.4rem 0 0.4rem; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 40rem; margin: 0 0 1.4rem; }
.lede-page { font-size: 1.12rem; color: var(--ink-2); max-width: 44rem; }

.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem; padding: 0.7rem 1.05rem; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font: inherit; font-size: 0.95rem; font-weight: 600; text-decoration: none;
  cursor: pointer; line-height: 1.2;
}
.btn:hover { background: var(--ink-2); color: var(--paper); }
.btn-ghost {
  background: transparent; color: var(--ink);
}
.btn-ghost:hover { background: var(--paper-deep); color: var(--ink); }
.btn-stamp { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.btn-stamp:hover { background: var(--stamp-ink); color: #fff; }
.btn-small { padding: 0.45rem 0.8rem; font-size: 0.85rem; }

/* Cards */
.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card, .calc-card, .ticket, .prose-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.calc-card { padding: 1.15rem 1.2rem 1.25rem; color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 0.45rem; min-height: 12rem; }
.calc-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.calc-card h3 { margin: 0; font-size: 1.25rem; }
.calc-card p { margin: 0; color: var(--muted); font-size: 0.98rem; flex: 1; }
.calc-card .go { margin-top: 0.5rem; font-size: 0.85rem; font-weight: 700; color: var(--stamp-ink); letter-spacing: 0.02em; }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.section { padding: 0.5rem 0 2.8rem; }
.section-head { margin-bottom: 1.1rem; }

.note-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.note { padding: 1.1rem 1.15rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.note h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.note p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }

/* Calculator layout */
.page-head { padding: 2rem 0 1.2rem; }
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: 1.2rem;
  align-items: start;
  padding-bottom: 2.5rem;
}
.ticket { padding: 0.4rem 1.15rem 1.2rem; }
.ticket + .ticket, .stack > .ticket { margin-top: 1rem; }
.fieldset { border: 0; margin: 0; padding: 0.95rem 0 0.3rem; }
.fieldset + .fieldset { border-top: 1px dashed var(--line); }
.fieldset legend {
  padding: 0; font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem;
  width: 100%; margin-bottom: 0.15rem;
}
.hint { color: var(--muted); font-size: 0.88rem; margin: 0 0 0.7rem; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 0.8rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.field.span-2 { grid-column: 1 / -1; }
.field label { font-size: 0.86rem; font-weight: 650; color: var(--ink-2); }
.field .sub { font-weight: 500; color: var(--muted); font-size: 0.78rem; display: block; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 0.5rem 0.65rem; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(156, 47, 42, 0.15);
}
.field input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--stamp); }
.check { display: flex; align-items: flex-start; gap: 0.55rem; padding-top: 1.4rem; }
.check label { font-size: 0.92rem; font-weight: 600; }
.check .sub { font-weight: 500; }

/* Results */
.results {
  position: sticky; top: calc(var(--header-h) + 0.8rem);
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius); padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: var(--shadow);
}
.results h2 { color: var(--paper); font-size: 1.15rem; margin: 0 0 0.2rem; }
.results .subhead { color: #cfc6b6; font-size: 0.86rem; margin: 0 0 0.9rem; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.metric { background: rgba(255, 253, 248, 0.06); border: 1px solid rgba(243, 238, 228, 0.12); border-radius: 10px; padding: 0.65rem 0.7rem; }
.metric .lbl { display: block; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: #cfc6b6; }
.metric .val { font-family: var(--font-serif); font-size: 1.35rem; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.metric.wide { grid-column: 1 / -1; }
.metric.accent .val { color: #f0c7c2; }
.metric.good .val { color: #b7dccb; }

.results table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-top: 0.9rem; font-variant-numeric: tabular-nums; }
.results th, .results td { text-align: right; padding: 0.32rem 0; border-bottom: 1px solid rgba(243, 238, 228, 0.1); }
.results th:first-child, .results td:first-child { text-align: left; }
.results th { color: #cfc6b6; font-weight: 600; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.results .result-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }
.results .btn-ghost { color: var(--paper); border-color: rgba(243, 238, 228, 0.35); }
.results .btn-ghost:hover { background: rgba(255, 253, 248, 0.08); color: var(--paper); }

.alert { margin-top: 0.85rem; padding: 0.65rem 0.7rem; border-radius: 8px; font-size: 0.88rem; line-height: 1.45; }
.alert-warn { background: rgba(245, 234, 210, 0.14); border: 1px solid rgba(245, 234, 210, 0.28); color: #f5ead2; }
.alert-bad { background: rgba(156, 47, 42, 0.28); border: 1px solid rgba(240, 199, 194, 0.28); color: #f0c7c2; }
.alert-good { background: rgba(29, 74, 58, 0.35); border: 1px solid rgba(183, 220, 203, 0.25); color: #b7dccb; }

/* Article / SEO body */
.article { max-width: 44rem; padding: 0 0 3rem; }
.article p, .article li { color: var(--ink-2); }
.article h2 { margin-top: 2rem; }
.article ul, .article ol { padding-left: 1.2rem; }
.article li { margin: 0.3rem 0; }
.callout {
  background: var(--stamp-soft); border-left: 4px solid var(--stamp);
  padding: 0.9rem 1rem; border-radius: 0 10px 10px 0; margin: 1.2rem 0;
}
.callout p { margin: 0; color: var(--ink); }

.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.7rem 1rem; margin: 0.5rem 0;
}
.faq summary { cursor: pointer; font-weight: 700; font-family: var(--font-serif); }
.faq details p { margin: 0.5rem 0 0.2rem; }

.related { padding-bottom: 3rem; }

/* Pro page */
.price-tag { font-family: var(--font-serif); font-size: 3rem; letter-spacing: -0.03em; margin: 0; }
.price-tag small { font-size: 1rem; color: var(--muted); font-family: var(--font-sans); font-weight: 500; letter-spacing: 0; }
.pro-list { list-style: none; padding: 0; margin: 1rem 0; }
.pro-list li { padding: 0.45rem 0 0.45rem 1.4rem; position: relative; border-bottom: 1px solid var(--line); }
.pro-list li::before { content: "✓"; position: absolute; left: 0; color: var(--press); font-weight: 700; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  padding: 2rem 0 2.4rem;
  font-size: 0.9rem; color: var(--ink-2);
}
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem; }
.site-footer h2 { font-size: 1rem; margin: 0 0 0.4rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0.2rem 0; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--stamp-ink); }
.disclaimer { margin-top: 1.4rem; color: var(--muted); font-size: 0.8rem; max-width: 50rem; }

/* Utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }

@media (max-width: 900px) {
  .grid-3, .note-row, .grid-2, .calc-layout, .footer-inner { grid-template-columns: 1fr; }
  .results { position: static; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: 0.7rem 1rem 1rem; flex-direction: column; align-items: stretch; gap: 0.4rem; }
  .nav.open { display: flex; }
  .nav a { padding: 0.45rem 0.2rem; }
  .fields { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .check { padding-top: 0.2rem; }
  .hero { padding-top: 2rem; }
}

@media print {
  .site-header, .site-footer, .nav-toggle, .result-actions, .hero-actions, .actions, .article, .related, .page-nav { display: none !important; }
  body { background: white; }
  .calc-layout { display: block; }
  .results { position: static; background: white; color: black; border: 1px solid #222; box-shadow: none; }
  .results h2, .metric .val, .metric .lbl, .results .subhead, .results th, .results td { color: black; }
  .ticket { box-shadow: none; }
}

