@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3ede0;
  --paper-2: #e8e0ce;
  --cream: #fbf7ef;
  --ink: #14241c;
  --ink-soft: #3d4f45;
  --swamp: #1c3d30;
  --swamp-deep: #0f241c;
  --gold: #c4a056;
  --gold-dark: #8a6a2c;
  --rule: #c9b896;
  --danger: #8b2e2e;
  --ok: #2a6b4a;
  --warn: #8a5a18;
  --muted: #5c6b62;
  --serif: "Instrument Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(rgba(20, 36, 28, 0.035) 0.6px, transparent 0.7px) 0 0 / 4px 4px,
    var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--swamp); text-underline-offset: 3px; }
a:hover { color: var(--gold-dark); }

.page {
  position: relative;
  max-width: calc(var(--max) + 96px);
  margin: 0 auto;
  padding: 36px 48px 72px;
  min-height: 100vh;
}
.crop {
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  color: var(--gold-dark);
}
.crop::before, .crop::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.crop::before { width: 18px; height: 1px; }
.crop::after { width: 1px; height: 18px; }
.crop-tl { top: 14px; left: 14px; }
.crop-tr { top: 14px; right: 14px; }
.crop-bl { bottom: 14px; left: 14px; }
.crop-br { bottom: 14px; right: 14px; }
.crop-tr::before { right: 0; top: 0; }
.crop-tr::after { right: 0; top: 0; }
.crop-bl::before { left: 0; bottom: 0; }
.crop-bl::after { left: 0; bottom: 0; }
.crop-br::before { right: 0; bottom: 0; }
.crop-br::after { right: 0; bottom: 0; }

.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.site-footer {
  flex-wrap: wrap;
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.01em;
}
.site-footer p { margin: 0; max-width: 70ch; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { color: var(--swamp); }
.brand-text { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.brand-name {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.nav { display: flex; align-items: center; gap: 16px; }
.nav-form { margin: 0; }
.nav-link, .btn-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
}
.nav-link:hover, .btn-link:hover { color: var(--ink); }

.pill {
  display: inline-block;
  border: 1px solid var(--gold-dark);
  color: var(--gold-dark);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1.4;
  position: relative;
  top: -4px;
}
.pill-placeholder { background: rgba(196, 160, 86, 0.12); }

.main { padding: 40px 0 0; }
.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.promise, h1 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 20px;
}
.promise {
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  max-width: 16ch;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2rem;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
h3 { margin: 8px 0; font-size: 1.15rem; }
.lede {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 24px;
}
.fine { color: var(--muted); font-size: 14px; }

.hero { padding: 12px 0 56px; border-bottom: 1px solid var(--rule); }
.hero-actions, .upgrade-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--swamp);
  color: var(--cream);
  text-decoration: none;
  border: 1px solid var(--swamp);
  padding: 10px 18px;
  font: 600 15px/1.2 var(--sans);
  letter-spacing: 0.01em;
  cursor: pointer;
  border-radius: 2px;
}
.btn:hover { background: var(--swamp-deep); color: var(--cream); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-sm { padding: 7px 12px; font-size: 13px; }

.how, .pricing, .faq, .signup, .create-panel, .code-list, .dash-head { padding: 56px 0 0; }
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.step-n {
  font-family: var(--serif);
  color: var(--gold-dark);
  font-size: 1.4rem;
}
.steps p { color: var(--ink-soft); margin: 0; }

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.price-card {
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 28px 28px 24px;
}
.price-card-pro { border-color: var(--swamp); box-shadow: inset 0 0 0 1px var(--swamp); }
.price-plan {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-dark);
}
.price-amt {
  font-family: var(--serif);
  font-size: 3rem;
  margin: 8px 0 4px;
  line-height: 1;
}
.price-amt span { font-size: 1.1rem; color: var(--muted); }
.price-amt em { font-style: italic; font-size: 1.2rem; color: var(--ink-soft); padding: 0 8px; }
.price-limit { color: var(--ink); font-weight: 600; margin: 0 0 16px; }
.price-card ul { margin: 0 0 24px; padding: 0 0 0 18px; color: var(--ink-soft); }
.price-card li { margin: 0 0 8px; }

.faq-list { margin: 0; max-width: 72ch; }
.faq-list dt {
  font-weight: 700;
  margin: 22px 0 6px;
}
.faq-list dt:first-child { margin-top: 0; }
.faq-list dd { margin: 0; color: var(--ink-soft); }

.signup-form, .stack-form, .create-form, .edit-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.stack-form { flex-direction: column; align-items: stretch; max-width: 420px; }
.stack-form .btn { width: fit-content; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.field-grow { flex: 1; min-width: 240px; }
label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
input[type="email"], input[type="url"], input[type="text"], input:not([type]) {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: var(--cream);
  color: var(--ink);
  border-radius: 2px;
  width: 100%;
}
input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.banner {
  padding: 12px 14px;
  border: 1px solid var(--rule);
  background: var(--cream);
  margin: 0 0 20px;
}
.banner-ok { border-color: var(--ok); background: #e9f3ec; }
.banner-bad { border-color: var(--danger); background: #f8ecec; }
.banner-warn { border-color: var(--warn); background: #f6efe3; }

.narrow { max-width: 640px; padding-top: 12px; }
.wide { padding-top: 12px; }

.dash-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 28px;
}
.plan-box {
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 16px 18px;
  min-width: 260px;
}
.plan-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-dark);
}
.plan-label { margin: 4px 0 12px; font-weight: 700; }

.gate {
  background: #f6efe3;
  border: 1px solid var(--warn);
  padding: 16px 18px;
}
.gate .upgrade-actions { margin: 12px 0 0; }

.code-card {
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 20px 22px;
  margin: 0 0 16px;
}
.code-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.code-card h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; color: var(--muted); word-break: break-all; }
.scan-total { margin: 8px 0 16px; }
.downloads { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid;
}
.status-live { color: var(--ok); border-color: var(--ok); }
.status-paused { color: var(--warn); border-color: var(--warn); }
.scan-details { margin-top: 8px; color: var(--ink-soft); }
.scan-table, .inbox { width: 100%; border-collapse: collapse; font-size: 14px; }
.scan-table th, .scan-table td, .inbox th, .inbox td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.table-wrap { overflow: auto; }
.inline-form { display: inline; margin: 0; }
.empty { color: var(--muted); }

.paused { max-width: 640px; padding: 24px 0 48px; }
.paused h1 { max-width: 16ch; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

@media (max-width: 800px) {
  .page { padding: 24px 20px 56px; }
  .steps, .price-grid, .dash-head { grid-template-columns: 1fr; display: grid; }
  .dash-head { display: flex; flex-direction: column; }
  .promise { max-width: none; }
}

/* Support / feedback (added 2026-11-21) */
.stack-form select, .stack-form textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 2px; background: var(--cream); color: var(--ink); width: 100%;
}
select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.stack-form textarea { resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.help-strip { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 15px; }

/* Phones: 44px minimum tap targets (2026-11-24) */
@media (max-width: 800px) {
  .btn, .btn-sm, button, .nav-link, .btn-link,
  input[type="email"], input[type="url"], input[type="text"], input:not([type]), select {
    min-height: 44px;
  }
  .btn-sm { padding: 10px 14px; font-size: 14px; }
  .nav-link, .btn-link { display: inline-flex; align-items: center; }
  input[type="email"], input[type="url"], input[type="text"], input:not([type]), select, textarea { font-size: 16px; }
  summary { min-height: 44px; padding: 12px 0; box-sizing: border-box; }
}
