/* The assessor portal's public pages: the report page an emailed report link
   opens, and the account application. They wear the apps' design, as the
   builder app's welcome pages do (Trello #244, 30 Oct 2026): navy and the
   drawing board at the top, a grey page, white cards, blue pill buttons, the
   platform's own type, the 8-point spacing scale. The tokens are the builder
   app's (app/_app-common.scss) and the brand book's; every colour that
   carries words reads at 4.5:1 or better where it is used, and borders and
   the focus ring at 3:1 or better. */

:root {
  --navy: #1A2B3F;          /* $color-primary */
  --accent: #287596;        /* $color-accent: 5.15:1 on white, 4.60:1 on the page */
  --accent-dark: #1E6A8A;   /* $color-accent-dark: pressed */
  --danger: #D32435;        /* 5.16:1 on white */
  --ink: #1A1A1A;           /* $color-text-primary */
  --ink-2: #666666;         /* $color-text-secondary: 5.74:1 on white, 5.13:1 on the page */
  --page: #F2F2F2;          /* $color-background: also a hovered outline button and a note */
  --card: #FFFFFF;
  --line: #E0E0E0;          /* dividers only: never a control's edge */
  /* A field's edge on the web: 3.45:1 on white, for WCAG 1.4.11. The apps'
     $color-border (1.3:1) is too faint for a control's only outline. */
  --field-edge: #8A8A8A;
  --amber: #F8A830;         /* the logo's amber: only the rule under the wordmark */
  --radius-pill: 24px;
  --radius-field: 12px;
  --radius-card: 16px;
  --shadow-card: 0 1px 2px rgba(26, 43, 63, 0.06), 0 10px 28px -14px rgba(26, 43, 63, 0.22);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  /* A long address breaks rather than pushing the page sideways (1.4.10). */
  overflow-wrap: break-word;
}

/* The top: navy, the drawing board, the assessor's mark, the app's name and
   its amber rule, as on the apps' welcome pages. Slim on a phone, and a strip
   on a short screen (on its side, zoomed), so the report stays in view. */
.band {
  background-color: var(--navy);
  background-image: url("assessor-public-grid.png");
  background-position: center top;
  background-size: max(100%, 720px) auto;
  color: #FFFFFF;
  text-align: center;
  padding: 24px 16px 56px;
}
.band-logo { display: block; width: 64px; height: 64px; margin: 0 auto 8px; }
/* The assessor app's name, as on every assessor page (founder, 8 Oct 2026):
   "Buildsnapper" in the wordmark's weight, "Assessor" lighter. */
.wordmark {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-wrap: balance;
}
.wordmark-app { font-weight: 400; }
.rule {
  display: block;
  width: 40px;
  height: 3px;
  margin: 8px auto 0;
  background: var(--amber);
}

/* The page: one column of cards, pulled up over the band's foot. */
.page {
  max-width: 560px;
  margin: -40px auto 0;
  padding: 0 16px;
}
.card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px 16px;
}
.page > * + * { margin-top: 16px; }

h1, h2 { text-wrap: balance; margin: 0; }
h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.25; }
h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
p, ul { margin: 0; }
.card > * + * { margin-top: 16px; }

.lede { font-size: 1.0625rem; }
/* An offer opens with a question in large type, its promise under it
   (Andrew, 30 Oct 2026: "something catchy to lead in"). */
.card h2.question { font-size: 1.625rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--navy); }
.card > .question + .pitch { margin-top: 6px; }
.pitch { font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
.small { font-size: 0.9375rem; }
.muted { color: var(--ink-2); }
.center { text-align: center; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); text-decoration-thickness: 2px; }

/* Focus: always visible, 3px of the accent (4.6:1 on the page). */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn:focus-visible { outline-offset: 3px; }
/* A message focused on load (an error for the whole form) shows no ring. */
[tabindex="-1"]:focus { outline: none; }

.icon { width: 1em; height: 1em; fill: currentColor; flex: 0 0 auto; }

/* What a report is, in two columns. */
.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 16px;
  margin: 16px 0 0;
}
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 600; }

/* Buttons are pills, 48 high at least, as in the apps. The file's type and
   size sit on a line of their own, so both buttons read alike. */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn .icon { width: 1.125em; height: 1.125em; }
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover, .btn-primary:active { background: var(--accent-dark); color: #FFFFFF; }
.btn-outline { background: var(--card); color: var(--accent); border-color: var(--accent); }
.btn-outline:hover, .btn-outline:active { background: var(--page); color: var(--accent-dark); }
.btn-label { display: block; }
.btn-meta { display: block; font-size: 0.875rem; font-weight: 400; }
.actions { display: grid; gap: 16px; }
.actions .hint { margin-top: -8px; }

/* A form's field: label, hint, any error, then the field with its glyph. */
.stack {
  display: grid;
  /* One column that what is in it can't stretch (Turnstile's iframe is
     300px wide): the fields stay inside the card at 320px. */
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.field label { display: block; font-weight: 600; }
.hint { color: var(--ink-2); font-size: 0.9375rem; }
.input-wrap { position: relative; margin-top: 8px; }
.input-wrap .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: var(--ink-2);
  pointer-events: none;
}
.input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px 12px 48px;
  border: 1px solid var(--field-edge);
  border-radius: var(--radius-field);
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;  /* 16px: iOS zooms into anything smaller */
}
.input:focus-visible { border-color: var(--accent); }
.field-error .input { border: 2px solid var(--danger); padding-left: 47px; }
.error-message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 8px;
  color: var(--danger);
  font-weight: 600;
}
.error-message .icon { margin-top: 0.2em; }
.form-error {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-left: 4px solid var(--danger);
  border-radius: 8px;
  background: var(--page);
}
.form-error .icon { margin-top: 0.25em; fill: var(--danger); }
.cf-turnstile { max-width: 100%; }

/* A quiet word in a box: no photos yet, a closed report, where things stand. */
.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--page);
}
.note .icon { margin-top: 0.25em; fill: var(--accent); }
.with-icon { display: flex; gap: 8px; align-items: flex-start; }
.with-icon .icon { margin-top: 0.25em; fill: var(--ink-2); }

/* What an account gives, and the steps to take: accent marks (in the apps a
   green circle-check means "complete"). */
.ticks { list-style: none; padding: 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks .icon { width: 18px; height: 18px; margin-top: 3px; fill: var(--accent); }

.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0 0; }

/* Who opened it, and closing it on this device. */
.opened {
  padding: 0 8px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-align: center;
}
.opened form { margin: 0; }

/* A button that reads as a link, with a 48px target. */
.linklike {
  display: inline-block;
  min-height: 48px;
  padding: 12px 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.linklike:hover { color: var(--accent-dark); text-decoration-thickness: 2px; }

.foot {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-align: center;
}
.foot a { display: inline-block; padding: 12px 4px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* A honeypot no person sees: the application form's bot trap. */
.trap { position: absolute; left: -9999px; top: -9999px; }

@media (min-width: 600px) {
  .band { padding: 40px 24px 72px; }
  .band-logo { width: 80px; height: 80px; margin-bottom: 12px; }
  .wordmark { font-size: 1.75rem; }
  .card { padding: 32px; }
  h1 { font-size: 1.75rem; }
}

/* A short screen (a phone on its side, a zoomed page): a strip, no mark. */
@media (max-height: 520px) {
  .band { padding: 12px 16px 52px; }
  .band-logo { display: none; }
}

@media (forced-colors: active) {
  .btn { border-color: ButtonText; }
  .rule { background: CanvasText; }
}

/* "Keep me posted" (the assessor CRM's consent, server/crm/signals.py). */
.keep-posted { display: grid; gap: 14px; margin-top: 20px; }
.keep-posted-title { font-size: 1.0625rem; margin: 0; }
.tick-label { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9375rem; line-height: 1.45; }
.tick-label input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--accent); }

