:root {
  color-scheme: light;
  --ink: #17221d;
  --muted: #5d6b64;
  --line: #dce5df;
  --paper: #fbfdfb;
  --surface: #ffffff;
  --forest: #164a36;
  --forest-2: #24684e;
  --mint: #e4f2ea;
  --amber: #a95f11;
  --amber-bg: #fff3df;
  --red: #a23a32;
  --shadow: 0 18px 50px rgba(22, 52, 40, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: linear-gradient(180deg, #f1f7f3 0, var(--paper) 330px); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.site-header { height: 72px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(22, 74, 54, .12); background: rgba(251, 253, 251, .86); backdrop-filter: blur(14px); }
.brand { display: flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: white; background: var(--forest); font-family: Georgia, serif; }
main { width: min(1120px, calc(100% - 32px)); margin: 48px auto 80px; }
.hero { padding: clamp(32px, 6vw, 72px); max-width: 900px; margin: 7vh auto; background: radial-gradient(circle at 88% 5%, #d9efe3 0, transparent 34%), var(--surface); }
h1, h2 { letter-spacing: -.035em; margin: 0; }
h1 { font-size: clamp(2.15rem, 5vw, 4.35rem); line-height: 1.02; max-width: 820px; }
h2 { font-size: 1.35rem; }
p { line-height: 1.6; color: var(--muted); }
.lede { font-size: 1.14rem; max-width: 720px; }
.eyebrow { margin: 0 0 12px; color: var(--forest-2); text-transform: uppercase; font-size: .76rem; letter-spacing: .13em; font-weight: 800; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 28px; margin: 20px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 8px; }
.header-link { color: var(--forest); font-weight: 700; text-decoration: none; padding: 8px 4px; }
.header-link:hover { text-decoration: underline; }
button { border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 700; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(36, 104, 78, .28); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .45; }
.primary { color: white; background: var(--forest); }
.primary:hover { background: #0e3b2a; }
.secondary { color: var(--forest); background: var(--mint); }
.quiet { color: var(--forest); background: transparent; border: 1px solid var(--line); }
.fine-print { font-size: .82rem; }
#google-sign-in { display: block; width: min(320px, 100%); min-height: 44px; max-height: 48px; overflow: hidden; }
#google-sign-in > div { max-width: 100%; max-height: 48px; overflow: hidden; }
#google-sign-in iframe { display: block; max-width: 100% !important; max-height: 44px !important; }
/* Google Identity normally supplies these dimensions. Keep a scoped fallback
   because a strict CSP may reject its dynamically injected inline stylesheet. */
#google-sign-in [role="button"] { display: inline-flex !important; align-items: center !important; justify-content: center; gap: 10px; width: auto !important; min-width: 210px; max-width: 100%; height: 40px !important; min-height: 40px; max-height: 40px; overflow: hidden; padding: 0 12px; border: 1px solid #747775; border-radius: 4px; background: white; color: #1f1f1f; font-size: 14px; line-height: 20px; }
#google-sign-in [role="button"] svg,
#google-sign-in [role="button"] img { flex: 0 0 18px; width: 18px !important; min-width: 18px; max-width: 18px; height: 18px !important; min-height: 18px; max-height: 18px; }
.notice { border: 1px solid #e5be86; background: var(--amber-bg); color: #70410d; padding: 13px 16px; border-radius: 12px; }
.page-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
.section-heading > div { display: flex; align-items: center; gap: 12px; }
.step { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: white; background: var(--forest); font-weight: 800; }
.badge { display: inline-flex; align-items: center; border: 1px solid #c8dbcf; background: #eff7f2; color: var(--forest); border-radius: 999px; padding: 6px 10px; font-size: .78rem; font-weight: 750; }
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.status-card { min-height: 124px; display: flex; flex-direction: column; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.status-card strong { font-size: 1.35rem; }
.status-card span:last-child, .status-label { font-size: .78rem; color: var(--muted); }
.status-card.warning { border-color: #e7c291; background: #fffaf1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
label { color: var(--ink); font-weight: 650; }
select, input[type="file"] { width: 100%; margin-top: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: white; }
.command-block { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #cbdad1; border-radius: 12px; background: #f4f8f5; padding: 9px 10px 9px 16px; margin: 18px 0 8px; }
.command-block code { overflow-wrap: anywhere; }
.platform-picker { border: 0; padding: 0; margin: 22px 0 12px; }
.platform-picker legend { margin-bottom: 10px; font-weight: 760; }
.platform-options { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-option { color: var(--forest); background: white; border: 1px solid #c8dbcf; min-width: 104px; }
.platform-option[aria-pressed="true"] { color: white; background: var(--forest); border-color: var(--forest); }
.setup-steps { display: grid; gap: 16px; margin: 20px 0; padding-left: 24px; color: var(--muted); }
.setup-steps li { padding-left: 4px; line-height: 1.55; }
.setup-steps strong { color: var(--ink); }
.setup-steps .command-block { margin: 10px 0 0; }
.returning-guidance { border-left: 4px solid var(--forest-2); border-radius: 8px; background: #eff7f2; padding: 14px 16px; margin-top: 20px; }
.returning-guidance p { margin: 4px 0 0; }
.file-picker { display: block; margin-top: 22px; }
.checklist { display: grid; gap: 10px; margin-top: 18px; }
.check-item { display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.check-item input, .confirm input { margin-top: 3px; accent-color: var(--forest); }
.question { border: 0; border-top: 1px solid var(--line); padding: 22px 0; margin: 0; }
.question legend { font-weight: 760; line-height: 1.4; }
.option { display: flex; gap: 9px; align-items: flex-start; padding: 9px 0; font-weight: 500; color: var(--muted); }
.feedback { margin-top: 15px; padding: 16px; border-radius: 12px; background: var(--amber-bg); color: #70410d; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 11px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.result-pass { color: var(--forest-2); font-weight: 750; }
.result-attention { color: var(--red); font-weight: 750; }
.table-action { color: var(--forest); background: var(--mint); padding: 6px 10px; font-size: .78rem; }
dialog { width: min(880px, calc(100% - 24px)); border: 0; border-radius: 18px; padding: 0; box-shadow: 0 30px 100px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(17, 29, 23, .63); backdrop-filter: blur(3px); }
.dialog-card { padding: 24px; }
pre { max-height: 50vh; overflow: auto; background: #122019; color: #dff3e7; border-radius: 12px; padding: 16px; font-size: .76rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.confirm { display: flex; gap: 10px; margin: 16px 0; }
.details-content { margin-top: 18px; }
.details-content h3 { margin: 26px 0 10px; }
.detail-row { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.detail-row span { color: var(--muted); overflow-wrap: anywhere; }
.answer-detail { padding: 12px; margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; }
.answer-correct { border-left: 4px solid var(--forest-2); }
.answer-missed { border-left: 4px solid var(--red); }

@media (max-width: 820px) {
  .status-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  main { margin-top: 26px; }
  .site-header { padding: 0 16px; }
  .site-header .actions { gap: 6px; }
  .header-link { font-size: .86rem; }
  .status-grid { grid-template-columns: 1fr; }
  .card { padding: 20px; border-radius: 16px; }
  .page-heading, .section-heading { align-items: flex-start; flex-direction: column; }
  .command-block { align-items: stretch; flex-direction: column; }
  .detail-row { grid-template-columns: 1fr; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
