/* Hours Back audit page. Same language as the rest of the site: white
   ground, black ink, Familjen Grotesk for everything, pills and big radii,
   hairlines instead of shadows. */
:root {
  --ink: #ffffff;
  --text: #0a0a0a;
  --muted: #5b5b5b;
  --faint: #8e8e8e;
  --line: #e6e6e6;
  --line-2: #d4d4d4;
  --soft: #f4f4f4;
  --r-card: 32px;
  --r-pill: 100px;
  --font: 'Familjen Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--ink); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.top, .foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 760px; margin: 0 auto; padding: 18px 16px;
}
.brand { font-weight: 700; text-decoration: none; letter-spacing: -.01em; }
.lang {
  background: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-pill);
  padding: 6px 12px; font-size: 12px; font-weight: 600; letter-spacing: .04em; cursor: pointer;
}
.lang span { color: var(--faint); }
.lang span.on { color: var(--text); }
.lang .slash { opacity: .5; margin: 0 2px; }
.foot { font-size: 13px; color: var(--faint); padding-bottom: 28px; }

main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }
.screen { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }
.screen.still { animation: none; }

.kicker {
  margin: 24px 0 10px; font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.display {
  margin: 0 0 18px; font-weight: 700; letter-spacing: -.03em; line-height: 1;
  font-size: clamp(42px, 8vw, 84px);
}
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--text); max-width: 620px; margin: 0 0 24px; }
.gets { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.gets li { border: 1px solid var(--line); border-radius: 20px; padding: 14px 18px; }
.meta { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.note { color: var(--muted); font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--text); border-radius: var(--r-pill);
  background: var(--text); color: var(--ink);
  padding: 14px 26px; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform .2s, opacity .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--ink); color: var(--text); border-color: var(--line-2); }
.btn.big { padding: 18px 30px; font-size: 18px; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 14px; }

/* Question screens */
.progress { margin: 18px 0 26px; }
.progress .label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--text); border-radius: 4px; transition: width .35s; }
.q h2 { margin: 0 0 6px; font-size: clamp(26px, 4.4vw, 40px); line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
.q .hint { color: var(--muted); margin: 0 0 20px; }
.options { display: grid; gap: 10px; margin: 18px 0 8px; }
.options.chips { display: flex; flex-wrap: wrap; }
.opt {
  text-align: left; background: var(--ink); border: 1px solid var(--line-2); border-radius: 18px;
  padding: 15px 18px; font-size: 16px; font-weight: 500; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.chips .opt { border-radius: var(--r-pill); padding: 11px 18px; }
.opt:hover { border-color: var(--text); }
.opt[aria-checked="true"], .opt[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.opt:disabled { opacity: .35; cursor: not-allowed; }
.other-input, .field input, textarea.long {
  width: 100%; font: inherit; color: inherit; background: var(--ink);
  border: 1px solid var(--line-2); border-radius: 16px; padding: 13px 16px;
}
.other-input { margin-top: 10px; }
textarea.long { min-height: 180px; resize: vertical; line-height: 1.5; }
.counter { font-size: 13px; color: var(--faint); text-align: right; margin-top: 6px; }
.counter.short { color: var(--muted); }
.nudge { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--soft); color: var(--text); font-size: 14px; line-height: 1.5; }
.nudge[hidden] { display: none; }
.currency { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 3px; margin-bottom: 6px; }
.currency button { border: 0; background: none; border-radius: var(--r-pill); padding: 6px 14px; font-weight: 700; cursor: pointer; }
.currency button[aria-pressed="true"] { background: var(--text); color: var(--ink); }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; }

/* Review */
.review { list-style: none; padding: 0; margin: 20px 0 28px; border-top: 1px solid var(--line); }
.review li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.review .k { font-size: 13px; color: var(--muted); grid-column: 1; }
.review .v { grid-column: 1; overflow-wrap: anywhere; }
.review .edit { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* Lead form dialog */
.sheet {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px;
  background: var(--ink); color: var(--text);
}
.sheet::backdrop { background: rgba(10, 10, 10, .32); }
.sheet[open] { animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.sheet h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.sheet .sub { color: var(--muted); margin: 0 0 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } .sheet { padding: 22px 18px; } }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 14px; font-weight: 600; }
.field input[aria-invalid="true"] { border-color: var(--text); border-width: 2px; }
.err { font-size: 13px; color: var(--text); font-weight: 600; min-height: 0; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin: 12px 0; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #0a0a0a; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.close { position: absolute; top: 14px; right: 14px; border: 0; background: none; font-size: 22px; cursor: pointer; line-height: 1; padding: 6px; }
.form-error { background: var(--soft); border-radius: 14px; padding: 10px 14px; font-size: 14px; margin: 0 0 12px; }

/* Loading */
.loading { text-align: left; padding-top: 40px; }
.loading .bar { margin: 26px 0 18px; }
.loading .bar i { width: 30%; animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--faint); }
.steps-list li.on { color: var(--text); font-weight: 600; }
.steps-list li.done { color: var(--muted); }
.steps-list li.done::before { content: '✓ '; }

/* Done */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr; } }
.stat { border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.stat b { display: block; font-size: clamp(22px, 3.2vw, 30px); line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; }
.stat span { font-size: 14px; color: var(--muted); }
.card { background: var(--soft); border-radius: 24px; padding: 20px 22px; margin: 0 0 24px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card ol { margin: 8px 0 0; padding-left: 20px; }
.cta { background: var(--text); color: var(--ink); border-radius: var(--r-card); padding: 26px; margin: 8px 0 18px; }
.cta h3 { margin: 0 0 6px; font-size: 24px; line-height: 1.2; letter-spacing: -.01em; }
.cta p { margin: 0 0 18px; color: var(--line-2); }
.cta .btn { background: var(--ink); color: var(--text); border-color: var(--ink); }

/* ---------- UX pass: smooth, thumb-friendly, no surprises ---------- */
h1:focus, h2:focus { outline: none; }
.btn, .opt { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.opt:active, .btn:active { transform: scale(.98); }
.opt { display: flex; align-items: center; gap: 12px; }
.chips .opt { display: inline-flex; }
/* Keyboard hints, only where there is a keyboard. */
.key { display: none; flex: none; min-width: 22px; height: 22px; border: 1px solid var(--line-2); border-radius: 6px;
  font-size: 12px; font-weight: 600; color: var(--faint); align-items: center; justify-content: center; }
.opt[aria-checked="true"] .key, .opt[aria-pressed="true"] .key { border-color: rgba(255,255,255,.4); color: rgba(255,255,255,.75); }
.kbd-hint { display: none; font-size: 13px; color: var(--faint); margin: 10px 0 0; }
@media (hover: hover) and (pointer: fine) { .key { display: inline-flex; } .kbd-hint { display: block; } }
.bar i { transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.field input { transition: border-color .15s; }
.field input:focus, .other-input:focus, textarea.long:focus { border-color: var(--text); outline: none; }
.field input.ok { border-color: var(--line-2); }
.review-bar { position: sticky; bottom: 0; padding: 14px 0 18px; background: linear-gradient(to bottom, rgba(255,255,255,0), var(--ink) 30%); }
.review-bar .btn { width: 100%; }
@media (min-width: 601px) { .review-bar .btn { width: auto; } }

/* Phones: Back/Next pinned within thumb reach, form as a bottom sheet. */
@media (max-width: 600px) {
  .q .nav { position: sticky; bottom: 0; margin: 18px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, rgba(255,255,255,0), var(--ink) 28%); }
  .q .nav .btn { flex: 1; }
  .opt { padding: 16px 18px; }
  .sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 28px 28px 0 0;
    padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .sheet[open] { animation: sheet-up .35s cubic-bezier(.2, .8, .2, 1) both; }
  .display { font-size: clamp(40px, 11vw, 56px); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } .bar i { transition: none; } }
