/* EduNotes beta testers' page. Plain CSS (no Tailwind, unlike the parent edunotes page), but the
   same design tokens, so the two pages read as one family. Change colours here only. */

:root {
  --brand: #1034A6;
  --brand-hover: #0D2B8A;
  --brand-tint: rgba(16, 52, 166, 0.08);
  --charcoal: #1D1D1F;
  --muted: #6E6E73;
  --studio: #F4F4F6;
  --space: #111113;
  --hairline: rgba(0, 0, 0, 0.08);
  --white: #FFFFFF;

  --pass: #1E7B45;
  --fail: #B42318;
  --blocked: #9A5B00;

  --radius: 20px;
  --radius-sm: 12px;
  --shell: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Let the hidden attribute win over component display rules such as .code-current. */
[hidden] { display: none !important; }

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }

code, kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--brand-tint);
  color: var(--brand);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  margin: 12px;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--white);
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.shell.narrow { max-width: calc(820px + 48px); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.section { padding: 80px 0; }
.tinted { background: var(--studio); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
@media (min-width: 768px) { .section { padding: 112px 0; } }

.grid { display: grid; gap: 20px; margin-top: 36px; }
@media (min-width: 768px) {
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.four { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) { .grid.four { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Header ---------- */
.glass {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--hairline); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }

.brand-link { display: flex; align-items: center; gap: 10px; color: var(--charcoal); text-decoration: none; }
.brand-mark { height: 28px; width: auto; }
.wordmark { font-size: 17px; font-weight: 600; letter-spacing: -0.022em; }
.wordmark-sub { color: var(--brand); }

.header-nav { display: none; gap: 24px; font-size: 14px; }
.header-nav a { color: var(--muted); text-decoration: none; }
.header-nav a:hover { color: var(--charcoal); }
@media (min-width: 768px) { .header-nav { display: flex; } }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius);
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.display {
  margin: 28px 0 0;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.022em;
}
@media (min-width: 768px) { .display { font-size: 64px; } }

.lead { margin: 24px auto 0; max-width: 640px; color: var(--muted); font-size: 18px; line-height: 1.6; }
@media (min-width: 768px) { .lead { font-size: 20px; } }

.h2 { margin: 0; font-size: 32px; font-weight: 600; line-height: 1.12; letter-spacing: -0.022em; }
@media (min-width: 768px) { .h2 { font-size: 40px; } }

.h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.h3.spaced { margin-top: 28px; }
.h4 { margin: 28px 0 4px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.section-lead { margin: 16px 0 0; max-width: 720px; color: var(--muted); font-size: 17px; }
.fine { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Panels ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px;
}
.panel.callout { border: 2px solid var(--brand); }
.panel.languages { margin-top: 20px; background: var(--brand-tint); border-color: transparent; }
.panel.languages p { margin: 10px 0 0; }

.focus { border-top: 2px solid var(--brand); padding-top: 24px; }
.focus p { margin: 8px 0 0; color: var(--muted); }

.steps, .ticks { margin: 14px 0 0; padding-left: 20px; }
.steps li, .ticks li { margin-top: 8px; }
.ticks { list-style: none; padding-left: 0; }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}

.tester-status {
  display: inline-block;
  margin: 32px 0 0;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--studio);
  font-size: 15px;
}
.tester-status.warn { background: #FFF6E5; border-color: rgba(154, 91, 0, 0.25); }

/* Tester code: the entry form when there is no code, otherwise the code and Change. */
.tester-code { margin-top: 32px; }
.tester-code .tester-status { margin-top: 16px; }
.code-form { max-width: 520px; margin: 0 auto; }
.code-form label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { flex: none; }
@media (max-width: 519px) { .code-row { flex-direction: column; } }
.code-current { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; font-size: 14px; color: var(--muted); }
.code-current code { word-break: break-all; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }

.field { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 0; min-width: 0; border: 0; padding: 0; }
.form-grid .field { margin: 0; }
.field > span, .field > legend { font-size: 14px; font-weight: 500; padding: 0; }
.field em { font-style: normal; color: var(--muted); font-weight: 400; }

.field-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }

input:not([type="radio"]), textarea, select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
}
input::placeholder, textarea::placeholder { color: rgba(110, 110, 115, 0.7); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--fail); }
textarea { resize: vertical; }

.outcome { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.outcome legend { width: 100%; margin-bottom: 6px; }
.outcome label { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
input[type="radio"] { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }

.btn {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 11px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.btn.primary { background: var(--brand); color: var(--white); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.primary:disabled { background: rgba(16, 52, 166, 0.4); cursor: not-allowed; }
.btn.secondary { background: var(--white); color: var(--brand); border-color: rgba(16, 52, 166, 0.3); }
.btn.secondary:hover { background: var(--brand-tint); }
.btn.link { background: none; color: var(--muted); padding-left: 8px; padding-right: 8px; }
.btn.link:hover { color: var(--charcoal); }
.btn.small { padding: 6px 14px; font-size: 13px; }

.form-status { margin: 12px 0 0; font-size: 14px; min-height: 1.4em; }
.form-status.ok { color: var(--pass); }
.form-status.error { color: var(--fail); }

/* ---------- Test cards ---------- */
.card {
  margin-top: 16px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
#cards .card:first-of-type { margin-top: 36px; }
.card[open] { border-color: rgba(16, 52, 166, 0.25); }
.card.assigned { border: 2px solid var(--brand); }

.card summary, .summary-static {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
}
.summary-static { cursor: default; }
.card summary::-webkit-details-marker { display: none; }
.card summary::after {
  content: "";
  margin-left: auto;
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 200ms ease;
}
.card[open] summary::after { transform: rotate(-135deg); }

.card-letter {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 600;
}
.card-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.badge {
  flex: none;
  padding: 3px 10px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
}
.badge.muted-badge { background: var(--studio); color: var(--muted); }
.summary-static .badge { margin-left: auto; }

.card-body { padding: 0 24px 24px; border-top: 1px solid var(--hairline); }
.card-intro { margin: 18px 0 0; color: var(--muted); }
.card-pending { background: var(--studio); }
.card-pending .card-intro { margin: 0; padding: 0 24px 22px 74px; }
@media (max-width: 639px) { .card-pending .card-intro { padding-left: 24px; } }

.checklist { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: item; }
.checklist li {
  counter-increment: item;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.checklist li:last-child { border-bottom: 0; }
.item-text::before { content: counter(item) ". "; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (min-width: 720px) {
  .checklist li { grid-template-columns: 1fr auto; align-items: center; gap: 20px; }
}

/* Pass / Fail / Blocked / Not tested segmented control, one per checklist line. */
.status-group { display: inline-flex; border: 1px solid rgba(0, 0, 0, 0.14); border-radius: 10px; overflow: hidden; justify-self: start; }
.status-group label { position: relative; }
.status-group input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.status-group span {
  display: block;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}
.status-group label:first-child span { border-left: 0; }
.status-group input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.status-group input:checked + span { color: var(--white); }
.status-group input[value="pass"]:checked + span { background: var(--pass); }
.status-group input[value="fail"]:checked + span { background: var(--fail); }
.status-group input[value="blocked"]:checked + span { background: var(--blocked); }
.status-group input[value="untested"]:checked + span { background: var(--muted); }

/* Status key above the cards; chips reuse the segmented-control colours. */
.status-key { margin-top: 36px; }
.status-key dl { margin: 12px 0 0; }
.status-key dl div { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.status-key dl div:last-child { border-bottom: 0; }
@media (min-width: 640px) { .status-key dl div { grid-template-columns: 112px 1fr; gap: 16px; align-items: baseline; } }
.status-key dd { margin: 0; color: var(--muted); }
.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.chip.pass { background: var(--pass); }
.chip.fail { background: var(--fail); }
.chip.blocked { background: var(--blocked); }
.chip.untested { background: var(--muted); }

.card-footer { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hairline); }

/* ---------- Reporting ---------- */
.format { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.format code { font-size: 15px; padding: 8px 12px; }
.example { margin: 12px 0 0; font-size: 15px; }

/* Report line builder: the tester's own first line, copied with one button. */
.report-builder { margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--hairline); }
.report-builder .format code { word-break: break-word; }

.severity { margin: 16px 0 0; }
.severity div { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.severity div:last-child { border-bottom: 0; }
.severity dt { font-weight: 600; }
.severity dd { margin: 4px 0 0; color: var(--muted); }
.sev {
  display: inline-block;
  min-width: 34px;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 8px;
  color: var(--white);
  font-size: 13px;
  text-align: center;
}
.sev.s0 { background: var(--fail); }
.sev.s1 { background: var(--blocked); }
.sev.s2 { background: var(--brand); }
.sev.s3 { background: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--space); color: var(--white); padding: 80px 0; }
@media (min-width: 768px) { .site-footer { padding: 112px 0; } }
.on-dark { color: var(--white); }
.footer-lead { margin: 20px 0 0; color: rgba(255, 255, 255, 0.7); font-size: 17px; }
.footer-lead a { color: var(--white); }
.footer-meta {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-meta p { margin: 0; }
.footer-meta a { color: rgba(255, 255, 255, 0.75); }
@media (min-width: 768px) { .footer-meta { flex-direction: row; justify-content: space-between; gap: 32px; } }
