:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #131820;
  --muted: #5a6474;
  --line: #e1e5eb;
  --brand: #0f766e;
  --brand-hover: #0b5f59;
  --brand-soft: #e3f3f1;
  --night: #0b1220;
  --night-soft: #1a2334;
  --warn-bg: #fff6e5;
  --warn-line: #f0c36d;
  --warn-ink: #6f4500;
  --note-bg: #edf3ff;
  --note-line: #b8cbf2;
  --note-ink: #1d3b73;
  --error-bg: #fdeceb;
  --error-line: #f1b2ac;
  --error-ink: #8a1c12;
  --danger: #b42318;
  --tier-basic: #475467;
  --tier-plus: #0f766e;
  --tier-pro: #7a2e98;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

main { flex: 1; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--brand); }
a:hover { color: var(--brand-hover); }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.section { padding-top: 40px; padding-bottom: 40px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: 700;
  color: var(--brand); margin-bottom: 0.4rem;
}
.lede { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.center .lede { margin-left: auto; margin-right: auto; }

/* Header */
.site-header { background: var(--night); color: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; }
.brand:hover { color: #fff; }
.brand-mark { width: 14px; height: 24px; border-radius: 4px; background: var(--brand); box-shadow: inset 0 0 0 3px #5eead4; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav-link { color: #c9d2e0; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.nav-link:hover, .nav-link.active { color: #fff; background: var(--night-soft); }
.nav-account { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.nav-account:hover, .nav-account.active { color: #fff; background: var(--night-soft); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--brand-hover); color: #fff; }
.button:disabled { opacity: 0.55; cursor: not-allowed; }
.button-small { min-height: 36px; padding: 6px 12px; font-size: 0.9rem; }
.button-wide { width: 100%; }
.button-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button-ghost:hover { background: #fff; color: var(--ink); border-color: #c5ccd6; }
.button-ghost-light { background: transparent; color: #fff; border-color: #3a475d; }
.button-ghost-light:hover { background: var(--night-soft); color: #fff; }
.button-danger { background: #fff; color: var(--danger); border-color: var(--error-line); }
.button-danger:hover { background: var(--error-bg); color: var(--danger); }
.link-button { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 0.875rem; color: var(--muted); cursor: pointer; text-decoration: underline; }
.link-button.danger:hover { color: var(--danger); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.actions.center { justify-content: center; }

:focus-visible { outline: 3px solid #5eead4; outline-offset: 2px; }

/* Cards and layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.page-head { margin-bottom: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.back { display: inline-block; margin-bottom: 16px; text-decoration: none; font-weight: 600; }

.hero { background: var(--night); color: #fff; padding: 64px 0 72px; }
.hero h1 { max-width: 18ch; }
.hero .lede { color: #c9d2e0; }
.hero .eyebrow { color: #5eead4; }

.how { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: how; }
.how li { display: flex; flex-direction: column; gap: 4px; counter-increment: how; }
.how li::before { content: counter(how); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; margin-bottom: 8px; }
.how span { color: var(--muted); }

.callout { background: var(--brand-soft); border: 1px solid #b6e0da; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.callout p:last-child { margin-bottom: 0; }
.callout-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.callout-note { background: var(--note-bg); border-color: var(--note-line); color: var(--note-ink); }
.callout-error { background: var(--error-bg); border-color: var(--error-line); color: var(--error-ink); }

/* Chips and badges */
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #eef1f5; color: #344054; font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; min-height: 36px; }
.chip-button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: #fff; vertical-align: middle; }
.badge-basic { background: var(--tier-basic); }
.badge-plus { background: var(--tier-plus); }
.badge-pro { background: var(--tier-pro); }

/* Phones */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 8px; }
.search input { width: min(320px, 100%); }
.phone-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 8px; }
.phone-card { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.phone-card:hover { color: var(--ink); border-color: #9fd6cf; transform: translateY(-2px); }
.phone-card h3 { margin: 4px 0 0; }
.phone-card p { margin: 0; font-size: 0.93rem; }
.phone-card-top { display: flex; justify-content: space-between; align-items: center; }
.phone-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: auto; padding-top: 10px; font-size: 0.82rem; color: var(--muted); }

.facts { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 0.9rem; }
.facts span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }

.guide-steps { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.step-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; }
.step h2 { font-size: 1.15rem; margin-top: 6px; }
.step .callout { margin: 10px 0 0; }
.official-link { display: inline-block; margin-top: 10px; font-weight: 600; }

.locked { margin: 24px 0; display: grid; gap: 16px; }
.lock-box { background: var(--night); color: #fff; border-radius: var(--radius); padding: 24px; }
.lock-box p { color: #c9d2e0; }
.locked-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: locked; }
.locked-steps li { counter-increment: locked; display: flex; gap: 12px; align-items: center; background: #fff; border: 1px dashed #c5ccd6; border-radius: 10px; padding: 12px 14px; color: var(--muted); }
.locked-steps li::before { content: counter(locked); font-weight: 800; color: #98a2b3; min-width: 1.2em; }

/* Plans */
.plan-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan ul { padding-left: 1.1rem; margin: 0 0 8px; flex: 1; }
.plan li { margin-bottom: 4px; }
.plan .button { margin-top: auto; }
.plan-basic { border-top: 4px solid var(--tier-basic); }
.plan-plus { border-top: 4px solid var(--tier-plus); }
.plan-pro { border-top: 4px solid var(--tier-pro); }
.plan-highlight { box-shadow: 0 0 0 3px #5eead4; }
.price { margin: 0; }
.price .amount { font-size: 2.2rem; font-weight: 800; }
.price .per { color: var(--muted); margin-left: 4px; }
.faq { margin-top: 48px; max-width: 720px; }
.faq dt { font-weight: 700; margin-top: 14px; }
.faq dd { margin: 4px 0 0; color: var(--muted); }

/* Forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field-label { font-weight: 600; font-size: 0.93rem; }
.hint { font-size: 0.82rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #c9d0da; border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18); }
.form-error { color: var(--danger); margin: 0; min-height: 1.2em; font-size: 0.93rem; }
.form-error:empty { display: none; }

.auth-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); max-width: 860px; margin: 0 auto; }
.dash-grid { display: grid; gap: 20px; grid-template-columns: 2fr 1fr; }
.plan-line { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.link-list { padding-left: 1.1rem; margin: 0 0 16px; }
.link-list li { margin-bottom: 6px; }

/* Board */
.compose { margin-bottom: 20px; }
.compose summary { cursor: pointer; font-weight: 700; }
.compose[open] summary { margin-bottom: 14px; }
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.post-row { padding: 14px 18px; }
.post-title { font-weight: 700; font-size: 1.05rem; text-decoration: none; color: var(--ink); }
.post-title:hover { color: var(--brand); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.post-meta strong { color: var(--ink); }
.post { margin-bottom: 24px; }
.post h1 { font-size: 1.6rem; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0 6px; }
.replies { display: grid; gap: 12px; margin-bottom: 24px; }
.replies h2 { font-size: 1.05rem; }
.pager { display: flex; justify-content: space-between; margin-top: 20px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--night); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: opacity 0.2s, transform 0.2s; max-width: min(560px, calc(100vw - 32px)); z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--danger); }
.toast-success { background: var(--brand); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 20px; font-size: 0.9rem; color: var(--muted); }
.footer-inner nav { display: flex; gap: 16px; }

@media (max-width: 720px) {
  .header-inner { gap: 8px 12px; padding-top: 8px; padding-bottom: 8px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .dash-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 48px; }
  .step { grid-template-columns: 1fr; }
}

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

/* ===== Server-rendered content components ===== */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 100; }
.skip-link:focus { left: 0; color: #fff; }

.site-header .brand-mark { background: none; box-shadow: none; border-radius: 6px; display: block; }
.hero-note { margin-top: 18px; color: #9fb0c4; font-size: 0.9rem; }
.footer-brand { font-weight: 800; margin: 0 0 4px; color: var(--ink); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px 32px; align-items: start; }
.footer-inner > p:last-child { grid-column: 1 / -1; }

.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { text-decoration: none; }
.crumbs span { margin: 0 4px; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; background: #eef1f5; color: #344054; font-size: 0.76rem; font-weight: 700; }
.tag-teal { background: var(--brand-soft); color: var(--brand-hover); }
.tag-muted { background: #eceff3; color: #667085; }

.phone-card { min-height: 100%; }
.phone-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; font-size: 0.82rem; color: var(--muted); }
.guide-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.guide-card:hover { color: var(--ink); border-color: #9fd6cf; transform: translateY(-2px); }
.guide-card-top { display: flex; justify-content: space-between; align-items: center; }
.guide-card h3 { margin: 4px 0 0; font-size: 1.05rem; }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; color: var(--ink); }
.list-row:hover { border-color: #9fd6cf; color: var(--ink); }
.list-row span span { display: block; }
.list-plain { padding-left: 1.1rem; }
.list-plain li { margin-bottom: 8px; }

.facts { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 0.9rem; }
.facts span { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin-bottom: 2px; }

.guide .page-head { margin-bottom: 12px; }
.guide-summary { font-size: 1.08rem; line-height: 1.6; border-left: 3px solid var(--brand); padding-left: 16px; margin: 18px 0 24px; color: #303a46; }
.guide-section { margin: 28px 0; }
.guide-section h2 { font-size: 1.2rem; margin-bottom: 8px; }
.guide-section p { margin: 0 0 12px; }
.steps { margin: 12px 0; padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding: 10px 14px 10px 46px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.steps li::before { content: counter(step); position: absolute; left: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 0.85rem; display: grid; place-items: center; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; }
.cta-row h3 { margin: 0 0 4px; }
.cta-row p { margin: 0; }

.legal h1 { margin-bottom: 12px; }
.legal h2 { margin-top: 28px; font-size: 1.2rem; }
.legal p, .legal li { color: #303a46; }

/* Pricing plan accents */
.plan-basic { border-top: 4px solid var(--tier-basic); }
.plan-plus { border-top: 4px solid var(--tier-plus); }
.plan-pro { border-top: 4px solid var(--tier-pro); }

/* Requests */
.request-row { padding: 0; }
.request-toggle { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 14px 16px; font: inherit; cursor: pointer; color: var(--ink); }
.request-toggle:hover { background: #fafbfc; }
.request-title { display: block; font-weight: 700; font-size: 1.02rem; margin-bottom: 6px; }
.request-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.85rem; color: var(--muted); }
.request-detail { margin: -4px 0 10px; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.manage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.pill-open { background: #e3f3f1; color: #0b5f59; }
.pill-planned { background: #edf3ff; color: #1d3b73; }
.pill-answered { background: #e6f6ea; color: #1a6b2e; }
.pill-closed { background: #eceff3; color: #667085; }

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; align-items: flex-start; }
  .list-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}
