:root {
  --bg: #101317;
  --bg-soft: #171b21;
  --bg-raised: #1e232b;
  --line: #2a3039;
  --line-strong: #3a424e;
  --text: #e7e9ee;
  --text-soft: #b9c0cc;
  --text-faint: #7f8794;
  --accent: #ff9900;      /* AWS orange */
  --accent-soft: rgba(255, 153, 0, 0.14);
  --accent-line: rgba(255, 153, 0, .35);
  --accent-ink: #ff9900;
  --track: #232932;
  --spark: #4b5563;
  --ok: #4fbf7f;
  --bad: #e0614f;
  --warn: #d8b34a;
  --on-accent: #16181c;   /* text on accent/ok/bad plates */
  --on-ok: #0f1a13;
  --on-bad: #ffffff;
  --ok-text: #a8e5c2;
  --bad-text: #f2b3a8;
  --ok-bg: rgba(79, 191, 127, .10);
  --ok-line: rgba(79, 191, 127, .45);
  --bad-bg: rgba(224, 97, 79, .10);
  --bad-line: rgba(224, 97, 79, .42);
  --ring: rgba(255, 255, 255, .10);
  --shadow: none;
  --btn-bg: var(--bg);
  --btn-border: var(--line-strong);
  --btn-text: var(--text-soft);
  --btn-border-hover: var(--text-faint);
  --accent-hover: var(--accent);
  --card-line: var(--line);
  --r: 8px;
  /* one gutter for the shell: .view, the top bar and the notice bar all read this, so the lockup
     lines up with the content column at every width instead of only on desktop */
  --gutter: 18px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --sans: -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
}


/* ---------- themes ---------- */
/* dark is the default palette on :root; light is forced by hand or follows the OS */

:root[data-theme='light'] {
  --bg: #f5f7fa;
  --bg-soft: #ffffff;
  --bg-raised: #ffffff;
  --line: #d7dee9;
  --line-strong: #c2cbda;
  --text: #141922;
  --text-soft: #3d4654;
  --text-faint: #5a6473;
  --accent: #2563eb;      /* blue keeps contrast on white */
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-line: rgba(37, 99, 235, .38);
  --accent-ink: #1d4ed8;
  --accent-hover: #1d4ed8;
  --track: #e4eaf3;
  --spark: #6b7788;
  --ok: #1c7f4c;
  --bad: #b4301f;
  --warn: #96650a;
  --on-accent: #ffffff;
  --on-ok: #ffffff;
  --on-bad: #ffffff;
  --ok-text: #12643b;
  --bad-text: #8c2a1b;
  --ok-bg: rgba(28, 127, 76, .09);
  --ok-line: rgba(28, 127, 76, .38);
  --bad-bg: rgba(180, 48, 31, .08);
  --bad-line: rgba(180, 48, 31, .32);
  --ring: rgba(20, 25, 34, .12);
  --shadow: 0 1px 2px rgba(20, 25, 34, .06), 0 10px 26px rgba(20, 25, 34, .07);
  --btn-bg: #ffffff;
  --btn-border: #c6cfdd;
  --btn-text: #3c4553;
  --btn-border-hover: #9aa6b8;
  --card-line: #d5dde8;
}

/* data-theme="system" = the light palette, but only when the OS prefers light.
   Both bodies are identical by design — edit them together. */
@media (prefers-color-scheme: light) {
  :root[data-theme='system'] {
  --bg: #f5f7fa;
  --bg-soft: #ffffff;
  --bg-raised: #ffffff;
  --line: #d7dee9;
  --line-strong: #c2cbda;
  --text: #141922;
  --text-soft: #3d4654;
  --text-faint: #5a6473;
  --accent: #2563eb;      /* blue keeps contrast on white */
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-line: rgba(37, 99, 235, .38);
  --accent-ink: #1d4ed8;
  --accent-hover: #1d4ed8;
  --track: #e4eaf3;
  --spark: #6b7788;
  --ok: #1c7f4c;
  --bad: #b4301f;
  --warn: #96650a;
  --on-accent: #ffffff;
  --on-ok: #ffffff;
  --on-bad: #ffffff;
  --ok-text: #12643b;
  --bad-text: #8c2a1b;
  --ok-bg: rgba(28, 127, 76, .09);
  --ok-line: rgba(28, 127, 76, .38);
  --bad-bg: rgba(180, 48, 31, .08);
  --bad-line: rgba(180, 48, 31, .32);
  --ring: rgba(20, 25, 34, .12);
  --shadow: 0 1px 2px rgba(20, 25, 34, .06), 0 10px 26px rgba(20, 25, 34, .07);
  --btn-bg: #ffffff;
  --btn-border: #c6cfdd;
  --btn-text: #3c4553;
  --btn-border-hover: #9aa6b8;
  --card-line: #d5dde8;
}
}

:root { color-scheme: dark; }
:root[data-theme='light'] { color-scheme: light; }
@media (prefers-color-scheme: light) { :root[data-theme='system'] { color-scheme: light; } }

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }

/* ---------- top bar ---------- */
.topbar {
  flex: none; display: flex; align-items: center; gap: 14px;
  height: 58px;
  padding: 0 calc(var(--gutter) + max(0px, (100% - 1080px - 2 * var(--gutter)) / 2));
  background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 11px; min-width: 0;
  /* it is an <a> now: inherit the type, drop the underline, keep a visible focus ring */
  color: inherit; text-decoration: none; border-radius: 4px;
}
.brand:hover { opacity: .92; }
.brand:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 4px; }
.brand__mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px;
  background: var(--accent); color: var(--on-accent); font: 700 11px/1 var(--mono);
}
.brand__mark--img { background: none; display: block; border-radius: 8px;
  box-shadow: 0 0 0 1px var(--ring); }
.brand__stack { display: flex; flex-direction: column; line-height: 1.2; }
.brand__lock { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 2px; }
.brand__lockup { height: 27px; width: auto; display: block; }
.brand__lockup--light { display: none; }
[data-theme="light"] .brand__lockup--dark { display: none; }
[data-theme="light"] .brand__lockup--light { display: block; }
@media (prefers-color-scheme: light) {
  [data-theme="system"] .brand__lockup--dark { display: none; }
  [data-theme="system"] .brand__lockup--light { display: block; }
}
.authcard__lock { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.authcard__lock .brand__lockup { height: 46px; }

.brand__name { font-family: var(--mono); font-size: 13.5px; letter-spacing: .8px; color: var(--text); }
/* Tagline stretched across the whole lockup: from the cloud's left edge to the end of EXAMS.
   The words are separate boxes so the row justifies to both ends without letter-spacing guesswork. */
.brand__sub {
  display: flex; justify-content: space-between; align-items: baseline;
  width: 100%; margin-top: 3px;
  font-size: 9.5px; letter-spacing: 0; text-transform: uppercase;
  color: var(--text-soft); white-space: nowrap;
}
.brand__sub i { font-style: normal; }

.brand__text--mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 1.8px; }
.brand__text { font-size: 14px; color: var(--text-soft); white-space: nowrap; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.shell { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
/* the page scrolls as one document: the footer ends the content instead of being pinned */
/* flex-shrink must be 0: otherwise a long page is squeezed to the viewport and
   its content paints over the footer instead of scrolling the shell */
.view { flex: 1 0 auto; min-height: 0; overflow: visible; padding: 26px var(--gutter) 40px; }
.page { max-width: 1080px; margin: 0 auto; }

/* ---------- buttons / chips ---------- */
.btn {
  font: inherit; font-size: 13px; padding: 8px 14px; cursor: pointer;
  border-radius: var(--r); border: 1px solid var(--btn-border);
  background: var(--btn-bg); color: var(--btn-text);
  /* links styled as buttons must not inherit the anchor underline */
  text-decoration: none; display: inline-block; text-align: center;
}
.btn:hover { border-color: var(--btn-border-hover); color: var(--text); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn--ghost { border-color: transparent; background: none; }
.btn--ghost:hover { background: var(--bg-raised); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.chip {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-faint);
}

h1 { font-size: 26px; font-weight: 600; margin: 0 0 6px; }
h2 { font-size: 19px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
p  { margin: 0 0 12px; color: var(--text-soft); }
.hint { color: var(--text-faint); font-size: 13px; }
.small { font-size: 12.5px; }

/* ---------- cards ---------- */
.card {
  background: var(--bg-soft); border: 1px solid var(--card-line); border-radius: 12px;
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grow { flex: 1 1 auto; }

/* ---------- settings controls ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .9px; color: var(--text-faint); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], select {
  font: inherit; font-size: 14px; padding: 8px 10px; min-width: 140px;
  background: var(--bg-raised); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); opacity: .75; }
/* Textareas had no rule at all, so the policy note rendered as a raw browser control beside styled
   inputs. Same surfaces, same focus ring; only the resize handle is extra. */
textarea {
  font: inherit; font-size: 14px; line-height: 1.5; padding: 10px 12px; width: 100%;
  min-height: 0; resize: vertical;
  background: var(--bg-raised); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-soft); outline-offset: 1px; border-color: var(--accent);
}
/* form inputs fill their container so selects and text fields line up */
input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="number"], select { width: 100%; padding: 10px 12px; }
/* let native date/select widgets render dark (calendar icon included) */
input[type="date"], select { color-scheme: dark; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.7); cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-soft); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ---------- domain list ---------- */
.domain {
  display: flex; align-items: baseline; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.domain:last-child { border-bottom: 0; }
.domain__num { font: 600 12px/1 var(--mono); color: var(--accent); width: 22px; }
.domain__name { flex: 1 1 auto; color: var(--text-soft); font-size: 13.5px; }
.domain__weight { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }

/* ---------- exam ---------- */
.exambar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  position: sticky; top: 0; z-index: 5;
}
.timer { font: 600 20px/1 var(--mono); color: var(--text); letter-spacing: .5px; }
.timer.is-low { color: var(--bad); }
.progress { flex: 1 1 200px; height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--accent); width: 0; transition: width .2s; }

.qmeta { font-family: var(--mono); font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.qstem { font-size: 17px; line-height: 1.5; color: var(--text); margin-bottom: 18px; }
.qtype { color: var(--accent); }

.opt {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 15px; margin-bottom: 10px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--line-strong); }
.opt.is-picked { border-color: var(--accent); background: var(--accent-soft); }
.opt.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt__key {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font: 600 12px/1 var(--mono);
  border: 1px solid var(--line-strong); color: var(--text-faint);
}
.opt.is-picked .opt__key { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.opt.is-correct .opt__key { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.opt.is-wrong .opt__key { background: var(--bad); border-color: var(--bad); color: var(--on-bad); }
.opt__text { flex: 1 1 auto; color: var(--text-soft); font-size: 14.5px; }
.opt.is-picked .opt__text { color: var(--text); }

.explain {
  margin-top: 14px; padding: 14px 16px; border-radius: 10px;
  background: var(--bg-raised); border-left: 3px solid var(--accent);
  color: var(--text-soft); font-size: 14px;
}
.explain a { color: var(--accent); }

.navgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
.navgrid button {
  font: 600 12px/1 var(--mono); padding: 8px 0; cursor: pointer;
  background: var(--bg-raised); color: var(--text-faint);
  border: 1px solid var(--line-strong); border-radius: 6px;
}
.navgrid button.is-answered { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }
.navgrid button.is-current { outline: 2px solid var(--text); outline-offset: 1px; }
.navgrid button.is-flagged { border-color: var(--warn); color: var(--warn); }

/* ---------- results ---------- */
.score { display: flex; align-items: baseline; gap: 14px; margin-bottom: 4px; }
.score__num { font: 700 46px/1 var(--mono); }
.score__num.is-pass { color: var(--ok); }
.score__num.is-fail { color: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { font: 600 11px/1 var(--mono); letter-spacing: .8px; text-transform: uppercase; color: var(--text-faint); }
td.num { font-family: var(--mono); }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font: 600 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .7px; }
.badge--pass { background: var(--ok-bg); color: var(--ok-text); border: 1px solid var(--ok-line); }
.badge--fail { background: var(--bad-bg); color: var(--bad-text); border: 1px solid var(--bad-line); }
.badge--flag { background: rgba(216,179,74,.16); color: var(--warn); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--bg-raised); border: 1px solid var(--line-strong); color: var(--text);
  padding: 10px 16px; border-radius: 999px; font-size: 13px; z-index: 50;
}

@media (max-width: 720px) {
  :root { --gutter: 12px; }
  .brand__sub { display: none; }
  .view { padding: 18px var(--gutter) 48px; }
  .qstem { font-size: 16px; }
  .exambar { position: static; }
}

/* ---------- exam picker ---------- */
.examcard {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; font: inherit; color: inherit;
}
.examcard:hover { border-color: var(--accent); background: var(--bg-raised); }
.examcard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.examcard__code { font: 600 11px/1 var(--mono); letter-spacing: .9px; color: var(--accent); }
.examcard__name { font-size: 14px; color: var(--text); margin: 7px 0 4px; line-height: 1.35; }
.examcard__meta { font-size: 11.5px; color: var(--text-faint); font-family: var(--mono); }

/* ---------- vendors ---------- */

.vendorbar {
  display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap;
}
.vendortab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px; border-radius: 999px; cursor: pointer;
  background: var(--bg-soft); color: var(--text-soft);
  border: 1px solid var(--line); font: inherit; font-size: 13.5px;
  transition: border-color .15s, background .15s, color .15s;
}
.vendortab:hover { border-color: var(--line-strong); color: var(--text); }
.vendortab.is-active {
  border-color: var(--vaccent, var(--accent));
  background: color-mix(in srgb, var(--vaccent, var(--accent)) 12%, var(--bg-soft));
  color: var(--text);
}
.vendortab__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--vaccent, var(--accent));
}
.vendortab__label { letter-spacing: .3px; }
.vendortab__count {
  font-family: var(--mono); font-size: 11px; color: var(--text-faint);
  border-left: 1px solid var(--line); padding-left: 8px;
}

/* ---------- guest landing ---------- */

.landing { max-width: 1080px; margin: 0 auto; }

.landing__hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 22px; align-items: start; margin-bottom: 32px;
}
.landing__copy h1 {
  font-size: clamp(30px, 4vw, 42px); line-height: 1.08; letter-spacing: -.9px;
  margin: 10px 0 14px; max-width: 20ch; text-wrap: balance;
}
.landing__sub {
  font-size: 15.5px; line-height: 1.62; color: var(--text-soft);
  margin: 0 0 18px; max-width: 54ch;
}
.landing__cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.landing__btn { padding: 11px 20px; font-size: 14px; }
/* Full width under the hero: a three-up row tucked into the left column left the right half of
   the page empty and broke the grid the feature cards sit on. */
.landing__stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin: 0 0 34px;
}
.landing__stats .stat__label { color: var(--text-soft); }

.steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px;
  font-size: 13.5px; line-height: 1.56; color: var(--text-soft);
}
.steps__k {
  width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center;
  font: 600 11px/1 var(--mono); color: var(--accent);
  border: 1px solid var(--accent-line); background: var(--accent-soft);
}

.landing__section { margin: 32px 0; }
/* A section heading, not a label: the first pass used 11px mono here and the sections never
   announced themselves against the 13px card body text. */
.landing__h2 {
  font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -.2px;
  color: var(--text); margin: 0 0 16px; display: flex; align-items: center; gap: 9px;
}
.landing__h2::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px;
  background: var(--accent); flex: 0 0 auto;
}

.landing__features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px;
}
.feat {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px;
}
.feat__k { font: 600 10.5px/1 var(--mono); letter-spacing: 1px; color: var(--accent); }
.feat h3 { margin: 9px 0 6px; font-size: 15px; letter-spacing: -.1px; }
.feat p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-soft); }

.landing__vendors { gap: 8px; }

.landing__band {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding: 22px 24px; border-radius: 16px; border: 1px solid var(--accent-line);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--bg-soft);
  margin-top: 36px;
}
.landing__band h2 { font-size: 20px; margin: 0 0 4px; letter-spacing: -.2px; }

@media (max-width: 900px) {
  .landing__hero { grid-template-columns: minmax(0, 1fr); }
  .landing__copy h1 { max-width: none; }
}
@media (max-width: 640px) {
  .landing__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 520px) {
  .landing__stats { gap: 8px; }
  .landing__stats .stat { padding: 10px 11px; }
  .landing__stats .stat__num { font-size: 19px; }
  .landing__band { padding: 18px; }
  .landing__band h2 { font-size: 18px; }
}

/* ---------- auth ---------- */

/* A `hidden` attribute only means display:none through the UA stylesheet, so any author rule that
   sets `display` on the element wins and the control stays on screen. `.btn` sets display:inline-block,
   which is exactly how the Console and Sign out buttons stayed visible to guests and customers.
   Restore the attribute for every element that uses it to gate a control. */
[hidden] { display: none !important; }

/* Guests get no account nav at all. visibility:hidden left the buttons' width reserved. */
body.is-guest .topbar__actions { display: none; }

/* …and a two-item guest bar instead, so the header has a right edge and a way back to pricing. */
.topbar__guest { margin-left: auto; display: none; align-items: center; gap: 8px; }
.topbar__guest .btn { white-space: nowrap; }
body.is-guest .topbar__guest { display: flex; }
@media (max-width: 480px) {
  .topbar__guest { gap: 4px; }
  .topbar__guest .btn { padding: 7px 9px; font-size: 12.5px; }
}

.authwrap {
  min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 32px 18px;
}
.authcard {
  width: 100%; max-width: 430px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 14px; padding: 26px 26px 22px;
}
.authcard__brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; }
.authcard h1 { font-size: 21px; margin: 0 0 4px; font-weight: 600; }
.authcard .hint { margin: 0 0 18px; }
.authcard .field { margin-bottom: 14px; }
.authsubmit { width: 100%; justify-content: center; margin-top: 18px; }

/* Single sign-on: a provider button above the email form, with a labelled divider. */
.ssoslot { display: grid; gap: 10px; margin-bottom: 4px; }
.authsso { width: 100%; justify-content: center; text-decoration: none; }
.ssoor {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 12px; letter-spacing: .02em; text-transform: uppercase;
}
.ssoor::before, .ssoor::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.authmsg {
  margin: 0 0 12px; padding: 9px 11px; border-radius: 8px; font-size: 13px;
  color: var(--bad-text); background: var(--bad-bg); border: 1px solid var(--bad-line);
}
.linkbtn {
  display: block; width: 100%; margin-top: 16px; padding: 6px;
  background: none; border: 0; cursor: pointer;
  color: var(--text-faint); font: inherit; font-size: 13px;
}
.linkbtn:hover { color: var(--text); }
.linkbtn b { color: var(--accent); font-weight: 500; }
.chip--user { font-family: var(--mono); font-size: 11.5px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }

.passrow { position: relative; display: flex; align-items: center; }
.passrow input { padding-right: 62px; }
.passpeek {
  position: absolute; right: 8px; padding: 4px 8px; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: 6px;
  color: var(--text-faint); font: inherit; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .8px;
}
.passpeek:hover { color: var(--text); border-color: var(--line); }

/* ---------- dashboard ---------- */

.dashstats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.stat {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
}
.stat__num { font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--text); }
.stat__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-faint); }

.badgerow { display: flex; flex-wrap: wrap; gap: 8px; }
.bdg {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line); background: var(--bg-raised); color: var(--text-soft);
}
.bdg__icon { font-family: var(--mono); font-size: 11px; letter-spacing: -1px; }
.bdg--positive { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-text); }
.bdg--positive .bdg__icon { color: var(--ok); }
.bdg--negative { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad-text); }
.bdg--negative .bdg__icon { color: var(--bad); }
.bdg--neutral .bdg__icon { color: var(--text-faint); }

/* ---------- badge medallions ----------
   A circle reads as an award in a way a pill never does, and the ring carries the tone so the
   icon can stay a single stroke colour. */
.badgerow--medals {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 14px 10px; align-items: start;
}
.medal {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; min-width: 0;
}
.medal__plate {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); background: var(--bg-raised); color: var(--text-soft);
  transition: transform .12s ease, border-color .12s ease;
}
.medal:hover .medal__plate { transform: translateY(-1px); }
.medal__plate svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.medal__label { font-size: 11.5px; line-height: 1.25; color: var(--text-soft); }
.medal--positive .medal__plate { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.medal--positive .medal__label { color: var(--ok-text); }
.medal--negative .medal__plate { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.medal--negative .medal__label { color: var(--bad-text); }
.medal--rank .medal__plate { border-color: #d4a12a; background: rgba(212,161,42,.12); color: #e8c15c; }
.medal--rank.medal--silver .medal__plate { border-color: #b6c2d4; background: rgba(182,194,212,.16); color: #e3e9f2; }
.medal--rank.medal--bronze .medal__plate { border-color: #a9744a; background: rgba(169,116,74,.12); color: #d9a97f; }
:root[data-theme='light'] .medal--rank .medal__plate { color: #8a6300; }
:root[data-theme='light'] .medal--rank.medal--silver .medal__plate { color: #47505f; }
:root[data-theme='light'] .medal--rank.medal--bronze .medal__plate { color: #7a4a22; }
:root[data-theme='light'] .medal--negative .medal__plate { border-color: var(--bad-line); }
:root[data-theme='light'] .medal--positive .medal__plate { border-color: var(--ok-line); }
@media (max-width: 520px) {
  .badgerow--medals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
}

/* how-to-earn guide: closed by default so the card stays quiet, and always present so the set is
   discoverable even before a single badge is earned */
.badgeguide { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.badgeguide summary {
  cursor: pointer; font-size: 12.5px; color: var(--text-faint); list-style: none;
  display: flex; align-items: center; gap: 7px;
}
.badgeguide summary::-webkit-details-marker { display: none; }
.badgeguide summary::before {
  content: '+'; font-family: var(--mono); font-size: 13px; width: 12px; text-align: center;
}
.badgeguide[open] summary::before { content: '−'; }
.guide { display: grid; gap: 10px; margin-top: 12px; }
.guide__row { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.guide__icon {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); color: var(--text-soft);
}
.guide__icon svg {
  width: 14px; height: 14px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.guide__icon.medal--positive { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.guide__icon.medal--negative { border-color: var(--bad); color: var(--bad); background: var(--bad-bg); }
.guide__icon.medal--rank { border-color: #d4a12a; color: #e8c15c; background: rgba(212,161,42,.12); }
:root[data-theme='light'] .guide__icon.medal--rank { color: #8a6300; }
.guide__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.guide__text strong { font-size: 12.5px; font-weight: 600; }
:root[data-theme='light'] .guide__icon.medal--negative { border-color: var(--bad-line); }
:root[data-theme='light'] .guide__icon.medal--positive { border-color: var(--ok-line); }

.examrow {
  display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(200px, 1.6fr) auto;
  gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line);
}
.examrow:first-of-type { border-top: 0; }
.examrow__id .examcard__code { font-family: var(--mono); font-size: 13px; color: var(--text); }
.examrow__score { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.score--small { font-family: var(--mono); font-size: 18px; font-weight: 600; }
.score--small.is-pass { color: var(--ok); }
.score--small.is-fail { color: var(--bad); }
.dv { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.dv--up { color: var(--ok); }
.dv--down { color: var(--bad); }
.dv--flat { color: var(--text-faint); }
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 24px; }
.spark i { display: block; width: 4px; background: var(--spark); border-radius: 1px; }
.examrow__meta .hint { display: block; }
.examrow__go { justify-self: end; }

@media (max-width: 900px) {
  .dashstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .examrow { grid-template-columns: 1fr auto; row-gap: 8px; }
  .examrow__meta { grid-column: 1 / -1; }
}

/* ---------- dashboard profile strip ---------- */
.profilecard { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.profilecard__who { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.avatar {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid var(--accent-line);
  font-family: var(--mono); font-size: 18px; font-weight: 600;
}
.profilecard__facts { display: flex; gap: 24px; flex-wrap: wrap; }
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact__k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-faint); }
.fact__v { font-size: 13.5px; color: var(--text-soft); }
.pill {
  font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
  padding: 1px 6px; border-radius: 999px; margin-left: 6px; white-space: nowrap;
}
.pill--ok { color: var(--ok-text); background: var(--ok-bg); border: 1px solid var(--ok-line); }
.pill--warn { color: var(--warn); background: rgba(216,179,74,.12); border: 1px solid rgba(216,179,74,.4); }

/* ---------- profile page ---------- */
.chip--button { cursor: pointer; font: inherit; font-size: 11.5px; font-family: var(--mono); }
/* header theme switch: a glyph, so it stays square and legible at 11px chip size */
#themeToggle { font-size: 13px; line-height: 1; padding: 5px 8px; }
.chip--button:hover { border-color: var(--accent); color: var(--text); }
.chip--button:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }

.profilegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.profilegrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 780px) {
  .profilegrid, .profilegrid--3 { grid-template-columns: 1fr; }
}

/* in-progress rows: lift secondary text off the faint grey and keep a 1px fill visible */
.examrow__meta .hint, .examrow .hint.small { color: var(--text-soft); }
.progress__fill { min-width: 3px; }
.btn[data-discard] { color: var(--text-faint); }
.btn[data-discard]:hover { color: var(--bad); border-color: var(--bad); }

/* show-more control for in-progress runs */
.ipmore {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 6px 12px; cursor: pointer;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-soft); font: inherit; font-size: 12.5px;
}
.ipmore:hover { border-color: var(--line-strong); color: var(--text); }
.ipmore__arrow { transition: transform .15s ease; font-size: 11px; color: var(--text-faint); }
.ipmore.is-open .ipmore__arrow { transform: rotate(180deg); }

/* ---------- appearance control ---------- */
.themepick { display: flex; gap: 10px; margin: 12px 0 4px; flex-wrap: wrap; }
.themepick__opt {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 14px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text-soft);
  font: inherit; font-size: 13px;
}
.themepick__opt:hover { border-color: var(--line-strong); color: var(--text); }
.themepick__opt[aria-pressed='true'] { border-color: var(--accent); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.themepick__swatch {
  width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line-strong);
  display: grid; place-items: center; font-size: 12px;
}
.themepick__swatch--dark { background: #101317; color: #ff9900; }
.themepick__swatch--light { background: #f5f7fa; color: #2563eb; }

/* light: secondary buttons need a visible edge on white */
.themepick__swatch--system {
  background: linear-gradient(135deg, #101317 0 50%, #f5f7fa 50% 100%);
  color: #7f8794;
}

/* ---------- domain links + cheat sheet ---------- */
.domain--link {
  width: 100%; text-align: left; font: inherit; cursor: pointer;
  border-radius: 8px; padding-left: 8px; padding-right: 8px; margin-left: -8px;
  background: none; border: 1px solid transparent; color: inherit;
}
.domain--link:hover { background: var(--bg-raised); border-color: var(--line); }
.domain--link:hover .domain__name { color: var(--accent-ink); }
.domain--link:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.domain__chev {
  color: var(--text-faint); white-space: nowrap;
  font: 500 9.5px/1 var(--mono); letter-spacing: .9px; text-transform: uppercase;
}
.domain--link { cursor: pointer; }
.domain--link:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.domain--link:hover .domain__chev { color: var(--accent-ink); }

/* ---------- cheat sheet ---------- */
.cs-hero {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 22px; margin-bottom: 18px;
  border: 1px solid var(--accent-line); border-radius: 14px;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 62%),
    var(--bg-soft);
}
.cs-hero__badge {
  flex: 0 0 auto; display: grid; place-items: center; gap: 2px;
  width: 62px; height: 62px; border-radius: 14px;
  border: 1px solid var(--accent-line); background: var(--bg-raised);
}
.cs-hero__num { font: 600 24px/1 var(--mono); color: var(--accent-ink); }
.cs-hero__lbl {
  font: 500 8.5px/1 var(--mono); letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--text-faint);
}
.cs-hero__body { flex: 1 1 auto; min-width: 0; }
.cs-hero__body .qmeta { margin-bottom: 6px; }
.cs-hero__title {
  margin: 0 0 12px; font-size: 25px; line-height: 1.22; letter-spacing: -0.2px;
  color: var(--text); font-weight: 650;
}
.cs-hero__back { flex: 0 0 auto; align-self: center; white-space: nowrap; }

.cs-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.cs-chip {
  font: 500 11px/1 var(--mono); letter-spacing: .3px;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-soft); background: var(--bg);
}
.cs-chip--key {
  border-color: var(--accent-line); background: var(--accent-soft);
  color: var(--accent-ink); font-weight: 600;
}
.cs-chips--skills { margin: 0 0 14px; }
.cs-skill {
  font: 500 10.5px/1 var(--mono); letter-spacing: .4px;
  padding: 4px 8px; border-radius: 6px;
  color: var(--text-soft); background: var(--bg);
  border: 1px solid var(--line);
}

.cs-tasks { display: grid; gap: 16px; }
.cs-task {
  position: relative; padding: 18px 20px 20px 24px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg-raised);
  box-shadow: var(--shadow);
}
.cs-task::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px;
  border-radius: 2px; background: var(--accent); opacity: .55;
}
.cs-task__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cs-task__id {
  font: 600 12.5px/1 var(--mono); letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--text); display: inline-flex; align-items: center; gap: 9px;
}
.cs-task__id::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent); flex: 0 0 auto;
}
.cs-task__rule { flex: 1 1 auto; height: 1px; background: var(--line); }
.cs-task__count {
  font: 500 10px/1 var(--mono); letter-spacing: .4px; white-space: nowrap;
  padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text-faint);
}

.cs-points {
  list-style: none; margin: 0; padding: 0;
  columns: 2; column-gap: 38px; column-rule: 1px solid var(--line-strong);
}
@media (max-width: 900px) { .cs-points { columns: 1; } }
.cs-points li {
  position: relative; padding-left: 20px; margin: 0 0 15px;
  font-size: 13.6px; line-height: 1.68; color: var(--text-soft);
  break-inside: avoid; -webkit-column-break-inside: avoid;
}
.cs-points li:last-child { margin-bottom: 0; }
.cs-points li::before {
  content: ""; position: absolute; left: 3px; top: .72em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: .7;
}

.cs-refcard {
  margin-top: 16px; padding: 20px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft);
  box-shadow: var(--shadow);
}
.cs-refgrid {
  display: grid; gap: 9px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.cs-ref {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 2px 10px; padding: 11px 13px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raised);
  transition: border-color .12s ease, transform .12s ease, background .12s ease;
}
.cs-ref:hover {
  border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-1px);
}
.cs-ref__host {
  grid-column: 1; font: 500 9.8px/1.4 var(--mono); letter-spacing: .7px;
  text-transform: uppercase; color: var(--text-faint); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.cs-ref__slug {
  grid-column: 1; font-size: 13.2px; line-height: 1.4; color: var(--text);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cs-ref__go { grid-column: 2; grid-row: 1 / span 2; color: var(--text-faint); font-size: 13px; }
.cs-ref:hover .cs-ref__go { color: var(--accent-ink); }
.cs-ref:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }

@media (max-width: 720px) {
  .cs-hero { flex-wrap: wrap; }
  .cs-hero__body { flex-basis: 100%; }
  .cs-hero__back { order: -1; }
  .cs-hero__title { font-size: 21px; }
}


/* ---------- unified card system (app-wide, matches the cheat sheets) ---------- */
.card { border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow); }
.card h2 {
  display: flex; align-items: center; gap: 9px; margin: 0 0 10px;
  font: 600 12px/1 var(--mono); letter-spacing: 1.35px;
  text-transform: uppercase; color: var(--text);
}
.card h2::before {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px;
  border-radius: 2px; background: var(--accent);
}

/* page-level hero band */
.pagehero {
  padding: 18px 20px; border-radius: 14px; margin-bottom: 16px;
  border: 1px solid var(--accent-line);
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 62%),
    var(--bg-soft);
}
.pagehero h1 { margin: 2px 0 6px; font-size: 25px; letter-spacing: -0.2px; }
.pagehero .hint { margin: 0; }

/* profile strip as a hero card */
.profilecard {
  padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--bg-soft); box-shadow: var(--shadow);
}
.avatar {
  width: 46px; height: 46px; border-radius: 12px;
  font: 600 17px/1 var(--mono);
  box-shadow: inset 0 0 0 1px var(--ring);
}
.fact { display: flex; flex-direction: column; gap: 3px; }
.fact__k {
  font: 500 9.5px/1 var(--mono); letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-faint);
}
.fact__v { font-size: 13.5px; color: var(--text); }

/* stat tiles */
.stat {
  border-radius: 12px; border: 1px solid var(--line);
  padding: 16px 16px 14px; gap: 4px; box-shadow: var(--shadow);
}
.stat__num { font-size: 27px; letter-spacing: -0.5px; }
.stat__label { font: 500 9.8px/1 var(--mono); letter-spacing: 1.1px; color: var(--text-faint); }

/* exam cards in the picker */
.examcard {
  border-radius: 13px; position: relative; overflow: hidden;
  transition: border-color .12s ease, transform .12s ease, background .12s ease;
}
.examcard::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent); opacity: 0; transition: opacity .12s ease;
}
.examcard:hover { transform: translateY(-1px); }
.examcard:hover::before { opacity: .8; }

/* dashboard per-exam rows */
.examrow { padding: 13px 10px; border-radius: 10px; transition: background .12s ease; }
.examrow:hover { background: var(--bg-raised); }
.examrow:first-of-type { border-top: 0; }
.examrow__score .score--small { font-size: 19px; }

/* results card leads with the outcome */
.card--result { border-left: 3px solid var(--line-strong); }
.card--result.is-pass { border-left-color: var(--ok); }
.card--result.is-fail { border-left-color: var(--bad); }
.score__num { font-size: 52px; letter-spacing: -1px; }

/* tables (history) */
th { font: 600 10px/1 var(--mono); letter-spacing: 1.1px; color: var(--text-faint); }
td { color: var(--text-soft); }
tbody tr:hover { background: var(--bg-raised); }

/* header chips: make the name chip read as interactive */
.chip { font: 500 11px/1 var(--mono); letter-spacing: .5px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text-soft); }
.chip--button { border-color: var(--line-strong); color: var(--text-soft); }
.chip--button:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }

:root[data-theme='light'] .chip { background: #fff; border-color: #c2cbda; color: var(--text-soft); }
:root[data-theme='light'] .chip--button:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- rankings ---------- */
.ranktable { width: 100%; }
.ranktable th { padding: 8px 10px 10px; }
.ranktable td { padding: 10px; vertical-align: middle; }
.ranktable tbody tr:last-child td { border-bottom: 0; }
.rankpos { font: 600 12px/1 var(--mono); color: var(--text-faint); }
.rankpos--top { color: var(--accent-ink); }
.ranktable tr.is-you td { background: var(--accent-soft); }
.ranktable tr.is-you td:first-child { border-left: 2px solid var(--accent); }
.you {
  font: 500 9px/1 var(--mono); letter-spacing: .8px; text-transform: uppercase;
  padding: 3px 6px; border-radius: 999px; margin-left: 6px;
  background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line);
}

/* ranking badges */
.bdg--rank { border-width: 1px; }
.bdg--gold { border-color: #d4a12a; background: rgba(212,161,42,.12); color: #e8c15c; }
.bdg--silver { border-color: #b6c2d4; background: rgba(182,194,212,.16); color: #e3e9f2; }
.bdg--bronze { border-color: #a9744a; background: rgba(169,116,74,.12); color: #d9a97f; }
:root[data-theme='light'] .bdg--gold { color: #7a5a06; }
:root[data-theme='light'] .bdg--silver { color: #47505f; }
:root[data-theme='light'] .bdg--bronze { color: #7a4a22; }
.rankopt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ranktable th { color: var(--text-soft); }

.badgesect {
  font: 600 9.5px/1 var(--mono); letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--text-faint); margin: 14px 0 8px;
}
.badgesect:first-of-type { margin-top: 4px; }

/* ---------- notice bar + admin console ---------- */
.noticebar {
  flex: none; padding: 9px calc(var(--gutter) + max(0px, (100% - 1080px - 2 * var(--gutter)) / 2)); font-size: 13px;
  background: var(--accent-soft); color: var(--accent-ink);
  border-bottom: 1px solid var(--accent-line);
}
:root[data-theme='light'] .noticebar { color: #1d4ed8; }

.admintable { width: 100%; }
.admintable td { vertical-align: middle; padding: 11px 10px; }
.admintable tbody tr:hover { background: var(--bg-raised); }
.adminuser__name { font-size: 13.5px; color: var(--text); }
.adminactions { text-align: right; white-space: nowrap; }
.adminactions .btn { margin-left: 6px; }
.btn--tiny { font-size: 11.5px; padding: 5px 9px; border-radius: 6px; }
.btn--danger { color: var(--bad-text); border-color: var(--bad-line); }
.btn--danger:hover { background: var(--bad-bg); border-color: var(--bad); color: var(--bad-text); }
.pill--warn { color: var(--warn); border: 1px solid var(--accent-line); }

/* ---------- subscriptions ---------- */
/* ---------- subscription users table ------------------------------------------
   Fits the card, never scrolls sideways. There is exactly one spec here on purpose: three stacked
   .subtable blocks used to fight, and the winning 780px min-width pushed a normal console into a
   horizontal scrollbar. Columns are percentages of the table, so the table is always the card's width. */
.subtable { width: 100%; table-layout: fixed; }
.subtable th:nth-child(1) { width: 28%; }   /* subscriber: name over email */
.subtable th:nth-child(2) { width: 11%; }   /* plan: a select, needs room for "pro" */
.subtable th:nth-child(3) { width: 14%; }   /* status */
.subtable th:nth-child(4) { width: 11%; }   /* started */
.subtable th:nth-child(5) { width: 13%; }   /* next renewal */
.subtable th:nth-child(6) { width: 13%; }   /* access ends */
.subtable th:nth-child(7) { width: 10%; }   /* actions: one button, never split */
.subtable td { white-space: normal; overflow-wrap: anywhere; }
.subtable th, .subtable td { padding-left: 8px; padding-right: 8px; }
.subtable th:nth-child(1), .subtable td:nth-child(1) { padding-left: 2px; }
.subtable th:last-child, .subtable td:last-child { padding-right: 2px; }
.subtable td.adminactions { text-align: right; }
.subtable .subsel { width: 100%; min-width: 0; }
.subtable .subends__note { display: block; margin-top: 2px; }
.subtable .subends__date { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* a two-syllable button must not break as "Rem / ove" when the card is narrow */
.subtable .btn { white-space: nowrap; }
.subtable .btn--tiny { padding: 5px 8px; }
.subtable td:nth-child(4) { white-space: nowrap; }   /* started: a date, never split */

.subsel, .subdate, .priceinput {
  background: var(--bg-raised); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; font-size: 12.5px; padding: 5px 7px; font-family: inherit;
}
.subsel:focus, .subdate:focus { outline: none; border-color: var(--accent-line); }
.subdate { max-width: 130px; }
#subCard .cs-chips { display: flex; gap: 8px; flex-wrap: wrap; }
#subCard .admintable td { padding: 9px 10px; }

/* ---------- subscription table polish ---------- */
.tablewrap { overflow-x: auto; }
/* Six rows, then scroll. A subscription list that grows the page forever pushes the automations panel out of
   reach; capping keeps every section one screen apart. The header is sticky so a scrolled row still has columns. */
.tablewrap--cap { overflow-y: auto; overflow-x: auto; }
.tablewrap--cap thead th { position: sticky; top: 0; z-index: 1; background: var(--bg-soft); }
.subsel, .subdate, .priceinput { height: 30px; line-height: 1; box-sizing: border-box; }
.subdate { max-width: 100%; width: 100%; }
.subadd { gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.subfield { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.subfield .hint { margin: 0; }
/* subtable final sizing: keep the action button legible */

/* ---------- admin: new account ---------- */
.newacct { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.newacct__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.newacct__grid .subsel { width: 100%; height: 32px; }
.newacct__created { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.newacct__title { font-weight: 600; color: var(--ok-text); font-size: 13px; }
.newacct__row { display: flex; gap: 8px; align-items: center; }
.newacct__row code { font-family: var(--mono); font-size: 13px; padding: 6px 10px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--line); letter-spacing: 0.5px; }
.authnote { text-align: center; margin-top: 12px; }

/* keep the header row from squeezing the user chip and sign-out link */
.topbar__actions { flex-wrap: nowrap; flex-shrink: 0; }
.topbar__actions .btn, .topbar__actions .linkbtn { white-space: nowrap; }
.chip--user { flex: 0 0 auto; }

/* ---------- site footer ---------- */
.sitefoot {
  flex: none;
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 14px 18px;
}
.sitefoot__inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; gap: 16px 28px; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap;
}
.sitefoot__legal { margin: 0; font-size: 12px; color: var(--text-soft); }
.sitefoot__note { margin: 4px 0 0; font-size: 11.5px; color: var(--text-faint); max-width: 62ch; line-height: 1.5; }
.sitefoot__links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; }
.sitefoot__links a { color: var(--text-soft); text-decoration: none; }
.sitefoot__links a:hover { color: var(--accent); text-decoration: underline; }
.sitefoot__links a:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; border-radius: 4px; }
@media print { .sitefoot { display: none; } }

/* short viewports: keep the footer to one line */
@media (max-height: 760px) {
  .sitefoot { padding: 10px 18px; }
  .sitefoot__note { display: none; }
  .sitefoot__inner { align-items: center; }
}
@media (max-width: 640px) {
  .sitefoot { padding: 12px 14px; }
  .sitefoot__links { gap: 12px; }
}

/* short-form results: too few questions for a pass/fail verdict */
.card--result.is-short { border-color: var(--warn); }
.badge--short { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.score__num.is-short { color: var(--warn); }


/* ---------------- grading policies (admin console) ----------------
   A policy is a vendor standard, not a row in a log: grouped by vendor, one tile
   each, with the locked numbers shown as chips and only our own fields editable. */
.polgroup { margin-top: 16px; }
.polgroup__head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font: 600 12px/1 var(--mono); letter-spacing: .8px; text-transform: uppercase; color: var(--text-soft);
}
.polgroup__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--vaccent, var(--accent)); }
.polgroup__count { color: var(--text-soft); font-weight: 500; letter-spacing: 0; text-transform: none; }

/* ---------- grading policies: rail + inspector ---------- */

.polpanel__head { margin-bottom: 14px; flex-wrap: wrap; gap: 10px; align-items: flex-start; }

.polveil {
  display: grid; grid-template-columns: minmax(200px, 258px) minmax(0, 1fr);
  gap: 18px; align-items: start;
}

.polrail { display: flex; flex-direction: column; gap: 14px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.polrail__group { display: flex; flex-direction: column; gap: 3px; }
.polrail__vendor {
  font: 600 10px/1 var(--mono); letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-faint); margin: 0 0 5px 8px;
}
.polrail__item {
  /* fixed count column: an auto column widened for '11' and narrowed for '5', so the numbers
     never lined up down the rail */
  display: grid; grid-template-columns: 8px minmax(0, 1fr) 18px; gap: 10px; align-items: start;
  font: inherit; text-align: left; cursor: pointer; color: var(--text-soft);
  background: none; border: 1px solid transparent; border-radius: 9px; padding: 8px 10px;
}
.polrail__item:hover { background: var(--bg-raised); color: var(--text); }
.polrail__item.is-active {
  background: var(--bg-raised); border-color: var(--line-strong); color: var(--text);
  box-shadow: inset 2px 0 0 var(--vaccent, var(--accent));
}
.polrail__dot { width: 8px; height: 8px; border-radius: 3px; background: var(--vaccent, var(--accent)); }
.polrail__text { min-width: 0; }
.polrail__label { display: block; font-size: 12.5px; line-height: 1.3; padding-top: 1px; }
.polrail__meta { display: block; font: 500 10.5px/1.5 var(--mono); color: var(--text-faint); }
.polrail__item.is-active .polrail__meta { color: var(--text-soft); }
.polrail__count { font: 600 11px/1 var(--mono); color: var(--text-faint); padding-top: 3px; text-align: right; }

.polpane { min-width: 0; }
/* One border around the inspector; the vendor half is tinted so the read-only boundary is visible
   instead of something the reader has to infer from a padlock chip. */
.pane { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.pane__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.pane__head h3 { margin: 3px 0 0; font-size: 16px; letter-spacing: -.1px; }
.pane__split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pane__vendor {
  padding: 14px 16px; background: var(--bg-soft); border-right: 1px solid var(--line-strong);
}
.pane__ours { padding: 14px 16px; background: var(--bg); }
/* An accent square marks our half, mirroring the read-only pill on the vendor half: the boundary
   should be visible, not something the reader infers from a chip colour. */
.pane__ours .pane__kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); flex: 0 0 auto;
}
.pane__kicker {
  font: 600 10px/1 var(--mono); letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-faint); display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.lock {
  font: 500 10px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-soft);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 8px;
}
.facts { margin: 0; display: grid; gap: 9px; }
.facts > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.facts dt { font: 500 10px/1.5 var(--mono); letter-spacing: .6px; text-transform: uppercase; color: var(--text-faint); }
.facts dd { margin: 0; font-size: 13px; color: var(--text); }
.facts dd a { color: var(--accent); }
.savebar {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding-top: 12px; border-top: 1px dashed var(--line);
}
.savebar .btn:disabled {
  opacity: 1; background: var(--bg-raised); color: var(--text-faint);
  border-color: var(--line); font-weight: 500;
}
.pane__section { padding: 14px 16px; border-top: 1px solid var(--line); }
.pane__section h4 {
  margin: 0 0 10px; font: 600 10px/1 var(--mono); letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-faint);
  display: flex; align-items: center; gap: 8px;
}
.pane__count {
  font: 600 10px/1 var(--mono); letter-spacing: 0; text-transform: none;
  color: var(--text-soft); background: var(--bg-raised);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 7px;
}
.marktable th, .marktable td { font-size: 12.5px; padding: 8px 10px; }
.auditlist { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.auditlist li { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--text-soft); }

.mono { font-family: var(--mono); }
th.num { font-family: var(--mono); }

@media (max-width: 860px) {
  .polveil { grid-template-columns: minmax(0, 1fr); }
  .polrail { flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 4px; }
  .polrail__group { min-width: 200px; }
}
@media (max-width: 640px) {
  .pane__split { grid-template-columns: minmax(0, 1fr); }
  .pane__vendor { border-right: 0; border-bottom: 1px solid var(--line); }
}


.btn.is-locked, button.is-locked { opacity: .5; cursor: not-allowed; }

/* ---------- subscription table: seven columns (status + access ends) ---------- */
/* The table is table-layout: fixed, so every column needs an explicit width or the last two fight for
   the remainder and the row ellipsises. Status and Access ends may wrap; both hold two short pieces. */
.subends__date { white-space: nowrap; }
.subexpired { display: block; margin-top: 4px; width: fit-content; }
.subends__note { display: block; margin-top: 2px; }

/* ---------- console tabs + RBAC access map ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 12px 0 16px; }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted, #9aa4b2);
  font: inherit; font-size: 13px; padding: 8px 12px; cursor: pointer; border-radius: 6px 6px 0 0;
}
.tab:hover { color: var(--text, #e8edf4); background: rgba(255, 255, 255, .04); }
.tab.is-on { color: var(--text, #e8edf4); border-bottom-color: var(--accent, #e8825a); font-weight: 600; }

/* Three roles, three columns: auto-fit left the Owner card orphaned on a second row, which reads as a
   missing fourth role. Below the breakpoint they stack. */
.rbac__roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 760px) { .rbac__roles { grid-template-columns: 1fr; } }
.rbac__role { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: rgba(255, 255, 255, .02); }
.rbac__countlabel { display: block; font-size: 10px; font-weight: 400; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-faint); text-align: right; margin-top: 2px; }
.rbac__rolehead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rbac__rolehead b { font-size: 14px; }
.rbac__count { font-size: 20px; font-weight: 700; line-height: 1; text-align: right; }
.rbac__meter { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); margin: 10px 0 8px; overflow: hidden; }
.rbac__meter span { display: block; height: 100%; background: var(--accent, #e8825a); }
.rbac__role p { margin: 0; }

.rbac__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rbac__table th, .rbac__table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
/* Sticky header: the map is 17 rows inside a long console page, and an unlabelled tick column is
   meaningless once the header scrolls away. */
.rbac__table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--bg-soft);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft);
  border-bottom: 1px solid var(--line-strong);
}
.rbac__table th.rbac__rolecol, .rbac__table td.rbac__cell {
  text-align: center; width: 92px; border-left: 1px solid var(--line);
}
.rbac__table th:last-child, .rbac__table td.rbac__cell:last-child { padding-right: 16px; }
.rbac__group td { background: rgba(255, 255, 255, .035); }
.rbac__group b { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.rbac__group span { display: block; margin-top: 2px; }
/* The header only sticks inside its own scrollport: an ancestor with overflow makes the nearest scroller
   the wrapper, so the matrix scrolls itself and the header travels with it. */
.rbac__wrap { max-height: min(70vh, 640px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.rbac__key { display: block; font-size: 11px; color: var(--muted, #9aa4b2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.rbac__tick { color: #7fd1a3; font-weight: 700; }
.rbac__dash { color: rgba(255, 255, 255, .18); }
.rbac__exclusive { display: inline-block; margin-left: 8px; font-size: 10px; letter-spacing: .05em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 999px; border: 1px solid rgba(232, 130, 90, .5); color: #f0a683; }

/* The role cards are buttons: clicking one filters the account list to that role. They have to lose
   their button chrome to keep the card look, but keep an unmistakable hover/focus state. */
button.rbac__role { display: block; width: 100%; text-align: left; font: inherit; color: inherit;
  cursor: pointer; transition: border-color .12s, background .12s; }
button.rbac__role:hover { border-color: var(--accent-line); background: var(--accent-soft); }
button.rbac__role:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rbac__action { display: block; margin-top: 8px; font-size: 10px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent);
  text-decoration: underline; cursor: pointer; }

/* ---- signup and study profile -------------------------------------------------
   Two-up field rows keep the signup short, and the exam checklist is a grid of vendor groups so
   picking three exams never means scrolling a 50-row select. */
.fieldrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) { .fieldrow { grid-template-columns: 1fr; } }

.fieldnote {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 11px;
  color: var(--text-soft);
}

.namehint { min-height: 16px; margin-top: 4px; }
.namehint.ok { color: var(--ok-text); }
.namehint.bad { color: var(--danger); }

.examgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.examgroup {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px 10px;
  margin: 0;
  min-width: 0;
}
.examgroup legend {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 0 6px;
}
.examgroup__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
  margin: 0;
}
.examgroup__row input { margin-top: 2px; flex: none; }
.examgroup__name { display: block; color: var(--text-soft); font-size: 12px; line-height: 1.35; }

/* ---- study summary ----------------------------------------------------------
   The saved answers read as a short list; the 46-exam checklist is only built when someone
   chooses Edit, so the page does not open as a wall of checkboxes. */
.summary { margin: 10px 0 0; display: grid; gap: 10px; }
.summary__row { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; margin: 0; }
.summary__row dt {
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.summary__row dd { margin: 0; font-size: 13.5px; }
.muted { color: var(--text-soft); }
.chipset { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.btn--sm { padding: 6px 12px; font-size: 12px; }
@media (max-width: 560px) {
  .summary__row { grid-template-columns: 1fr; gap: 2px; }
}

/* Per-exam headline figures: one block per exam, mocks only. Practice sets score on a different
   scale, so they are reported apart rather than folded into a "best score". */
.dashstats--per { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stat--exam { gap: 8px; }
.stat__exam {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--accent);
  text-transform: uppercase;
}
.stat__figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat__figures > span { display: flex; flex-direction: column; gap: 1px; }
.stat__figures .stat__num { font-size: 19px; }

/* ---- target exams on Home ---------------------------------------------------
   Numbers get their own columns so a member with three targets reads a small table, not three run-on
   sentences. The head row is the legend; it disappears before the columns would have to wrap. */
/* The card is a flex row for the details line; the tabs and their panel take a line of their own so the
   table spans the card instead of shrinking to its widest cell. */
.dashpanel { width: 100%; flex-basis: 100%; }
.profilecard__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.targets { display: grid; grid-template-columns: minmax(0, 1fr); }
.target {
  display: grid;
  grid-template-columns: minmax(210px, 2.4fr) 68px 68px 68px minmax(150px, 1.3fr) 108px;
  gap: 22px;
  align-items: center;
  padding: 14px 8px;
  border-top: 1px solid var(--line);
}
.target--head {
  border-top: 0;
  padding: 0 8px 8px;
  font-size: 10.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.target--head span { font-weight: 600; }
.target__col { font-size: 15px; font-variant-numeric: tabular-nums; }
/* Numbers align on their last digit, so a column of 1 / 690 / 700 scans without reading. */
.target__col:nth-child(2),
.target__col:nth-child(3),
.target__col:nth-child(4),
.target--head span:nth-child(2),
.target--head span:nth-child(3),
.target--head span:nth-child(4) { text-align: right; }
.target__col--mark { font-size: 12.5px; color: var(--text-soft); }
.target__col--mark b { font-weight: 600; }
.target .btn--sm { width: 100%; justify-content: center; padding: 6px 10px; font-size: 12px; }
.targets__empty { padding: 6px 2px 2px; }
@media (max-width: 760px) {
  /* The legend is off, so each cell carries its own label instead of relying on a column position. */
  .target--head { display: none; }
  .target {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 14px;
    padding: 14px 2px;
  }
  .target__id { grid-column: 1 / -1; }
  .target__col { text-align: left !important; font-size: 14px; }
  .target__col::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 2px;
  }
  .target__col--mark { grid-column: 1 / -1; }
  .target__col--mark::before { margin-bottom: 3px; }
  .target .btn--sm { grid-column: 1 / -1; width: auto; justify-self: start; }
}


/* ---- one exam's results ------------------------------------------------------
   The score line answers "am I improving", the domain bars answer "where do I study next". Both read
   from the same sitting history, but only the line is mock-only — a practice % cannot share a scaled axis. */
.results__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin: 6px 0 16px;
}
.results__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.results__verdict {
  display: flex; gap: 28px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.results__verdict > div { display: flex; flex-direction: column; gap: 2px; }
.results__verdict b { font-size: 14px; }

.is-clickable { cursor: pointer; }
.is-clickable:hover { border-color: var(--accent); }
.is-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.chart { width: 100%; height: auto; display: block; margin-top: 4px; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__ylab, .chart__xsub { fill: var(--muted, #8b93a7); font-size: 10.5px; }
.chart__xlab { fill: var(--text-soft); font-size: 11px; }
.chart__line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__dot { stroke: var(--bg); stroke-width: 2; }
.chart__dot.is-pass { fill: var(--ok, #46c07a); }
.chart__dot.is-fail { fill: var(--bad, #e0574a); }
.chart__pass { stroke: var(--text-soft); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .75; }
.chart__passlab { fill: var(--text-soft); font-size: 11px; letter-spacing: .04em; }
.chart__axistitle { fill: var(--text-soft); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }

.dom {
  display: grid;
  grid-template-columns: minmax(200px, 1.5fr) minmax(120px, 2fr) 56px minmax(150px, 1fr);
  gap: 16px; align-items: center;
  padding: 11px 2px; border-top: 1px solid var(--line);
}
.dom:first-of-type { border-top: 0; }
.dom__name { display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.dom__bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dom__fill { display: block; height: 100%; border-radius: 999px; background: var(--text-soft); }
.dom__fill--weak { background: var(--bad, #e0574a); }
.dom__fill--steady { background: var(--accent); }
.dom__fill--strong { background: var(--ok, #46c07a); }
.dom__pct { font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.dom__band { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.dom__pill--weak { border-color: var(--bad, #e0574a); color: var(--bad, #e0574a); }
.dom__pill--steady { border-color: var(--accent); color: var(--accent); }
.dom__pill--strong { border-color: var(--ok, #46c07a); color: var(--ok, #46c07a); }
.dom--untouched { grid-template-columns: 1fr; }

@media (max-width: 760px) {
  .dom { grid-template-columns: 1fr auto; row-gap: 6px; }
  .dom__bar { grid-column: 1 / -1; }
  .dom__band { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---- recent attempts on one exam --------------------------------------------
   A log, not a scoreboard: both modes appear, labelled, because "92" from a practice set and "742" from a
   mock are different units sitting in the same column. */
.attlist { display: grid; grid-template-columns: minmax(0, 1fr); }
.att {
  display: grid;
  grid-template-columns: minmax(150px, 1.5fr) 84px 70px 70px 78px 86px 92px;
  gap: 18px;
  align-items: center;
  padding: 10px 6px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.att--head {
  border-top: 0;
  padding: 0 6px 8px;
  font-size: 10.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.att__score { font-variant-numeric: tabular-nums; }
/* which domains a sitting touched — a practice set is chosen by domain, so the log has to say which */
.att__domains {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-soft);
  padding-top: 2px;
}
.att__mode { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.att__mode--mock { color: var(--accent); }
.att__mode--practice { color: var(--text-soft); }
.att__flag { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; }
.att__flag.is-pass { color: var(--ok, #46c07a); }
.att__flag.is-fail { color: var(--bad, #e0574a); }

@media (max-width: 760px) {
  .att--head { display: none; }
  .att { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
  .att > span:first-child { grid-column: 1 / -1; }
}

/* The exam header is the card: code, name, actions, and this member's sittings on this exam at its foot. */
.results__card { margin-bottom: 14px; }
.results__attempts { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.results__attempts h3 { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-soft); }

/* ---- badges with dates, on History ------------------------------------------- */
.badgelist { display: grid; }
.badgeline {
  display: grid;
  grid-template-columns: 14px minmax(150px, 1fr) minmax(0, 2fr) 104px;
  gap: 14px;
  align-items: center;
  padding: 9px 2px;
  border-top: 1px solid var(--line);
}
.badgeline:first-child { border-top: 0; }
.badgeline__dot { width: 8px; height: 8px; border-radius: 999px; background: var(--text-soft); }
.badgeline__dot--positive { background: var(--ok, #46c07a); }
.badgeline__dot--negative { background: var(--bad, #e0574a); }
.badgeline__dot--neutral { background: var(--accent); }
.badgeline__label { font-size: 13.5px; }
.badgeline__when { text-align: right; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.badgeline__clock { opacity: .75; }
@media (max-width: 700px) {
  .badgeline { grid-template-columns: 14px 1fr 90px; }
  .badgeline__detail { grid-column: 2 / -1; }
}

/* ---------- console: money, retention, adoption, audit ----------------------- */
.mgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.mstat { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.mstat__v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.2px; }
.mstat__l { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-top: 4px; }
.paytable, .adoptable { table-layout: fixed; width: 100%; }
.adoptable td, .adoptable th { padding: 9px 8px; white-space: normal; overflow-wrap: anywhere; }
.adoptable th:nth-child(1) { width: 27%; }
.adoptable th:nth-child(2) { width: 13%; }
.adoptable th:nth-child(3), .adoptable th:nth-child(4) { width: 9%; }
.adoptable th:nth-child(5) { width: 10%; }
.adoptable th:nth-child(6) { width: 20%; }
.adoptable th:nth-child(7) { width: 12%; }
.adoptable tr.is-silent { background: var(--accent-soft); }

.explist { display: grid; }
.exprow {
  display: grid;
  grid-template-columns: 58px minmax(150px, 1.6fr) minmax(90px, 1fr) 74px;
  gap: 12px; align-items: center;
  padding: 8px 2px; border-top: 1px solid var(--line);
}
.exprow:first-child { border-top: 0; }
.exprow__days { font-size: 11.5px; font-variant-numeric: tabular-nums; text-align: center; padding: 2px 6px; border-radius: 999px; border: 1px solid var(--line-strong); }
.exprow__days--soon { color: var(--accent); border-color: var(--accent-line); }
.exprow__days--lapsed { color: var(--bad-text); border-color: var(--bad-line); }
.exprow__who { display: flex; flex-direction: column; min-width: 0; }
.exprow__when { text-align: right; font-variant-numeric: tabular-nums; }

.auditlist { display: grid; }
.auditrow {
  display: grid;
  grid-template-columns: 120px minmax(140px, 1fr) minmax(120px, 1fr) minmax(100px, 1.2fr);
  gap: 12px; align-items: baseline;
  padding: 7px 2px; border-top: 1px solid var(--line);
}
.auditrow:first-child { border-top: 0; }
.auditrow__at { font-variant-numeric: tabular-nums; }
.auditrow__who { font-size: 12.5px; overflow-wrap: anywhere; }
.auditrow__what { font-size: 12.5px; color: var(--text-soft); }
.auditrow__target { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .exprow { grid-template-columns: 52px 1fr 74px; }
  .exprow__kind { display: none; }
  .auditrow { grid-template-columns: 100px 1fr; }
  .auditrow__what, .auditrow__target { grid-column: 2; }
}

/* ---------- console: automations -------------------------------------------- */
.autolist { display: grid; }
.autorow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px; align-items: center;
  padding: 11px 2px;
  border-top: 1px solid var(--line);
}
.autorow:first-child { border-top: 0; }
.autorow__main { min-width: 0; }
.autorow__actions { display: flex; gap: 8px; }
.autoruns { display: grid; }
.autorun {
  display: grid;
  /* The status column is sized by its longest word ('nothing to send'), not by a guess: a fixed 80px let the
     text run over the card's margin. */
  grid-template-columns: 118px minmax(0, 1.2fr) minmax(0, 1fr) minmax(96px, auto);
  gap: 12px; align-items: baseline;
  padding: 7px 2px; border-top: 1px solid var(--line);
}
.autorun .pill { white-space: nowrap; justify-self: start; }
.autorun__who, .autorun__what { min-width: 0; overflow-wrap: anywhere; }
.autorun:first-child { border-top: 0; }
.autorun__at { font-variant-numeric: tabular-nums; }
.autorun__who { font-size: 12.5px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .autorow { grid-template-columns: 1fr; }
  .autorun { grid-template-columns: 100px minmax(0, 1fr) 80px; }
  .autorun__what { display: none; }
}

/* ---------- console: automation email editor -------------------------------- */
.autoedit {
  margin: 4px 0 10px;
  padding: 12px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.autoedit .subfield { min-width: 0; }
.autoedit input, .autoedit textarea {
  font: inherit; padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%;
  box-sizing: border-box;
}
.tplvar {
  font-family: var(--mono); font-size: 11.5px; padding: 1px 5px; border-radius: 4px;
  background: var(--bg); border: 1px solid var(--line-strong); color: var(--text-soft);
}
@media (max-width: 760px) {
  .autorun { grid-template-columns: 100px minmax(0, 1fr) auto; }
  .autorun__what { display: none; }
}
