/*
  The Forms token surface /f — styles.
  System fonts only: a webfont means a second origin, and the CSP here is
  `default-src 'none'`. It is also the failure mode #18 fixed in the app (a
  failed webfont left the screen blank) — a consent form must render on a bad
  hotel wifi with no network left.
  Logical properties throughout (margin-inline, padding-inline, text-align:
  start) so the same sheet is correct in the Hebrew RTL default and the English
  LTR fallback — the repo's direction rule, applied to a page that has no
  I18nManager to consult.
*/
:root {
  --bg: #fbfbfd;
  --fg: #16161a;
  --muted: #6b6b76;
  --line: #e4e4ea;
  --accent: #b4194a;
  --danger: #b00020;
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131316;
    --fg: #f2f2f5;
    --muted: #9a9aa6;
    --line: #2a2a31;
    --accent: #ff5c8a;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.shell {
  max-width: 34rem;
  margin-inline: auto;
  padding: 1.75rem 1.25rem 4rem;
}

.head {
  border-bottom: 1px solid var(--line);
  padding-block-end: 1rem;
  margin-block-end: 1.5rem;
}

.brand {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.biz {
  margin: 0.35rem 0 0;
  font-size: 1.45rem;
  font-weight: 650;
  text-align: start;
}

.meta {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: start;
}

.panel {
  text-align: start;
}

/*
  The health declaration (Phase 4, Task 16). It sits ABOVE the questions and is
  given more weight than any other block on the page — a border, a fill and its
  own heading — because §14.5 records that the customer accepted THIS text, and
  a sentence somebody scrolled past is not one they read. `white-space:
  pre-line` keeps the paragraph breaks a business typed into the template
  editor; the text is written with textContent, so nothing in it can be markup.
*/
.declaration {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-block-end: 1.75rem;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.declaration h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.declaration p {
  margin: 0;
  white-space: pre-line;
}

.q {
  margin-block-end: 1.5rem;
}

.q > label.title {
  display: block;
  font-weight: 600;
  margin-block-end: 0.35rem;
}

.q .help {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-block-end: 0.5rem;
}

.req {
  color: var(--accent);
  margin-inline-start: 0.2rem;
}

input[type='text'],
textarea,
select {
  width: 100%;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

input[type='text']:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
input[type='checkbox']:focus-visible,
input[type='radio']:focus-visible,
input[type='file']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-block-end: 0.55rem;
  cursor: pointer;
}

.check input {
  margin-block-start: 0.3rem;
  flex: none;
  accent-color: var(--accent);
}

.attest {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-block: 1.75rem 1rem;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-start: 0.6rem;
}

.thumbs img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.primary {
  width: 100%;
  font: inherit;
  font-weight: 650;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  cursor: pointer;
}

.primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
  margin-block-start: 0.85rem;
}

.error {
  color: var(--danger);
  font-weight: 600;
}

h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}
