/* NATI METHOD brand, measured from natimethod.sk (computed styles, 27. 8. 2026)
   rather than sampled from a screenshot.

   Two rules hold the whole palette together:

   - The gold is a gradient, not a flat colour. The client's primary button is
     linear-gradient(172deg, #F8C28E, #B86626); one hex cannot stand in for it.
   - Gold is fill, edge and mark — never text. Their heading gold #D59056 sits
     at 2.5:1 on the warm ground, under the 3:1 floor for even large text. It
     works on their site because it appears in 76 px display headings; here it
     would be statements and error messages. Text stays on --text at 11.8:1.

   The gradient carries no text either. Measured across its length, light text
   runs 1.5:1 to 4.0:1 and dark text 7.8:1 down to 3.0:1 — neither survives the
   whole sweep. So anything with a label on it uses --gradient-fill, the light
   quarter of the same gradient, where the brand's own dark text reads at 6-8:1.
   The full gradient is kept for the progress bar, which carries no text. */

/* Self-hosted because the site's CSP is default-src 'self' — a Google Fonts
   link would be blocked and the page would silently fall back. Both families
   are variable and OFL-licensed; see fonts/OFL.txt. */
@font-face {
  font-family: 'Reddit Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/reddit-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Reddit Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/reddit-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/source-serif-4-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/source-serif-4-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ground: #fbf8f6;
  --bg: #ffffff;
  --surface: #fdf4ec;
  --border: #eae2db;
  --gold-edge: #debe9f;
  --text: #2b3633;
  --text-muted: #5e6c67;
  --gold: #d59056;
  --copper: #b86626;
  /* A copper dark enough to be read as text; --copper stays for fills. */
  --copper-text: #a85a1e;
  --gradient: linear-gradient(172deg, #f8c28e 0%, #b86626 100%);
  --gradient-fill: linear-gradient(172deg, #f8c28e 0%, #e8ab74 100%);
  --accent: var(--copper);
  --accent-text: #fbf8f6;
  --danger: #a8302a;

  --radius: 14px;
  --radius-card: 22px;
  --radius-pill: 28px;
  --gap: 0.75rem;
  --measure: 46rem;
  --font: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-ui: 'Reddit Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* No dark theme on purpose: the brand has no dark expression, and a dark gold
   would be a colour the client never approved. */

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 1rem;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

/* The whole screen is one card, the way natimethod.sk builds its panels. */
.app {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(1.4rem, 5vw, 2.5rem) clamp(1.1rem, 4vw, 2.25rem) 3rem;
  background: var(--bg);
  border-radius: var(--radius-card);
  box-shadow:
    0 14px 40px -24px rgba(94, 81, 69, 0.5),
    0 1px 2px rgba(94, 81, 69, 0.07);
}

h1, h2 {
  font-family: var(--font-ui);
  font-weight: 500;
  text-wrap: balance;
}
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 0.9rem; }
h2 em { font-style: normal; font-weight: 600; color: var(--copper); }
p { margin: 0 0 0.9rem; }
strong { font-weight: 600; }
.muted { color: var(--text-muted); font-size: 0.92rem; }

.btn {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 44px;
  padding: 0.6rem 1.35rem;
  border: 1px solid var(--gold-edge);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--copper-text);
  cursor: pointer;
}
.btn:hover:not(:disabled) { border-color: var(--gold); background: var(--surface); }
/* The client's own button puts pale text on the full gradient, which measures
   1.5:1 at the light end. Same gold, same pill, dark label instead. */
.btn--primary {
  border-color: transparent;
  background: var(--gradient-fill);
  color: var(--text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.btn--primary:hover:not(:disabled) { border-color: transparent; filter: brightness(1.05); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.field { display: block; margin: 0 0 1rem; }
.field__label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}
.field input {
  font: inherit;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--gold-edge);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.field input:focus { border-color: var(--gold); }

/* The whole label is the hit area — the box itself is far under 44 px. */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0 0 1rem;
  padding: 0.6rem 0;
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.15rem 0 0;
  accent-color: var(--copper);
}
.consent a { color: var(--copper-text); }

.notice {
  border: 1px solid var(--gold-edge);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.95rem 1.1rem;
  margin: 0 0 1.5rem;
}
.actions { display: flex; gap: var(--gap); align-items: center; margin-top: 1.5rem; }
.actions--split { justify-content: space-between; }

.progress { margin-bottom: 1.5rem; }
.progress__label {
  display: flex; justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.4rem;
}
.progress__track {
  height: 6px; border-radius: 999px; background: var(--border);
  overflow: hidden;
}
/* Runs along the bar rather than across its 6 px, so the sweep is visible and
   the deepest gold is always at the leading edge. */
.progress__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f8c28e 0%, #b86626 100%);
  transition: width 0.25s ease;
}

.hint {
  color: var(--danger);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
}

/* ---- Guided most/least/weights flow ----------------------------------- */
.group { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.25rem; }

.row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 44px;
  padding: 0.9rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--ground);
  color: var(--text);
  font: inherit;
  text-align: left;
}
button.row { cursor: pointer; }
button.row:hover { border-color: var(--gold-edge); }

.row__text { flex: 1; margin: 0; }

.row__badge {
  display: grid; place-items: center;
  width: 1.9rem; height: 1.9rem; flex: none;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
}

/* A row still open in the most/least phase but carrying a leftover weight
   (e.g. after clearing this group's L or K). Muted and bordered, so it reads
   as "currently 5" rather than as a decision like the L/K badges. */
.row__badge--neutral {
  border: 1px solid var(--gold-edge);
  background: var(--bg);
  color: var(--text-muted);
}

/* The chosen statement fills with gold — the loudest thing on the screen, and
   the one a respondent looks for 25 times. */
.row--L {
  background: var(--gradient-fill);
  color: var(--text);
  font-weight: 600;
}
.row--L .row__badge { background: var(--copper-text); color: #ffffff; }
button.row--L:hover { border-color: transparent; filter: brightness(1.04); }

.row--K {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--gold-edge);
}
.row--K .row__badge { background: var(--gold-edge); color: #6b4a22; }
button.row--K:hover { border-color: transparent; box-shadow: inset 0 0 0 1px var(--gold); }

.row--weight { flex-direction: column; align-items: stretch; gap: 0.7rem; }
.row--weight .row__text { font-weight: 600; }

.weights { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.weight {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  min-width: 44px; min-height: 44px;
  flex: 1 1 3rem;
  border: 1px solid var(--gold-edge);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
}
.weight:hover:not(:disabled) { border-color: var(--gold); color: var(--copper-text); }
.weight[aria-checked="true"] {
  background: var(--gradient-fill); border-color: transparent;
  color: var(--text); font-weight: 600;
}
/* Taken by the other statement in this group. Visibly out of reach, but still
   readable — at 0.35 it disappeared and the strip looked broken. */
.weight:disabled {
  opacity: 1;
  border-color: var(--border);
  background: var(--ground);
  color: #84908b;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .progress__bar { transition: none; }
}

.summary { border-collapse: collapse; width: 100%; margin-bottom: 1.5rem; }
.summary th, .summary td {
  text-align: left; padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border); font-size: 0.95rem;
}
.summary th {
  font-family: var(--font-ui);
  color: var(--text-muted);
  font-weight: 600;
}
.summary tr[data-incomplete="true"] { color: var(--danger); }
.summary td:first-child { padding: 0; }
.summary td:first-child button {
  font: inherit;
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.45rem 0.5rem;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold-edge);
  text-underline-offset: 3px;
  cursor: pointer;
}
.summary__marks {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
