/* Second Look — calm, readable, accessible.
   Fonts are bundled in /fonts (SIL Open Font License), so nothing is fetched from other websites.
   Body: Atkinson Hyperlegible Next, designed by the Braille Institute for low-vision readers.
   Headings: Bricolage Grotesque. */

@font-face { font-family: "Atkinson Next"; src: url("fonts/atkinson-next.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("fonts/atkinson-next-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --surface-2: #f3f0e9;
  --ink: #141a24;
  --ink-2: #4f5767;
  --line: #e5dfd3;
  --accent: #0b5e57;
  --accent-2: #24b29f;
  --accent-ink: #ffffff;
  --focus: #2563eb;

  --strong: #b42318;
  --strong-bg: #fdecea;
  --some: #9a5b00;
  --some-bg: #fff4dc;
  --few: #1f6f4a;
  --few-bg: #e7f5ee;
  --link-bg: #e8eefc;
  --link-ink: #2347a8;

  --hl-strong: #ffd3cd;
  --hl-some: #ffe7a8;
  --hl-link: #cfdcff;

  --radius: 22px;
  --shadow: 0 1px 2px rgba(20, 24, 33, .05), 0 12px 32px -14px rgba(20, 24, 33, .16);
  --marker: #ffe08a;
  --glow: color-mix(in srgb, var(--accent-2) 16%, transparent);
  --font: "Atkinson Next", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage", "Atkinson Next", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --scale: 1;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1318;
    --surface: #171c24;
    --surface-2: #1f2530;
    --ink: #eef1f6;
    --ink-2: #aab2c2;
    --line: #2b3240;
    --accent: #3cc7b6;
    --accent-2: #3cc7b6;
    --accent-ink: #062320;
    --focus: #7aa5ff;
    --strong: #ff8a7a;
    --strong-bg: #3a1d1b;
    --some: #f3b94d;
    --some-bg: #36290f;
    --few: #6fd3a0;
    --few-bg: #14301f;
    --link-bg: #1e2a48;
    --link-ink: #a9bfff;
    --hl-strong: #6b2a24;
    --hl-some: #5a4512;
    --hl-link: #2b3d6e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -8px rgba(0, 0, 0, .45);
    --glow: color-mix(in srgb, var(--accent-2) 10%, transparent);
    --marker: #5b4a12;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { font-size: calc(17px * var(--scale)); -webkit-text-size-adjust: 100%; }
html[data-size="1"] { --scale: 1.15; }
html[data-size="2"] { --scale: 1.32; }
body {
  margin: 0;
  background: radial-gradient(1100px 420px at 50% -160px, var(--glow), transparent 70%) no-repeat, var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 .8rem; }
a { color: var(--accent); }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.visually-hidden, .sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }

/* ---------- header ---------- */
header.site {
  background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 750; font-size: 1.22rem; letter-spacing: -0.02em; }
.logo { width: 34px; height: 34px; color: var(--accent); flex: none; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.privacy-pill {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: .8rem; font-weight: 600; color: var(--few); background: var(--few-bg);
  padding: 6px 11px; border-radius: 999px; white-space: nowrap;
}
.privacy-pill svg { width: 14px; height: 14px; }
.icon-btn {
  font: inherit; font-weight: 700; font-size: .9rem; min-width: 44px; min-height: 36px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; cursor: pointer;
}
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 0; padding-bottom: 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; padding: 8px 15px; color: var(--ink-2); text-decoration: none; font-weight: 650; font-size: .93rem;
  border-radius: 999px; transition: background .15s, color .15s;
}
.tabs a:hover { color: var(--ink); background: var(--surface-2); }
.tabs a[aria-current="page"] { color: var(--accent-ink); background: var(--ink); }

main { padding-top: 32px; padding-bottom: 48px; outline: none; }
.intro { margin-bottom: 20px; }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 60ch; }
.hero { margin: 10px 0 26px; }
.hero h1 { font-size: clamp(2.2rem, 6.4vw, 3.4rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; margin-bottom: .9rem; max-width: 16ch; }
.hero h1 .marker { background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%); padding: 0 .06em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: .8rem; font-weight: 700; letter-spacing: .02em;
  color: var(--accent); background: var(--surface); border: 1px solid var(--line); padding: 6px 13px 6px 10px; border-radius: 999px; box-shadow: var(--shadow); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 22%, transparent); }
.section-label { display: flex; align-items: center; gap: 12px; font-size: .8rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); margin: 34px 0 12px; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- cards & buttons ---------- */
.card {
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: var(--radius);
  padding: 22px; margin: 0 0 16px; box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
fieldset.card { min-width: 0; }
.field-label { display: block; font-weight: 700; margin-bottom: 8px; }
textarea {
  width: 100%; font: inherit; font-size: 1.08rem; color: var(--ink); background: var(--surface-2);
  border: 1.5px solid transparent; border-radius: 16px; padding: 16px 18px; resize: vertical; min-height: 10rem; transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea::placeholder { color: color-mix(in srgb, var(--ink-2) 75%, transparent); }
textarea:focus { border-color: var(--accent); background: var(--surface); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.input-card { padding: 22px; border-radius: 26px; box-shadow: 0 1px 2px rgba(20, 24, 33, .05), 0 24px 48px -24px rgba(20, 24, 33, .28); }
.input-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  font: inherit; font-weight: 700; font-size: .95rem; border-radius: 999px; padding: 10px 18px; min-height: 44px;
  border: 1.5px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  transition: filter .15s, background .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: .88rem; }
.btn.big { padding: 12px 26px; min-height: 54px; font-size: 1.06rem; border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 86%, #fff), var(--accent));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 22px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn.big::after { content: "→"; font-size: 1.15em; transition: transform .15s; }
.btn.big:hover::after { transform: translateX(3px); }
.btn.tool { background: var(--surface-2); color: var(--ink); border-color: transparent; padding: 10px 14px; }
.btn.tool:hover { border-color: var(--line); }
.btn.tool svg { width: 18px; height: 18px; flex: none; }
.btn.tool.select { padding-left: 16px; padding-right: 34px; width: 11.5rem; }
/* .btn.tool's background shorthand would wipe out .select's arrow, so draw it again here */
.btn.tool.select { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 13px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
.select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; max-width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.notice { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-size: .95rem; }
.danger-notice { background: var(--strong-bg); color: var(--ink); border-left: 4px solid var(--strong); }

/* ---------- results ---------- */
.results:empty { display: none; }
.results { margin-top: 22px; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.verdict { display: grid; grid-template-columns: auto 1fr; gap: 14px 18px; align-items: start; border-width: 1.5px; padding: 26px; border-radius: 26px; }
.verdict .badge { width: 64px; height: 64px; flex: none; padding: 10px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.verdict h2 { font-size: clamp(1.6rem, 4.4vw, 2rem); font-weight: 800; letter-spacing: -0.035em; margin: 2px 0 8px; }
.verdict p { margin: 0 0 .5rem; font-size: 1.05rem; }
.verdict .verdict-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.verdict.strong { background: var(--strong-bg); border-color: color-mix(in srgb, var(--strong) 45%, transparent); }
.verdict.strong h2, .verdict.strong .badge { color: var(--strong); }
.verdict.some { background: var(--some-bg); border-color: color-mix(in srgb, var(--some) 45%, transparent); }
.verdict.some h2, .verdict.some .badge { color: var(--some); }
.verdict.few { background: var(--few-bg); border-color: color-mix(in srgb, var(--few) 40%, transparent); }
.verdict.few h2, .verdict.few .badge { color: var(--few); }
.context-note { font-size: .92rem; font-weight: 600; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 12px 44px; min-height: 32px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 750; display: grid; place-items: center; font-size: .92rem;
}
.steps li:first-child { font-weight: 650; }
.steps li:last-child { padding-bottom: 0; }

.message-view {
  white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; font-size: 1rem; margin-bottom: 14px;
}
mark.hl { color: inherit; border-radius: 4px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: outline-color .15s; outline: 2px solid transparent; }
mark.hl.t-high { background: var(--hl-strong); }
mark.hl.t-mid { background: var(--hl-some); }
mark.hl.t-link { background: var(--hl-link); text-decoration: underline wavy color-mix(in srgb, var(--link-ink) 60%, transparent); text-underline-offset: 3px; }
mark.hl.focus { outline-color: var(--ink); }

.tactics { display: grid; gap: 10px; }
.tactic {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; text-align: left; width: 100%;
  background: var(--surface-2); color: var(--ink); border: 1.5px solid transparent; border-radius: 16px; padding: 14px 16px; font: inherit; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.tactic:hover, .tactic[aria-pressed="true"] { border-color: var(--accent); background: var(--surface); }
.tactic .ticon { font-size: 1.35rem; line-height: 1.2; grid-row: span 2; }
.tactic .tname { font-weight: 700; }
.tactic .tname .sev { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-left: 6px; padding: 2px 7px; border-radius: 99px; vertical-align: 2px; }
.sev.high { background: var(--strong-bg); color: var(--strong); }
.sev.mid { background: var(--some-bg); color: var(--some); }
.sev.low { background: var(--surface-2); color: var(--ink-2); }
.tactic .tplain { color: var(--ink-2); font-size: .94rem; }
.tactic .tquote { grid-column: 2; font-size: .86rem; color: var(--ink-2); font-style: italic; }

.link-card { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.link-card:last-child { margin-bottom: 0; }
.link-card .shown { font-family: var(--mono); font-size: .85rem; color: var(--ink-2); word-break: break-all; }
.link-card .real { font-size: 1.05rem; margin: 6px 0 10px; word-break: break-all; }
.link-card .real strong { font-family: var(--mono); background: var(--link-bg); color: var(--link-ink); padding: 1px 6px; border-radius: 6px; }
.findings { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.findings li { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: .94rem; }
.findings .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .45em; }
.dot.high { background: var(--strong); }
.dot.medium { background: var(--some); }
.dot.low { background: var(--ink-2); opacity: .6; }
.dot.info { background: var(--few); }

.verify-list, .plain-list { margin: 0; padding-left: 1.2rem; }
.verify-list li, .plain-list li { margin-bottom: 8px; }

.questions { display: grid; gap: 14px; }
.q { border: 0; padding: 0; margin: 0; min-width: 0; }
.q legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: .92rem; min-height: 36px; display: inline-flex; align-items: center;
}
.seg input:checked + label { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

.share textarea { min-height: 8rem; font-size: .95rem; }
.removed { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.chip { font-size: .8rem; font-weight: 650; background: var(--surface-2); color: var(--ink-2); border-radius: 999px; padding: 4px 10px; }
.chip.good { background: var(--few-bg); color: var(--few); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status { font-size: .88rem; color: var(--few); font-weight: 600; min-height: 1.2em; }

.cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cta-card p { margin: 0; }

/* ---------- recover ---------- */
.situation-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.sit { position: relative; }
.sit input { position: absolute; opacity: 0; }
.sit label {
  display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px 10px 42px; cursor: pointer; height: 100%;
}
.sit label::before {
  content: ""; position: absolute; left: 13px; top: 13px; width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--ink-2);
}
.sit input:checked + label { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.sit input:checked + label::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); }
.sit input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.sit .s-label { font-weight: 650; display: block; }
.sit .s-hint { font-size: .84rem; color: var(--ink-2); }

.plan-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 6px 0 16px; }
.progress span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s; }
.plan-group h3 { margin-top: 14px; display: flex; align-items: center; gap: 8px; }
.plan-group h3 .when-dot { width: 10px; height: 10px; border-radius: 50%; }
.when-now { background: var(--strong); }
.when-today { background: var(--some); }
.when-week { background: var(--few); }
.check-item { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.check-item input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.check-item.done span { text-decoration: line-through; color: var(--ink-2); }

/* ---------- practice ---------- */
.phone {
  max-width: 420px; margin: 0 auto 16px; background: var(--surface-2); border-radius: 28px; padding: 18px 16px 22px; border: 1px solid var(--line);
}
.phone .from { text-align: center; font-weight: 700; }
.phone .channel { text-align: center; font-size: .8rem; color: var(--ink-2); margin-bottom: 14px; }
.bubble {
  background: var(--surface); border-radius: 18px 18px 18px 6px; padding: 12px 14px; box-shadow: var(--shadow); white-space: pre-wrap; word-break: break-word;
}
.answers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 520px; margin: 0 auto; }
.answers .btn { justify-content: center; flex-direction: column; gap: 2px; padding: 10px 8px; text-align: center; }
.answers .btn small { font-weight: 500; font-size: .76rem; color: var(--ink-2); }
.answers .btn.picked { border-color: var(--accent); }
.feedback { margin-top: 16px; }
.feedback.right { border-color: color-mix(in srgb, var(--few) 50%, transparent); }
.feedback.wrong { border-color: color-mix(in srgb, var(--some) 55%, transparent); }
.dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots span.right { background: var(--few); }
.dots span.wrong { background: var(--some); }
.dots span.current { outline: 2px solid var(--accent); outline-offset: 2px; }
.score-big { font-family: var(--display); font-size: 3.4rem; font-weight: 800; letter-spacing: -0.04em; color: var(--accent); line-height: 1; margin: 8px 0; }

/* ---------- how ---------- */
.proof { display: grid; gap: 8px; margin: 14px 0; }
.proof div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; background: var(--bg); border-radius: 10px; padding: 10px 14px; }
.proof dt { color: var(--ink-2); }
.proof dd { margin: 0; font-weight: 700; }
.tactic-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tactic-list li { background: var(--bg); border-radius: 10px; padding: 8px 12px; font-size: .92rem; font-weight: 600; }
table.eval { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .92rem; }
table.eval th, table.eval td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.eval td.num { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
table.eval tr.quoted td { background: var(--few-bg); }
.table-scroll { overflow-x: auto; }

.site-footer { color: var(--ink-2); font-size: .85rem; padding-bottom: 40px; }

@media (max-width: 560px) {
  .privacy-pill span { display: none; }
  .privacy-pill { padding: 8px; }
  .card { padding: 16px; }
  .answers { grid-template-columns: 1fr; }
  .answers .btn { flex-direction: row; justify-content: space-between; }
  .verdict { grid-template-columns: 1fr; }
}

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

@media print {
  header.site, .site-footer, #view-recover .situations, .danger-notice + *, .no-print { display: none !important; }
  .card { box-shadow: none; border: 1px solid #999; }
  body { background: #fff; }
}

.mt { margin-top: 12px; }
.m0 { margin: 0; }
.center { text-align: center; }

fieldset.card > legend { float: left; width: 100%; padding: 0; }
fieldset.card > legend + * { clear: both; }
.tabs .short { display: none; }
@media (max-width: 480px) {
  .tabs { gap: 0; justify-content: space-between; flex-wrap: wrap; }
  .tabs a { padding-left: 8px; padding-right: 8px; font-size: .88rem; }
  .tabs .long { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tabs .short { display: inline; }
}
@media (max-width: 560px) {
  /* Phone: the main button first and full width, the tools as an even row underneath */
  .input-actions { flex-direction: column-reverse; align-items: stretch; }
  .input-actions .btn.big { justify-content: center; }
  .tools { display: grid; grid-template-columns: 1fr 1fr; }
  .tools .btn { justify-content: center; min-width: 0; }
  .tools .btn.select { grid-column: 1 / -1; order: 3; width: auto; text-align: center; }
}

/* "Why this level?" score breakdown */
.why { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 10px; }
.why summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.why-list { list-style: none; padding: 0; margin: 10px 0 6px; display: grid; gap: 4px; }
.why-list li { display: grid; grid-template-columns: 4.2em 1fr; gap: 8px; font-size: .94rem; }
.why-list .pts { font-family: var(--mono); font-weight: 700; text-align: right; }
.why-list .total { border-top: 1px dashed var(--line); padding-top: 4px; font-weight: 700; }
.why-scale { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 8px 0 4px; font-size: .8rem; text-align: center; }
.why-scale span { padding: 4px 2px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); }
.why-scale span.on { outline: 2px solid currentColor; font-weight: 700; color: var(--ink); }

/* QR code X-ray */
.qr-panel .row { margin-bottom: 4px; }
.qr-video { display: block; width: 100%; max-width: 420px; aspect-ratio: 1; object-fit: cover; border-radius: 12px; margin: 12px 0 4px; background: #000; }
.qr-video[hidden] { display: none; }
.qr-panel .status.warn { color: var(--some); }
.qr-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 10px 0 0; font-size: .94rem; }
.qr-card dt { color: var(--ink-2); }
.qr-card dd { margin: 0; font-family: var(--mono); word-break: break-all; }
.qr-card.payment { border: 2px solid color-mix(in srgb, var(--strong) 45%, transparent); background: var(--strong-bg); }
.qr-card.payment h2 { color: var(--strong); }

/* Fold-out result sections */
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2 { margin: 0; }
.fold > summary::after { content: ""; width: 10px; height: 10px; flex: none; border-right: 2.5px solid var(--ink-2); border-bottom: 2.5px solid var(--ink-2);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; }
.fold[open] > summary::after { transform: rotate(-135deg); }
.fold[open] > summary { margin-bottom: 12px; }

/* Keep sections clear of the sticky header when the app scrolls to them */
.card { scroll-margin-top: 130px; }

/* "Something else to check?" tiles */
.tile-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.tile {
  display: flex; gap: 14px; align-items: flex-start; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 1px 2px rgba(20, 24, 33, .05), 0 18px 36px -18px rgba(20, 24, 33, .3); }
.tile[aria-expanded="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.tile-icon { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; }
.tile-icon svg { width: 24px; height: 24px; }
.tile-icon.call { background: var(--strong-bg); color: var(--strong); }
.tile-icon.qr { background: var(--link-bg); color: var(--link-ink); }
.tile-text strong { display: block; font-family: var(--display); font-size: 1.1rem; letter-spacing: -0.015em; margin-bottom: 2px; }
.tile-text span { display: block; font-size: .9rem; color: var(--ink-2); }
@media (max-width: 560px) { .tile-row { grid-template-columns: 1fr; } }

/* "On a call right now?" */
.call-signs { display: grid; gap: 4px; margin-bottom: 12px; }
.call-verdict { position: sticky; top: 96px; z-index: 2; margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; font-weight: 700;
  font-size: 1.1rem; background: var(--surface-2); color: var(--ink); min-height: 3.2em; display: flex; align-items: center; }
.call-verdict.hang-up { background: var(--strong); color: var(--strong-bg); } /* strong-bg is the readable opposite in both themes */
.call-advice { border-radius: 12px; padding: 14px; background: var(--surface-2); }
.call-advice h3 { margin: 0 0 8px; font-size: 1.25rem; }
.call-advice.hang-up { background: var(--strong-bg); border: 2px solid var(--strong); }
.call-advice.hang-up h3 { color: var(--strong); font-size: 1.45rem; }

/* Country picker */
.region-select { margin-top: 8px; max-width: 100%; }
#input-status:empty { display: none; }

/* Headings the app moves focus to (for screen readers) don't need a visible ring */
[tabindex="-1"]:focus { outline: none; }
.short-note { background: var(--surface); border-radius: 12px; padding: 10px 14px; margin-top: 4px; }
