:root {
  --paper: #f6f4ef;
  --paper-raised: #fffdf8;
  --ink: #14130f;
  --muted: #6f6a5d;
  --rule: #dcd6c6;
  --accent: #a83a1c;
  --error: #9b2c2c;
  --warn-bg: #fbf6e6;
  --warn-ink: #7a5c14;
  --ok: #2f6b46;
  --code-bg: #171613;
  --code-ink: #e9e5da;
  --code-muted: #8a8677;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 4vw, 40px);
}

* { 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: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* header ------------------------------------------------------------------ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark.small { font-size: 18px; margin: 0 0 8px; }
.dot { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.site-header nav a, .site-header nav button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
}
.pill {
  border: 1px solid var(--ink);
  padding: 8px 14px;
  text-decoration: none;
}
.pill:hover { background: var(--ink); color: var(--paper); }
.lang { color: var(--muted); }

/* layout ------------------------------------------------------------------ */
main { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.lede { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 620px; margin: 0; }
.muted { color: var(--muted); }
.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.fineprint { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 20px; }
.section-title { font-size: 26px; margin: 0 0 32px; }

/* hero -------------------------------------------------------------------- */
.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 80px); max-width: 900px; }
.hero h1 {
  font-size: clamp(38px, 6.2vw, 78px);
  line-height: 1.03;
  margin: 0 0 26px;
}
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.button {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 13px 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.ghost {
  display: inline-block;
  padding: 13px 2px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  background: none;
  cursor: pointer;
}
.ghost:hover { color: var(--accent); border-color: var(--accent); }

/* numbered points --------------------------------------------------------- */
.points { border-top: 1px solid var(--rule); padding: clamp(40px, 6vw, 64px) 0; }
.numbered {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.numbered .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.numbered h3 { font-size: 23px; margin: 10px 0 10px; }
.numbered p { margin: 0; color: var(--muted); font-size: 15px; }

/* demo -------------------------------------------------------------------- */
.demo {
  background: var(--code-bg);
  color: var(--code-ink);
  margin: 0 calc(-1 * var(--gutter));
  padding: clamp(40px, 6vw, 64px) var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.demo .lede { color: var(--code-muted); }
.demo .section-title { color: var(--code-ink); }
.code {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  background: #0f0e0c;
  color: var(--code-ink);
  border: 1px solid #2a2822;
  padding: 20px 22px;
  overflow-x: auto;
  margin: 0;
  white-space: pre;
}
.c-muted { color: var(--code-muted); }

/* band -------------------------------------------------------------------- */
.band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 36px 0;
  margin-top: clamp(40px, 6vw, 72px);
}
.band p { font-family: var(--serif); font-size: 20px; margin: 0; }

/* page head --------------------------------------------------------------- */
.page-head { padding: clamp(48px, 7vw, 80px) 0 28px; }
.page-head h1 { font-size: clamp(32px, 4.6vw, 58px); margin: 0 0 18px; }

/* pricing ----------------------------------------------------------------- */
.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  margin-bottom: clamp(48px, 7vw, 88px);
}
.plan { padding: 32px 26px 36px; border-right: 1px solid var(--rule); }
.plan:last-child { border-right: 0; }
.plan-free { background: var(--paper-raised); }
.plan .price { font-family: var(--serif); font-size: 34px; margin: 4px 0 20px; letter-spacing: -0.02em; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; }
.plan li { padding: 9px 0; border-top: 1px solid var(--rule); font-size: 14.5px; color: var(--muted); }
.plan li:first-child { border-top: 0; }

/* docs and forms ---------------------------------------------------------- */
.doc { max-width: 780px; padding-bottom: clamp(56px, 8vw, 96px); }
.doc h2 {
  font-size: 21px;
  margin: 44px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.doc p, .doc li { color: var(--muted); }
.doc code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: #ece7da;
  padding: 2px 5px;
}
.types { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
.types th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 6px;
  border-bottom: 1px solid var(--ink);
}
.types td { padding: 11px 6px; border-bottom: 1px solid var(--rule); font-size: 14.5px; vertical-align: top; }
.plain { padding-left: 18px; }
.plain li { margin: 6px 0; }

.narrow { max-width: 560px; }

/* contact --------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding-bottom: clamp(48px, 7vw, 88px);
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-form { margin-top: 8px; }
.contact-form fieldset { border: 0; padding: 0; margin: 0; }
.contact-form legend {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.needs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); }
@media (max-width: 520px) { .needs { grid-template-columns: 1fr; } }
.need {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--paper-raised);
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.need:nth-of-type(odd) { border-right: 1px solid var(--rule); }
.need:last-of-type, .need:nth-last-of-type(2):nth-of-type(odd) { border-bottom: 0; }
.need input { accent-color: var(--accent); margin: 0; }
.need:hover { background: var(--paper); }
.need:has(input:checked) { background: var(--ink); color: var(--paper); }
.need:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
@media (max-width: 520px) { .pair { grid-template-columns: 1fr; } }
.pair > div { display: grid; gap: 10px; }
.optional {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.contact-form select, .contact-form textarea {
  padding: 12px 14px;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  width: 100%;
}
.contact-form textarea { resize: vertical; line-height: 1.55; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); opacity: 1; }
.contact-form .button { margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-side {
  border-top: 1px solid var(--ink);
  padding-top: 18px;
  position: sticky;
  top: 28px;
}
.contact-side .label { margin: 0 0 14px; }
.contact-side a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.contact-side a:hover { color: var(--accent); }
.steps { margin: 0 0 30px; padding-left: 18px; }
.steps li { padding: 0 0 12px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.steps li::marker { font-family: var(--mono); font-size: 11px; color: var(--accent); }

/* admin lead table: wide, scrolls sideways on narrow screens */
.admin { display: block; overflow-x: auto; }
.admin th, .admin td { white-space: nowrap; padding-right: 18px; }
.admin th:last-child, .admin td:last-child { white-space: normal; min-width: 280px; }
.admin a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.admin summary { cursor: pointer; color: var(--muted); }
.admin details p { margin: 8px 0 0; color: var(--ink); white-space: pre-line; }
.form { display: grid; gap: 10px; margin: 26px 0 40px; }
/* Sign-up method switch: a small inline pair of labels, no JavaScript. Quiet by default; the
   current one carries a thin rule and a dot so it still reads at a glance. */
.method { display: inline-flex; margin: 30px 0 0; border-bottom: 1px solid var(--rule); }
.method a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 2px 9px;
  margin: 0 22px -1px 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.method a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
}
.method a:hover { color: var(--ink); }
.method a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.method a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.method a[aria-current="page"]::before { background: var(--accent); }

/* "Send code" sits beside the identity field: give it the same height and a full border. */
.row .ghost {
  padding: 0 18px;
  border: 1px solid var(--ink);
  background: var(--paper-raised);
  white-space: nowrap;
}
.row .ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.form label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.form input[type="tel"], .form input[type="email"], .form input[type="text"], .form input[name="code"], .form input[name="phone"] {
  padding: 12px 14px;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
}
.row { display: flex; gap: 10px; }
.row input { flex: 1; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.consent input { margin-top: 3px; }
.notice { padding: 12px 16px; border-left: 3px solid var(--ink); background: var(--paper-raised); font-size: 14.5px; }
.notice.ok { border-color: var(--ok); color: var(--ok); }
.notice.error { border-color: var(--error); color: var(--error); }
.notice.warn { border-color: var(--warn-ink); background: var(--warn-bg); color: var(--warn-ink); }
.notice .code { margin-top: 12px; }

.quota { margin: 4px 0 0; }
.quota .big { font-family: var(--serif); font-size: clamp(52px, 8vw, 76px); letter-spacing: -0.03em; }

.inline { display: inline; }
button.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: underline;
  color: var(--ink);
}
button.link:hover { color: var(--accent); }
button.link.danger { color: var(--error); }

/* footer ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: clamp(48px, 8vw, 96px);
  padding: 44px var(--gutter) 64px;
}
.footer-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-grid a { display: block; font-size: 14px; margin: 6px 0; text-decoration: none; color: var(--muted); }
.footer-grid a:hover { color: var(--accent); }
.disclaimer {
  max-width: 760px;
  margin: 40px auto 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}

@media (max-width: 860px) {
  .numbered, .plans, .demo, .footer-grid { grid-template-columns: 1fr; }
  .plan { border-right: 0; border-bottom: 1px solid var(--rule); }
  .footer-grid { gap: 24px; }
  .site-header nav { gap: 18px; }
}
/* services table ---------------------------------------------------------- */
.services { padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 7vw, 88px); border-top: 1px solid var(--rule); }
.services .lede { margin-bottom: 32px; }
.services-table { width: 100%; border-collapse: collapse; }
.services-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--ink);
  font-weight: 400;
}
.services-table td {
  padding: 16px 12px 16px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  font-size: 14.5px;
  color: var(--muted);
}
.services-table td strong { color: var(--ink); font-weight: 500; font-family: var(--serif); font-size: 16px; }
.services-table .price-cell { font-family: var(--mono); font-size: 13px; color: var(--ink); white-space: nowrap; }
@media (max-width: 860px) {
  .services-table thead { display: none; }
  .services-table tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .services-table td { display: block; border: 0; padding: 2px 0; }
  .services-table td.price-cell { font-size: 15px; margin: 4px 0 6px; }
}

/* pilot package ------------------------------------------------------------ */
.pilot {
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr auto;
  gap: 24px;
  align-items: center;
  border: 1px solid var(--ink);
  background: var(--paper-raised);
  padding: 24px 26px;
  margin: 8px 0 clamp(40px, 6vw, 64px);
}
.pilot .price { font-family: var(--serif); font-size: 32px; margin: 2px 0 0; letter-spacing: -0.02em; }
.pilot ul { list-style: none; margin: 0; padding: 0; font-size: 14.5px; color: var(--muted); }
.pilot li { padding: 3px 0; }
.pilot li::before { content: "· "; color: var(--accent); }
@media (max-width: 860px) {
  .pilot { grid-template-columns: 1fr; }
}
