/* ExtermBolt brand system — forest green + gold on clean white; green/amber/red = status only */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/assets/fonts/inter-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(/assets/fonts/inter-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Brand */
  --green: #014421;        /* forest green — primary (white text 11:1) */
  --green-2: #1F6B45;
  --green-3: #3E8E66;
  --green-4: #74B394;
  --green-5: #B5D9C5;
  --green-t: #EEF5F0;      /* selected tint */
  --gold: #C9A23A;         /* accent fills: header rule, progress bar */
  --gold-l: #E3BE5C;       /* gold on green (6.4:1) */
  --gold-d: #7D5F0E;       /* gold text/borders on white (6:1) */
  --gold-t: #FBF5E3;       /* gold tint (Next-visit box) */
  --gold-b: #EBDDB0;
  /* Neutrals */
  --white: #FFFFFF;
  --surface: #F3F6F4;
  --ink: #12261a;
  --muted: #4d5f54;        /* 6.8:1 on white */
  --line: #E1E7E3;
  --field: #9fb5a7;
  /* Status — always paired with a text label */
  --success: #1d6b3a; --success-bg: #e3f2e7;
  --warning: #8a4b00; --warning-bg: #fff3e0;
  --error: #a3162b;   --error-bg: #fde8eb;
  /* Charts */
  --crimson: #7A0019; --royal: #2A52BE; --lime: #9BE33C;
  --radius: 16px;
  --tap: 48px;
  --font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.shell { min-height: 100dvh; display: flex; flex-direction: column; }

/* Forest green header band carries the on-green logo (white EXTERM + gold BOLT), with a gold rule. */
.brand {
  position: relative; text-align: center; background: var(--green); color: #fff;
  padding: calc(46px + env(safe-area-inset-top)) 16px 14px;
  border-bottom: 4px solid var(--gold);
}
.brand.no-lang { padding-top: calc(16px + env(safe-area-inset-top)); }
.brand img { width: min(240px, 66vw); height: auto; display: block; margin: 0 auto; aspect-ratio: 609 / 223; }
.brand .by { font-size: 13px; letter-spacing: .3px; margin-top: 2px; color: #fff; }
.lang {
  position: absolute; top: calc(8px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right));
  min-height: 40px; padding: 6px 12px; border-radius: 999px;
  background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .75);
  font: 600 14px var(--font); cursor: pointer;
}

main {
  flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 560px; margin: 0 auto;
  padding: 16px calc(16px + env(safe-area-inset-right)) 0 calc(16px + env(safe-area-inset-left));
}

.card {
  background: var(--white); color: var(--ink);
  border-radius: var(--radius); padding: 22px 18px;
  border: 1px solid var(--line);
}
.card + .card { margin-top: 14px; }
@media (min-width: 430px) { .card { padding: 26px 24px; } }

h1, h2, h3 { line-height: 1.25; margin: 0 0 10px; }
h1 { font-size: 26px; font-weight: 700; color: var(--green); }
h2 { font-size: 22px; font-weight: 700; color: var(--green); }
h3, h2.lbl { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--gold-d); }
h1.step-q { font-size: 22px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.progress { margin: 6px 0 14px; }
.progress .label { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.progress .bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--gold); border-radius: 99px; transition: width .3s ease; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
.hint { font-size: 14px; color: var(--muted); margin-top: -2px; margin-bottom: 6px; }
input[type=text], input[type=tel], textarea, select {
  width: 100%; font: 400 17px var(--font); /* ≥16px prevents iOS zoom */
  color: var(--ink); background: #fff;
  border: 1.5px solid var(--field); border-radius: 12px; padding: 12px 14px; min-height: var(--tap);
}
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, .opt:focus-within {
  outline: 3px solid var(--green-3); outline-offset: 2px;
}
.big-input { font-size: 26px !important; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; text-align: center; }
textarea { min-height: 120px; resize: vertical; }
/* dropdowns look like the text boxes, with a green arrow (same on iPhone and Android) */
select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23014421' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center; }
.counter { text-align: right; font-size: 13px; color: var(--muted); margin-top: 4px; }

.error { color: var(--error); background: var(--error-bg); border-radius: 10px; padding: 10px 12px; font-size: 15px; margin-top: 10px; }
.error::before { content: '⚠ '; }
.notice { border-radius: 12px; padding: 12px 14px; font-size: 15px; margin: 12px 0; }
.notice.warn { background: var(--warning-bg); color: var(--warning); border-left: 4px solid var(--warning); }
.notice.ok { background: var(--success-bg); color: var(--success); border-left: 4px solid var(--success); }
.notice.info { background: var(--green-t); color: var(--ink); border-left: 4px solid var(--green-3); }
.notice.err { background: var(--error-bg); color: var(--error); border-left: 4px solid var(--error); }
/* “Adding your photos…”: a small spinner before the text */
.notice.busy { display: flex; gap: 10px; align-items: center; }
.notice.busy::before { content: ''; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--green-t); border-top-color: var(--green); animation: spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) { .notice.busy::before { animation: none; border-top-color: var(--green-3); } }

/* Big choice buttons & chips */
.opts { display: grid; gap: 10px; margin-top: 8px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 14px 16px; border-radius: 14px;
  border: 2px solid #C6D3CA; background: #fff; color: var(--ink);
  font: 600 17px var(--font); text-align: left; cursor: pointer; margin: 0;
}
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt .tick {
  flex: 0 0 26px; height: 26px; border-radius: 50%; border: 2px solid var(--field); display: grid; place-items: center;
  color: transparent; font-size: 15px; font-weight: 700;
}
.opt.check .tick { border-radius: 7px; }
.opt.on { border-color: var(--green); background: var(--green-t); }
.opt.on .tick { background: var(--green); border-color: var(--green); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.chips .opt { min-height: var(--tap); padding: 10px 14px; border-radius: 999px; font-size: 16px; }
.chips .opt .tick { flex-basis: 22px; height: 22px; font-size: 13px; }

.toggle { display: flex; align-items: flex-start; gap: 12px; margin: 14px 0 4px; font-weight: 500; cursor: pointer; min-height: var(--tap); }
.toggle input { width: 26px; height: 26px; margin: 1px 0 0; accent-color: var(--green); flex: 0 0 26px; }
.consent { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }

/* Keep anything that gets keyboard focus (or is scrolled to) clear of the pinned bottom bar. */
html { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
/* Bottom action bar — pinned within thumb reach, above the home indicator */
.actions {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; gap: 10px; padding: 14px 0 calc(6px + env(safe-area-inset-bottom));
  margin-top: auto;
  background: linear-gradient(to top, #fff 72%, rgba(255, 255, 255, 0));
  pointer-events: none; /* taps on the faded strip reach the content underneath… */
}
.actions > * { pointer-events: auto; } /* …while the buttons themselves work as normal */
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  min-height: 54px; padding: 14px 20px; border-radius: 14px; font: 700 17px var(--font);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: var(--green); color: #fff; flex: 1; }
.btn-primary:hover { background: var(--green-2); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: #fff; color: var(--gold-d); border: 2px solid var(--gold-d); min-width: 96px; }
.linkish { background: none; border: 0; color: var(--green); font: 600 15px var(--font); text-decoration: underline; cursor: pointer; padding: 8px 4px; min-height: 44px; }

/* Landing */
.visit { border: 1.5px solid var(--gold-b); border-radius: 14px; padding: 14px 16px; margin: 14px 0; background: var(--gold-t); }
.visit .date { font-size: 20px; font-weight: 700; color: var(--green); }
.visit .win { font-size: 17px; font-weight: 600; }

/* Review */
.rev { border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 10px; align-items: flex-start; }
.rev:first-of-type { border-top: 0; }
.rev .k { flex: 1; }
.rev .k h3, .rev .k h2.lbl { margin-bottom: 4px; }
.rev .k div { font-size: 16px; }
.checklist { padding-left: 22px; margin: 8px 0 0; }
.checklist li { margin: 6px 0; }

/* Photos */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 10px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button {
  position: absolute; top: 4px; right: 4px; min-width: 44px; min-height: 44px; border-radius: 999px; border: 0;
  background: rgba(18, 38, 26, .82); color: #fff; font: 600 13px var(--font); cursor: pointer;
}
.file-btn { display: inline-flex; }
.file-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.ref { font-size: 30px; font-weight: 800; color: var(--green); letter-spacing: 1px; }
.center { text-align: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--green-t); border-top-color: var(--green); animation: spin 1s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.ts { margin-top: 12px; min-height: 0; }
footer.foot { text-align: center; font-size: 12px; padding: 14px 0 0; color: var(--muted); }

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

/* ---- Super's visit report ---- */
.sup-list { list-style: none; padding: 0; margin: 10px 0; }
.sup-list li { border: 1px solid var(--line, #E3E8E5); border-radius: 14px; padding: 12px; margin: 10px 0; }
.sup-list li.marked { border-color: var(--gold, #C9A227); background: #FFFBEF; }
.sup-apt strong { font-size: 20px; }
.segs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.seg { min-height: var(--tap, 48px); border-radius: 12px; border: 2px solid var(--field, #CBD5CF); background: #fff; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; color: inherit; }
.seg.on.ok { background: var(--green); border-color: var(--green); color: #fff; }
.seg.on.warn { background: #8A5A0B; border-color: #8A5A0B; color: #fff; } /* dark amber: white text at 5.9:1 */
.seg.on.err { background: #A61B1B; border-color: #A61B1B; color: #fff; }
.sup-sum { font-weight: 600; text-align: center; margin: 14px 0 0; }
.bb { display: inline-block; background: #A61B1B; color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: 3px; }

/* Larger text (tenant "A+" button). zoom scales text, buttons and spacing together, so nothing overlaps. */
.text-size {
  position: absolute; top: calc(8px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left));
  min-width: 44px; min-height: 40px; padding: 6px 10px; border-radius: 999px;
  background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .75);
  font: 700 16px var(--font); cursor: pointer; line-height: 1;
}
.text-size[aria-pressed="true"] { background: #fff; color: var(--green); }
.text-size:focus-visible, .lang:focus-visible { outline: 3px solid var(--gold, #D9B44A); outline-offset: 2px; }
html.large-text main, html.large-text footer.foot { zoom: 1.22; }
@supports not (zoom: 1) { html.large-text body { font-size: 21px; } }

h1[tabindex="-1"]:focus { outline: none; } /* focused only so screen readers read the new step */
