/* ==========================================================================
   Professional theme — loaded last. Re-maps the app's design tokens to a calm,
   academic look (navy + neutrals, Inter / Source Serif 4, flat controls) so every
   screen — dashboard, lessons, tests — shares one formal style.
   ========================================================================== */
:root {
  --ink: #1b2537;
  --ink-soft: #46546a;
  --muted: #6b7789;
  --line: #e1e6ee;
  --paper: #ffffff;
  --cream: #fbfaf7;
  --sky-1: #f5f7fa;
  --sky-2: #f5f7fa;
  --canvas: #f4f6f9;

  /* the old "violet" accent becomes the navy brand colour everywhere */
  --violet: #1f3a68;
  --violet-deep: #142848;
  --violet-soft: #e9eef7;
  --go: #2d7a55;
  --go-deep: #22603f;
  --go-soft: #e5f3ec;
  --sun: #b7791f;
  --sun-soft: #fbf3e2;
  --gold: #c9a227;
  --coral: #b83232;
  --coral-soft: #fbeaea;
  --sea: #2b6cb0;
  --sea-soft: #e8f1fa;
  --pink: #8b3a62;

  --zone: #1f3a68;
  --zone-deep: #142848;
  --zone-soft: #e9eef7;
  --zone-bg: #f4f6f9;

  --maths: #1f3a68;
  --maths-soft: #e9eef7;
  --english: #1d5c63;
  --english-soft: #e4f1f1;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 1px 3px rgba(16, 24, 40, .08), 0 4px 12px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  --press: none;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.theme-forest, .zone-forest { --zone: #2d6a4f; --zone-deep: #1f4d39; --zone-soft: #e6f1eb; --zone-bg: #f4f6f9; }
.theme-factory, .zone-factory { --zone: #1f3a68; --zone-deep: #142848; --zone-soft: #e9eef7; --zone-bg: #f4f6f9; }
.theme-ridge, .zone-ridge { --zone: #8a5a1f; --zone-deep: #6b4415; --zone-soft: #f6eedf; --zone-bg: #f4f6f9; }
.theme-fair, .zone-fair { --zone: #7a3b5e; --zone-deep: #5c2b46; --zone-soft: #f4e8ef; --zone-bg: #f4f6f9; }
.theme-castle, .zone-castle { --zone: #3b3f8f; --zone-deep: #2b2e6b; --zone-soft: #ebecf7; --zone-bg: #f4f6f9; }

body {
  font-family: var(--font-body);
  font-weight: 450;
  font-size: 16px;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.005em; color: var(--ink); }
strong, b { font-weight: 650; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.screen.active { animation: screenFade .25s ease; }
@keyframes screenFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- buttons: flat, rectangular, quiet */
.btn {
  font-family: var(--font-body); font-weight: 600; letter-spacing: 0;
  border-radius: var(--r-md); box-shadow: none !important;
  background: var(--violet); color: #fff;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { filter: none; transform: none; background: var(--violet-deep); }
.btn:active { transform: none; }
.btn:disabled { background: #e3e7ed; color: #9aa4b2; }
.btn-xl { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; padding: 14px 26px; border-radius: var(--r-md); }
.btn-lg { font-size: 1rem; padding: 12px 22px; }
.btn-sm { font-size: .85rem; padding: 6px 12px; border-radius: var(--r-sm); }
.btn-go { background: var(--go); }
.btn-go:hover { background: var(--go-deep); }
.btn-ghost, .btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none !important; }
.btn-ghost:hover, .btn-outline:hover { background: #f7f9fb; border-color: #c9d2de; }
.btn-outline.active, .btn.active { background: var(--violet); color: #fff; }
.icon-btn { box-shadow: none !important; border: 1px solid var(--line); background: #fff; border-radius: var(--r-md); }
.icon-btn:hover { transform: none; background: #f7f9fb; }
.link-btn { color: var(--sea); font-weight: 600; }

.text-input { font-family: var(--font-body); font-weight: 500; border-radius: var(--r-md); border: 1px solid #cfd7e2; box-shadow: none; }
.text-input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }

.toast { font-family: var(--font-body); font-weight: 500; background: var(--ink); border-radius: var(--r-md); box-shadow: var(--shadow-lg); }

/* ---------- quieter playful details in lessons and tests */
.btn-op, .btn-discount { box-shadow: none !important; }
.ex-pill.is-current { box-shadow: none; }
.ex-qnum { border-radius: var(--r-md); font-family: var(--font-body); font-weight: 700; }
.ex-card, .ex-start-card, .rv-banner, .rv-row, .ex-text { box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.ex-start-kicker { color: var(--sea); }
.rv-banner { background: #fff; }
.rv-ring > div strong, .ex-facts strong { font-family: var(--font-display); }
.ex-tl-btn { box-shadow: none; }
.exr-card { border: 1px solid var(--line); }
#confettiCanvas { opacity: .85; }

/* ---------- SATs papers and times tables inside the studio */
.subject-tab { font-family: var(--font-body); font-weight: 500; font-size: .9rem; padding: 8px 16px; border-radius: var(--r-md); box-shadow: none !important; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); transform: none !important; }
.subject-tab.is-active { background: var(--violet); color: #fff; border-color: var(--violet); }
.subject-tabs { justify-content: flex-start; gap: 8px; }
.paper-year { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); animation: none; }
.py-year { font-family: var(--font-display); font-weight: 600; }
.paper-btn { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: none !important; transform: none !important; }
.paper-btn:hover { border-color: var(--violet); background: #fff; }
.paper-btn strong { font-weight: 600; }
.mtc-intro { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); text-align: left; max-width: 720px; }
.mtc-intro h3 { font-size: 1.3rem; }
.mtc-buttons { justify-content: flex-start; }
