/* ---------- shared ---------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f4f6f8;
  --text: #1f2733;
  --muted: #66707d;
  --line: #e6e9ee;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* state colors (set via body[data-state] on the result page) */

body[data-state="red"]    { --glow: #d92626; --glow-tint: rgba(217, 38, 38, 0.10); }
body[data-state="yellow"] { --glow: #dd9f06; --glow-tint: rgba(221, 159, 6, 0.12); }
body[data-state="green"]  { --glow: #0fae4a; --glow-tint: rgba(15, 174, 74, 0.10); }

/* ---------- home page ---------- */

.card {
  width: min(420px, 90vw);
  padding: 36px 32px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(20, 30, 45, 0.06);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.card h1 {
  font-size: 26px;
  margin: 8px 0 6px;
}

.hint {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #f7f8fa;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.option:hover {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: #cfd6df;
}

.option-key {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.option-label {
  color: var(--muted);
  font-size: 14px;
}

.option-dot {
  width: 10px;
  height: 10px;
  margin-left: auto;
  border-radius: 50%;
  opacity: 0.7;
}

.option-dot[data-color="red"]    { background: #e5484d; }
.option-dot[data-color="yellow"] { background: #f5a524; }
.option-dot[data-color="green"]  { background: #30a46c; }

/* ---------- result page ---------- */


@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* housing: realistic dark panel with corner screws and a hanger loop */

.traffic {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: fit-content;
  margin: 24px auto 0;
  padding: 24px 26px;
  border-radius: 28px;
  background:
    radial-gradient(circle, #45484d 1.5px, #0e0f12 2.5px, transparent 3px),
    radial-gradient(circle, #45484d 1.5px, #0e0f12 2.5px, transparent 3px),
    radial-gradient(circle, #45484d 1.5px, #0e0f12 2.5px, transparent 3px),
    radial-gradient(circle, #45484d 1.5px, #0e0f12 2.5px, transparent 3px),
    linear-gradient(180deg, #383b40, #1b1d20 70%);
  background-position:
    13px 13px,
    calc(100% - 13px) 13px,
    13px calc(100% - 13px),
    calc(100% - 13px) calc(100% - 13px),
    0 0;
  background-size: 8px 8px, 8px 8px, 8px 8px, 8px 8px, 100% 100%;
  background-repeat: no-repeat;
  border: 3px solid #0c0d0f;
  box-shadow:
    0 14px 36px rgba(20, 30, 45, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* hanger loop on top */

.traffic::after {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 14px;
  border: 5px solid #26282c;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}

/* each light: metallic silver bezel ring + glass lens (::before) */

.light {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d8dce1, #969ca4 45%, #565b63 78%, #848a92);
  box-shadow:
    0 0 0 3px #0f1013,
    0 3px 6px rgba(0, 0, 0, 0.4),
    inset 0 2px 3px rgba(255, 255, 255, 0.28),
    inset 0 -3px 5px rgba(0, 0, 0, 0.45);
}

.light::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #0c0d10;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* unlit lens: dark glass that still reads as red, amber, or green */

.light.red::before {
  background: radial-gradient(circle at 35% 30%, #7c2520, #4c120f 60%, #2a0a08);
}

.light.yellow::before {
  background: radial-gradient(circle at 35% 30%, #c49812, #7d5c09 60%, #3f2e06);
}

.light.green::before {
  background: radial-gradient(circle at 35% 30%, #156636, #0d4226 60%, #072418);
}

/* lit lens: bright saturated color, big soft hotspot, glass depth */

.light.lit::after {
  content: "";
  position: absolute;
  top: 12%;
  left: 16%;
  width: 46%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.75), transparent 70%);
  filter: blur(1px);
  transform: rotate(-18deg);
  pointer-events: none;
}

.light.red.lit {
  box-shadow:
    0 0 0 3px #0f1013,
    0 0 32px 10px rgba(232, 28, 28, 0.65),
    0 0 84px 28px rgba(232, 28, 28, 0.28);
}

.light.red.lit::before {
  background: radial-gradient(circle at 32% 28%, #ffd9d5 0%, #ff7369 18%, #e81c1c 32%, #e81c1c 70%, #c41616 100%);
  box-shadow:
    0 0 0 2px #0c0d10,
    inset 0 4px 8px rgba(255, 255, 255, 0.35),
    inset 0 -6px 10px rgba(0, 0, 0, 0.28);
}

.light.yellow.lit {
  box-shadow:
    0 0 0 3px #0f1013,
    0 0 38px 12px rgba(242, 181, 12, 0.75),
    0 0 96px 32px rgba(242, 181, 12, 0.38);
}

.light.yellow.lit::before {
  background: radial-gradient(circle at 32% 28%, #fff7d6 0%, #ffe566 22%, #f2b50c 36%, #f2b50c 78%, #f0be14 100%);
  box-shadow:
    0 0 0 2px #0c0d10,
    inset 0 4px 8px rgba(255, 255, 255, 0.4),
    inset 0 -6px 10px rgba(0, 0, 0, 0.22);
}

.light.green.lit {
  box-shadow:
    0 0 0 3px #0f1013,
    0 0 32px 10px rgba(15, 191, 77, 0.65),
    0 0 84px 28px rgba(15, 191, 77, 0.28);
}

.light.green.lit::before {
  background: radial-gradient(circle at 32% 28%, #d2ffe3 0%, #4fe07d 18%, #0fbf4d 32%, #0fbf4d 70%, #12a844 100%);
  box-shadow:
    0 0 0 2px #0c0d10,
    inset 0 4px 8px rgba(255, 255, 255, 0.35),
    inset 0 -6px 10px rgba(0, 0, 0, 0.25);
}

/* verdict pill */

.verdict {
  display: inline-block;
  margin-top: 28px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glow);
  background: var(--glow-tint);
  border: 1px solid color-mix(in srgb, var(--glow) 30%, transparent);
}

.r-main {
  max-width: 660px !important;
  padding: 8px 0 56px;
}

/* ---------- result page v3: hero, findings, actions ---------- */
.r-hero {
  text-align: center;
  animation: rise 0.4s ease both;
}

.r-hero .traffic { margin-top: 20px; }
.r-hero .verdict { margin-top: 26px; font-size: 13px; padding: 8px 18px; }

.r-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(26px, 4.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.r-checked {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  list-style: none;
}

.r-checked li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 13px;
  color: var(--muted);
}

.r-checked li b { color: var(--text); font-weight: 600; }

.r-edit {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- section titles ---------- */
.r-section { margin-top: 36px; }

.r-title {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- findings (red / yellow) ---------- */
.r-finding {
  position: relative;
  padding: 20px 22px 18px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.r-finding + .r-finding { margin-top: 12px; }

.r-finding::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--risk);
}

.r-finding.red    { --risk: #d92626; --risk-tint: rgba(217, 38, 38, 0.07); }
.r-finding.yellow { --risk: #dd9f06; --risk-tint: rgba(221, 159, 6, 0.10); }

.r-finding-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.r-badge {
  flex: none;
  margin-top: 1px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--risk-tint);
  color: var(--risk);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.r-finding.yellow .r-badge { color: #a87600; }

.r-reason {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.r-todo {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--risk-tint);
}

.r-todo-label {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.r-todo p { font-size: 15px; line-height: 1.5; }

.r-steps {
  list-style: none;
  display: grid;
  gap: 10px;
}

.r-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
}

.r-steps li > span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding-top: 2px;
  white-space: nowrap;
}

.r-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.r-contact:hover { border-color: var(--text); }

.r-source {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.r-note {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px dashed var(--line);
  font-size: 14px;
  color: var(--muted);
}

/* ---------- green ---------- */
.r-pass {
  display: flex;
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid rgba(15, 174, 74, 0.25);
  border-radius: 16px;
  background: rgba(15, 174, 74, 0.06);
}

.r-pass-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0fae4a;
  color: #ffffff;
  font-weight: 700;
}

.r-pass p { font-size: 16px; line-height: 1.5; }
.r-pass p + p { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* ---------- checklist ---------- */
.r-list {
  list-style: none;
  padding: 6px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.r-list li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  font-size: 15px;
}

.r-list li + li { border-top: 1px solid var(--line); }
.r-list li::before { content: "✓"; color: #0fae4a; font-weight: 700; }

/* ---------- actions ---------- */
.r-actions {
  display: flex;
  gap: 10px;
  margin-top: 32px;
}

.r-btn {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--text);
  background: var(--text);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.r-btn.ghost { background: #ffffff; color: var(--text); border-color: var(--line); }

.r-others {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.r-others a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

.r-others a small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.r-others a:hover { border-color: var(--text); }

.r-disclaimer {
  margin-top: 32px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 560px) {
  .r-hero .traffic { gap: 10px; padding: 16px 18px; border-radius: 22px; }
  .r-hero .light { width: 50px; height: 50px; }
  .r-hero .light::before { inset: 4px; }
  .r-actions { flex-direction: column; }
  .r-others { grid-template-columns: 1fr; }
  .r-finding { padding: 18px 16px 16px 20px; }
  .r-finding-head { flex-direction: column; gap: 8px; }
}

.r-error {
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid #f3c2c4;
  border-radius: 14px;
  background: #fff5f5;
  color: #b3261e;
  font-size: 15px;
}

.r-error a { display: inline-block; margin-top: 8px; color: var(--text); font-weight: 600; }

/* ---------- dynamic form (home page) ---------- */

body.form-page,
body.result-body {
  display: block;
  padding: 0 20px;
}

body.form-page > :not(dialog),
body.result-body > :not(dialog) {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

/* top bar */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand-lights {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 5px;
  border-radius: 8px;
  background: var(--text);
}

.brand-lights i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.brand-lights i:nth-child(1) { background: #d92626; }
.brand-lights i:nth-child(2) { background: #dd9f06; }
.brand-lights i:nth-child(3) { background: #0fae4a; }

.nav-links {
  display: flex;
  gap: 8px;
  margin-right: -10px;
  font-size: 15px;
}

/* padded so each link is a comfortable tap target */
.nav-links a {
  padding: 10px;
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover { color: var(--text); }

/* hero: pitch on the left, form on the right */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 56px;
  align-items: start;
  padding: 32px 0 64px;
}

.hero-pitch {
  position: sticky;
  top: 32px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.pill b {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(15, 174, 74, 0.12);
  color: #0b8a3a;
  font-size: 12px;
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 62%, #fde68a 62%);
}

.lede {
  max-width: 30em;
  margin-bottom: 26px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.exam-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  list-style: none;
}

.exam-chips li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.preview {
  max-width: 440px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.preview-cap {
  padding: 10px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.preview-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.45;
}

.preview-row + .preview-row { margin-top: 2px; }
.preview-row strong { display: block; font-size: 14px; }
.preview-row small { font-size: 13px; color: var(--muted); }

.preview-row .dot {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
}

.preview-row.green  { background: rgba(15, 174, 74, 0.09); }
.preview-row.yellow { background: rgba(221, 159, 6, 0.11); }
.preview-row.red    { background: rgba(217, 38, 38, 0.08); }
.preview-row.green .dot  { background: #0fae4a; }
.preview-row.yellow .dot { background: #dd9f06; }
.preview-row.red .dot    { background: #d92626; }

.card.form-card {
  width: 100%;
  padding: 32px;
  box-shadow: 0 20px 50px -24px rgba(20, 30, 45, 0.22);
}

.form-title {
  margin-bottom: 4px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

/* sections below the hero */
.how,
.browse {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-eyebrow {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.how h2,
.browse h2 {
  margin-bottom: 28px;
  font-size: 28px;
  letter-spacing: -0.025em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--text);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.steps h3 { margin-bottom: 6px; font-size: 16px; }
.steps p { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* crawlable links to the static answer pages (scripts/build_pages.py) */
.browse-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

.browse details {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.browse summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.browse summary::-webkit-details-marker { display: none; }

.browse summary small {
  margin-right: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.browse summary::after { content: "–"; color: var(--muted); }
.browse details:not([open]) summary::after { content: "+"; }

.browse ul {
  margin-top: 14px;
  list-style: none;
  font-size: 14.5px;
  line-height: 1.45;
}

.browse li { margin-bottom: 7px; }
.browse a { color: var(--muted); text-decoration: none; }
.browse a:hover { color: var(--text); text-decoration: underline; }

/* footer and About / Privacy / Terms */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.site-footer > span:first-child { max-width: 46em; }

/* padded so each link is a comfortable tap target */
.footer-links { display: flex; gap: 4px; margin: 0 -10px; }
.footer-links a { padding: 10px; color: var(--text); font-weight: 500; }

.info-dialog {
  width: calc(100% - 32px);
  max-width: 520px;
  margin: auto;
  padding: 32px;
  border: none;
  border-radius: 20px;
  color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(20, 30, 45, 0.4);
}

.info-dialog::backdrop { background: rgba(20, 30, 45, 0.45); }
.info-dialog h2 { margin-bottom: 16px; font-size: 22px; letter-spacing: -0.02em; }
.info-dialog p,
.info-dialog li { margin-bottom: 10px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.info-dialog ul { padding-left: 18px; }
.info-dialog b { color: var(--text); }
.info-dialog .signature { margin-top: 18px; font-weight: 600; color: var(--text); }
.info-dialog .muted { font-size: 13px; }

.dialog-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 12px; }
  .hero-pitch { position: static; }
  .preview { display: none; }
  .exam-chips { margin-bottom: 0; }
  .steps, .browse-cols { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body.form-page,
  body.result-body { padding: 0 16px; }
  .nav-links a:not([data-open]) { display: none; }
  .card.form-card { padding: 24px 20px; }
  .lede { font-size: 16px; }
}

.form-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 10px;
}

/* inline sub-title inside a section (e.g. "Name comparison") */
.form-section-title.sub {
  margin: 16px 0 8px;
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field label .req,
.compare-label .req {
  color: #e5484d;
}

.field .control,
.field input,
.field select,
.compare input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input:focus,
.field select:focus,
.compare input:focus {
  background: #ffffff;
  border-color: #aeb8c4;
}

.field input.invalid,
.field select.invalid,
.compare input.invalid {
  border-color: #e5484d;
  background: #fff5f5;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.field-row.two {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 560px) {
  .field-row,
  .field-row.two {
    grid-template-columns: 1fr;
  }
}

.hint-small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
}

/* stacked pill choices (Yes/No, organizer …) */

.choice-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.choice {
  flex: 1 1 auto;
  padding: 11px 14px;
  font-size: 13px;
  text-align: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f7f8fa;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.choice.selected {
  background: #ffffff;
  border-color: var(--text);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--text);
}

/* tick-box checklist (school letter …) */

.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* .field label / .field input are styled for normal fields; the
   .field-prefixed selectors below take precedence for checklist rows */
.field .check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f7f8fa;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.field .check-item input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  accent-color: var(--text);
  cursor: pointer;
}

.field .check-item:has(input:checked) {
  background: #ffffff;
  border-color: var(--text);
  color: var(--text);
}

.field .check-item:has(input:focus-visible) {
  box-shadow: 0 0 0 2px var(--text);
}

/* "My exams" panel (saved details) */
.my-exams {
  margin: 14px 0 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8fa;
  font-size: 13px;
}

.my-exams-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.my-exams-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.my-exam + .my-exam {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.my-exam-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text);
}

.my-exam-what {
  font-weight: 600;
}

.my-exam-state {
  color: var(--muted);
}

.my-exam-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.my-exam-dot.red { background: #d92626; }
.my-exam-dot.yellow { background: #dd9f06; }
.my-exam-dot.green { background: #0fae4a; }

.my-exam-note,
.my-exam-warning {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.my-exam-warning {
  margin-top: 10px;
  color: var(--text);
}

.my-exam-actions {
  display: flex;
  gap: 14px;
  margin-top: 4px;
}

.my-exam-actions a,
.my-exam-remove,
.my-exam-ics {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text);
  text-decoration: underline;
  cursor: pointer;
}

/* "Remember my details on this device" (assets/js/profile.js) */
.remember {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8fa;
  font-size: 13px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.remember-label input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--text);
}

.remember-note,
.remember-status {
  margin: 6px 0 0 26px;
  color: var(--muted);
  line-height: 1.45;
}

.remember-forget {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text);
  text-decoration: underline;
  cursor: pointer;
}

.submit-btn {
  display: block;
  width: 100%;
  margin-top: 26px;
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: #ffffff;
  background: var(--text);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.submit-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.form-error {
  display: none;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #e5484d;
}

.form-error[style*="block"] {
  display: block;
}

/* name comparison table */

.compare {
  display: grid;
  grid-template-columns: 92px 1fr 1fr;
  gap: 8px 10px;
  align-items: center;
}

/* TOEFL: optional third column for the supplemental ID's name; the whole
   column hides (via .supp-off) until a supplemental ID is actually needed */
.compare.three {
  grid-template-columns: 92px 1fr 1fr 1fr;
}

.compare.three.supp-off {
  grid-template-columns: 92px 1fr 1fr;
}

.compare.supp-off .supp-cell {
  display: none;
}

@media (max-width: 560px) {
  .compare.three,
  .compare.three.supp-off {
    grid-template-columns: 1fr 1fr;
  }

  .compare.three.supp-off .compare-label {
    grid-column: 1 / -1;
  }
}

.compare-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.compare-label {
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 560px) {
  .compare {
    grid-template-columns: 1fr 1fr;
  }

  .compare-label {
    grid-column: 1 / -1;
  }
}

/* ---------- searchable comboboxes + split date picker (home page) ---------- */

.combo {
  position: relative;
}

.combo-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
  max-height: 230px;
  overflow-y: auto;
  padding: 6px;
}

.combo-option {
  padding: 9px 10px;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* optional second line in a combo option (e.g. an exam's full name under
   its short name; the input keeps just the short name after selection) */
.combo-option-detail {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  margin-top: 1px;
}

.combo-option:hover,
.combo-option.active {
  background: #f1f3f5;
}

.combo-option.none {
  color: var(--muted);
  cursor: default;
}

.combo-option.none:hover {
  background: none;
}

.combo.open .combo-input {
  background: #ffffff;
  border-color: #aeb8c4;
}

/* split date picker: three mini-dropdowns side by side */

.datepicker-split {
  display: flex;
  gap: 8px;
}

.datepicker-split .combo {
  flex: 1;
  min-width: 0;
}

.datepicker-split .combo-input {
  text-align: center;
  padding: 12px 8px;
  font-size: 13px;
}

/* name-comparison inputs display in uppercase (stored value keeps case;
   name matching normalizes anyway) */
.name-input {
  text-transform: uppercase;
}

/* ---------- v2: conditional sections, two-layer fixes, contact chips ---------- */

/* wraps the conditionally-rendered block (expiry + name comparison) */
.conditional-section {
  margin-top: 4px;
}

