/* plainsend.app: the console's visual language (apps/console/src/index.css) without a framework.
   Warm off-white ground, white cards with 1px borders, one blue accent; dark mode follows the system. */
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #fafaf9;
  --panel: #ffffff;
  --subtle: #f0f0ee;
  --fg: #16181d;
  --secondary: #3f4450;
  --muted: #5b616e;
  --border: #e6e6e3;
  --divider: #efefed;
  --accent: #2b4acb;
  --accent-hover: #1f37a0;
  --accent-fg: #ffffff;
  --accent-bg: #eef1fc;
  --accent-ink: #1f37a0;
  --warn: #8a4b00;
  --warn-bg: #fdf1e3;
  --code-bg: #16181d;
  --code-fg: #e8e9ec;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1013;
    --panel: #17191e;
    --subtle: #22252c;
    --fg: #ecedef;
    --secondary: #c4c8d0;
    --muted: #a0a5b0;
    --border: #2c2f37;
    --divider: #24272e;
    --accent: #8197f5;
    --accent-hover: #9aacf7;
    --accent-fg: #0f1013;
    --accent-bg: #1c2340;
    --accent-ink: #b3c0fa;
    --warn: #f0a54a;
    --warn-bg: #2d1f0c;
    --code-bg: #0a0b0d;
    --code-fg: #e8e9ec;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--panel); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--fg); text-decoration: none; }
.site-header nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.site-header nav a { color: var(--secondary); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; white-space: nowrap; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { background: var(--subtle); color: var(--fg); }
@media (max-width: 640px) {
  .header-row { padding-top: 8px; padding-bottom: 8px; gap: 8px; }
  .site-header nav { order: 3; flex-basis: 100%; }
  .header-row .button { margin-left: auto; }
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--fg);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
}
.button:hover { border-color: var(--muted); color: var(--fg); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-fg); }
.button.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Prose */
main.prose { padding-top: 40px; padding-bottom: 64px; }
.prose h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 16px; font-weight: 650; }
.prose h2 { font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; margin: 48px 0 12px; font-weight: 620; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; font-weight: 600; }
.prose h4 { font-size: 16px; margin: 20px 0 6px; }
.prose p, .prose li { color: var(--secondary); max-width: 72ch; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--accent); background: var(--accent-bg); border-radius: 0 8px 8px 0; }
.muted { color: var(--muted) !important; }
.small { font-size: 14px; }
code { font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 0.9em; background: var(--subtle); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.code { position: relative; margin: 16px 0; }
.code pre { margin: 0; background: var(--code-bg); color: var(--code-fg); padding: 16px; border-radius: 10px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.code pre code { background: none; padding: 0; color: inherit; overflow-wrap: normal; }
.code .copy { position: absolute; top: 8px; right: 8px; min-height: 28px; padding: 2px 10px; font-size: 12px; background: #2a2d35; color: #e8e9ec; border-color: #3a3e48; }

/* Tables */
.table { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--divider); }
th { color: var(--fg); font-weight: 600; background: var(--subtle); }
td { color: var(--secondary); }
tr:last-child td { border-bottom: 0; }

/* Hero and cards */
.hero { padding: 24px 0 8px; }
.hero h1 { max-width: 20ch; }
.hero p { font-size: 19px; max-width: 60ch; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 16px 0; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h3 { font-size: 18px; }
.doors .cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.doors .card { padding: 28px; }
.doors .card:first-child { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.doors .card h3 { font-size: 22px; }
.plans .cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.plans .card { display: flex; flex-direction: column; }
.plans .card .actions { margin-top: auto; padding-top: 8px; }
.plans .card h3 { margin-bottom: 4px; }
.plans .card h3 + p strong { font-size: 28px; letter-spacing: -0.02em; }
.plans .card ul { padding-left: 18px; font-size: 14.5px; }
.split .cards { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.note { margin: 20px 0; padding: 14px 18px; border: 1px solid var(--border); background: var(--panel); border-radius: var(--radius); }
.note > :first-child { margin-top: 0; }
.note > :last-child { margin-bottom: 0; }
.note.coming { border-style: dashed; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-ink); margin-bottom: 6px; }
.draft-banner { background: var(--warn-bg); color: var(--warn) !important; border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); padding: 12px 16px; border-radius: 10px; max-width: none !important; }
.draft-banner strong { color: var(--warn); }

/* Forms */
form.card { margin: 16px 0; }
.fields { display: grid; gap: 12px 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--fg); }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--fg); background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; min-height: 40px; width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.hp { position: absolute; left: -9999px; }
.form-status:empty { display: none; }
.form-status { font-weight: 500; color: var(--fg) !important; }
.turnstile { margin: 12px 0; }
.calc-results .table { margin-top: 8px; }
.calc-results td:last-child, .calc-results th:last-child { text-align: right; white-space: nowrap; }
.calc-results .best td { color: var(--fg); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 24px; background: var(--panel); }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.site-footer h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--secondary); text-decoration: none; font-size: 14.5px; }
.site-footer a:hover { color: var(--fg); text-decoration: underline; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 32px; font-size: 13px; color: var(--muted); }
.footer-meta p { margin: 0; }

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