/* Namefolk — site stylesheet
   Editorial warm-neutral palette, one vermilion accent.
   Serif is reserved for names and headlines; everything interactive is a grotesque.

   Type scale (only these sizes are allowed, no half-pixels):
     11  micro caps (labels, tags, meta caps)
     12  tiny (foot meta, numbers)
     13  small (captions, helper text, crumb)
     14  ui (nav, chips, list gloss)
     15  body-sm (search, buttons, card reading)
     16  body (prose, faq answers)
     18  lead
     21  h3 / list hanzi
     25  h2
     27  card name
     46  h1 (clamped)

   Spacing scale (only multiples of 4): 4 8 12 16 24 32 48 56 64
*/

:root {
  --paper: #fbf8f2;
  --paper-2: #f3eee3;
  --card: #fffefa;
  --ink: #191713;
  --ink-2: #3f3930;
  --muted: #6b6355;
  --line: #e3dccb;
  --line-2: #cdc3ae;
  --accent: #a8412c;
  --accent-dark: #8b3523;
  --accent-soft: #f2e2dc;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Songti SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto,
          "Helvetica Neue", "PingFang SC", Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(25, 23, 19, .04), 0 10px 28px -22px rgba(25, 23, 19, .35);

  --s4: 4px;
  --s8: 8px;
  --s12: 12px;
  --s16: 16px;
  --s24: 24px;
  --s32: 32px;
  --s48: 48px;
  --s56: 56px;
  --s64: 64px;

  --track-caps: .1em;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- shared type atoms ---------- */

.caps {
  font-size: 11px;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

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

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 5;
  background: rgba(251, 248, 242, .93);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s16); height: 64px;
}

.brand { display: inline-flex; align-items: center; gap: var(--s12); text-decoration: none; color: var(--ink); }

.brand-mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--ink); color: var(--paper);
  font-family: var(--serif); font-size: 17px; line-height: 1;
  padding-bottom: 1px;
}

.brand-name { font-family: var(--serif); font-size: 20px; letter-spacing: .01em; }

.topnav { display: flex; gap: var(--s24); font-size: 14px; }
.topnav a { color: var(--muted); text-decoration: none; padding-bottom: 4px; border-bottom: 1.5px solid transparent; }
.topnav a:hover { color: var(--ink); }
.topnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- page head ---------- */

.crumb { font-size: 13px; color: var(--muted); padding: var(--s24) 0 0; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb span.sep { padding: 0 var(--s8); opacity: .55; }

.pagehead { padding: var(--s16) 0 var(--s32); max-width: 780px; }

.pagehead h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -.015em;
  margin: 0 0 var(--s16);
  text-wrap: balance;
}

.lead { font-size: 18px; line-height: 1.55; color: var(--ink-2); margin: 0; max-width: 64ch; }

.trust {
  display: flex; flex-wrap: wrap; gap: 0 var(--s16); margin: var(--s16) 0 0; padding: 0;
  list-style: none;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.trust li + li::before { content: "·"; margin-right: var(--s16); color: var(--line-2); }

/* ---------- tool ---------- */

.tool {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: var(--s24);
  margin: var(--s8) 0 var(--s56);
}

.tool-bar { display: flex; flex-wrap: wrap; gap: var(--s24); align-items: flex-end; }
.tool-bar-stack { flex-direction: column; align-items: stretch; gap: var(--s16); }
.tool-bar-stack .field-wide { flex: 0 0 auto; }
.tool-bar-stack .search { max-width: 380px; }

.field { display: flex; flex-direction: column; gap: var(--s8); }
.field-wide { flex: 1 1 380px; }
.field-label {
  font-size: 11px; letter-spacing: var(--track-caps); text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  appearance: none; border: 1px solid var(--line-2); background: var(--paper);
  color: var(--ink-2); border-radius: 999px; padding: 6px 12px;
  font: inherit; font-size: 14px; line-height: 1.3; cursor: pointer;
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip:focus-visible, .btn:focus-visible, .linkbtn:focus-visible, .copy:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.search {
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 15px; min-width: 190px;
}
.search::placeholder { color: #a89f8d; }

.btn {
  appearance: none; border: 0; border-radius: 9px; cursor: pointer;
  background: var(--accent); color: #fff;
  padding: 12px 20px; font: inherit; font-size: 15px; font-weight: 600;
  letter-spacing: .01em; margin-left: auto;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .10);
}
.btn:hover { background: var(--accent-dark); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line-2);
  box-shadow: none; font-weight: 500; margin-left: 0;
}
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); background: var(--paper-2); }

/* the hairline + status row: every tool has exactly one, always 24 above / 16 below */
.tool-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s16); margin-top: var(--s24); padding-top: var(--s16);
  border-top: 1px solid var(--line); margin-bottom: var(--s16);
  min-height: 20px;
}

.tool-status {
  margin: 0; font-size: 11px; letter-spacing: var(--track-caps);
  text-transform: uppercase; color: var(--muted); font-weight: 500;
}

.linkbtn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--ink-2); padding: 0 0 2px;
  border-bottom: 1px solid var(--line-2);
}
.linkbtn:hover { color: var(--accent); border-color: var(--accent); }

.hint { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.55; }

.tool-note {
  margin: var(--s24) 0 0; padding-top: var(--s16);
  border-top: 1px solid var(--line);
}
.tool-note .hint, .tool-note { max-width: none; }

.tool-foot { display: flex; align-items: center; gap: var(--s16); margin-top: var(--s24); flex-wrap: wrap; }
.tool-foot .hint { max-width: 60ch; }

/* ---------- name cards ---------- */

.results {
  display: grid; gap: var(--s12);
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  /* min height belongs on the track, not the card: a min-height on the card
     overflows the row and swallows the gap. */
  grid-auto-rows: minmax(128px, auto);
}

.namecard {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s16) var(--s16) var(--s12) var(--s24);
  display: flex; flex-direction: column;
}
.namecard::before {
  content: ""; position: absolute; left: 0; top: var(--s16); bottom: var(--s16);
  width: 2px; background: var(--accent-soft); border-radius: 2px;
}
.namecard .nm {
  font-family: var(--serif); font-size: 27px; line-height: 1.15; letter-spacing: .02em;
  padding-right: 44px;
}
.namecard .rm {
  font-size: 15px; font-weight: 500; color: var(--ink-2); letter-spacing: .01em;
  margin-top: 2px; line-height: 1.4;
}
.namecard .mn {
  font-size: 14px; color: var(--muted); line-height: 1.5; margin-top: var(--s8);
}
.namecard .tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: auto; padding-top: var(--s12);
}
.namecard .tag {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
}
.copy {
  position: absolute; top: 10px; right: 10px;
  appearance: none; border: 1px solid transparent; background: transparent;
  color: var(--muted); border-radius: 6px; padding: 4px 8px;
  font: inherit; font-size: 12px; letter-spacing: .04em; cursor: pointer; opacity: .62;
}
.namecard:hover .copy, .copy:focus-visible { opacity: 1; }
.copy:hover { border-color: var(--line); color: var(--ink); }

/* ---------- list ---------- */

.listwrap { margin-top: 0; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 210px) minmax(0, 1fr) 72px;
  gap: var(--s16); align-items: baseline;
  padding: var(--s12) 0; border-bottom: 1px solid var(--line);
}

.row-head {
  padding: 0 0 var(--s8); border-bottom: 1px solid var(--line-2);
  font-size: 11px; letter-spacing: var(--track-caps); text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.row-head span:last-child { text-align: right; }

.cell { display: flex; align-items: baseline; gap: var(--s12); flex-wrap: wrap; }
.row .han { font-family: var(--serif); font-size: 21px; line-height: 1.3; }
.row .py { font-size: 13px; color: var(--muted); letter-spacing: .01em; }
.row .gl { font-size: 14px; color: var(--ink-2); }
.row .rk {
  font-size: 12px; color: var(--muted); text-align: right;
  font-variant-numeric: tabular-nums; text-transform: uppercase; letter-spacing: .06em;
}

.empty { padding: var(--s24) 0; color: var(--muted); font-size: 15px; }

/* ---------- content sections ---------- */

.prose { max-width: 720px; }
.prose > section:first-child h2 { margin-top: var(--s16); }
.prose h2 {
  font-family: var(--serif); font-size: 25px; line-height: 1.25; font-weight: 600;
  margin: var(--s48) 0 var(--s12); letter-spacing: -.005em;
}
.prose h3 { font-size: 21px; line-height: 1.35; font-weight: 600; margin: var(--s32) 0 var(--s8); }
.prose p { margin: 0 0 var(--s16); }
.prose ul, .prose ol { margin: 0 0 var(--s16); padding-left: 22px; }
.prose li { margin-bottom: var(--s8); }

.note {
  border-left: 2px solid var(--accent-soft);
  background: var(--paper-2);
  border-radius: 0 8px 8px 0;
  padding: var(--s16) var(--s16) var(--s16) var(--s24);
  margin: var(--s24) 0 var(--s24);
  font-size: 15px; color: var(--ink-2);
}

.spec {
  display: grid; gap: var(--s12);
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  margin: var(--s24) 0 var(--s8);
}
.spec div { border: 1px solid var(--line); border-radius: 9px; padding: var(--s12) var(--s16); background: var(--paper); }
.spec dt {
  font-size: 11px; text-transform: uppercase; letter-spacing: var(--track-caps);
  color: var(--muted); margin-bottom: var(--s4); font-weight: 500;
}
.spec dd { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }

/* ---------- faq ---------- */

.faq { max-width: 720px; margin-top: var(--s48); }
.faq h2 { font-family: var(--serif); font-size: 25px; font-weight: 600; margin: 0 0 var(--s12); }
.faq details { border-bottom: 1px solid var(--line); padding: var(--s16) 0; }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 16px; line-height: 1.4; list-style: none;
  display: flex; justify-content: space-between; gap: var(--s16); align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 18px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: var(--s12) 0 2px; color: var(--ink-2); font-size: 16px; line-height: 1.6; }

/* ---------- related ---------- */

.related { margin: var(--s56) 0; }
.related h2 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 0 0 var(--s16); }
.related-grid { display: grid; gap: var(--s12); grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.rel {
  display: block; border: 1px solid var(--line); border-radius: 10px;
  padding: var(--s16); background: var(--card); text-decoration: none; color: var(--ink);
}
.rel:hover { border-color: var(--line-2); box-shadow: var(--shadow); color: var(--ink); }
.rel .t { font-size: 15px; font-weight: 600; }
.rel .d { font-size: 13px; color: var(--muted); margin-top: var(--s4); line-height: 1.5; }

/* ---------- pitch (the one upsell line under a tool) ---------- */

.pitch {
  margin: var(--s16) 0 var(--s48);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  padding: var(--s16) var(--s24);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s16) var(--s24); flex-wrap: wrap;
}
.pitch-txt { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
.pitch-txt strong { color: var(--ink); }
.pitch-cta {
  font-size: 14px; white-space: nowrap; text-decoration: none;
  border-bottom: 1px solid var(--accent); padding-bottom: 1px;
}
.pitch-cta:hover { color: var(--accent-dark); border-color: var(--accent-dark); }

/* ---------- interest offer (a want, not a sale, tied to one name) ---------- */

.interest {
  margin: var(--s24) 0 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--card);
  padding: var(--s24);
}
.interest-kicker {
  margin: 0 0 var(--s8); font-size: 11px; text-transform: uppercase;
  letter-spacing: var(--track-caps); color: var(--accent-dark); font-weight: 600;
}
.interest-h {
  font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.35;
  margin: 0 0 var(--s8); color: var(--ink);
}
.interest-h span { color: var(--accent-dark); }
.interest-lead {
  margin: 0 0 var(--s16); font-size: 15px; line-height: 1.6;
  color: var(--ink-2); max-width: 66ch;
}
.interest-list {
  margin: 0 0 var(--s16); padding-left: 20px; font-size: 15px; line-height: 1.6;
  color: var(--ink-2); max-width: 66ch;
}
.interest-list li { margin-bottom: var(--s8); }
.interest-list strong { color: var(--ink); font-weight: 600; }
.interest-caveat {
  margin: 0 0 var(--s24); font-size: 13px; line-height: 1.6;
  color: var(--muted); max-width: 68ch;
}
.interest-caveat strong { color: var(--ink-2); }
.interest-note { margin: var(--s16) 0 0; font-size: 13px; color: var(--muted); max-width: 66ch; }

/* the only interactive thing left: one field, one button */
.interest-form { margin-top: var(--s8); }
.interest-label {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: var(--track-caps); color: var(--muted); margin-bottom: var(--s8);
}
.interest-row { display: flex; gap: var(--s12); flex-wrap: wrap; align-items: center; }
.interest-input, .interest-select {
  appearance: none; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 9px;
  padding: 11px 14px; min-width: 260px;
}
.interest-select { min-width: 340px; }
.interest-input:focus, .interest-select:focus {
  outline: 2px solid var(--accent-soft); outline-offset: 1px; border-color: var(--accent);
}
.interest-row .btn { margin-left: 0; }
.interest-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.interest-status { margin: var(--s12) 0 0; font-size: 14px; line-height: 1.5; min-height: 1px; }
.interest-status.is-ok { color: var(--ink); }
.interest-status.is-error { color: #a33; }

/* ---------- pricing ---------- */

.price-grid {
  display: grid; gap: var(--s16); align-items: stretch;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-rows: 1fr;
  margin: var(--s24) 0 var(--s12);
}
.price-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); padding: var(--s16) var(--s16) var(--s16) var(--s24);
}
.price-card-lead { background: var(--card); border-color: var(--line-2); box-shadow: var(--shadow); }
.prose .price-card .amount { font-family: var(--serif); font-size: 34px; line-height: 1.1; margin: var(--s8) 0 0; }
.prose .once {
  font-family: var(--sans); font-size: 11px; letter-spacing: var(--track-caps);
  text-transform: uppercase; color: var(--muted); margin-left: 6px;
}
.prose .price-card .price-sub { font-size: 13px; color: var(--muted); margin: var(--s4) 0 var(--s16); }
.price-list { margin: 0 0 var(--s16); padding-left: 18px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.price-list li { margin-bottom: var(--s8); }
.prose .price-card .price-foot {
  margin: auto 0 0; padding-top: var(--s12); border-top: 1px solid var(--line);
  font-size: 11px; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted);
}
.prose .price-caveat { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line); background: var(--paper-2); margin-top: var(--s24); }
.foot-in {
  display: flex; flex-wrap: wrap; gap: var(--s12) var(--s32);
  justify-content: space-between; align-items: center;
  padding: var(--s32) 0 var(--s8);
}
.foot-brand { margin: 0; font-family: var(--serif); font-size: 17px; color: var(--ink); }
.foot-nav { display: flex; flex-wrap: wrap; gap: var(--s24); font-size: 13px; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--accent); }
.foot-note {
  font-size: 13px; color: var(--muted); padding: var(--s8) 0 0; margin: 0;
  max-width: 68ch; line-height: 1.55;
}
.foot-meta {
  font-size: 12px; letter-spacing: .04em; color: var(--muted);
  padding: var(--s16) 0 var(--s24); margin: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .field-wide { flex: 1 1 100%; }
  .btn { margin-left: 0; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 var(--s16); }
  .topnav { gap: var(--s16); font-size: 13px; }
  .tool { padding: var(--s16); }
  .tool-bar { gap: var(--s16); }
  .btn { width: 100%; padding: 13px 18px; }
  .row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .row .gl { grid-column: 1 / -1; font-size: 14px; }
  .row-head span:nth-child(2) { display: none; }
  .row-head { grid-template-columns: 1fr auto; }
  .namecard .nm { font-size: 24px; };
  .results { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 520px) {
  .brand-name { display: none; }
  .trust { gap: 0 var(--s12); }
  .trust li + li::before { margin-right: var(--s12); }
}

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