/* Shared base styles for every BankoPost lesson/hub page (not parent.html,
   which is an intentionally separate admin surface with its own design).
   Consolidated from what was previously ~500 duplicated inline <style>
   blocks - see scripts/wire-shared-css.py. Keep this the single source of
   truth for header/color/layout chrome; page-specific rules (e.g. a
   deliberate image-size override) stay in a small local <style> block.

   Palette is grounded in real Montessori material colors: each subject
   (math/language/biology/geometry/history) carries its own accent so kids
   recognize "the green one" / "the blue one" at a glance - see
   html/js/banko-menu.js's SUBJECT_STYLE map, which is the single source of
   truth for which subject gets which color/icon. */

:root {
  --brand: #1D4E3C;
  --brand-light: #2F7A5C;
  --brand-wash: #E7F1EC;
  --accent: #C9A227;
  --success: #3F7D4A;
  --bg: #FBF7F0;
  --card: #FFFFFF;
  --text: #2B2620;
  --text-muted: #6B6255;
  --line: #E8E0D2;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(43,38,32,0.06), 0 8px 24px -12px rgba(43,38,32,0.18);

  --math: #C68B27;
  --math-wash: #FBF1DE;
  --language: #C2597B;
  --language-wash: #FBEAF0;
  --biology: #3F7D4A;
  --biology-wash: #EAF3EA;
  --geometry: #2E6E9E;
  --geometry-wash: #E7F0F7;
  --history: #B15E2E;
  --history-wash: #F7EBE1;
}

/* data-theme is set by ThemeInit.astro (localStorage override, else
   prefers-color-scheme) before first paint - see that file. CSS only needs
   to know the resolved attribute, not re-derive system preference itself. */
:root[data-theme="dark"] {
  --brand: #4C9B7E;
  --brand-light: #6BBE9E;
  --brand-wash: #223A32;
  --accent: #D9B84A;
  --success: #6FB47B;
  --bg: #1E1B17;
  --card: #2A2620;
  --text: #F2EDE4;
  --text-muted: #B7AD9C;
  --line: #3D372E;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px -12px rgba(0,0,0,0.5);

  --math: #E0AC4E;
  --math-wash: #3A2F1C;
  --language: #DD84A2;
  --language-wash: #3A2530;
  --biology: #6FB47B;
  --biology-wash: #223523;
  --geometry: #6FA8D6;
  --geometry-wash: #1E2E3C;
  --history: #D68A56;
  --history-wash: #3A2A1D;
}

* { box-sizing: border-box; }

body {
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

h1, h2, h3, .header, button {
  font-family: 'Fredoka', system-ui, sans-serif;
}

/* Sidebar is an off-canvas drawer (matches the pre-migration site's
   html/js/banko-menu.js): closed by default, opened via
   #banko-menu-toggle. On wide screens (>=900px) it defaults open and
   pushes the page right via body.banko-sidebar-push instead of
   overlaying it; on narrow screens a backdrop covers the page while
   it's open. See Sidebar.astro for the open/close script. */
#banko-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
  display: none;
}
#banko-menu-backdrop.banko-visible { display: block; }

#banko-menu-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1002;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 2px solid var(--brand);
  background: var(--card);
  color: var(--brand);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-family: inherit;
}
#banko-menu-toggle.banko-hidden { display: none; }

.banko-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 300px;
  max-width: 88vw;
  background: var(--card);
  z-index: 1000;
  box-shadow: var(--shadow);
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}
.banko-sidebar.banko-open { transform: translateX(0); }
.banko-sidebar nav { overflow-y: auto; padding: 0.65rem; flex: 1; }

.banko-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.1rem;
  background: var(--brand);
  color: #fff;
  flex-shrink: 0;
}
.banko-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
}
.banko-sidebar-brand svg { width: 26px; height: 26px; flex-shrink: 0; }
.banko-sidebar-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  line-height: 1;
  border-radius: 8px;
}
.banko-sidebar-close:hover { background: rgba(255, 255, 255, 0.15); }

body.banko-sidebar-push { padding-left: 300px; transition: padding-left 0.22s ease; }

/* Reserve room for the floating #banko-menu-toggle so it doesn't sit on
   top of the header's own text when the drawer is closed (not an issue
   once pushed â€” the header already starts past the open sidebar then). */
body:not(.banko-sidebar-push) .header { padding-left: 4.5rem; }

.header {
  background: var(--brand);
  color: #fff;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow);
}
.header h1 {
  font-weight: 600;
  font-size: 1.75rem;
  margin: 0;
}
.header a {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
  font-size: 0.95rem;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 500;
}
.header a:hover { opacity: 1; }
.header .header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.header .header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header .header-title-row { margin-top: 0.6rem; }
.header .header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}
.header .child-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: #fff;
}
.header .child-switcher-label { opacity: 0.85; }
.header .child-switcher select {
  appearance: none;
  -webkit-appearance: none;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.7rem;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 0.4rem 1.9rem 0.4rem 0.85rem;
  cursor: pointer;
}
.header .child-switcher select:hover { background-color: rgba(255, 255, 255, 0.12); }
.header .child-switcher select:focus { outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: 1px; }
.header .child-switcher select option { color: var(--text); background: var(--card); }

.header .logout-btn {
  margin-left: auto;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: #fff;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}
.header .logout-btn:hover { background: rgba(255, 255, 255, 0.12); }
.header .logout-btn:disabled { opacity: 0.7; cursor: wait; }

.header .theme-toggle {
  font-size: 1.05rem;
  line-height: 1;
  color: #fff;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}
.header .theme-toggle:hover { background: rgba(255, 255, 255, 0.12); }

/* Mark-complete lives at the top of the lesson content (matches the
   pre-migration site's html/js/banko-progress.js, which always did
   content.insertBefore(wrap, content.firstChild) â€” not the header). */
.banko-progress-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem 0;
  padding: 0.75rem 1.1rem;
  background: var(--brand-wash);
  border-radius: 12px;
}
.banko-mark-btn {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.02rem;
  padding: 0.85rem 1.6rem;
  border-radius: 14px;
  border: none;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 0 0 color-mix(in srgb, var(--brand) 70%, black);
}
.banko-mark-btn:hover { filter: brightness(1.05); }
.banko-mark-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 0 color-mix(in srgb, var(--brand) 70%, black);
}
.banko-mark-btn.banko-done {
  background: var(--success);
  box-shadow: 0 4px 0 0 color-mix(in srgb, var(--success) 70%, black);
}
.banko-mark-btn.banko-done:active {
  box-shadow: 0 2px 0 0 color-mix(in srgb, var(--success) 70%, black);
}

/* Completion celebration, ported from banko-progress.js's playFireworks(). */
.banko-fireworks { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.banko-fw-particle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  opacity: 0.95;
  box-shadow: 0 0 12px currentColor;
  animation: banko-fw-burst 1.45s cubic-bezier(.1, .7, .2, 1) forwards;
}
.banko-fw-spark {
  position: absolute;
  width: 7px;
  height: 20px;
  border-radius: 999px;
  opacity: 0.95;
  animation: banko-fw-confetti 1.6s ease-out forwards;
}
.banko-fw-ring {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid currentColor;
  border-radius: 50%;
  opacity: 0.8;
  animation: banko-fw-ring 1.15s ease-out forwards;
}
.banko-fw-message {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) scale(.86);
  padding: .75rem 1.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  border: 3px solid var(--accent);
  color: var(--brand);
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 4vw, 2.25rem);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  animation: banko-fw-message 1.55s ease-out forwards;
}
@keyframes banko-fw-burst {
  0% { transform: translate(0, 0) scale(.6); opacity: 1; }
  65% { opacity: 1; }
  100% { transform: var(--banko-tx) scale(.15); opacity: 0; }
}
@keyframes banko-fw-confetti {
  0% { transform: translate(0, -30px) rotate(0deg); opacity: 1; }
  100% { transform: var(--banko-tx) rotate(720deg); opacity: 0; }
}
@keyframes banko-fw-ring {
  0% { transform: translate(-50%, -50%) scale(.2); opacity: .85; }
  100% { transform: translate(-50%, -50%) scale(9); opacity: 0; }
}
@keyframes banko-fw-message {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.75); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  78% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -72%) scale(.92); }
}
@media (prefers-reduced-motion: reduce) {
  .banko-fw-particle, .banko-fw-spark, .banko-fw-ring, .banko-fw-message { animation: none; opacity: 0; }
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.content > h2 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  font-size: 1.375rem;
  color: var(--brand);
}

p { margin: 0.6rem 0; }
h2 { font-weight: 600; font-size: 1.375rem; margin: 1.25rem 0 0.5rem 0; }
h3 { font-weight: 600; font-size: 1.125rem; margin: 1rem 0 0.35rem 0; }

.cover-image { width: 300px; max-width: 100%; height: auto; display: block; margin: 0 0 1.25rem 0; border-radius: 12px; }
.inline-image { width: 200px; max-width: 100%; height: auto; display: block; margin: 0.75rem 0 1rem 0; border-radius: 10px; }
.question-image { width: 200px; max-width: 100%; height: auto; display: block; margin: 0.75rem 0 0.5rem 0; border-radius: 10px; }
.step-image { width: 200px; max-width: 100%; height: auto; display: block; margin: 0.75rem 0 0.5rem 0; border-radius: 10px; }
.step-img { width: 200px; max-width: 100%; height: auto; display: block; margin: 0.75rem 0; border-radius: 10px; }

.answer-reveal { margin: 0.5rem 0 1.25rem 0; }
.answer-reveal summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 600;
  font-family: 'Fredoka', system-ui, sans-serif;
  padding: 0.35rem 0;
  user-select: none;
}
.answer-reveal summary:hover { color: var(--brand-light); text-decoration: underline; }
.answer-reveal .answer-text {
  margin: 0.5rem 0 0 0;
  padding: 0.5rem 0 0 0.75rem;
  border-left: 3px solid var(--accent);
}

.top-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-url { margin-top: 1.5rem; }

/* In-page reference/resource lists used by several lesson pages
   (not just the old removed hub pages) */
.lesson-list, .doc-list { list-style: none; padding: 0; margin: 0; }
.lesson-list a, .doc-list a { display: block; padding: 0.6rem 1rem; color: var(--text); text-decoration: none; border-radius: 10px; }
.lesson-list a:hover, .doc-list a:hover { background: var(--brand); color: #fff; }
.doc-list a { color: var(--brand-light); }
.lesson-list li, .doc-list li { margin: 0.25rem 0; }

/* Chunky, obvious buttons - big tap targets with a bit of visible depth
   so they read as clickable at a glance, not a flat link. Used for any
   general call-to-action; the lesson "Mark complete" button has its own
   done/not-done states defined in banko-progress.js. */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 0 0 color-mix(in srgb, var(--brand) 70%, black);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 0 color-mix(in srgb, var(--brand) 70%, black); }
.btn-primary:disabled { opacity: 0.7; cursor: wait; filter: none; transform: none; }

/* Login — Direction A (warm classroom gate): soft radial wash + bead
   dots, desktop motif panel, wordmark with leaf+gold-bead monogram,
   wider card (~460), field hints, Show/Hide password toggle.
   Auth behavior unchanged; visual + label copy only. */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.15rem 2rem;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 50%),
    var(--brand-wash);
  position: relative;
  overflow: hidden;
}

/* Soft bead pattern wash (mobile + always) */
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--math) 35%, transparent) 0 7px, transparent 8px),
    radial-gradient(circle at 22% 72%, color-mix(in srgb, var(--geometry) 30%, transparent) 0 5px, transparent 6px),
    radial-gradient(circle at 78% 14%, color-mix(in srgb, var(--language) 28%, transparent) 0 6px, transparent 7px),
    radial-gradient(circle at 88% 68%, color-mix(in srgb, var(--biology) 30%, transparent) 0 8px, transparent 9px),
    radial-gradient(circle at 48% 88%, color-mix(in srgb, var(--history) 28%, transparent) 0 5px, transparent 6px),
    radial-gradient(circle at 62% 28%, color-mix(in srgb, var(--accent) 32%, transparent) 0 4px, transparent 5px);
  background-size: 100% 100%;
}
:root[data-theme="dark"] .login-page::before { opacity: 0.28; }

.login-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

/* Desktop left visual panel */
.login-motif {
  display: none;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--card) 70%, var(--brand-wash)) 0%,
      color-mix(in srgb, var(--brand-wash) 85%, var(--card)) 100%);
  border: 1px solid color-mix(in srgb, var(--brand) 12%, transparent);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  flex-direction: column;
  justify-content: center;
  gap: 1.15rem;
  min-height: 400px;
  overflow: hidden;
  position: relative;
}
:root[data-theme="dark"] .login-motif {
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.login-motif-copy h2 {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--brand);
}
.login-motif-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 28ch;
}

.bead-illustration {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}

@media (min-width: 900px) {
  .login-page { padding: 1.25rem 1.25rem 1.5rem; }
  .login-stage {
    grid-template-columns: 1fr minmax(440px, 480px);
    gap: 1.5rem;
  }
  .login-motif { display: flex; }
  .login-shell { margin: 0; max-width: none; }
}

/* Card — Direction A: slightly wider than prior 400 → 460 */
.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius-sm);
  border-top: 4px solid var(--accent);
  box-shadow: var(--shadow);
  padding: 2rem 1.85rem 1.85rem;
}

/* Wordmark: leaf + gold-bead monogram + name + tagline */
.login-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.15rem;
  text-decoration: none;
  color: var(--brand);
}
.login-brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  display: grid;
  place-items: center;
}
.login-brand-mark svg { width: 28px; height: 28px; display: block; }
.login-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.login-brand-name {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--brand);
}
.login-brand-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.login-shell h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.login-subtitle {
  margin: 0.35rem 0 1.35rem;
  color: var(--text-muted);
  font-size: 1.02rem;
}
.login-shell h1 + .login-form { margin-top: 1.15rem; }

.login-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}
.login-form .field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin: 0;
}
.login-form label {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brand);
}
.field-hint {
  margin: -0.1rem 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.login-form input {
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.9rem;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  border: 2px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-radius: 10px;
}
.login-form input:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-light) 22%, transparent);
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.password-wrap input { padding-right: 3.1rem; }
.pw-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--brand);
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
}
.pw-toggle:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.pw-toggle:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 1px;
}

.login-form .btn-primary {
  width: 100%;
  margin-top: 0.25rem;
  justify-content: center;
}
.login-form .err {
  margin: 0;
  color: #b00020;
  font-size: 0.9rem;
}
:root[data-theme="dark"] .login-form .err { color: #ff8a9a; }

.login-form .login-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.login-form .login-links {
  margin: 0.25rem 0 0;
  text-align: center;
  font-size: 0.95rem;
}
.login-form .login-links a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.login-form .login-links a:hover { text-decoration: underline; }
.login-form .login-links .sep {
  color: var(--text-muted);
  margin: 0 0.35rem;
  font-weight: 400;
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary:active { transform: none; }
}

/* Home page: "Your Progress" subject cards with per-subject icon +
   completion ring. Ported verbatim from the pre-migration site's
   home page inline <style> (html/index.html on bankoserver) so the
   two look the same, plus the icon/color map in subject-style.ts. */
.lede {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
.subj-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
}
.subj-card-top { display: flex; align-items: center; gap: 0.85rem; }
.subj-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.subj-card-icon svg { width: 27px; height: 27px; }
.subj-card-title { font-family: 'Fredoka', system-ui, sans-serif; font-size: 1.12rem; font-weight: 600; }
.subj-card-sub { font-size: 0.85rem; color: var(--text-muted); }
.ring-row { display: flex; align-items: center; gap: 1rem; }
.ring text { font-family: 'Fredoka', system-ui, sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring .track { fill: none; stroke: var(--line); stroke-width: 8; }
.ring .fill { fill: none; stroke-width: 8; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring-label { font-size: 0.88rem; color: var(--text-muted); }
.ring-label strong { display: block; color: var(--text); font-family: 'Fredoka', system-ui, sans-serif; font-weight: 600; font-size: 0.95rem; }
