:root {
  --text: #0f1e35;
  --text-dim: #57626f;
  --text-dimmer: #8996a3;
  --bg: #ffffff;
  --bg-alt: #f5f8f9;
  --card: #ffffff;
  --border: #e3e9ec;
  --accent: #14b8a6;
  --accent-dark: #0f9488;
  --accent-soft: #e6f7f4;
  --navy: #0f1e35;
  --navy-2: #172a47;
  --ok: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 30, 53, 0.08);
  --font-head: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
pre { background: #0f1e35; color: #d9f5f0; padding: 1rem 1.2rem; border-radius: 10px; overflow-x: auto; line-height: 1.5; }
code.inline { background: var(--bg-alt); padding: 0.1em 0.4em; border-radius: 6px; }

.container { width: min(1120px, calc(100% - 2.5rem)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 2.5rem)); margin: 0 auto; }
section { padding: 4.5rem 0; }
section.alt { background: var(--bg-alt); }
section.dark { background: var(--navy); color: #e6edf5; }
section.dark h2, section.dark h3 { color: #fff; }
section.dark p { color: #c7d2de; }
.kicker { font-family: var(--font-head); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 0.8rem; }
section.dark .kicker { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--text-dim); max-width: 60ch; }
section.dark .lead { color: #c7d2de; }
.muted { color: var(--text-dim); }
.small { font-size: 0.9rem; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* announcement */
.announce { background: var(--navy); color: #e6edf5; font-size: 0.92rem; padding: 0.55rem 0; text-align: center; }
.announce strong { color: #fff; }
.announce a { color: var(--accent); font-weight: 600; margin-left: 0.5rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 32px; width: auto; }
.brand .tag { font-family: var(--font-body); font-weight: 500; font-size: 0.72rem; color: var(--text-dimmer); letter-spacing: 0.06em; text-transform: uppercase; border-left: 1px solid var(--border); padding-left: 0.6rem; }
nav.main { display: flex; align-items: center; gap: 1.6rem; }
nav.main a { color: var(--text-dim); font-weight: 500; font-size: 0.95rem; }
nav.main a:hover, nav.main a.active { color: var(--text); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 0.7rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.6rem; font: inherit; cursor: pointer; }
@media (max-width: 900px) {
  nav.main { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 1rem 1.25rem 1.25rem; border-bottom: 1px solid var(--border); gap: 0.9rem; }
  nav.main.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .nav-actions .btn.ghost { display: none; }
  .brand .tag { display: none; }
  .brand img { height: 28px; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.7rem 1.15rem; border-radius: 10px; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer; font-family: var(--font-body); transition: background 0.15s, color 0.15s, border-color 0.15s; line-height: 1.2; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--accent); color: #062b27; }
.btn.primary:hover { background: var(--accent-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--text-dimmer); }
.btn.dark { background: var(--navy); color: #fff; }
.btn.dark:hover { background: var(--navy-2); }
.btn.light { background: #fff; color: var(--navy); }
.btn.lg { padding: 0.9rem 1.5rem; font-size: 1.05rem; }
.btn.sm { padding: 0.45rem 0.8rem; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* hero */
.hero { padding: 5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 1rem; }
.hero .lead { font-size: 1.2rem; }

/* task mock in hero */
.queue { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 18px; padding: 1.1rem; box-shadow: var(--shadow); }
.queue .qhead { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-dim); padding: 0 0.3rem 0.7rem; }
.qcard { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0.85rem 1rem; margin-bottom: 0.6rem; display: grid; grid-template-columns: 1fr auto; gap: 0.4rem 1rem; align-items: center; }
.qcard .t { font-weight: 600; font-size: 0.95rem; }
.qcard .m { font-size: 0.8rem; color: var(--text-dim); grid-column: 1; }
.qcard .pay { font-family: var(--font-head); font-weight: 700; color: var(--accent-dark); grid-row: span 2; }
.chip { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); margin-right: 0.35rem; }
.chip.navy { background: #e8edf5; color: var(--navy); }
.chip.warn { background: #fef3e2; color: #9a5b00; }
.chip.ok { background: #e3f6ee; color: #086e4b; }
.chip.bad { background: #fde8e8; color: #9b1c1c; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3rem; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; background: #fff; }
.stat .n { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat .l { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.4rem; }

/* cards + grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.card h3 { margin-top: 0.4rem; }
.card p:last-child { margin-bottom: 0; }
.card.soft { background: var(--bg-alt); border-color: transparent; }
section.dark .card { background: var(--navy-2); border-color: #26395a; color: #dbe4ef; }
section.dark .card h3 { color: #fff; }
.icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
section.dark .icon { background: rgba(20, 184, 166, 0.18); color: var(--accent); }

/* steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 0.9rem; align-items: start; }
.steps li::before { content: counter(step); width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.steps li strong { display: block; }
.steps li span { color: var(--text-dim); font-size: 0.95rem; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-family: var(--font-head); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.table-wrap table { min-width: 620px; }
td.yes { color: var(--ok); font-weight: 600; }
td.no { color: var(--bad); font-weight: 600; }

/* forms */
form.stack { display: grid; gap: 1rem; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: 10px; font: inherit; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }
.help { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.3rem; }
.notice { border-radius: 10px; padding: 0.8rem 1rem; font-size: 0.95rem; border: 1px solid var(--border); background: var(--bg-alt); }
.notice.ok { background: #e3f6ee; border-color: #b6e6d0; color: #065f46; }
.notice.bad { background: #fde8e8; border-color: #f5bcbc; color: #7f1d1d; }
.notice.warn { background: #fef3e2; border-color: #f7d9a8; color: #7c4a03; }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.role-switch label { border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 1rem; cursor: pointer; font-weight: 500; display: grid; gap: 0.2rem; }
.role-switch label strong { font-family: var(--font-head); }
.role-switch input { margin-right: 0.4rem; }
.role-switch label.selected { border-color: var(--accent); background: var(--accent-soft); }

/* auth pages */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 3rem 0; background: var(--bg-alt); }
.auth-wrap .form-card { width: min(520px, calc(100% - 2rem)); }

/* faq */
.faq details { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 600; font-family: var(--font-head); font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--accent-dark); font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0.6rem 0 0; color: var(--text-dim); }

/* dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.status-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin: 1rem 0 0; }
@media (max-width: 720px) { .status-track { grid-template-columns: repeat(2, 1fr); } }
.status-step { border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem 0.9rem; font-size: 0.9rem; background: #fff; }
.status-step .s { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dimmer); }
.status-step.done { border-color: #b6e6d0; background: #f0fbf6; }
.status-step.done .s { color: var(--ok); }
.status-step.now { border-color: var(--accent); }
.status-step.now .s { color: var(--accent-dark); }
.task-card { display: grid; gap: 0.5rem; }
.task-card .meta { font-size: 0.85rem; color: var(--text-dim); display: flex; gap: 0.8rem; flex-wrap: wrap; }
.task-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 0.4rem; }
.progress { height: 6px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); }

/* task runner */
.task-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .task-layout { grid-template-columns: 1fr; } }
.doc-frame { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); }
.doc-frame svg { width: 100%; height: auto; display: block; }
.answer-panel { position: sticky; top: 88px; }
.instructions { list-style: disc; padding-left: 1.2rem; color: var(--text-dim); font-size: 0.95rem; }
.item-block { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: 0.9rem; background: #fff; }
.item-block .q { font-weight: 600; margin-bottom: 0.5rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choices label { border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.8rem; font-weight: 500; font-size: 0.9rem; cursor: pointer; margin: 0; }
.choices label.selected { background: var(--navy); color: #fff; border-color: var(--navy); }
.choices input { display: none; }
.rec { display: grid; gap: 0.2rem; font-size: 0.92rem; background: var(--bg-alt); border-radius: 10px; padding: 0.7rem 0.9rem; }
.rec b { font-family: var(--font-head); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.6rem; }
@media (max-width: 620px) { .pair { grid-template-columns: 1fr; } }
.result-list { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.4rem; }
.result-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; border-bottom: 1px dashed var(--border); padding-bottom: 0.3rem; }
.score { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--navy); }
.handwriting { font-family: 'Caveat', 'Bradley Hand', 'Segoe Script', cursive; }
.lineitem-row { display: grid; grid-template-columns: 1fr 120px; gap: 0.6rem; margin-bottom: 0.5rem; }

/* footer */
.site-footer { background: var(--navy); color: #b8c4d3; padding: 3.5rem 0 2rem; margin-top: 2rem; font-size: 0.92rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 900px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.8rem; }
.site-footer a { color: #d5dee9; display: block; margin-bottom: 0.45rem; }
.site-footer .legal { border-top: 1px solid #26395a; margin-top: 2.5rem; padding-top: 1.25rem; font-size: 0.82rem; color: #8ea0b7; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer .brand { color: #fff; }
.site-footer .brand img { filter: brightness(0) invert(1); }

/* misc */
.pill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.pill-list li { border: 1px solid var(--border); border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.92rem; background: #fff; }
.partner-card .loc { color: var(--text-dim); font-size: 0.9rem; }
.partner-card dl { margin: 0.8rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.8rem; font-size: 0.88rem; }
.partner-card dt { color: var(--text-dimmer); }
.partner-card dd { margin: 0; }
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 1rem 1.2rem; border-radius: 0 12px 12px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 0.7rem 1.1rem; border-radius: 10px; font-size: 0.92rem; box-shadow: var(--shadow); z-index: 100; }
.hidden { display: none !important; }
.legal-text h2 { font-size: 1.3rem; margin-top: 2rem; }
.legal-text p, .legal-text li { color: var(--text-dim); }

/* requester console */
.tabs { display: flex; gap: 0.4rem; border-bottom: 1px solid var(--border); margin: 1rem 0 1.5rem; }
.tab { background: none; border: none; border-bottom: 3px solid transparent; padding: 0.6rem 0.9rem; font: inherit; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.wizard-steps { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1.5rem; }
.step-pill { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.9rem 0.35rem 0.4rem; font-size: 0.9rem; color: var(--text-dim); }
.step-pill span { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-alt); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; }
.step-pill.now { border-color: var(--accent); color: var(--text); }
.step-pill.now span { background: var(--accent); color: #062b27; }
.step-pill.done span { background: var(--navy); color: #fff; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
@media (max-width: 900px) { .type-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .type-grid { grid-template-columns: 1fr; } }
.type-card { text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem; font: inherit; cursor: pointer; display: grid; gap: 0.25rem; }
.type-card strong { font-family: var(--font-head); }
.type-card span { color: var(--text-dim); font-size: 0.9rem; }
.type-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.code-area { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; min-height: 340px; }
.preview-frame { width: 100%; min-height: 360px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.qual-row { display: grid; grid-template-columns: 1.4fr 1.2fr 1.4fr 1.4fr auto; gap: 0.5rem; margin-bottom: 0.5rem; align-items: center; }
@media (max-width: 900px) { .qual-row { grid-template-columns: 1fr 1fr; } }
dl.summary { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0.8rem 0 0; font-size: 0.93rem; }
dl.summary dt { color: var(--text-dimmer); }
dl.summary dd { margin: 0; }
