/* MapVigil shared styles. Tokens and components copied from the approved designs
   (docs/designs/<Screen>/project/Main.dc.html). Change a value here, not in a page. */
:root {
  --paper: #f5f6f2;
  --ink: #0e1b2c;
  --teal: #0f6b6b;
  --teal-deep: #0a4a4a;
  --teal-tint: #d5eeea;
  --teal-wash: #eaf6f4;
  --mist: #bfe3df;
  --signal: #b8460b;
  --signal-deep: #8a3208;
  --signal-tint: #fbe3d3;
  --lamp: #f2c14e;
  --sand: #f6d9a8;
  --muted: #475467;
  --line: #dde1da;
  --line-soft: #eaece6;
  --stone: #e8eae4;
  --slate: #344054;
  --field: #98a2b3;
  --on-dark-muted: #d0d5dd;
  --mint: #7fd6cb;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--paper); }
body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3, .h {
  font-family: 'Space Grotesk', Inter, sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}
p { margin: 0; }
a { color: var(--teal); }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.pad { padding-left: max(24px, calc((100% - 1200px) / 2)); padding-right: max(24px, calc((100% - 1200px) / 2)); }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }

/* Components */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.btn, .btn2 {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  border-radius: 10px; font: 600 16px Inter, sans-serif; text-decoration: none; cursor: pointer;
}
.btn { padding: 0 24px; background: var(--teal); color: #fff; border: 0; }
.btn2 { padding: 0 22px; background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn[disabled], .btn2[disabled] { opacity: .5; cursor: not-allowed; }
.btn.danger { background: var(--signal); }
.mut { color: var(--muted); }
.small { font-size: 14px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--teal-tint); color: var(--teal-deep); }
.tag.o { background: var(--signal-tint); color: var(--signal-deep); }
.tag.g { background: var(--stone); color: var(--slate); }
.lab { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sample { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border: 1px dashed var(--muted); border-radius: 6px; color: var(--muted); background: #fff; }
.placeholder { background: #fff7df; outline: 1px dashed var(--signal); border-radius: 4px; padding: 0 4px; }

/* Rank grid */
.rank-grid { display: grid; gap: 4px; }
.cell { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 8px; font: 600 14px 'Space Grotesk', sans-serif; }
.r1 { background: var(--teal); color: #fff; }
.r2 { background: var(--mist); color: var(--ink); }
.r3 { background: var(--sand); color: var(--ink); }
.r4 { background: var(--signal-deep); color: #fff; }
.r0 { background: var(--stone); color: var(--slate); }

/* Forms */
input.f, select.f { width: 100%; min-height: 48px; border: 1.5px solid var(--field); border-radius: 10px; padding: 0 14px; font: 16px Inter, sans-serif; background: #fff; color: var(--ink); }
input.f[aria-invalid="true"] { border-color: var(--signal); }
label.l { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field-error { color: var(--signal-deep); font-size: 14px; margin-top: 6px; }

/* Site header and footer */
.site-top { padding-top: 20px; padding-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #fff; border-bottom: 1px solid var(--line); }
.site-top nav { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.site-top nav a.plain { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-foot { background: var(--ink); padding-top: 48px; padding-bottom: 48px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-foot p { color: var(--on-dark-muted); font-size: 14px; }
.logo { display: flex; }

/* Lists with check marks (pricing) */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks svg { flex: none; margin-top: 4px; }

/* Choice rows (plan pickers) */
.choice { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1.5px solid var(--field); border-radius: 10px; padding: 12px 16px; cursor: pointer; background: #fff; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border: 2px solid var(--teal); background: var(--teal-wash); }
.choice:has(input:focus-visible) { outline: 3px solid var(--lamp); outline-offset: 2px; }

/* Step indicator */
.steps { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.step { display: flex; gap: 10px; align-items: center; color: var(--muted); font-weight: 700; }
.step .num { width: 32px; height: 32px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--stone); color: var(--slate); }
.step[aria-current="step"] { color: var(--ink); }
.step[aria-current="step"] .num, .step.done .num { background: var(--teal); color: #fff; }

/* App shell (dashboard, settings) */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 0 0 220px; padding: 24px 16px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.side a.nav { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--ink); }
.side a.nav[aria-current="page"] { font-weight: 700; color: var(--teal-deep); background: var(--teal-tint); }
.side .foot { margin-top: auto; }
.main { flex: 1 1 640px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.stat .h { font-size: 40px; margin-top: 6px; }
.line-item { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line-soft); gap: 12px; }
.line-item > div:first-child { flex: 1 1 220px; }
.tabbar { display: none; }

@media (max-width: 720px) {
  .side { display: none; }
  .main { padding: 20px 20px 88px; gap: 16px; }
  .main h1 { font-size: 26px !important; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats .card { padding: 14px; }
  .stat .h { font-size: 30px; }
  .card { padding: 16px; }
  .tabbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: 64px; background: #fff; border-top: 1px solid var(--line); z-index: 10; }
  .tabbar a { display: flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; font-weight: 500; }
  .tabbar a[aria-current="page"] { font-weight: 700; color: var(--teal-deep); background: var(--teal-tint); }
  .mobile-top { display: flex !important; }
  h1.hero { font-size: 40px !important; }
}
.mobile-top { display: none; padding: 16px 20px; background: #fff; border-bottom: 1px solid var(--line); justify-content: space-between; align-items: center; }
.stat .h.text-state { font-size: 24px; line-height: 1.2; padding: 8px 0 4px; }
@media (max-width: 720px) {
  .stat-reviews { order: -1; }
  .stats .stat:first-child { order: -2; }
  .stat .h.text-state { font-size: 18px; }
}

/* Legal and info pages */
.legal h2 { font-size: 24px; margin: 36px 0 10px; }
.legal p, .legal ul { margin: 10px 0; }
.legal li { margin: 6px 0; }
.legal code { font-size: 14px; background: var(--stone); padding: 1px 6px; border-radius: 4px; }
