/* AutoExam Drive — public site. Brand colours match the app's tailwind.config.js. */

@import url('fonts.css');

:root {
  --blue: #1f66d9;
  --blue-ink: #12305e;
  --yellow: #ffd300;

  --ink: #16181c;
  --muted: #5c6068;
  --faint: #8b8f97;
  --rule: #d9d5cc;
  --rule-soft: #e8e5de;
  --paper: #faf8f4;
  --card: #ffffff;
  --success: #2f7d32;
  --error: #c62828;

  --serif: 'Literata', Georgia, serif;
  --sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --gutter: clamp(18px, 4.5vw, 56px);
  --measure: 1200px;
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

::selection { background: var(--yellow); color: var(--ink); }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}

.brand__mark { width: 26px; height: 26px; display: block; }

.brand__name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 26px);
  font-family: var(--mono);
  font-size: 12.5px;
}

.navlinks a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

.navlinks a:hover { color: var(--ink); border-bottom-color: var(--yellow); }

@media (max-width: 680px) {
  .masthead__inner {
    flex-wrap: wrap;
    min-height: 0;
    padding-block: 11px;
    gap: 9px;
  }

  .brand { margin-right: 0; }
  .navlinks { width: 100%; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; }
}

/* ---------- statement ---------- */

.hero { border-bottom: 1px solid var(--rule); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.hero__main { padding: clamp(38px, 6vw, 74px) clamp(24px, 4vw, 56px) clamp(34px, 5vw, 60px) 0; }

.hero__aside {
  border-left: 1px solid var(--rule);
  padding: clamp(38px, 6vw, 74px) 0 clamp(34px, 5vw, 60px) clamp(24px, 4vw, 44px);
}

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__main { padding-right: 0; padding-bottom: 26px; }
  .hero__aside { border-left: 0; border-top: 1px solid var(--rule); padding: 26px 0 34px; }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--yellow);
  flex: none;
}

h1 {
  font-family: var(--serif);
  margin: 0;
  font-size: clamp(31px, 4.6vw, 53px);
  line-height: 1.12;
  letter-spacing: -0.017em;
  font-weight: 600;
  text-wrap: balance;
}

.hero__lede {
  margin: 20px 0 0;
  max-width: 52ch;
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--muted);
}

/* key–value block, the datasheet device used throughout */

.spec { margin: 0; font-family: var(--mono); font-size: 13px; }

.spec div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.spec div:first-child { border-top: 1px solid var(--rule-soft); }

.spec dt { color: var(--faint); letter-spacing: 0.03em; }
.spec dd { margin: 0; color: var(--ink); text-align: right; font-weight: 500; }
.spec dd em { font-style: normal; color: var(--blue); }

.aside__note {
  margin: 20px 0 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* ---------- sections as specification entries ---------- */

section { border-bottom: 1px solid var(--rule); }

.entry {
  display: grid;
  grid-template-columns: minmax(0, 210px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  padding-block: clamp(36px, 5.5vw, 68px);
}

@media (max-width: 880px) {
  .entry { grid-template-columns: 1fr; gap: 18px; }
}

.entry__key {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 6px;
}

@media (min-width: 881px) {
  .entry__key { position: sticky; top: 24px; align-self: start; }
}

h2 {
  font-family: var(--serif);
  margin: 0 0 14px;
  font-size: clamp(22px, 2.7vw, 31px);
  line-height: 1.2;
  letter-spacing: -0.014em;
  font-weight: 600;
  text-wrap: balance;
}

h3 {
  margin: 0 0 7px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

p { margin: 0 0 15px; }
p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(16.5px, 1.5vw, 18.5px); color: var(--muted); max-width: 64ch; }

/* dense feature rows instead of a card grid */

.rows { margin-top: 30px; border-top: 1px solid var(--rule-soft); }

.rows > div {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-soft);
}

@media (max-width: 700px) {
  .rows > div { grid-template-columns: 1fr; gap: 5px; }
}

.rows p { color: var(--muted); font-size: 15.5px; margin: 0; }

.cols {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 720px) {
  .cols--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 22px 22px 24px;
}

.card p { color: var(--muted); font-size: 15px; margin: 0; }

/* numbered procedure */

.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; }

.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.steps li:first-child { border-top: 1px solid var(--rule-soft); }

.steps li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  padding-top: 3px;
}

.steps strong { display: block; margin-bottom: 3px; font-weight: 600; }
.steps p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- actions ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.btn {
  display: inline-flex;
  align-items: center;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn--outline:hover, .btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: 0.45; cursor: default; }

/* ---------- documents ---------- */

.doc { max-width: 74ch; }
.doc h2 { margin-top: 40px; font-size: clamp(19px, 2.1vw, 24px); }
.doc h2:first-of-type { margin-top: 26px; }
.doc h3 { margin-top: 24px; }
.doc ul, .doc ol { padding-left: 20px; margin: 0 0 15px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--faint); }

.doc__meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 6px;
}

table.data { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; }

table.data th,
table.data td {
  text-align: left;
  vertical-align: top;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--rule-soft);
}

table.data th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 400;
  border-bottom-color: var(--rule);
}

table.data td:first-child { font-weight: 600; width: 33%; }

@media (max-width: 620px) {
  table.data thead { position: absolute; left: -9999px; }
  table.data tr { display: block; padding: 13px 0; border-bottom: 1px solid var(--rule-soft); }
  table.data tr:first-child { border-top: 1px solid var(--rule); }
  table.data td { display: block; border: 0; padding: 0; }
  table.data td:first-child { width: auto; margin-bottom: 3px; }
  table.data td + td { color: var(--muted); font-size: 14.5px; }
}

.todo {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--yellow);
  background: var(--card);
  padding: 14px 16px;
  margin: 0 0 18px;
  font-size: 14.5px;
}

.todo b {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- forms ---------- */

.form { max-width: 540px; display: grid; gap: 17px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 13px; color: var(--muted); }

.field input,
.field textarea,
.field select {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 11px 13px;
  width: 100%;
}

.field input:focus,
.field textarea:focus,
.field select:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }

.field textarea { min-height: 108px; resize: vertical; }

.note { font-size: 14.5px; color: var(--muted); border-left: 1px solid var(--rule); padding-left: 14px; }

.status { font-size: 15px; padding: 12px 15px; display: none; border: 1px solid; }
.status[data-state='ok'] { display: block; border-color: var(--success); color: var(--success); background: var(--card); }
.status[data-state='err'] { display: block; border-color: var(--error); color: var(--error); background: var(--card); }

/* ---------- footer ---------- */

footer {
  flex-shrink: 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  padding-block: 42px 26px;
}

.footer__grid {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.5fr) repeat(auto-fit, minmax(140px, 1fr));
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 12px;
  font-weight: 400;
}

footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; overflow-wrap: anywhere; }
footer a:hover { color: var(--yellow); }

@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .footer__note { max-width: none; }
  .colophon { flex-direction: column; gap: 8px; }
}

.footer__brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--mono); font-size: 13.5px; }
.footer__brand img { width: 24px; height: 24px; }
.footer__note { margin: 12px 0 0; max-width: 38ch; font-size: 13.5px; }

.colophon {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.38);
}

/* ---------- misc ---------- */

a.inline { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
a.inline:hover { color: var(--blue-ink); }

.stack > * + * { margin-top: 16px; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.tight { max-width: 66ch; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: var(--gutter);
  top: 8px;
  z-index: 50;
  background: var(--yellow);
  color: var(--ink);
  padding: 9px 14px;
}

/* ---------- language switch ---------- */

/* <details> so the switch works with scripting off — the legal pages must. */
.lang { position: relative; }

.lang > summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

.lang > summary::-webkit-details-marker { display: none; }
.lang > summary::after { content: "▾"; margin-left: 5px; }

.lang[open] > summary,
.lang > summary:hover { color: var(--ink); border-bottom-color: var(--yellow); }

.lang__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 132px;
  padding: 5px 0;
  background: var(--card);
  border: 1px solid var(--ink);
}

.lang__menu a {
  padding: 7px 14px;
  border-bottom: 0;
  white-space: nowrap;
}

.lang__menu a:hover {
  background: var(--paper);
  color: var(--ink);
  border-bottom-color: transparent;
}

@media (max-width: 680px) {
  /* The nav wraps here, so the language button can end up at the left edge.
     Anchoring the panel to the button would then push it off-screen — anchor it
     to the masthead instead and let it span the gutter. */
  .masthead__inner { position: relative; }
  .lang { position: static; }

  .lang__menu {
    left: var(--gutter);
    right: var(--gutter);
    top: calc(100% + 11px);
    min-width: 0;
  }

  .lang__menu a { padding: 11px 14px; }
}
