/* ===== Twara design tokens (carried over from the Itoze design) ===== */
:root {
  /* Rwandan flag-inspired */
  --rw-blue:    #1E88C7;
  --rw-blue-2:  #0E5F94;
  --rw-blue-3:  #E8F4FB;
  --rw-green:   #1A8A4E;
  --rw-green-2: #0F6B3A;
  --rw-green-3: #E7F4ED;
  --rw-gold:    #E8B411;
  --rw-gold-2:  #B68500;
  --rw-gold-3:  #FBF4DA;

  /* Neutrals */
  --ink:       #0E1518;
  --ink-2:     #1F2A2E;
  --muted:     #5F6B70;
  --muted-2:   #8A9499;
  --line:      #E7E7E2;
  --line-2:    #F0F0EB;
  --surface:   #FFFFFF;
  --on-ink:    #FFFFFF;   /* text on an ink-coloured block */
  --surface-2: #FBFAF7;
  --surface-3: #F4F3EE;

  /* Semantic */
  --danger:    #C13B2E;
  --danger-bg: #FDECEA;
  --warn:      #B68500;
  --ok:        var(--rw-green);

  /* Type */
  --f-sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Radii / shadow */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --sh-1: 0 1px 2px rgba(14,21,24,.04), 0 0 0 1px rgba(14,21,24,.04);
  --sh-2: 0 4px 14px rgba(14,21,24,.06), 0 0 0 1px rgba(14,21,24,.05);
}

/* ===== Baseline ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.tw-screen {
  margin: 0;
  font-family: var(--f-sans);
  color: var(--ink);
  background: var(--surface-2);
  letter-spacing: -0.005em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

.tw-num   { font-family: var(--f-mono); font-feature-settings: 'tnum','zero'; letter-spacing: -.02em; }
.tw-muted { color: var(--muted); }

/* ===== Type ===== */
.tw-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; font-family: var(--f-mono); }
.tw-h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin: 10px 0 0; text-wrap: balance; }
.tw-h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.tw-p  { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 8px 0 0; }

/* Lane stripe — the road motif */
.tw-lane {
  height: 2px; border-radius: 2px; margin-top: 22px; max-width: 320px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 12px, transparent 12px 22px);
  opacity: .15;
}

/* ===== Top bar ===== */
.tw-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tw-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.tw-brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  background: var(--ink); color: var(--on-ink);
  display: grid; place-items: center; font-weight: 700; letter-spacing: -.02em;
  position: relative; overflow: hidden;
}
.tw-brand-mark::after {
  content: ''; position: absolute; left: 4px; right: 4px; bottom: 6px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--rw-gold) 0 4px, transparent 4px 8px);
  border-radius: 2px;
}
.tw-brand-name { display: block; font-weight: 700; font-size: 17px; letter-spacing: -.02em; line-height: 1.2; }
.tw-brand-tag  { display: block; font-size: 11px; color: var(--muted-2); font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .06em; }

/* Language switcher */
.tw-lang { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin: 0; }
.tw-lang button { background: transparent; border: 0; padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--muted); border-radius: 7px; font-family: var(--f-mono); letter-spacing: .04em; }
.tw-lang button.is-on { background: var(--ink); color: var(--on-ink); }
.tw-lang button:focus-visible, .tw-btn:focus-visible, .tw-endpoint:focus-visible { outline: 2px solid var(--rw-blue); outline-offset: 2px; }

/* ===== Layout ===== */
.tw-wrap { max-width: 1080px; margin: 0 auto; padding: 44px 28px 72px; display: flex; flex-direction: column; gap: 40px; }
.tw-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }

/* ===== Primitives ===== */
.tw-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }

.tw-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 11px; font-size: 14px; font-weight: 600; border: 1px solid transparent; line-height: 1; text-decoration: none; }
.tw-btn-primary { background: var(--ink); color: var(--on-ink); }
.tw-btn-primary:hover { background: #000; }

.tw-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.tw-tag-green { background: var(--rw-green-3); color: var(--rw-green-2); }
.tw-tag-blue  { background: var(--rw-blue-3);  color: var(--rw-blue-2); }
.tw-tag-gold  { background: var(--rw-gold-3);  color: var(--rw-gold-2); }

.tw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tw-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.tw-chip .tw-num { font-size: 11px; color: var(--muted-2); }

/* ===== Home ===== */
.tw-tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.tw-track { padding: 22px; }
.tw-track.is-off { background: var(--surface-2); }
.tw-track-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tw-track-meta { display: flex; gap: 16px; margin-top: 16px; font-size: 12px; color: var(--muted); }

.tw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tw-stat { padding: 18px 20px; }
.tw-stat-n { font-size: 30px; font-weight: 700; line-height: 1.1; }
.tw-stat-l { font-size: 13px; color: var(--muted); margin-top: 4px; }

.tw-signs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tw-sign { margin: 0; padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.tw-sign img { width: 96px; height: 96px; object-fit: contain; }
.tw-sign figcaption { font-size: 12.5px; font-weight: 600; line-height: 1.3; }

.tw-endpoints { padding: 6px; }
.tw-endpoint { display: grid; grid-template-columns: auto minmax(150px, 220px) 1fr; align-items: center; gap: 14px; padding: 11px 12px; border-radius: var(--r-md); text-decoration: none; font-size: 13.5px; }
.tw-endpoint:hover { background: var(--surface-3); }
.tw-endpoint + .tw-endpoint { border-top: 1px solid var(--line-2); }

.tw-error { min-height: 70vh; justify-content: center; }

@media (max-width: 640px) {
  .tw-top  { padding: 12px 16px; }
  .tw-wrap { padding: 28px 16px 56px; gap: 32px; }
  .tw-endpoint { grid-template-columns: auto 1fr; }
  .tw-endpoint .tw-muted { grid-column: 1 / -1; }
}

/* ============================================================
   Phase 1 — splash, sign-in, onboarding, app shell, forms
   ============================================================ */

.tw-ink { color: var(--ink); }
.tw-icon { flex: 0 0 auto; }
.tw-spacer { flex: 1; }
.tw-h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.tw-h2-lg { font-size: 26px; margin-top: 8px; }
.tw-h2-xl { font-size: clamp(24px, 3.2vw, 30px); margin-top: 8px; line-height: 1.15; text-wrap: balance; }
.tw-stack { display: flex; flex-direction: column; gap: 16px; }
.tw-card-pad { padding: 22px; }
.tw-grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }

/* ---- Buttons (additions) ---- */
.tw-btn { justify-content: center; cursor: pointer; }
.tw-btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.tw-btn-ghost:hover { background: var(--surface-3); }
.tw-btn-soft { background: var(--surface-3); color: var(--ink); }
.tw-btn-soft:hover { background: var(--line); }
.tw-btn-block { width: 100%; padding: 14px 18px; font-size: 15px; }
.tw-btn-sm { padding: 8px 12px; font-size: 13px; }
.tw-linkbtn { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tw-linkbtn:focus-visible, .tw-input:focus-visible, .tw-langcard:focus-visible, .tw-nav a:focus-visible, .tw-tab:focus-visible { outline: 2px solid var(--rw-blue); outline-offset: 2px; }

/* ---- Forms ---- */
.tw-field { display: flex; flex-direction: column; gap: 6px; }
.tw-field label { font-size: 13px; font-weight: 600; }
.tw-field-narrow { max-width: 320px; }
.tw-input {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; width: 100%;
}
.tw-input:hover { border-color: var(--muted-2); }
.tw-input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(14,21,24,.08); }
.tw-input-code { font-size: 24px; letter-spacing: .4em; text-align: center; font-weight: 700; }
.tw-field.has-error .tw-input { border-color: var(--danger); }
.tw-field-error { font-size: 13px; color: var(--danger); font-weight: 500; margin-top: 6px; }
.tw-field .tw-field-error { margin-top: 0; }
.tw-field-hint { font-size: 12.5px; color: var(--muted); }

.tw-alert { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; border: 1px solid transparent; }
.tw-alert-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(193,59,46,.18); }
.tw-alert-ok     { background: var(--rw-green-3); color: var(--rw-green-2); border-color: rgba(26,138,78,.18); }
.tw-alert-info   { background: var(--rw-gold-3); color: #6B4E00; border-color: rgba(182,133,0,.22); }
.tw-alert .tw-num { font-size: 16px; letter-spacing: .12em; }

/* ---- Split pages: brand panel + form (splash, sign in, sign up, verify) ---- */
.tw-split { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; background: var(--surface); }
.tw-brandpanel {
  padding: 56px 56px 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  background: var(--surface-2); border-right: 1px solid var(--line);
}
.tw-brand-mark-lg { width: 38px; height: 38px; border-radius: 11px; font-size: 17px; flex-basis: 38px; }
.tw-brandpanel .tw-brand-name { font-size: 19px; }
.tw-brandpanel-copy { max-width: 460px; }
.tw-display { font-size: clamp(34px, 4.4vw, 48px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 14px 0 0; }
.tw-display span { color: var(--rw-green); }
.tw-brandpanel-intro { font-size: 15.5px; margin-top: 18px; max-width: 400px; }
.tw-tricolor { display: flex; gap: 6px; margin-bottom: 14px; }
.tw-tricolor i { flex: 1; height: 4px; border-radius: 2px; background: var(--rw-blue); }
.tw-tricolor i:nth-child(2) { background: var(--rw-gold); }
.tw-tricolor i:nth-child(3) { background: var(--rw-green); }
.tw-brandpanel-foot { color: var(--muted); font-size: 12px; }

.tw-split-main { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 72px 64px; }
.tw-split-top { position: absolute; top: 24px; right: 28px; }
.tw-form-col { width: 100%; max-width: 440px; }
.tw-form-foot { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); text-align: center; }
.tw-form-foot a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

.tw-langcard {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  font: inherit; color: inherit;
}
.tw-langcard:hover { border-color: var(--muted-2); }
.tw-langcard.is-on { border: 1.5px solid var(--ink); background: var(--surface-2); box-shadow: var(--sh-2); padding: 15.5px 17.5px; }
.tw-langcard-code { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; font-family: var(--f-mono); font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.tw-langcard-text { flex: 1; min-width: 0; }
.tw-langcard-name { display: block; font-weight: 700; font-size: 16px; }
.tw-langcard-sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.tw-radio { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 1.5px solid var(--line); }
.tw-langcard.is-on .tw-radio { border: 6px solid var(--ink); background: var(--surface); }

/* ---- Choice cards and chips (radio inputs underneath) ---- */
.tw-choices { display: grid; gap: 12px; }
.tw-choices-2 { grid-template-columns: repeat(2, 1fr); }
.tw-choices-3 { grid-template-columns: repeat(3, 1fr); }
.tw-choice { display: block; position: relative; cursor: pointer; }
.tw-choice input, .tw-chipradio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tw-choice-body {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; height: 100%;
  padding: 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.tw-choice:hover .tw-choice-body { border-color: var(--muted-2); }
.tw-choice-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; }
.tw-choice-title { font-weight: 700; font-size: 15px; }
.tw-choice-sub { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.tw-choice input:checked + .tw-choice-body { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); background: var(--surface-2); }
.tw-choice input:checked + .tw-choice-body .tw-choice-icon { background: var(--ink); color: var(--on-ink); }
.tw-choice input:focus-visible + .tw-choice-body, .tw-chipradio input:focus-visible + span { outline: 2px solid var(--rw-blue); outline-offset: 2px; }
.tw-choice.is-off { cursor: not-allowed; }
.tw-choice.is-off .tw-choice-body { background: var(--surface-2); }
.tw-choice.is-off .tw-choice-title, .tw-choice.is-off .tw-choice-icon { color: var(--muted); }

.tw-chipradio { position: relative; cursor: pointer; }
.tw-chipradio span { display: inline-flex; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.tw-chipradio:hover span { border-color: var(--muted-2); }
.tw-chipradio input:checked + span { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

.tw-goal { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tw-goal-n { font-size: 42px; font-weight: 700; letter-spacing: -.03em; line-height: 1; min-width: 150px; white-space: nowrap; }
.tw-goal-n span { margin-left: 6px; font-size: 14px; color: var(--muted); font-family: var(--f-sans); font-weight: 500; letter-spacing: 0; }
.tw-range { flex: 1; min-width: 180px; accent-color: var(--ink); height: 28px; }
.tw-goal-scale { font-size: 11px; color: var(--muted); }

/* ---- Onboarding ---- */
.tw-onb { display: grid; grid-template-columns: 320px 1fr; min-height: 100vh; background: var(--surface); }
.tw-onb-rail { padding: 48px 36px; background: var(--surface-2); border-right: 1px solid var(--line); }
.tw-onb-brand { margin-bottom: 42px; }
.tw-steps { list-style: none; margin: 24px 0 0; padding: 0; }
.tw-step { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; }
.tw-step + .tw-step { border-top: 1px solid var(--line-2); }
.tw-step-dot { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; border: 1.5px dashed var(--line); }
.tw-step.is-done .tw-step-dot { background: var(--rw-green); border: 0; }
.tw-step.is-now .tw-step-dot { background: var(--ink); border: 0; }
.tw-step-label { display: block; font-size: 13px; font-weight: 600; }
.tw-step-value { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.tw-tip { margin-top: 32px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.tw-tip p { font-size: 13px; margin: 6px 0 0; line-height: 1.5; }
.tw-onb-main { display: flex; flex-direction: column; justify-content: center; padding: 64px 80px; }
.tw-onb-form { width: 100%; max-width: 680px; }
.tw-onb-actions { display: flex; gap: 12px; margin-top: 42px; align-items: center; flex-wrap: wrap; }

/* ---- App shell ---- */
.tw-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: var(--surface-2); }
.tw-side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 14px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.tw-side-brand { padding: 4px 10px 22px; }
.tw-navgrp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); padding: 18px 12px 8px; font-weight: 600; }
.tw-navgrp:first-of-type { padding-top: 0; }
.tw-nav { display: flex; flex-direction: column; gap: 2px; }
.tw-nav a, .tw-nav .is-soon { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.tw-nav .tw-icon { color: var(--muted); }
.tw-nav a:hover { background: var(--surface-3); }
.tw-nav a.is-active { background: var(--ink); color: var(--on-ink); }
.tw-nav a.is-active .tw-icon { color: var(--on-ink); }
.tw-nav .is-soon { color: var(--muted-2); cursor: default; }
.tw-nav .is-soon .tw-icon { color: var(--line); }
.tw-side-foot { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.tw-avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: linear-gradient(135deg, var(--rw-blue), var(--rw-green)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.tw-side-foot-text { min-width: 0; }
.tw-side-foot-name { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-side-foot-sub { display: block; font-size: 11px; color: var(--muted); }

.tw-main { display: flex; flex-direction: column; min-width: 0; }
.tw-topbar { display: flex; align-items: center; gap: 14px; padding: 18px 28px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tw-topbar-title { flex: 1; min-width: 0; }
.tw-topbar h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.tw-topbar-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-topbar form { margin: 0; }
.tw-content { padding: 28px; }

.tw-tabs { display: none; }

/* ---- Home and profile ---- */
.tw-hero-card { position: relative; overflow: hidden; }
.tw-hero-card .tw-lane { position: absolute; left: 0; right: 0; bottom: 0; max-width: none; height: 3px; margin: 0; }
.tw-bignum { font-size: 44px; font-weight: 700; line-height: 1.1; margin-top: 4px; }
.tw-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 0; }
.tw-facts dt { font-size: 12px; color: var(--muted); }
.tw-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.tw-settings { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .tw-split { grid-template-columns: 1fr; }
  .tw-brandpanel { padding: 28px 24px; gap: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tw-brandpanel-intro { display: none; }
  .tw-split-main { padding: 40px 24px 56px; justify-content: flex-start; }
  .tw-split-top { position: static; align-self: flex-end; margin-bottom: 20px; }
  .tw-form-col { margin: 0 auto; }

  .tw-onb { grid-template-columns: 1fr; }
  .tw-onb-rail { padding: 20px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tw-onb-brand { margin-bottom: 16px; }
  .tw-steps { display: flex; gap: 8px; margin-top: 12px; }
  .tw-step { padding: 0; }
  .tw-step + .tw-step { border-top: 0; }
  .tw-step > span:last-child, .tw-tip { display: none; }
  .tw-onb-main { padding: 32px 24px 56px; justify-content: flex-start; }

  .tw-shell { grid-template-columns: 1fr; padding-bottom: 68px; }
  .tw-side { display: none; }
  .tw-topbar { padding: 12px 16px; flex-wrap: wrap; }
  .tw-topbar h1 { font-size: 19px; }
  .tw-content { padding: 16px; }
  .tw-grid-2 { grid-template-columns: 1fr; }
  .tw-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 8px 6px; background: var(--surface); border-top: 1px solid var(--line); }
  .tw-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px 4px; color: var(--muted); font-size: 11px; font-weight: 500; text-decoration: none; text-align: center; border-radius: 10px; }
  .tw-tab-pill { width: 36px; height: 22px; border-radius: 999px; display: grid; place-items: center; }
  .tw-tab.is-on { color: var(--ink); font-weight: 700; }
  .tw-tab.is-on .tw-tab-pill { background: color-mix(in oklch, var(--rw-green) 25%, white); color: var(--rw-green-2); }
  .tw-tab.is-soon { color: var(--muted-2); opacity: .55; }
}
@media (max-width: 560px) {
  .tw-choices-2, .tw-choices-3 { grid-template-columns: 1fr; }
  .tw-choice-body { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .tw-choice-sub { flex-basis: 100%; }
  .tw-onb-actions { margin-top: 28px; }
  .tw-onb-actions .tw-btn-primary { flex: 1; }
}

/* ============================================================
   Phase 2 — dashboard, paths, practice, library, mistakes, saved
   ============================================================ */

.tw-small  { font-size: 12.5px; color: var(--muted); }
.tw-body   { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 6px 0 0; }
.tw-green  { color: var(--rw-green-2); }
.tw-danger { color: var(--danger); }
.tw-row     { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tw-between { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tw-between-top { align-items: flex-start; flex-wrap: wrap; }
.tw-stack-lg { gap: 18px; }
.tw-stack-sm { gap: 10px; }
.tw-h2-md { font-size: 24px; margin-top: 4px; }
.tw-divider { height: 1px; background: var(--line); margin: 18px 0; }
.tw-card-soft { background: var(--surface-2); }
.tw-empty { text-align: center; color: var(--muted); padding: 40px 22px; }
.tw-empty .tw-row { justify-content: center; }
.tw-more { font-size: 13px; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tw-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.tw-count { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 6px; }
.tw-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tw-tag-ink    { background: var(--surface-3); color: var(--ink-2); }
.tw-tag-danger { background: var(--danger-bg); color: var(--danger); }
.tw-btn-green { background: var(--rw-green); color: #fff; }
.tw-btn-green:hover { background: var(--rw-green-2); }
.tw-btn.is-on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
a.tw-chip { text-decoration: none; }
a.tw-chip:hover { border-color: var(--muted-2); }
.tw-chip.is-on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tw-nav-count { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.tw-nav a.is-active .tw-nav-count { color: rgba(255,255,255,.65); }

.tw-progress { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.tw-progress > span { display: block; height: 100%; background: var(--rw-green); border-radius: 999px; }
.tw-progress-lg { height: 8px; }

.tw-iconbox { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); }
.tw-iconbox-lg { width: 56px; height: 56px; flex-basis: 56px; border-radius: 14px; }
.tw-iconbox-green { background: var(--rw-green-3); color: var(--rw-green-2); }
.tw-iconbox-blue  { background: var(--rw-blue-3);  color: var(--rw-blue-2); }
.tw-iconbox-gold  { background: var(--rw-gold-3);  color: var(--rw-gold-2); }

/* ---- Dashboard ---- */
.tw-readiness { padding: 24px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.tw-ring { flex: 0 0 auto; }
.tw-ring-n { font-family: var(--f-mono); font-weight: 700; font-size: 42px; fill: var(--ink); letter-spacing: -1.5px; }
.tw-ring-l { font-family: var(--f-sans); font-size: 10px; letter-spacing: 1.6px; fill: var(--muted); font-weight: 600; }
.tw-streak { display: flex; align-items: center; gap: 16px; }
.tw-streak .tw-iconbox { width: 46px; height: 46px; flex-basis: 46px; border-radius: 13px; }
.tw-streak-n { font-size: 26px; font-weight: 700; line-height: 1.15; }
.tw-streak-n span { font-size: 14px; color: var(--muted); font-family: var(--f-sans); font-weight: 500; margin-left: 6px; letter-spacing: 0; }
.tw-week { margin-left: auto; display: flex; gap: 3px; }
.tw-week i { width: 6px; height: 18px; border-radius: 2px; background: var(--line); }
.tw-week i.is-on { background: var(--rw-gold); }

.tw-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tw-action { padding: 18px; display: flex; flex-direction: column; gap: 14px; text-decoration: none; }
a.tw-action:hover { border-color: var(--muted-2); }
.tw-action.is-off { background: var(--surface-2); color: var(--muted); }
.tw-action-title { display: block; font-weight: 700; font-size: 15px; }
.tw-action-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.tw-topics { margin-top: 14px; }
.tw-topic { display: grid; grid-template-columns: minmax(110px, 150px) 1fr 44px auto; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.tw-topic .tw-progress { margin-top: 0; }
.tw-topic-name { font-size: 13px; font-weight: 600; }
.tw-topic-pct { font-size: 13px; text-align: right; color: var(--ink-2); }
.tw-topic-tag { min-width: 96px; text-align: right; }

.tw-plan { margin-top: 12px; }
.tw-plan-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; }
.tw-plan-row + .tw-plan-row { border-top: 1px solid var(--line-2); }
.tw-plan-row:hover .tw-plan-title { text-decoration: underline; text-underline-offset: 3px; }
.tw-plan-n { font-size: 11px; color: var(--muted-2); width: 22px; }
.tw-plan-text { flex: 1; min-width: 0; }
.tw-plan-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }

/* ---- Learning paths ---- */
.tw-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.tw-module { overflow: hidden; display: flex; flex-direction: column; }
.tw-module-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 18px 10px; flex: 1; }
.tw-module-n { font-size: 11px; color: var(--muted-2); margin-top: 4px; }
.tw-module-text { flex: 1; min-width: 0; }
.tw-module-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tw-module-title h2 { margin: 0; font-size: 16px; font-weight: 700; }
.tw-module-meta { padding: 0 18px 14px; }
.tw-module-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface-2); }

/* ---- Practice ---- */
.tw-setbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.tw-setbar-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tw-setbar-track { flex: 1; display: flex; gap: 4px; min-width: 60px; }
.tw-setbar-track i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.tw-setbar-track i.is-ok  { background: var(--rw-green); }
.tw-setbar-track i.is-bad { background: var(--danger); }
.tw-setbar-track i.is-now { background: var(--ink); }

.tw-practice { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.tw-question { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; margin: 14px 0 0; text-wrap: pretty; }
.tw-figure { margin-top: 18px; padding: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.tw-figure-sign { width: 88px; height: 88px; object-fit: contain; }
.tw-figure-img { max-height: 280px; border-radius: var(--r-sm); object-fit: contain; }

.tw-options { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.tw-option { position: relative; display: block; cursor: pointer; }
.tw-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tw-option-body { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.tw-option:hover .tw-option-body { border-color: var(--muted-2); }
.tw-option-key { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: var(--surface-3); color: var(--ink-2); display: grid; place-items: center; font-family: var(--f-mono); font-weight: 700; font-size: 13px; }
.tw-option-text { flex: 1; font-size: 14.5px; }
.tw-option input:checked + .tw-option-body { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); background: var(--surface-2); }
.tw-option input:checked + .tw-option-body .tw-option-key { background: var(--ink); color: var(--on-ink); }
.tw-option input:focus-visible + .tw-option-body { outline: 2px solid var(--rw-blue); outline-offset: 2px; }

.tw-practice-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.tw-practice-actions-bare { margin-top: 0; padding-top: 0; border-top: 0; }
.tw-toggle span { display: inline-flex; align-items: center; gap: 6px; }
.tw-signlink { display: flex; align-items: center; gap: 12px; margin-top: 10px; text-decoration: none; font-weight: 600; font-size: 14px; }
.tw-signlink img { width: 48px; height: 48px; object-fit: contain; }
.tw-signlink:hover span { text-decoration: underline; text-underline-offset: 3px; }
.tw-langlist { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); }
.tw-langlist > div { display: flex; gap: 10px; }
.tw-langlist .tw-num { color: var(--muted-2); font-size: 11px; font-weight: 600; flex: 0 0 22px; padding-top: 2px; }
.tw-langlist-tight { margin-top: 6px; gap: 3px; font-size: 14px; color: var(--muted); }

/* ---- Explanation ---- */
.tw-verdict { padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.tw-verdict.is-ok  { background: #F3FAF5; border-color: #C7E8D2; }
.tw-verdict.is-bad { background: var(--danger-bg); border-color: #F3C9C4; }
.tw-verdict-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--rw-green); }
.tw-verdict.is-bad .tw-verdict-icon { background: var(--danger); }
.tw-verdict-text { flex: 1; min-width: 0; }
.tw-verdict-title { font-weight: 700; font-size: 17px; color: var(--rw-green-2); }
.tw-verdict.is-bad .tw-verdict-title { color: var(--danger); }
.tw-verdict-sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.tw-verdict-xp { font-weight: 700; font-size: 18px; }

.tw-answer { display: flex; gap: 12px; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--line-2); }
.tw-answer-key { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; display: grid; place-items: center; font-family: var(--f-mono); font-weight: 700; font-size: 12px; background: var(--danger-bg); color: var(--danger); }
.tw-answer.is-ok .tw-answer-key { background: var(--rw-green-3); color: var(--rw-green-2); }
.tw-answer-text { font-size: 13.5px; color: var(--ink-2); }
.tw-answer.is-ok .tw-answer-text { font-size: 15px; font-weight: 600; color: var(--ink); }
.tw-answer.is-mine .tw-answer-text { text-decoration: line-through; text-decoration-color: var(--danger); }
.tw-answer-why { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.tw-why { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.tw-why-text { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }

.tw-done { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.tw-done > div:first-child { min-width: 220px; flex: 1; max-width: 420px; }
.tw-list { overflow: hidden; }
.tw-list-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; font-size: 14px; }
.tw-list-row + .tw-list-row { border-top: 1px solid var(--line-2); }
.tw-list-main { flex: 1; min-width: 0; }
.tw-mark { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 1.5px dashed var(--line); }
.tw-mark.is-ok  { background: var(--rw-green); border: 0; }
.tw-mark.is-bad { background: var(--danger); border: 0; }

/* ---- Library: signs and glossary ---- */
.tw-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.tw-searchbox { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 11px; color: var(--muted); min-width: 240px; flex: 0 1 380px; }
.tw-searchbox:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14,21,24,.08); }
.tw-searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13.5px; color: var(--ink); padding: 9px 0; }
.tw-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.tw-check input { accent-color: var(--ink); width: 16px; height: 16px; }

.tw-library { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.tw-catnav { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.tw-catnav-head { padding: 8px 12px 6px; }
.tw-catnav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.tw-catnav a:hover { background: var(--surface-2); }
.tw-catnav a.is-on { background: var(--surface-3); font-weight: 700; }
.tw-catnav .tw-num { font-size: 11px; color: var(--muted-2); }

.tw-signgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tw-signcard { padding: 14px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.tw-signcard:hover { border-color: var(--muted-2); }
.tw-signcard-img { height: 108px; display: grid; place-items: center; background: var(--surface-2); border-radius: var(--r-md); border: 1px solid var(--line-2); }
.tw-signcard-img img { width: 76px; height: 76px; object-fit: contain; }
.tw-signcard-name { font-weight: 600; font-size: 13.5px; line-height: 1.25; text-wrap: pretty; }
.tw-signcard-cat { font-size: 11px; color: var(--muted); font-family: var(--f-mono); letter-spacing: .04em; text-transform: uppercase; margin-top: -6px; }
.tw-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; }

.tw-crumbs { margin-bottom: 14px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.tw-crumbs a { color: var(--muted); text-decoration: none; }
.tw-crumbs a:hover { color: var(--ink); }
.tw-crumbs [aria-current] { color: var(--ink); }
.tw-signdetail { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
.tw-signdetail-img { aspect-ratio: 1; background: var(--surface-2); border-radius: var(--r-md); border: 1px solid var(--line-2); display: grid; place-items: center; }
.tw-signdetail-img img { width: 62%; height: 62%; object-fit: contain; }
.tw-signdetail-name { font-size: 28px; margin-top: 6px; }
.tw-credit { font-size: 11.5px; color: var(--muted-2); margin: 12px 0 0; overflow-wrap: anywhere; }
.tw-credit a { color: var(--muted); }
.tw-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tw-arrowlist { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--ink-2); }
.tw-arrowlist li { display: flex; gap: 8px; }
.tw-arrowlist li::before { content: '→'; color: var(--rw-green); }
.tw-confused { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.tw-confused a { padding: 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-md); display: flex; gap: 12px; align-items: flex-start; text-decoration: none; }
.tw-confused a:hover { border-color: var(--muted-2); }
.tw-confused img { width: 48px; height: 48px; flex: 0 0 48px; object-fit: contain; }
.tw-confused-name { display: block; font-weight: 700; font-size: 13.5px; }
.tw-confused .tw-small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; line-height: 1.45; font-size: 12px; }

.tw-term { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px; align-items: start; }
.tw-term-name { margin: 6px 0 2px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.tw-term-lang { font-family: var(--f-mono); font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.tw-term-alt { font-size: 14px; margin-top: 6px; color: var(--ink-2); }

/* ---- Mistakes and saved ---- */
.tw-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tw-kpi { font-size: 28px; font-weight: 700; margin-top: 8px; letter-spacing: -.02em; line-height: 1.2; }
.tw-kpi.is-text { font-size: 18px; }
.tw-recommend { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tw-recommend-text { flex: 1; min-width: 200px; }
.tw-recommend-title { font-size: 15px; font-weight: 600; margin-top: 4px; }
.tw-table { overflow: hidden; }
.tw-table-head, .tw-table-row { display: grid; grid-template-columns: 150px 1fr 220px 70px 80px; gap: 16px; align-items: center; padding: 14px 22px; }
.tw-table-head { border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; font-family: var(--f-mono); }
.tw-table-row { text-decoration: none; font-size: 13.5px; }
.tw-table-row + .tw-table-row { border-top: 1px solid var(--line-2); }
.tw-table-row:hover { background: var(--surface-2); }
.tw-table-q { line-height: 1.4; color: var(--ink-2); text-wrap: pretty; }
.tw-table-a { font-size: 12px; line-height: 1.4; }
.tw-struck { color: var(--danger); text-decoration: line-through; }
.tw-savedgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.tw-savedcard { display: flex; flex-direction: column; gap: 10px; }
.tw-savedcard form { margin: 0; }
.tw-savedcard-q { margin: 0; font-size: 15.5px; font-weight: 600; line-height: 1.35; text-wrap: pretty; flex: 1; }

@media (max-width: 1100px) {
  .tw-actions { grid-template-columns: repeat(2, 1fr); }
  .tw-kpis { grid-template-columns: repeat(2, 1fr); }
  .tw-signdetail { grid-template-columns: 280px 1fr; }
}
@media (max-width: 900px) {
  .tw-practice, .tw-library, .tw-signdetail, .tw-cols-2 { grid-template-columns: 1fr; }
  .tw-catnav { flex-direction: row; overflow-x: auto; padding: 6px; }
  .tw-catnav a { white-space: nowrap; }
  .tw-catnav-head { display: none; }
  .tw-signdetail-img { max-width: 260px; margin: 0 auto; }
  .tw-term { grid-template-columns: 1fr; gap: 12px; }
  .tw-table-head { display: none; }
  .tw-table-row { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px 16px; }
  .tw-table-row > :nth-child(2), .tw-table-row > :nth-child(3) { grid-column: 1 / -1; }
  .tw-readiness { grid-template-columns: 1fr; justify-items: start; }
  .tw-topic { grid-template-columns: 1fr 44px; gap: 6px 12px; }
  .tw-topic .tw-progress { grid-column: 1 / -1; grid-row: 2; }
  .tw-topic-tag { grid-column: 1 / -1; text-align: left; min-width: 0; }
  .tw-question { font-size: 19px; }
  .tw-searchbox { flex: 1 1 100%; }
}
@media (max-width: 560px) {
  .tw-actions { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tw-action { padding: 14px; }
  .tw-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tw-setbar { flex-wrap: wrap; }
  .tw-setbar-track { order: 3; flex-basis: 100%; }
  .tw-practice-actions .tw-btn-primary { flex: 1 1 100%; }
  .tw-signgrid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Phase 3 — mock exam, progress, sign quiz, lessons ===== */
.tw-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tw-btn-lg { padding: 14px 22px; font-size: 15px; }
.tw-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.tw-fieldset legend { padding: 0; }
.tw-card-head { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.tw-card-body { margin: 0; padding-top: 16px; }
.tw-kpi span { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tw-kpi-lg { font-size: 36px; }
.tw-grid-wide { grid-template-columns: 1.7fr 1fr; align-items: start; }
a.tw-list-link { text-decoration: none; }
a.tw-list-link:hover { background: var(--surface-2); }

/* Exam: start */
.tw-examfacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tw-examfacts > div { padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-md); }
.tw-attempt-score { font-size: 18px; font-weight: 700; min-width: 64px; }
.tw-attempt-score span { font-size: 12px; font-weight: 500; color: var(--muted); }

/* Exam: verdict across mocks (dark card) */
.tw-standing { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.tw-standing .tw-eyebrow { color: rgba(255,255,255,.62); }
.tw-standing-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; }
.tw-standing-bar { display: flex; gap: 6px; margin-top: 14px; }
.tw-standing-bar i { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.16); }
.tw-standing-bar i.is-on { background: var(--rw-gold); }
.tw-standing-body { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.78); margin: 12px 0 0; }

/* Exam: sitting */
.tw-exambar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.tw-timer { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 12px; background: var(--ink); color: var(--on-ink); }
.tw-timer .tw-num { font-size: 18px; font-weight: 700; min-width: 5ch; }
.tw-timer .tw-small { color: rgba(255,255,255,.7); }
.tw-timer.is-low { background: var(--danger); }
.tw-exambar-progress { flex: 1; min-width: 160px; }
.tw-exambar-progress .tw-progress { margin-top: 6px; }
.tw-exam { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.tw-qgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tw-qgrid-wide { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); max-width: 620px; }
.tw-qcell { display: grid; place-items: center; height: 40px; padding: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 700; text-decoration: none; }
button.tw-qcell:hover, a.tw-qcell:hover { border-color: var(--muted-2); }
.tw-qcell:focus-visible { outline: 2px solid var(--rw-blue); outline-offset: 2px; }
.tw-qcell.is-done { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.tw-qcell.is-now  { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--rw-blue); }
.tw-qcell.is-ok   { background: var(--rw-green); border-color: var(--rw-green); color: #fff; }
.tw-qcell.is-bad  { background: var(--danger); border-color: var(--danger); color: #fff; }
.tw-qcell.is-none { border-style: dashed; border-color: var(--muted-2); color: var(--muted); }
.tw-handin { max-width: 760px; }

/* Exam: result */
.tw-score { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.tw-bignum-of { font-size: 22px; font-weight: 600; color: var(--muted); }
.tw-ring-n.is-sm { font-size: 34px; }
.tw-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tw-legend .tw-qcell { width: 12px; height: 12px; border-radius: 4px; }
.tw-legend .tw-qcell:not(.is-ok):not(.is-bad) { border-style: dashed; border-color: var(--muted-2); }
.tw-review { align-items: flex-start; scroll-margin-top: 16px; }
.tw-review:target { background: var(--rw-gold-3); }
.tw-review-q { display: block; font-weight: 600; line-height: 1.4; text-wrap: pretty; }
.tw-review-a { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin-top: 8px; font-size: 13.5px; }
.tw-review-a .tw-eyebrow { display: block; font-size: 10px; margin-bottom: 2px; }

/* Progress: line chart */
.tw-chart-box { position: relative; }
.tw-chart { display: block; width: 100%; height: auto; overflow: visible; }
.tw-chart-grid, .tw-chart-target, .tw-chart-line, .tw-chart-cross { vector-effect: non-scaling-stroke; }
.tw-chart-grid   { stroke: var(--line-2); stroke-width: 1; }
.tw-chart-axis   { font-family: var(--f-mono); font-size: 11px; fill: var(--muted); }
.tw-chart-target { stroke: var(--muted-2); stroke-width: 1.5; stroke-dasharray: 5 5; }
.tw-chart-area   { fill: var(--rw-green); opacity: .1; }
.tw-chart-line   { fill: none; stroke: var(--rw-green); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tw-chart-dot    { fill: var(--rw-green); stroke: var(--surface); stroke-width: 2; }
.tw-chart-dot.is-on { r: 6px; }
.tw-chart-cross  { stroke: var(--muted-2); stroke-width: 1; }
.tw-chart-cross[hidden] { display: none; }   /* the hidden attribute alone does not hide SVG elements */
.tw-chart-value  { font-family: var(--f-mono); font-size: 13px; font-weight: 700; fill: var(--ink); }
.tw-chart-hit    { fill: transparent; }
.tw-hover { position: fixed; z-index: 20; pointer-events: none; max-width: 240px; padding: 8px 11px; border-radius: 10px; background: var(--ink); color: var(--on-ink); font-size: 12.5px; line-height: 1.45; box-shadow: var(--sh-2); }
.tw-hover b { display: block; font-weight: 700; }
.tw-details { margin-top: 10px; font-size: 13px; }
.tw-details summary { cursor: pointer; color: var(--muted); font-weight: 600; width: fit-content; }
.tw-details summary:hover { color: var(--ink); }
.tw-datatable { border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.tw-datatable th, .tw-datatable td { text-align: left; padding: 6px 22px 6px 0; border-bottom: 1px solid var(--line-2); }
.tw-datatable th { font-size: 11px; color: var(--muted); font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

/* Progress: heatmap */
.tw-heat-wrap { overflow-x: auto; margin-top: 14px; }
.tw-heat { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 560px; table-layout: fixed; }
.tw-heat thead th { height: 22px; font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; color: var(--muted); text-align: left; white-space: nowrap; overflow: visible; }
.tw-heat thead th:first-child, .tw-heat tbody th { width: 210px; }
.tw-heat tbody th { text-align: left; font-size: 13px; font-weight: 500; padding-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-heat tbody th a { text-decoration: none; }
.tw-heat tbody th a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tw-heat tbody th .tw-num { font-size: 11px; color: var(--muted-2); margin-right: 4px; }
.tw-heat td { height: 26px; border-radius: 5px; text-align: center; font-family: var(--f-mono); font-size: 11px; font-weight: 700; color: var(--ink); }
.tw-heat td:hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.tw-heat .is-l0, .tw-heat-key .is-l0 { background: var(--surface-3); }
.tw-heat .is-l1, .tw-heat-key .is-l1 { background: #FBDAD5; }
.tw-heat .is-l2, .tw-heat-key .is-l2 { background: #F2A99F; }
.tw-heat .is-l3, .tw-heat-key .is-l3 { background: #DD6A5C; }
.tw-heat .is-l4, .tw-heat-key .is-l4 { background: #B93226; }
.tw-heat td.is-l4 { color: #fff; }
.tw-heat-legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }
.tw-heat-key { display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-mono); font-size: 11px; }
.tw-heat-key i { width: 14px; height: 14px; border-radius: 4px; }

/* Progress: badges */
.tw-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tw-badge { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
.tw-badge .tw-tag { margin-top: 4px; white-space: normal; }
.tw-badge-name { font-weight: 700; font-size: 14.5px; margin-top: 4px; }
.tw-badge-state { font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.tw-badge.is-locked { background: var(--surface-2); }
.tw-badge.is-locked .tw-iconbox { color: var(--muted-2); }
.tw-badge.is-locked .tw-badge-name { color: var(--muted); }

/* Lessons */
a.tw-lessoncard { text-decoration: none; }
a.tw-lessoncard:hover { border-color: var(--muted-2); }
.tw-lessoncard-title { display: block; font-size: 16px; font-weight: 700; line-height: 1.3; margin: 2px 0 4px; }
.tw-lessoncard .tw-module-foot .tw-small { display: inline-flex; align-items: center; gap: 5px; }
.tw-prose { font-size: 15px; line-height: 1.65; color: var(--ink-2); max-width: 68ch; }
.tw-prose p { margin: 0 0 12px; }
.tw-prose h4 { font-size: 15.5px; font-weight: 700; color: var(--ink); margin: 20px 0 8px; }
.tw-prose ul, .tw-prose ol { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.tw-prose b, .tw-prose strong { color: var(--ink); }
.tw-prose > :last-child { margin-bottom: 0; }

/* Sign quiz */
.tw-figure-quiz img { width: 180px; height: 180px; object-fit: contain; }
.tw-quizanswer { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: center; }
.tw-quizanswer .tw-figure { margin-top: 0; }
.tw-quizanswer .tw-figure-quiz img { width: 140px; height: 140px; }
.tw-signcard .tw-progress { height: 4px; margin-top: 0; }

/* Home: links that live in the sidebar on wide screens */
.tw-morelinks { display: none; overflow: hidden; }
.tw-morelinks a { display: flex; align-items: center; gap: 12px; padding: 14px 18px; text-decoration: none; font-size: 14.5px; font-weight: 600; }
.tw-morelinks a + a { border-top: 1px solid var(--line-2); }
.tw-morelinks a span { flex: 1; }
.tw-morelinks a .tw-icon:last-child { color: var(--muted-2); }

/* Profile: identity card */
.tw-idcard { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tw-avatar-lg { width: 64px; height: 64px; flex-basis: 64px; font-size: 24px; }
.tw-idcard-text { flex: 1; min-width: 180px; }
.tw-idcard-stats { display: flex; gap: 26px; margin: 0; }
.tw-idcard-stats dd { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; }
.tw-idcard-stats dt { font-size: 12px; color: var(--muted); }
.tw-idcard-stats > div { display: flex; flex-direction: column; }

@media (max-width: 900px) {
  .tw-grid-wide, .tw-exam { grid-template-columns: 1fr; }
  .tw-morelinks { display: block; }
  .tw-heat thead th:first-child, .tw-heat tbody th { width: 150px; }
  .tw-qgrid { grid-template-columns: repeat(10, 1fr); }
}
@media (max-width: 560px) {
  .tw-examfacts { gap: 8px; }
  .tw-examfacts > div { padding: 12px; }
  .tw-qgrid { grid-template-columns: repeat(5, 1fr); }
  .tw-review-a, .tw-quizanswer { grid-template-columns: 1fr; }
  .tw-review .tw-tag { display: none; }
  .tw-idcard-stats { width: 100%; justify-content: space-between; }
  /* Charts on a phone: the drawing shrinks, so its text and marks are drawn larger. */
  .tw-chart-axis  { font-size: 21px; }
  .tw-chart-value { font-size: 24px; }
  .tw-chart-dot   { r: 7px; stroke-width: 3; }
  .tw-chart-dot.is-on { r: 10px; }
  /* Heatmap on a phone: the latest six weeks, no sideways scrolling. */
  .tw-heat { min-width: 0; }
  .tw-heat thead th:first-child, .tw-heat tbody th { width: 46%; }
  .tw-heat tr > :nth-child(n+2):nth-child(-n+7) { display: none; }
  .tw-timer .tw-small { display: none; }
}

/* ===== Phase 4 — admin panel and problem reports ===== */
.tw-report summary { display: inline-flex; align-items: center; gap: 6px; }
.tw-inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.tw-btn-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(193,59,46,.25); }
.tw-btn-danger:hover { background: #F9D9D5; }
textarea.tw-input { resize: vertical; line-height: 1.5; min-height: 48px; }
select.tw-input { appearance: auto; }
.tw-input-sm { width: auto; padding: 7px 10px; font-size: 13px; border-radius: 9px; }
.tw-input-code-text { font-family: var(--f-mono); font-size: 13px; }
.tw-statlink { text-decoration: none; display: block; }
a.tw-statlink:hover { border-color: var(--muted-2); }
.tw-adminmenu { display: none; position: relative; }
.tw-adminmenu summary { list-style: none; cursor: pointer; }
.tw-adminmenu summary::-webkit-details-marker { display: none; }
.tw-adminmenu nav { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-2); display: flex; flex-direction: column; }
.tw-adminmenu nav a { padding: 9px 12px; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 500; }
.tw-adminmenu nav a:hover, .tw-adminmenu nav a[aria-current] { background: var(--surface-3); }

.tw-atable-wrap { overflow-x: auto; }
.tw-atable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tw-atable th { text-align: left; padding: 12px 14px; font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; font-family: var(--f-mono); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tw-atable td { padding: 10px 14px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.tw-atable tbody tr:first-child td { border-top: 0; }
.tw-atable tbody tr:hover { background: var(--surface-2); }
.tw-atable td.is-main { min-width: 240px; font-weight: 600; line-height: 1.4; }
.tw-atable td.is-main a { text-decoration: none; }
.tw-atable td.is-main a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tw-atable-actions { white-space: nowrap; text-align: right; }
.tw-atable-actions > * { margin-left: 4px; }
.tw-thumb { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: var(--surface-2); display: block; }
.tw-thumb-lg { width: 96px; height: 96px; border: 1px solid var(--line-2); }

.tw-aform { display: flex; flex-direction: column; gap: 18px; max-width: 1100px; }
.tw-aform legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.tw-tri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tw-tri .tw-field { position: relative; }
.tw-tri-lang { position: absolute; top: 7px; right: 9px; font-size: 10px; color: var(--muted-2); pointer-events: none; }
.tw-tri .tw-input { padding-right: 34px; }
.tw-optrow { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); }
.tw-optrow.has-error { border-color: var(--danger); }
.tw-optrow-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.tw-optrow-pick input:checked ~ .tw-option-key { background: var(--rw-green); color: #fff; }
.tw-optrow-body { display: flex; flex-direction: column; gap: 8px; }
.tw-imgpick { display: flex; flex-wrap: wrap; gap: 12px; }
.tw-imgtile { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-md); font-size: 12.5px; }
.tw-imgtile img { width: 168px; height: 118px; object-fit: contain; border-radius: var(--r-sm); background: var(--surface-2); display: block; }
.tw-imgtile.is-pinned { border-color: var(--rw-blue); box-shadow: inset 0 0 0 1px var(--rw-blue); }
.tw-imgtile.is-hidden img { opacity: .45; }
.tw-planpick { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.tw-planpick:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.tw-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; }
.tw-thumbs { display: inline-flex; align-items: center; gap: 4px; }
.tw-thumbs .tw-thumb { object-fit: cover; }
.tw-aform-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(to top, var(--surface-2) 70%, transparent); }
.tw-aform-danger { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); max-width: 1100px; }
.tw-reviewgrid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tw-reviewgrid .tw-signcard-img { height: 150px; }
.tw-reviewgrid .tw-signcard-img img { width: 120px; height: 120px; }

@media (max-width: 900px) {
  .tw-adminmenu { display: block; }
  .tw-tri { grid-template-columns: 1fr; }
  .tw-optrow { grid-template-columns: 1fr; }
  .tw-optrow-pick { flex-direction: row; }
  .tw-admin .tw-main { padding-bottom: 0; }
}

/* ---- Spacing utilities (last, so they win over component margins) ---- */
.tw-mt-xs { margin-top: 4px; }
.tw-mt-sm { margin-top: 14px; }
.tw-mt-md { margin-top: 18px; }
.tw-mt-lg { margin-top: 28px; }
.tw-mb-sm { margin-bottom: 12px; }
.tw-mb-md { margin-bottom: 18px; }

/* Membership: a plan's price, with the list price struck through when an offer applies. */
.tw-plan-price { margin-left: auto; text-align: right; white-space: nowrap; }
.tw-plan-price s { opacity: .55; margin-right: 4px; }
img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.tw-row-end { align-items: flex-end; }
.tw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tw-grid-2 > * { min-width: 0; }

/* ---- Receipts and invoices ---- */
.tw-invoice { max-width: 760px; padding: 32px; }
.tw-invoice-note { margin: 0 0 20px; }
.tw-invoice-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.tw-invoice-seller { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.tw-invoice-meta { text-align: right; }
.tw-invoice-no { font-size: 20px; font-weight: 700; margin-top: 4px; }
.tw-invoice-buyer { padding: 18px 0; }
.tw-invoice-table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 14px; }
.tw-invoice-table th, .tw-invoice-table td { padding: 10px 0; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tw-invoice-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--f-mono); border-bottom-color: var(--line); }
.tw-invoice-table tfoot th { font-weight: 500; color: var(--muted); }
.tw-invoice-table .is-num { text-align: right; white-space: nowrap; }
.tw-invoice-table .is-total th, .tw-invoice-table .is-total td { font-size: 16px; font-weight: 700; color: var(--ink); border-bottom: 0; padding-top: 14px; }
.tw-invoice-sdc { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.tw-invoice-sdc dd { font-size: 13px; }
@media print {
  .tw-side, .tw-topbar, .tw-tabs, .tw-invoice-actions { display: none !important; }
  .tw-shell { display: block; padding: 0; background: #fff; }
  .tw-content { padding: 0; }
  .tw-invoice { border: 0; max-width: none; padding: 0; }
}

/* Picture credits page */
.tw-credits { margin: 14px 0 0; padding-left: 18px; display: grid; gap: 12px; font-size: 14px; }
.tw-credits-url { overflow-wrap: anywhere; color: var(--muted); }

/* Profile pictures */
.tw-avatar-img { object-fit: cover; background: var(--surface-3); padding: 0; }

/* ── Dark appearance: the account's choice (Profile → Preferences). Only the tokens change. ── */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink:       #EEF1F0;
  --ink-2:     #D5DBD9;
  --on-ink:    #0E1518;
  --muted:     #A5AFB2;
  --muted-2:   #818C90;
  --line:      #2B363A;
  --line-2:    #222C30;
  --surface:   #161D20;
  --surface-2: #0E1416;
  --surface-3: #1E282C;
  --rw-blue:    #3FA2DB;
  --rw-blue-2:  #7CC3EC;
  --rw-blue-3:  #11303F;
  --rw-green:   #2FA567;
  --rw-green-2: #63C892;
  --rw-green-3: #10301F;
  --rw-gold-2:  #F0C544;
  --rw-gold-3:  #3A2F0B;
  --danger:    #E8695B;
  --danger-bg: #3A1814;
  --warn:      #F0C544;
  --sh-1: 0 1px 2px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.05);
  --sh-2: 0 4px 14px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06);
}
html[data-theme="dark"] .tw-verdict.is-ok  { background: #10301F; border-color: #1F5A3A; }
html[data-theme="dark"] .tw-verdict.is-bad { border-color: #6B2A23; }
html[data-theme="dark"] .tw-btn-danger:hover { background: #4A1F1A; }
html[data-theme="dark"] .tw-heat .is-l1, html[data-theme="dark"] .tw-heat-key .is-l1 { background: #4A2420; }
html[data-theme="dark"] .tw-heat .is-l2, html[data-theme="dark"] .tw-heat-key .is-l2 { background: #7A342C; }
html[data-theme="dark"] .tw-heat .is-l3, html[data-theme="dark"] .tw-heat-key .is-l3 { background: #A9463A; }
html[data-theme="dark"] .tw-heat .is-l4, html[data-theme="dark"] .tw-heat-key .is-l4 { background: #D4574A; }
/* Sign and question pictures are drawn for a white page: keep them on a light tile. */
html[data-theme="dark"] .tw-signdetail-img, html[data-theme="dark"] .tw-signcard-img { background: #F4F3EE; border-color: transparent; }
@media print { html[data-theme="dark"] { color-scheme: light; --ink: #0E1518; --ink-2: #1F2A2E; --muted: #5F6B70; --line: #E7E7E2; --surface: #FFFFFF; --surface-2: #FFFFFF; --surface-3: #F4F3EE; } }
/* A block that is ink-coloured in the light look holds light text of its own: in the dark look it becomes a raised card instead. */
html[data-theme="dark"] .tw-standing { background: var(--surface-3); border-color: var(--line); color: var(--ink); }

/* The brand mark is the logo. The letter stays in the page for screen readers, unseen. */
.tw-brand-mark, .tw-brand-mark-lg { background: url('../img/favicon-192.png') center / cover no-repeat; color: transparent; font-size: 0; border-radius: 22%; box-shadow: none; }
.tw-brand-mark::after { content: none; }

/* How a learner fares (0.15.0) */
.tw-fare-line { font-size: 15px; color: var(--ink); }
.tw-fare[data-compare="lower"] { border-color: rgba(182,133,0,.35); }
.tw-attn { color: var(--rw-gold-2); margin-top: 2px; }
.tw-attn svg { vertical-align: -1px; }
.tw-grid-even { grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 900px) { .tw-grid-even { grid-template-columns: 1fr; } }
/* Admin home: one bar per day */
.tw-days { display: flex; align-items: flex-end; gap: 4px; height: 96px; padding-top: 4px; }
.tw-days i { flex: 1; min-width: 4px; background: var(--rw-green); border-radius: 3px 3px 0 0; }
.tw-days i.is-zero { background: var(--line); }
.tw-facts dt a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* A visually hidden label inside a wide table must scroll with the table, not widen the page (phones). */
.tw-atable-wrap { position: relative; }
/* Phone menu of the staff areas: the same groups as the side menu, and it scrolls when long */
.tw-adminmenu nav { max-height: 75vh; overflow-y: auto; }
.tw-adminmenu-grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); font-weight: 600; padding: 10px 12px 4px; }
