/* Klaai — shared styles for landing + app mockup */

:root {
  --ink: #16211f;
  --ink-2: #5b6b68;
  --ink-3: #93a3a0;
  --bg: #fafcfb;
  --card: #ffffff;
  --line: #e4ecea;
  --accent: #0e7568;
  --accent-dark: #0a5a50;
  --accent-soft: #e3f2ef;
  --amber: #b45309;
  --amber-soft: #fef3e2;
  --red: #b3372f;
  --red-soft: #fdeceb;
  --green: #1a7f37;
  --green-soft: #e6f4ea;
  --blue: #1d5fae;
  --blue-soft: #e8f0fb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 33, 31, 0.05), 0 4px 16px rgba(22, 33, 31, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.92em; }

/* ============ Landing ============ */

.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 20px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(145deg, #12907f 0%, #0a5a50 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 1px 2px rgba(10,40,35,0.25);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-block; padding: 10px 20px; border-radius: 8px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; transition: background 0.15s;
}

/* Phosphor icons, used in place of emoji throughout the app. */
i.ph { vertical-align: -2px; line-height: 1; }
.btn-primary { background: var(--accent); color: #fff !important; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink) !important; background: var(--card); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: 10px; }

.hero { max-width: 860px; margin: 0 auto; padding: 72px 24px 48px; text-align: center; }
.hero h1 { font-size: 52px; line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede { font-size: 20px; color: var(--ink-2); margin: 22px auto 0; max-width: 640px; }
.hero-cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; }
.hero-note { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); }

.pill {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent-dark);
  font-size: 13.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}

.section { max-width: 1080px; margin: 0 auto; padding: 64px 24px; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 { font-size: 34px; letter-spacing: -0.01em; }
.section-head p { color: var(--ink-2); margin-top: 10px; font-size: 17px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.feature .ico {
  width: 38px; height: 38px; border-radius: 9px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; font-size: 19px; margin-bottom: 14px;
}
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { font-size: 14.5px; color: var(--ink-2); }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.how-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.how-step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: #fff; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; margin-bottom: 14px;
}
.how-step h3 { font-size: 17px; margin-bottom: 6px; }
.how-step p { font-size: 14.5px; color: var(--ink-2); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.plan {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px 22px;
  display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative;
}
.plan.featured { border: 2px solid var(--accent); }
.plan .flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px; white-space: nowrap;
}
.plan h3 { font-size: 18px; }
.plan .for { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; min-height: 42px; }
.plan .price { margin: 16px 0 2px; font-size: 38px; font-weight: 800; letter-spacing: -0.02em; }
.plan .price span { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.plan .cap {
  font-size: 13px; font-weight: 600; color: var(--accent-dark);
  background: var(--accent-soft); border-radius: 6px; padding: 5px 10px; display: inline-block; margin: 10px 0 16px;
}
.plan ul { list-style: none; font-size: 14px; color: var(--ink-2); flex: 1; }
.plan ul li { padding: 5px 0 5px 24px; position: relative; }
.plan ul li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.plan .btn { margin-top: 18px; text-align: center; }
.pricing-note { text-align: center; color: var(--ink-3); font-size: 13.5px; margin-top: 22px; }

.footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 28px 24px; display: flex;
  justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--ink-3);
}
.footer-inner .ph-heart { color: #e0245e; }
.footer-inner a { color: var(--ink-2); }
.footer-inner a:hover { color: var(--accent); }

/* ============ App ============ */

.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: #10201d; color: #c6d4d1; padding: 18px 12px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { color: #fff; padding: 4px 10px 18px; font-size: 18px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; color: #b6c6c2; padding: 9px 12px;
  border-radius: 8px; font-size: 14.5px; font-weight: 500;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sidebar nav a.active { background: var(--accent); color: #fff; }
.sidebar nav a .badge {
  margin-left: auto; background: var(--amber); color: #fff; font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 1px 8px;
}
.sidebar .nav-label { font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: #6f8480; padding: 16px 12px 6px; }
.sidebar .side-foot { margin-top: auto; padding: 10px 4px 2px; border-top: 1px solid rgba(255,255,255,0.08); }
.side-logout {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 14px;
  font-weight: 500; color: #b6c6c2;
}
.side-logout:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar nav a i.ph, .side-logout i.ph { font-size: 16px; width: 18px; text-align: center; flex-shrink: 0; }

.main {
  padding: 0 34px 0; min-width: 0;
  /* Column layout so #view absorbs the free space and the footer sits at the
     bottom of short pages instead of floating under the content. */
  display: flex; flex-direction: column; min-height: 100vh;
}
.main #view { flex: 1 0 auto; padding-bottom: 32px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 26px;
}
.topbar .co { font-weight: 700; font-size: 15.5px; }
.topbar .co small { display: block; font-weight: 500; color: var(--ink-3); font-size: 12.5px; }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--ink-2); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}

.page-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.page-title h1 { font-size: 24px; letter-spacing: -0.01em; }
.page-title .sub { color: var(--ink-3); font-size: 13.5px; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.stat .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; }
.stat .value { font-size: 26px; font-weight: 750; margin-top: 4px; letter-spacing: -0.01em; }
.stat .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.stat.warn .value { color: var(--amber); }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow-x: auto; margin-bottom: 22px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 15.5px; }
.panel-head .sub { font-size: 12.5px; color: var(--ink-3); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-3); font-weight: 600; padding: 10px 18px; border-bottom: 1px solid var(--line);
  background: #fcfdfd;
}
table.data td { padding: 11px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #f7faf9; }
table.data td.r, table.data th.r { text-align: right; }
table.data .muted { color: var(--ink-3); font-size: 13px; }
table.data td.total-row { font-weight: 700; background: #fcfdfd; }

.chip {
  display: inline-block; font-size: 12px; font-weight: 650; padding: 2px 10px; border-radius: 999px;
}
.chip.paid, .chip.approved { background: var(--green-soft); color: var(--green); }
.chip.sent { background: var(--blue-soft); color: var(--blue); }
.chip.overdue { background: var(--red-soft); color: var(--red); }
.chip.draft { background: #eef1f0; color: var(--ink-2); }
.chip.pending_review { background: var(--amber-soft); color: var(--amber); }
.chip.asset { background: var(--blue-soft); color: var(--blue); }
.chip.liability { background: var(--amber-soft); color: var(--amber); }
.chip.equity { background: #ece9fb; color: #5b4bb5; }
.chip.revenue { background: var(--green-soft); color: var(--green); }
.chip.expense { background: var(--red-soft); color: var(--red); }

.who { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.who .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.who.claude .dot { background: var(--accent); }
.who.claude { color: var(--accent-dark); font-weight: 600; }

.btn-sm {
  font-size: 12.5px; font-weight: 650; padding: 5px 12px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.btn-sm.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm.primary:hover { background: var(--accent-dark); }

.activity { list-style: none; }
.activity li { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.activity li:last-child { border-bottom: 0; }
.activity .t { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; padding-top: 1px; }

.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 7px 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.report-note { font-size: 12.5px; color: var(--ink-3); padding: 10px 18px; background: #fcfdfd; border-top: 1px solid var(--line); }

.postings { margin-top: 6px; font-size: 13px; }
.postings .p-row { display: grid; grid-template-columns: 1fr 90px 90px; gap: 10px; color: var(--ink-2); padding: 1px 0; }
.postings .p-row .num { text-align: right; }

.empty { padding: 30px 18px; text-align: center; color: var(--ink-3); font-size: 14px; }

.spinner {
  display: inline-block; width: 20px; height: 20px; vertical-align: middle;
  border: 2.5px solid var(--accent-soft); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Global "working…" overlay shown by the API client during a slow request
   (js/api.js). z-index sits ABOVE the receipt modal's .overlay (z 50), so a
   save triggered from inside a modal is still covered. */
.loading-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16, 32, 29, 0.30);
}
.loading-overlay[hidden] { display: none; }
.loading-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); color: var(--ink);
  padding: 15px 22px; border-radius: 12px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
}
.loading-spinner {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 2.5px solid var(--accent-soft); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
/* Still turns for people who ask for reduced motion, just slowly enough not to
   provoke — a frozen spinner reads as "hung". */
@media (prefers-reduced-motion: reduce) { .loading-spinner { animation-duration: 2.4s; } }

.chip.expense { background: var(--red-soft); color: var(--red); }
.chip.transfer { background: var(--blue-soft); color: var(--blue); }
.chip.new { background: var(--amber-soft); color: var(--amber); }

/* Plan picker on the registration form. */
.plan-picker { display: grid; gap: 8px; }
.plan-option {
  display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; background: #fff;
}
.plan-option:hover { border-color: var(--ink-2); }
.plan-option.selected { border-color: var(--green); background: var(--green-soft); }
.plan-option input { display: none; }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.plan-price { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.plan-desc { font-size: 12px; color: var(--ink-2); }

/* To-do priorities. 'normal' is deliberately unstyled — if every item carries a
   colour, none of them stand out, which defeats having a priority at all. */
.chip.high { background: var(--red-soft); color: var(--red); }
.chip.low { background: #eef1f0; color: var(--ink-2); }
/* Without a floor the fixed-width priority and action columns squeeze the text
   to one word per line on a phone. A min-width makes this table overflow and
   scroll inside .panel (which is already overflow-x:auto), the same way the
   vendors and invoices tables do. */
.todo-table { min-width: 620px; }
.todo-done .todo-text { text-decoration: line-through; color: var(--ink-2); }
.todo-meta { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.todo-meta a { color: var(--blue); }
.todo-overdue { color: var(--red); font-weight: 600; }
.chip.processed { background: var(--green-soft); color: var(--green); }
.attach { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }

/* AI Setup view — step-by-step how-to for connecting Claude. */
.setup-intro { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; max-width: 700px; margin-bottom: 20px; }
.setup-step { margin-bottom: 14px; }
.setup-step .panel-head h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.step-n {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
/* Body sat flush to the panel edge because .panel has no padding and .panel-head
   supplies its own — match the header's 14px 18px inset so text and command
   blocks line up under the title. */
.setup-body { color: var(--ink-2); font-size: 14px; padding: 14px 18px 16px; }
.setup-body > :first-child { margin-top: 0; }
.setup-body > :last-child { margin-bottom: 0; }
.setup-body p { margin: 8px 0; }
.setup-note { font-size: 13px; color: var(--ink-3); }
.setup-cmd { position: relative; margin: 12px 0; }
.setup-cmd pre {
  background: #10201d; color: #d7e4e1; border-radius: 8px;
  padding: 13px 15px; padding-right: 74px; overflow-x: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word;
}
.setup-cmd .copy-cmd {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.2);
}
.setup-cmd .copy-cmd:hover { background: rgba(255,255,255,0.2); }

/* "The easy way" callout — the recommended, let-Claude-do-it path. */
.setup-easy {
  background: var(--accent-soft); border: 1px solid #c8e3de; border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 18px;
}
.setup-easy h2 { font-size: 16px; color: var(--accent-dark); margin-bottom: 6px; }
.setup-easy p { color: var(--ink-2); font-size: 14px; margin: 6px 0; }
.setup-easy .setup-cmd pre { padding-right: 74px; }
.setup-or { color: var(--ink-3); font-size: 13.5px; font-weight: 600; margin: 4px 0 16px; }

/* Advanced disclosure inside a step. */
.setup-advanced { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.setup-advanced summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); list-style: none;
}
.setup-advanced summary::-webkit-details-marker { display: none; }
.setup-advanced summary::before { content: "▸ "; color: var(--ink-3); }
.setup-advanced[open] summary::before { content: "▾ "; }

/* Skill download row. */
.setup-dl-row { display: flex; align-items: center; gap: 16px; margin: 12px 0; }
.setup-dl { text-align: center; }
.setup-rawlink { font-size: 13px; color: var(--ink-2); }
.setup-rawlink:hover { color: var(--accent); }

/* "Get the skill" section on the With-Claude landing page. */
.skill-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.skill-view { max-width: 760px; margin: 24px auto 0; }
.skill-view summary {
  cursor: pointer; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.skill-view pre {
  margin-top: 14px; background: #10201d; color: #d7e4e1; border-radius: 10px;
  padding: 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px;
  line-height: 1.6; max-height: 420px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
}

/* Receipt detail modal */
.overlay {
  position: fixed; inset: 0; background: rgba(16, 32, 29, 0.45); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto;
}
.modal {
  background: var(--card); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  max-width: 860px; width: 100%; padding: 22px 24px 26px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.modal-head h2 { font-size: 18px; }
.modal-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.fields { display: flex; flex-direction: column; gap: 10px; }
.field { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: 14px; align-items: baseline; }
.f-label { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); }
.f-value { min-width: 0; }

/* Attachment mocks */
.paper {
  background: #fffdf5; border: 1px solid #e8e2cf; border-radius: 4px; padding: 18px 16px;
  font-family: var(--mono); font-size: 12px; color: #3a3a33; margin-top: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08); transform: rotate(-0.6deg);
}
.paper-head { text-align: center; font-weight: 700; font-size: 13px; letter-spacing: 0.06em; }
.paper-line { text-align: center; color: #8a8878; margin-top: 4px; }
.paper-rule { border-top: 1px dashed #c9c4ab; margin: 10px 0; }
.paper-row { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.paper-total { font-weight: 700; font-size: 13px; }
.paper-foot { margin-top: 10px; }

.pdfdoc { margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.pdfdoc-bar { background: #eef1f0; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 7px 12px; border-bottom: 1px solid var(--line); }
.pdfdoc-page { background: #fff; padding: 18px 16px; font-size: 13px; }
.pdfdoc-title { font-weight: 700; font-size: 15px; }
.pdfdoc-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }

@media (max-width: 720px) { .modal-grid { grid-template-columns: 1fr; } }

/* ============ Topbar: fiscal year + user menu ============ */
.fy-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.fy-switch select {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card);
}
.usermenu { position: relative; }
.avatar-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; }
.avatar-btn .caret { color: var(--ink-3); font-size: 11px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10.5px; }
.menu {
  position: absolute; right: 0; top: 42px; width: 240px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,0.14);
  z-index: 40; overflow: hidden; padding: 6px;
}
.menu-head { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 13.5px; }
.menu-head .muted { font-size: 12.5px; }
.menu a, .menu button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px;
  font-size: 13.5px; color: var(--ink); background: none; border: 0;
}
.menu a:hover, .menu button:hover { background: #f2f6f5; }
.menu-danger { color: var(--red) !important; border-top: 1px solid var(--line) !important; margin-top: 4px; }

/* ============ Banners ============ */
.banner {
  border-radius: 9px; padding: 11px 16px; font-size: 13.5px; margin-bottom: 18px; font-weight: 500;
}
.banner.locked { background: var(--amber-soft); color: var(--amber); border: 1px solid #f3dcbc; }
.banner.error { background: var(--red-soft); color: var(--red); border: 1px solid #f0d3d0; }
.banner.warn-inline { background: var(--amber-soft); color: var(--amber); border: 1px solid #f3dcbc; font-size: 13px; font-weight: 500; }
.banner.info-inline { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #c8e3de; font-size: 13px; font-weight: 500; }
table.data.mini td { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
table.data.mini tr:hover td { background: transparent; }
table.data tr.total-line td { font-weight: 700; background: #fcfdfd; }

/* Customer / vendor secondary detail */
.sub-line { font-size: 12.5px; margin-top: 2px; max-width: 260px; }
.note-tag { cursor: help; font-size: 12px; opacity: 0.75; }
textarea { resize: vertical; min-height: 54px; line-height: 1.45; }

/* Invoice line editor */
.entry-lines-head.inv-head, .inv-line { display: grid; grid-template-columns: 1fr 190px 110px 32px; gap: 8px; align-items: center; }
.inv-line { margin-bottom: 6px; }
.inv-line input, .inv-line select { margin-top: 0; }
.inv-line .l-del { padding: 6px 8px; }
#inv-preview { background: #fcfdfd; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 6px; }
@media (max-width: 620px) { .entry-lines-head.inv-head, .inv-line { grid-template-columns: 1fr; } }

/* ============ Page title actions ============ */
.page-title .sub { color: var(--ink-3); font-size: 13.5px; margin-top: 3px; }
.title-actions { display: flex; gap: 8px; align-items: center; }

/* ============ Tables: clickable rows, source tag ============ */
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--accent-soft); }
.src {
  display: inline-block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-3); background: #eef2f1; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px;
}
.btn-sm.danger { color: var(--red); border-color: #f0d3d0; }
.btn-sm.danger:hover { background: var(--red-soft); }
.btn-sm:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ Forms & modals ============ */
.modal-narrow { max-width: 560px; }
label.block { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 12px 0 0; }
.form-row { display: flex; gap: 12px; margin-top: 12px; }
.form-row label { flex: 1; display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
input, select, textarea {
  font: inherit; font-size: 14px; width: 100%; margin-top: 5px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled { background: #f5f8f7; color: var(--ink-3); }

.entry-lines-head, .entry-line { display: grid; grid-template-columns: 1fr 110px 110px 32px; gap: 8px; align-items: center; }
.entry-lines-head { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); font-weight: 600; margin: 16px 0 6px; }
.entry-line { margin-bottom: 6px; }
.entry-line input, .entry-line select { margin-top: 0; }
.entry-line .line-del { padding: 6px 8px; }
#add-line { margin-top: 4px; }
.entry-balance { margin-top: 14px; padding: 9px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.entry-balance.ok { background: var(--green-soft); color: var(--green); }
.entry-balance.off { background: #f4f1e8; color: var(--ink-2); }
.modal-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.form-error { margin-top: 12px; color: var(--red); font-size: 13px; font-weight: 500; }
.form-panel { padding-bottom: 4px; }

/* Contact form success state. */
.form-panel-success { padding: 52px 36px; text-align: center; animation: form-success-in .5s cubic-bezier(.16,1,.3,1); }
@media (prefers-reduced-motion: reduce) { .form-panel-success { animation: none; } }
@keyframes form-success-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.success-icon {
  width: 52px; height: 52px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--green-soft); color: var(--green);
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
}
.form-panel-success h3 { font-size: 20px; letter-spacing: -0.01em; }
.form-panel-success p { color: var(--ink-2); font-size: 15px; max-width: 40ch; margin: 8px auto 0; }
.success-next {
  margin: 28px auto 0; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2); max-width: 42ch;
}
.success-next a { font-weight: 600; }
.settings-form { padding: 16px 18px 18px; }
.field-note { font-size: 12.5px; color: var(--ink-2); margin-top: 14px; background: #f7faf9; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.saved-note { color: var(--green); font-size: 13px; font-weight: 600; }
.invite-bar { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fcfdfd; }
.invite-bar input { flex: 2; margin-top: 0; }
.invite-bar select { flex: 1; margin-top: 0; }

/* ============ Bulk upload dropzone ============ */
.dropzone {
  display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 28px; text-align: center;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dz-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dz-ico { font-size: 26px; color: var(--accent); }
.dz-inner strong { font-size: 15px; }
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.file-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #f7faf9; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; }

/* ============ App footer ============ */
.app-footer {
  flex: 0 0 auto; margin-top: auto; padding: 18px 0 20px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3); text-align: center;
}
.app-footer .ph-heart { color: #e0245e; }
.app-footer a { color: var(--ink-2); }
.app-footer a:hover { color: var(--accent); }

/* ============ Auth pages ============ */
/*
 * Two-panel split: the form on the left, a panel on the right that makes the
 * case for the product. Sign-in is the one page every user sees repeatedly and
 * the only one a hesitant new user sees before deciding, so the right half is
 * doing marketing work, not decoration.
 *
 * The split collapses below 900px — see the media query at the end of this
 * block. On a phone the benefit panel moves BELOW the form rather than above
 * it: a returning user should reach the email field without scrolling past a
 * pitch they have already accepted.
 */
/* --- single centred card: still used by the CLI authorize page, which is a one-off
       confirmation screen and deliberately keeps the older, simpler layout. --- */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 34px 32px; width: 100%; max-width: 400px; }

/* --- the split layout used by the sign-in and sign-up pages --- */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.auth-form-side { min-height: 100vh; display: flex; padding: 48px 24px; background: var(--bg); }
/*
 * `margin: auto` rather than `justify-content: center`. Both centre the form,
 * but a flex container that CENTRES content taller than itself overflows in
 * both directions and the overflow above the top edge cannot be scrolled to —
 * on a short window the register form would lose its first fields with no way
 * to reach them. Auto margins collapse to zero instead of going negative.
 */
.auth-form-inner { width: 100%; max-width: 400px; margin: auto; }
.auth-form-inner.wide { max-width: 470px; }

/* --- signup wizard --- */
/*
 * Classic three-dot stepper: badge on top, label beneath, a connector line
 * running badge-to-badge BEHIND them. The label sits below the line height, so
 * the connector never crosses the text (an earlier inline layout struck the
 * line straight through "Your email").
 */
.wiz-steps { display: flex; list-style: none; margin: 4px 0 28px; padding: 0; }
.wiz-steps li {
  flex: 1; text-align: center; position: relative;
  font-size: 11.5px; font-weight: 600; color: var(--ink-3);
}
.wiz-steps li .n {
  position: relative; z-index: 1; width: 26px; height: 26px; margin: 0 auto 7px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 2px solid var(--line); color: var(--ink-3); font-size: 12.5px;
}
/* Connector spans from this badge's centre to the next one's (each li is 1/3
   the width, so width:100% from left:50% reaches the next centre exactly). */
.wiz-steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 13px; left: 50%; width: 100%; height: 2px;
  background: var(--line); z-index: 0;
}
.wiz-steps li.active { color: var(--ink); }
.wiz-steps li.active .n { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.wiz-steps li.done { color: var(--ink-2); }
.wiz-steps li.done .n { border-color: var(--accent); background: var(--accent); color: #fff; font-size: 0; }
.wiz-steps li.done .n::after { content: "✓"; font-size: 13px; }
.wiz-steps li.done:not(:last-child)::after { background: var(--accent); }

.wiz-step[hidden] { display: none; }

/* A short, spaced-out numeric input for the verification code. */
.code-input {
  letter-spacing: 0.4em; font-size: 20px; font-variant-numeric: tabular-nums;
  text-align: center; font-weight: 600;
}
/* "(optional)" marker on a field label. */
.opt { font-weight: 500; color: var(--ink-3); text-transform: none; letter-spacing: 0; }

/* --- the benefit panel --- */
/*
 * Sticky, not just tall: the register form is roughly twice the height of the
 * viewport, and a statically-positioned panel would centre itself against the
 * whole page — leaving the pitch half-scrolled-past exactly when a hesitant
 * user is deciding whether to finish the form. Sticky keeps it in view.
 * Reverted to static in the stacked mobile layout below.
 */
.auth-aside {
  position: sticky; top: 0; min-height: 100vh; overflow: hidden; color: #fff;
  background: linear-gradient(150deg, #0e7568 0%, #0a5a50 55%, #073f38 100%);
  display: flex; flex-direction: column; justify-content: center; padding: 56px 52px;
}
/* Soft light bloom, so the flat gradient reads as a lit surface rather than a
   block of colour. Purely decorative and pointer-transparent. */
.auth-aside::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(255,255,255,0.13) 0%, rgba(255,255,255,0) 65%);
  pointer-events: none;
}
.auth-aside > * { position: relative; }
.auth-aside-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  background: rgba(255,255,255,0.13); border: 1px solid rgba(255,255,255,0.18);
  font-size: 12.5px; font-weight: 600; padding: 6px 13px; border-radius: 999px; margin-bottom: 26px;
}
.auth-aside h2 {
  font-size: 34px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; max-width: 15ch;
}
.auth-aside h2 em { font-style: normal; color: #7fd8c8; }
.auth-aside .lede { margin-top: 18px; font-size: 16px; line-height: 1.6; color: rgba(255,255,255,0.82); max-width: 42ch; }

.auth-benefits { list-style: none; margin-top: 34px; display: grid; gap: 18px; max-width: 44ch; }
.auth-benefits li { display: grid; grid-template-columns: 26px 1fr; gap: 13px; align-items: start; }
.auth-benefits .tick {
  width: 24px; height: 24px; border-radius: 7px; background: rgba(255,255,255,0.15);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; margin-top: 1px;
}
.auth-benefits strong { display: block; font-size: 14.5px; font-weight: 650; }
.auth-benefits span.d { display: block; font-size: 13.5px; color: rgba(255,255,255,0.72); line-height: 1.5; margin-top: 2px; }

.auth-aside-foot {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 13px; color: rgba(255,255,255,0.65);
}
.auth-aside-foot strong { color: rgba(255,255,255,0.9); font-weight: 650; }

/* --- social sign-in --- */
.auth-social { display: grid; gap: 9px; margin-bottom: 6px; }
.auth-social button {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 10px 14px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.auth-social button:hover { border-color: var(--ink-3); background: #fcfefd; }
.auth-social button svg { width: 17px; height: 17px; flex: none; }
/* Shown when a provider button is pressed before SSO is wired up. Better than a
   button that swallows the click and leaves the user wondering. */
.auth-social-note {
  display: none; font-size: 12.5px; color: var(--amber); background: var(--amber-soft);
  border-radius: 8px; padding: 8px 11px; margin-bottom: 14px;
}
.auth-social-note.show { display: block; }

.auth-or {
  display: flex; align-items: center; gap: 12px; margin: 18px 0 4px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3);
}
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Centred for the single-card pages (the CLI authorize page); the split pages below
   override it to left-align against the form. */
.auth-brand { justify-content: center; margin-bottom: 22px; }
.auth-split .auth-brand { justify-content: flex-start; margin-bottom: 26px; }
.auth-h { font-size: 27px; letter-spacing: -0.02em; font-weight: 750; }
.auth-sub { color: var(--ink-2); font-size: 14.5px; margin: 7px 0 22px; }
.auth-flash { background: var(--accent-soft); color: var(--accent-dark); font-size: 13px; padding: 9px 12px; border-radius: 8px; margin-bottom: 16px; }
.auth-flash.ok { background: var(--green-soft); color: var(--green); }
.auth-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin: 14px 0 6px; }
.auth-row .remember { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; }
.auth-row .remember input { width: auto; margin: 0; }
.auth-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; margin-top: 16px; border: 0; padding: 12px 20px; font-size: 15.5px; cursor: pointer; }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-btn .spinner { width: 16px; height: 16px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.auth-btn .spinner[hidden] { display: none; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--ink-2); margin-top: 22px; }
.auth-foot { margin-top: 34px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.auth-foot a { color: var(--ink-2); }
.auth-foot .ph-heart { color: #e0245e; }

/* Still used by the CLI authorize page, which keeps the original centred-card layout. */
.auth-card-wide { max-width: 460px; }

/* Below 900px the two panels stack. The benefit panel comes SECOND in source
   order for exactly this reason — no `order` juggling, and a screen reader hits
   the form first too. */
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-form-side { min-height: 100vh; padding: 40px 22px; }
  /* Static and self-sized once stacked — a sticky full-height panel below the
     form would trap the scroll on the way down the page. */
  .auth-aside { position: static; min-height: 0; padding: 46px 26px; }
  .auth-aside h2 { font-size: 27px; }
  .auth-benefits { margin-top: 26px; gap: 15px; }
}
.auth-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-3); margin: 22px 0 2px; padding-top: 12px; border-top: 1px solid var(--line);
}
.auth-demo { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }
.auth-demo code { background: #f2f6f5; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); margin-top: 14px; font-weight: 500; }
.check-row input { width: auto; margin: 0; }
.role-sel { margin-top: 0; padding: 4px 8px; font-size: 13px; }
code.token { display: block; margin-top: 6px; font-size: 12.5px; word-break: break-all; background: #fff; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink); }
optgroup { font-style: normal; font-weight: 700; color: var(--ink-3); }

/* ============ Legal pages ============ */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.legal h1 { font-size: 34px; letter-spacing: -0.01em; margin-bottom: 6px; }
.legal .updated { color: var(--ink-3); font-size: 13.5px; margin-bottom: 28px; }
.legal h2 { font-size: 19px; margin: 30px 0 8px; }
.legal p, .legal li { color: var(--ink-2); font-size: 15px; margin-bottom: 10px; }
.legal ul { padding-left: 22px; }
.legal .note { background: #fcfdfd; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-size: 13.5px; color: var(--ink-3); margin-bottom: 24px; }

@media (max-width: 960px) {
  .feature-grid, .how, .pricing-grid, .cards { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 38px; }
  .app { grid-template-columns: 64px 1fr; }
  .sidebar .brand span, .sidebar nav a .txt, .sidebar .nav-label { display: none; }
  .side-logout { text-align: center; padding: 9px 4px; }
}
@media (max-width: 620px) {
  .feature-grid, .how, .pricing-grid, .cards { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .nav-links { gap: 10px; }
  .form-row { flex-direction: column; }
  .invite-bar { flex-direction: column; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
  .fy-switch span { display: none; }
  .topbar { flex-wrap: wrap; gap: 10px; }
}

/* CLI authorization code */
.cli-code {
  font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: 0.14em;
  text-align: center; padding: 16px; margin: 14px 0 10px;
  background: #f2f6f5; border: 1px dashed var(--ink-3); border-radius: 10px; color: var(--ink);
  user-select: all;
}

/* ===================================================================
   Marketing: the "with Claude" page
   =================================================================== */

.hero-narrow { max-width: 820px; margin: 0 auto; }
.eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px;
  margin-bottom: 16px; font-weight: 600;
}
.nav-links a.active { color: var(--accent); font-weight: 600; }

/* Each scenario: copy on one side, a mocked session on the other. */
.scenario {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center;
  padding: 44px 0; border-bottom: 1px solid var(--line);
}
.scenario:last-child { border-bottom: 0; }
.scenario.reverse .scenario-copy { order: 2; }
.scenario-tag {
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-bottom: 8px;
}
.scenario-copy h3 { font-size: 24px; line-height: 1.25; margin: 0 0 12px; }
.scenario-copy > p { color: var(--ink-2); margin: 0 0 16px; }
.scenario-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.scenario-points li { padding-left: 22px; position: relative; font-size: 14px; color: var(--ink-2); }
.scenario-points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* The session mockup. Our own chrome, deliberately — see the note in the Claude page. */
.mock {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--card); box-shadow: 0 10px 30px rgba(22,33,31,.07);
}
.mock-bar {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  background: #f4f8f7; border-bottom: 1px solid var(--line);
}
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: #d6e0de; }
.mock-title { margin-left: 8px; font-size: 12px; color: var(--ink-3); }
.mock-body { padding: 16px; display: grid; gap: 11px; font-size: 13.5px; line-height: 1.5; }
.m-label {
  display: inline-block; min-width: 52px; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); vertical-align: top;
}
.m-label.ai { color: var(--accent); }
.m-you, .m-ai { margin: 0; color: var(--ink); }
.m-ai { color: var(--ink-2); }
.m-run, .m-out {
  margin: 0 0 0 52px; padding: 9px 11px; border-radius: 8px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55;
  white-space: pre;
}
.m-run { background: #16211f; color: #cfe6e1; }
.m-out { background: #f4f8f7; color: var(--ink-2); border: 1px solid var(--line); }

.cta-band { text-align: center; padding: 64px 24px; background: var(--accent-soft); }
.cta-band h2 { margin: 0 0 8px; font-size: 28px; }
.cta-band p { margin: 0 0 22px; color: var(--ink-2); }

@media (max-width: 900px) {
  /* Stack, and put the copy first regardless of which side it was on —
     reading the story before the mockup only works in one order. */
  .scenario { grid-template-columns: 1fr; gap: 24px; }
  .scenario.reverse .scenario-copy { order: 0; }
  .m-run, .m-out { margin-left: 0; }
}

/* Cards used by the "why it can be trusted" grid on the Claude page. */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { font-size: 16px; margin-bottom: 6px; }
.card p { font-size: 14px; color: var(--ink-2); }
.card-icon {
  width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 12px;
}
.section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: none; }
.section.alt > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.hero-sub { font-size: 18px; color: var(--ink-2); margin: 20px auto 0; max-width: 620px; }

@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

/* Explainer box on the developers page — deliberately plain, for the reader who
   followed a link and has never seen a command line. */
.plain-box {
  max-width: 720px; margin: 0 auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 30px 32px;
}
.plain-box h2 { font-size: 22px; margin-bottom: 12px; }
.plain-box p { color: var(--ink-2); margin-bottom: 12px; }
.plain-box p:last-child { margin-bottom: 0; }
.plain-note {
  background: var(--accent-soft); border-radius: 8px; padding: 10px 14px;
  font-size: 14px; color: var(--accent-dark) !important;
}
.card code {
  font-family: var(--mono); font-size: 0.9em; background: #f4f8f7;
  padding: 1px 5px; border-radius: 4px;
}
