/* Soda: a small daily fizz of English. Loaded after the functional theme styles. */
:root {
  --soda-paper: #fff8ed;
  --soda-surface: #fffdf8;
  --soda-raised: #fff1e4;
  --soda-ink: #20392f;
  --soda-muted: #637067;
  --soda-line: #dddccf;
  --soda-orange: #ff8b68;
  --soda-orange-hover: #ff9e80;
  --soda-peach: #ffe7da;
  --soda-grape: #eae2fa;
  --soda-lime: #edf2d7;
  --soda-blue: #e4eef9;
  --soda-focus: #71548d;
  --soda-shadow: 0 12px 35px #4c412509;
  --paper: var(--soda-paper);
  --white: var(--soda-surface);
  --ink: var(--soda-ink);
  --muted: var(--soda-muted);
  --line: var(--soda-line);
  --lilac: #b8a6eb;
  --coral: var(--soda-orange);
  --lime: #d9ed94;
  --blue: #c4d8ef;
  --shadow: var(--soda-shadow);
}
:root[data-theme="dark"] {
  --soda-paper: #111b19;
  --soda-surface: #192924;
  --soda-raised: #23362e;
  --soda-ink: #edf0e6;
  --soda-muted: #b5c0b6;
  --soda-line: #45574a;
  --soda-peach: #422e26;
  --soda-grape: #352c43;
  --soda-lime: #2c3926;
  --soda-blue: #253540;
  --soda-focus: #d5bdf0;
  --soda-shadow: 0 12px 35px #00000012;
  --paper: var(--soda-paper);
  --white: var(--soda-surface);
  --ink: var(--soda-ink);
  --muted: var(--soda-muted);
  --line: var(--soda-line);
}
:root[data-theme] body {
  background: var(--soda-paper);
  color: var(--soda-ink);
}
:is(.soda-wordmark, .soda-home h1, .soda-home h2, .academy-page-heading h1, .soda-brand-guide h1, .soda-brand-guide h2) {
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:is(button, a, input, select, textarea, summary):focus-visible {
  outline-color: var(--soda-focus);
}
/* One lockup, from favicon to mobile header. Reset the old star treatment. */
.study-club > aside > .brand,
.soda-brand-header .brand,
body:not(.study-club) header > .brand,
.admin-brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  min-height: 44px;
  letter-spacing: normal;
  line-height: 1;
  text-decoration: none;
  color: var(--soda-ink) !important;
}
.soda-brand-mark { display: block; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; }
.soda-wordmark {
  display: inline-block;
  position: static;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--soda-ink);
  font-size: 39px;
  font-weight: 850;
  letter-spacing: -2.2px;
  line-height: 1;
  transform: none;
  box-shadow: none;
}
:root[data-theme] .study-club > aside {
  background: var(--soda-surface);
  border-color: var(--soda-line);
}
.study-club > aside > .tagline { margin-top: 14px; color: var(--soda-muted); font-size: 11px; letter-spacing: .3px; }
:root[data-theme] .study-club nav > a { border-radius: 17px; }
:root[data-theme] .study-club nav > a:hover { background: var(--soda-raised); }
:root[data-theme] .study-club nav > a.active {
  background: var(--soda-peach);
  color: var(--soda-ink);
  border-color: #df997d;
  box-shadow: none;
}
.soda-nav-icon { display: block; width: 22px; height: 22px; flex: 0 0 22px; }
:root[data-theme] .study-club nav > a > b { background: var(--soda-surface); color: var(--soda-ink); border: 1px solid var(--soda-line); border-radius: 50%; }
:root[data-theme] .sidebar-bottom { background: var(--soda-raised); border-color: var(--soda-line); border-radius: 22px; }
:root[data-theme] .sidebar-bottom :is(p, .small-outline) { color: var(--soda-muted); }
:root[data-theme] .sidebar-bottom .goal-icon { background: var(--soda-peach); color: var(--soda-ink); border-radius: 50%; }
:root[data-theme] .profile { border-color: var(--soda-line); }
:root[data-theme] .profile .avatar { background: var(--soda-grape); color: var(--soda-ink); border-radius: 50%; }
:root[data-theme] .app > header { background: var(--soda-paper); border-color: var(--soda-line); }
:root[data-theme] .header-right :is(select, .auth-link),
:root[data-theme] #themeToggle { background: var(--soda-surface); border-color: var(--soda-line); color: var(--soda-ink); border-radius: 16px; }
:root[data-theme] #themeToggle:hover { background: var(--soda-peach); border-color: #df997d; }
:root[data-theme] #cloudStatus { background: var(--soda-surface) !important; color: var(--soda-muted) !important; border-color: var(--soda-line) !important; border-radius: 16px; }
:root[data-theme] .breadcrumbs { color: var(--soda-muted); }
:root[data-theme] .breadcrumbs b { color: var(--soda-ink); }
:root[data-theme] .app > footer { color: var(--soda-muted); border-color: var(--soda-line); }
.soda-footer-brand { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
.soda-footer-brand .soda-brand-mark { width: 25px; height: 25px; border-radius: 8px; }
.soda-footer-brand .soda-wordmark { font-size: 25px; letter-spacing: -1.3px; }
/* Controls share the same rounded, quietly fizzy character. */
:root[data-theme] .primary,
:root[data-theme] .admin-button:not(.admin-secondary):not(.admin-quiet) {
  background: var(--soda-orange);
  color: #20392f;
  border-color: var(--soda-orange);
  border-radius: 999px;
  box-shadow: none;
  font-weight: 750;
}
:root[data-theme] .primary:hover:not(:disabled),
:root[data-theme] .admin-button:not(.admin-secondary):not(.admin-quiet):hover:not(:disabled) { background: var(--soda-orange-hover); border-color: var(--soda-orange-hover); }
:root[data-theme] .outline,
:root[data-theme] .admin-button.admin-secondary {
  background: var(--soda-surface);
  color: var(--soda-ink);
  border-color: var(--soda-line);
  border-radius: 999px;
  box-shadow: none;
}
:root[data-theme] .outline:hover:not(:disabled),
:root[data-theme] .admin-button.admin-secondary:hover:not(:disabled) { background: var(--soda-raised); border-color: #bc9d88; }
:root[data-theme] :is(.pill, .admin-pill) { background: var(--soda-lime); color: var(--soda-ink); border-radius: 999px; }
:root[data-theme] :is(.pill.purple, .category) { background: var(--soda-grape); color: var(--soda-ink); }
:root[data-theme] :is(.toolbar input, .toolbar select, .academy-filterbar select, .academy-profile-form select, .academy-text-input, .academy-writing, #themePreference) {
  border-color: var(--soda-line);
  background: var(--soda-surface);
  color: var(--soda-ink);
  border-radius: 15px;
}
:root[data-theme] :is(input, textarea)::placeholder { color: var(--soda-muted); opacity: 1; }
/* Home: a single daily entry, then three supporting categories. */
.soda-home { max-width: 1100px; margin: 0 auto; }
.soda-welcome { margin-bottom: 25px; }
.soda-welcome .eyebrow { color: var(--soda-muted); font-size: 10px; letter-spacing: 1.5px; margin-bottom: 10px; }
.soda-welcome h1 { font-size: clamp(27px, 3.1vw, 39px); letter-spacing: -1.2px; line-height: 1.25; margin-bottom: 8px; }
.soda-welcome > p:last-child { color: var(--soda-muted); font-size: 14px; margin-bottom: 0; }
.soda-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(230px, .9fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  min-height: 330px;
  padding: 34px 35px 31px;
  margin-bottom: 23px;
  border: 1px solid #e4b5a0;
  border-radius: 30px;
  overflow: hidden;
  isolation: isolate;
  background: #ffe9db;
  color: #20392f;
  box-shadow: var(--soda-shadow);
}
.soda-hero::before,
.soda-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: -1; }
.soda-hero::before { width: 320px; height: 320px; right: -85px; top: -150px; background: #ff8b6826; border: 1px solid #e4b5a080; }
.soda-hero::after { width: 150px; height: 150px; left: -95px; bottom: -90px; background: #fff8ed80; border: 1px solid #fff8ed; }
.soda-hero-copy { min-width: 0; position: relative; z-index: 1; }
.soda-hero-tags { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
:root[data-theme] .soda-hero-tags .pill { padding: 6px 11px; background: #fff8ed; color: #20392f; border: 1px solid #dbbba6; font-size: 10px; letter-spacing: .5px; }
.soda-tiny-bubbles { display: inline-flex; align-items: flex-end; gap: 4px; height: 21px; }
.soda-tiny-bubbles i { display: block; border-radius: 50%; background: #d07657; width: 6px; height: 6px; }
.soda-tiny-bubbles i:nth-child(2) { width: 9px; height: 9px; transform: translateY(-6px); }
.soda-tiny-bubbles i:nth-child(3) { width: 5px; height: 5px; transform: translateY(-13px); }
.soda-hero h2 { max-width: 510px; font-size: clamp(30px, 3.6vw, 43px); line-height: 1.17; letter-spacing: -1.5px; margin: 0 0 17px; color: inherit; }
.soda-hero-copy > p { max-width: 470px; font-size: 14px; line-height: 1.85; color: #536154; margin: 0 0 23px; }
.soda-hero .primary { min-height: 49px; font-size: 14px; padding: 13px 23px; gap: 24px; }
.soda-hero-note { display: block; font-size: 11px; line-height: 1.8; color: #536154; margin-top: 15px; max-width: 410px; }
.soda-hero-art { position: relative; display: flex; align-items: center; justify-content: center; align-self: stretch; min-width: 0; }
.soda-hero-art::before { content: ""; position: absolute; width: 93%; aspect-ratio: 1; max-height: 290px; max-width: 290px; border-radius: 50%; background: #fff8ed6e; }
.soda-hero-art > img { position: relative; display: block; width: 100%; max-width: 405px; height: auto; object-fit: contain; }
.soda-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.soda-category-card { display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 108px; padding: 20px 18px; border: 1px solid var(--soda-line); border-radius: 23px; background: var(--soda-surface); color: var(--soda-ink); box-shadow: 0 3px 0 #20392f03; }
.soda-category-card[href]:hover { border-color: #c49b80; background: var(--soda-raised); transform: translateY(-1px); }
.soda-icon-bubble { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 50%; background: var(--soda-lime); color: var(--soda-ink); }
.soda-icon-bubble svg { display: block; width: 22px; height: 22px; }
.soda-category-card:nth-child(2) .soda-icon-bubble { background: var(--soda-grape); }
.soda-category-card:nth-child(3) .soda-icon-bubble { background: var(--soda-blue); }
.soda-category-copy { min-width: 0; flex: 1; }
.soda-category-copy strong { display: block; font-size: 15px; line-height: 1.5; letter-spacing: -.3px; }
.soda-category-copy small { display: block; font-size: 12px; line-height: 1.7; color: var(--soda-muted); margin-top: 4px; }
.soda-category-card > b { align-self: flex-start; font-weight: 500; color: var(--soda-muted); font-size: 18px; }
.soda-account-links { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 12px; margin-top: 3px; color: var(--soda-muted); }
.soda-account-links a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: underline; text-underline-offset: 4px; }
.soda-stat-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 23px; min-height: 48px; margin: 17px 0 0; font-size: 12px; color: var(--soda-muted); }
.soda-stat-line span { position: relative; white-space: nowrap; }
.soda-stat-line span + span::before { content: ""; display: block; position: absolute; left: -14px; top: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: #b5967c; }
:root[data-theme="dark"] .soda-hero { background: #332923; color: #f0eee2; border-color: #80604d; }
:root[data-theme="dark"] .soda-hero-copy > p,
:root[data-theme="dark"] .soda-hero-note { color: #c7c2b2; }
:root[data-theme="dark"] .soda-hero-art::before { background: #ffbe8e0e; }
:root[data-theme="dark"] .soda-hero::before { background: #ff8b680a; border-color: #ad795b42; }
:root[data-theme="dark"] .soda-hero::after { background: #ffbb8d0b; border-color: #ffbb8d18; }
/* CEFR catalog: color is concentrated in small bubbles, not whole screens. */
:root[data-theme] .academy-page-heading > a { border-radius: 999px; }
:root[data-theme] .academy-page-heading h1 { letter-spacing: -1.1px; }
:root[data-theme] .academy-level-card {
  border-color: var(--soda-line);
  border-radius: 24px;
  background: var(--soda-surface);
  color: var(--soda-ink);
  padding: 23px 24px;
  box-shadow: 0 3px 0 #20392f03;
}
:root[data-theme] .academy-level-card:hover { background: var(--soda-raised); border-color: #c49b80; }
:root[data-theme] .academy-level-card.selected { background: var(--soda-peach); border: 2px solid #d78260; padding: 22px 23px; }
:root[data-theme] .academy-level-code { display: grid; place-items: center; align-self: start; justify-self: start; width: 59px; height: 51px; margin-bottom: 4px; font-size: 29px; border: 1px solid #cfae9580; border-radius: 19px; background: var(--soda-raised); color: var(--soda-ink); }
:root[data-theme] .academy-level-card.selected .academy-level-code { background: var(--soda-surface); }
:root[data-theme] :is(.academy-level-meta, .academy-level-link) { color: var(--soda-muted); }
:root[data-theme] .academy-category-card { background: var(--soda-surface); border-color: var(--soda-line); color: var(--soda-ink); border-radius: 23px; }
:root[data-theme] .academy-category-card:hover { background: var(--soda-raised); border-color: #c49b80; }
:root[data-theme] .academy-category-card .academy-category-icon { border-radius: 50%; background: var(--soda-lime); color: var(--soda-ink); width: 46px; height: 46px; flex-basis: 46px; }
:root[data-theme] .academy-category-card:nth-child(2) .academy-category-icon { background: var(--soda-blue); }
:root[data-theme] .academy-category-card:nth-child(3) .academy-category-icon { background: var(--soda-peach); }
:root[data-theme] .academy-category-card:nth-child(4) .academy-category-icon { background: var(--soda-peach); border: 1px solid #cf9176; }
:root[data-theme] .academy-category-card:nth-child(5) .academy-category-icon { background: var(--soda-grape); }
:root[data-theme] :is(.academy-category-copy small, .academy-category-count, .academy-lesson-category, .academy-lesson-meta, .academy-lesson-progress) { color: var(--soda-muted); }
:root[data-theme] .academy-lesson-row { border-color: var(--soda-line); background: var(--soda-surface); color: var(--soda-ink); border-radius: 21px; padding: 19px 20px; }
:root[data-theme] .academy-lesson-number { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: var(--soda-ink); background: var(--soda-raised); padding: 0; }
:root[data-theme] .academy-lesson-row > button { border-radius: 999px; }
:root[data-theme] :is(.academy-unit-progress, .academy-lesson-track) { height: 6px; background: var(--soda-line); border-radius: 999px; }
:root[data-theme] :is(.academy-unit-progress > span, .academy-lesson-track > span) { background-color: var(--soda-orange); background-image: radial-gradient(circle, #ffffff80 1.3px, transparent 1.5px); background-size: 10px 6px; border-radius: 999px; }
:root[data-theme] :is(.academy-framework, .academy-progress-details) { background: var(--soda-surface); border-color: var(--soda-line); border-radius: 20px; }
:root[data-theme] :is(.academy-framework > summary, .academy-progress-details > summary, .academy-catalog-breadcrumb strong) { color: var(--soda-ink); }
:root[data-theme] :is(.academy-framework p, .academy-framework th, .academy-catalog-breadcrumb, .academy-catalog-toolbar) { color: var(--soda-muted); }
:root[data-theme] :is(.academy-framework th, .academy-framework td) { border-color: var(--soda-line); }
:root[data-theme] :is(.academy-profile-form, .academy-placement-intro, .academy-progress-summary > div) { border-color: var(--soda-line); background: var(--soda-surface); color: var(--soda-ink); border-radius: 24px; }
:root[data-theme] .academy-placement-intro { background: var(--soda-lime); }
:root[data-theme] .academy-progress-summary > div:first-child { background: var(--soda-grape); }
:root[data-theme] :is(.academy-form-help, .academy-unit-label, .academy-production-note, .academy-assessment-note, .roadmap-note, .sub) { color: var(--soda-muted); }
/* Lesson focus remains quiet; the same rounded controls carry the identity. */
:root[data-theme] dialog { background: var(--soda-surface); color: var(--soda-ink); border-color: var(--soda-line); border-radius: 27px; box-shadow: 0 20px 90px #17251b35; }
:root[data-theme] dialog::backdrop { background: #0e211d9c; }
:root[data-theme] dialog .close { background: var(--soda-raised); color: var(--soda-ink); border-color: var(--soda-line); }
:root[data-theme] .academy-answer { border-color: var(--soda-line); background: var(--soda-surface); color: var(--soda-ink); border-radius: 17px; }
:root[data-theme] .academy-answer > span { background: var(--soda-grape); color: var(--soda-ink); border-radius: 50%; }
:root[data-theme] .academy-answer:hover:not(:disabled) { background: var(--soda-raised); border-color: #c49b80; }
:root[data-theme] :is(.academy-context, .academy-reading-passage) { background: var(--soda-raised); color: var(--soda-ink); border-color: #d29b75; }
:root[data-theme] :is(.academy-rule, .academy-model, .academy-transcript, .academy-review-guidance, .academy-checklist, .academy-writing-facts, .academy-speech-panel) { background: var(--soda-raised); color: var(--soda-ink); border-color: var(--soda-line); border-radius: 17px; }
:root[data-theme] :is(.academy-model summary, .academy-transcript summary, .academy-rule summary, .academy-checklist legend) { color: var(--soda-ink); }
:root[data-theme] .academy-listen { background: var(--soda-grape); border-color: #aa94c6; border-radius: 23px; }
:root[data-theme] .academy-listen :is(p, small) { color: var(--soda-ink); }
:root[data-theme] :is(.academy-order-output, .academy-speech-text) { background: var(--soda-lime); color: var(--soda-ink); border-color: #92a36e; }
:root[data-theme] .academy-token { background: var(--soda-grape); color: var(--soda-ink); border-color: #aa94c6; border-radius: 13px; }
:root[data-theme] .academy-checklist input { accent-color: #805b9b; }
:root[data-theme] :is(.academy-writing-meta, .academy-writing-facts small, .academy-review-message, .academy-session-footer) { color: var(--soda-muted); border-color: var(--soda-line); }
:root[data-theme] :is(.academy-feedback, .feedback) { background: var(--soda-grape); color: var(--soda-ink); border-color: #aa94c6; border-radius: 20px; }
:root[data-theme] :is(.academy-feedback.good, .feedback.good) { background: var(--soda-lime); color: var(--soda-ink); border-color: #92a36e; }
:root[data-theme] .academy-feedback.again { background: var(--soda-peach); color: var(--soda-ink); border-color: #cf9176; }
:root[data-theme] .academy-feedback small { color: var(--soda-muted); }
:root[data-theme] .academy-summary-star { background: var(--soda-peach); border-color: #d29b75; border-radius: 50%; color: var(--soda-ink); box-shadow: none; transform: rotate(-5deg); }
/* Supporting vocabulary and personal tools use the same component language. */
:root[data-theme] :is(.vocab-card, .mode, .badge-card, .quest-card, .today-word) { background: var(--soda-surface); color: var(--soda-ink); border-color: var(--soda-line); border-radius: 23px; }
:root[data-theme] .vocab-card:hover { border-color: #c49b80; box-shadow: var(--soda-shadow); }
:root[data-theme] :is(.audio, .save, .quest-icon) { background: var(--soda-lime); color: var(--soda-ink); border-color: var(--soda-line); border-radius: 50%; }
:root[data-theme] .save.saved { background: var(--soda-peach); color: var(--soda-ink); }
:root[data-theme] .sense-tab { border-color: var(--soda-line); background: var(--soda-surface); color: var(--soda-ink); border-radius: 999px; }
:root[data-theme] .sense-tab.selected { background: var(--soda-grape); border-color: #aa94c6; box-shadow: none; }
:root[data-theme] :is(.flash-insights, .word-relations, .relation-chip) { background: var(--soda-raised); border-color: var(--soda-line); color: var(--soda-ink); }
:root[data-theme] .sense-note { color: var(--soda-muted); border-color: var(--soda-line); }
:root[data-theme] :is(.example, .ipa, .word-explore) { color: var(--soda-muted); }
:root[data-theme] .beta-consent,
:root[data-theme] .beta-settings-card { background: var(--soda-surface); color: var(--soda-ink); border-color: var(--soda-line); border-radius: 23px; }
:root[data-theme] .beta-card-icon { display: grid; place-items: center; width: 45px; height: 45px; background: var(--soda-peach); color: var(--soda-ink); border-radius: 50%; }
:root[data-theme] :is(.beta-consent p, .beta-settings-card p, .beta-intro) { color: var(--soda-muted); }
:root[data-theme] .beta-settings-card.beta-danger { border-color: #cc947b; background: var(--soda-peach); }
:root[data-theme] .beta-danger .beta-card-icon { color: var(--soda-ink); background: var(--soda-surface); }
:root[data-theme] :is(.admin-panel, .admin-gate, .admin-metrics > div, .admin-dialog) { border-radius: 20px; }
:root[data-theme] .admin-tabs button { border-radius: 999px; }
:root[data-theme] .admin-tabs button.is-active { background: var(--soda-peach); color: var(--soda-ink); }
:root[data-theme] .admin-brand > span { color: var(--soda-ink); }
/* Public supporting pages and the downloadable identity sheet. */
:root[data-theme] body:not(.study-club):not(.admin-body) :is(.card, .hero, .metric) { border-radius: 23px; }
:root[data-theme] body:not(.study-club):not(.admin-body) .hero { background: var(--soda-peach); border-color: #cf9176; }
.soda-brand-guide { max-width: 1120px; margin: 0 auto; padding: 0 28px 65px; }
.soda-brand-header { max-width: 1120px; margin: 0 auto; padding: 25px 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--soda-line); }
.soda-brand-header > a:last-child { min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; color: var(--soda-muted); }
.soda-brand-guide h1 { font-size: clamp(34px, 5vw, 53px); line-height: 1.18; letter-spacing: -1.9px; max-width: 750px; margin-bottom: 18px; }
.soda-brand-intro { padding: 35px 0 20px; }
.soda-brand-intro .eyebrow { color: var(--soda-muted); }
.soda-brand-intro > p { color: var(--soda-muted); max-width: 760px; line-height: 1.85; }
.soda-brand-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.soda-brand-card { min-width: 0; border: 1px solid var(--soda-line); border-radius: 26px; padding: 27px; background: var(--soda-surface); }
.soda-brand-card > h2 { font-size: 24px; line-height: 1.35; margin-bottom: 13px; letter-spacing: -.7px; }
.soda-brand-card > p { font-size: 14px; line-height: 1.85; color: var(--soda-muted); }
.soda-brand-preview { display: grid; place-items: center; min-height: 180px; padding: 25px; border: 1px solid var(--soda-line); border-radius: 22px; margin: 17px 0; background: var(--soda-raised); }
.soda-brand-preview.is-dark { background: #111b19; border-color: #45574a; }
.soda-brand-preview.is-light { background: #fff8ed; border-color: #dddccf; }
.soda-brand-lockup { display: inline-flex; gap: 12px; align-items: center; color: var(--soda-ink); }
.soda-brand-lockup > img { width: 46px; height: 46px; flex-shrink: 0; }
.soda-brand-lockup .soda-wordmark { font-size: 44px; }
.soda-brand-preview.is-dark .soda-wordmark { color: #edf0e6; }
.soda-brand-preview.is-light .soda-wordmark { color: #20392f; }
.soda-brand-preview > img { display: block; width: 100%; max-width: 300px; height: auto; }
.soda-brand-downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.soda-brand-downloads a { font-size: 12px; min-height: 44px; }
.soda-swatch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.soda-swatch { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.soda-swatch > :is(i, span:first-child) { display: block; min-height: 68px; border-radius: 17px; border: 1px solid #20392f26; }
.soda-swatch strong { font-size: 12px; line-height: 1.5; }
.soda-swatch code { color: var(--soda-muted); font-size: 11px; overflow-wrap: anywhere; }
.soda-brand-guide :is(ul, ol) { padding-left: 20px; color: var(--soda-muted); font-size: 14px; line-height: 1.9; }
.soda-brand-guide .soda-brand-wide { grid-column: 1 / -1; }
/* Responsive layouts keep the brand visible without moving learning controls. */
@media (max-width: 1150px) {
  .soda-hero { padding: 29px; grid-template-columns: minmax(0, 1.18fr) minmax(190px, .82fr); }
  .soda-category-card { gap: 11px; padding: 18px 15px; }
  .soda-category-copy strong { font-size: 14px; }
  .soda-category-copy small, .soda-account-links { font-size: 11px; }
}
@media (max-width: 760px) {
  .study-club > aside > .brand { display: none; }
  :root[data-theme] .study-club > aside { background: var(--soda-surface); border-color: var(--soda-line); }
  :root[data-theme] .study-club nav > a { border-radius: 15px; }
  .soda-nav-icon { width: 21px; height: 21px; flex-basis: 21px; }
  .mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: static;
    width: auto;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0;
    line-height: 1;
    letter-spacing: normal;
  }
  .mobile-brand .soda-brand-mark { width: 30px; height: 30px; border-radius: 10px; }
  .mobile-brand > .soda-wordmark { position: static; display: inline-block; padding: 0; margin: 0; color: var(--soda-ink); background: transparent; font-size: 29px; letter-spacing: -1.6px; font-weight: 850; line-height: 1; transform: none; box-shadow: none; }
  .app > header { padding-left: 14px; padding-right: 14px; gap: 10px; }
  .header-right { flex-wrap: nowrap; max-width: calc(100% - 112px); margin-left: auto; gap: 5px; }
  .header-right #langSwitch { width: 48px; min-width: 45px; max-width: 48px; }
  .header-right .auth-link { min-height: 44px; max-width: 88px !important; font-size: 10px; padding: 6px 8px; }
  #themeToggle { width: 44px; height: 44px; flex-basis: 44px; min-width: 44px; border-radius: 15px; }
  .soda-welcome { margin-bottom: 20px; }
  .soda-welcome h1 { font-size: 28px; letter-spacing: -.9px; }
  .soda-welcome .eyebrow { font-size: 9px; letter-spacing: 1.3px; }
  .soda-welcome > p:last-child { font-size: 13px; }
  .soda-hero { min-height: 0; grid-template-columns: minmax(0, 1fr) 150px; gap: 5px; border-radius: 25px; padding: 24px 22px; margin-bottom: 17px; }
  .soda-hero h2 { font-size: 29px; line-height: 1.2; letter-spacing: -1px; margin-bottom: 15px; }
  .soda-hero-copy > p { font-size: 12px; line-height: 1.8; margin-bottom: 18px; }
  .soda-hero-tags { gap: 9px; margin-bottom: 16px; }
  :root[data-theme] .soda-hero-tags .pill { font-size: 9px; padding: 5px 9px; }
  .soda-hero .primary { min-height: 47px; padding: 12px 17px; font-size: 12px; gap: 15px; }
  .soda-hero-note { font-size: 10px; line-height: 1.8; margin-top: 12px; }
  .soda-hero-art { margin-right: -16px; }
  .soda-hero-art > img { max-width: 185px; width: 185px; }
  .soda-hero-art::before { width: 170px; }
  .soda-category-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .soda-category-card { min-height: 84px; padding: 14px 17px; border-radius: 21px; gap: 14px; }
  .soda-icon-bubble { width: 40px; height: 40px; flex-basis: 40px; }
  .soda-category-copy strong { font-size: 14px; }
  .soda-category-copy small { font-size: 12px; line-height: 1.6; margin-top: 3px; }
  .soda-category-card > b { align-self: center; }
  .soda-account-links { font-size: 12px; margin-top: 0; }
  .soda-stat-line { justify-content: flex-start; gap: 21px; margin-top: 13px; font-size: 11px; }
  .soda-stat-line span + span::before { left: -12px; }
  :root[data-theme] .academy-level-card { padding: 19px 17px; border-radius: 21px; }
  :root[data-theme] .academy-level-card.selected { padding: 18px 16px; }
  :root[data-theme] .academy-level-code { width: 52px; height: 45px; border-radius: 17px; font-size: 26px; }
  :root[data-theme] .academy-category-card { border-radius: 21px; }
  :root[data-theme] .academy-category-card .academy-category-icon { width: 40px; height: 40px; flex-basis: 40px; }
  :root[data-theme] .academy-lesson-row { padding: 16px 13px; border-radius: 19px; }
  :root[data-theme] .academy-lesson-number { width: 25px; height: 25px; font-size: 11px; }
  :root[data-theme] dialog { border-radius: 23px; }
  .soda-brand-header { padding: 18px 20px; }
  .soda-brand-header .soda-wordmark { font-size: 32px; }
  .soda-brand-header .soda-brand-mark { width: 34px; height: 34px; }
  .soda-brand-guide { padding: 0 20px 40px; }
  .soda-brand-intro { padding-top: 27px; }
  .soda-brand-guide h1 { font-size: 37px; letter-spacing: -1.3px; }
  .soda-brand-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .soda-brand-card { padding: 23px; border-radius: 23px; }
  .soda-brand-card > h2 { font-size: 22px; }
}
@media (max-width: 500px) {
  .soda-hero { display: grid; grid-template-columns: minmax(0, 1fr) 96px; column-gap: 5px; padding: 23px 21px 24px; }
  .soda-hero-copy { display: contents; }
  .soda-hero-tags { grid-column: 1 / -1; }
  .soda-hero h2 { grid-column: 1 / -1; max-width: none; font-size: 30px; }
  .soda-hero-copy > p { grid-column: 1; max-width: none; }
  .soda-hero .primary { grid-column: 1; justify-self: start; padding-left: 14px; padding-right: 14px; gap: 10px; }
  .soda-hero-note { grid-column: 1 / -1; }
  .soda-hero-art { grid-column: 2; grid-row: 3 / 5; width: 112px; height: auto; float: none; margin: 0 -13px 0 0; opacity: 1; pointer-events: none; }
  .soda-hero-art > img { width: 150px; max-width: none; flex: 0 0 150px; }
  .soda-hero-art::before { display: none; }
  .soda-hero::before { width: 200px; height: 200px; right: -65px; top: -80px; }
  .soda-brand-preview { min-height: 160px; padding: 20px; }
}
@media (max-width: 360px) {
  .mobile-brand { gap: 5px; }
  .mobile-brand .soda-brand-mark { width: 27px; height: 27px; }
  .mobile-brand > .soda-wordmark { font-size: 27px; letter-spacing: -1.6px; }
  .app > header { padding-left: 11px; padding-right: 11px; gap: 7px; }
  .header-right { max-width: calc(100% - 97px); gap: 4px; }
  .header-right #langSwitch { width: 44px; min-width: 44px; max-width: 44px; padding-left: 5px; padding-right: 5px; }
  .header-right .auth-link { max-width: 80px !important; padding: 6px; font-size: 9px; }
  .soda-welcome h1 { font-size: 26px; }
  .soda-hero h2 { font-size: 28px; max-width: none; }
  .soda-hero { padding: 21px 18px 23px; }
  .soda-hero-art { width: 105px; margin-right: -14px; }
  .soda-hero-art > img { width: 135px; flex-basis: 135px; }
  .soda-category-card { padding: 13px 14px; }
  .soda-stat-line { font-size: 10px; gap: 17px; }
  .soda-stat-line span + span::before { left: -10px; width: 3px; height: 3px; }
  .soda-swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .soda-category-card[href]:hover { transform: none; }
}

/* The opposite-scheme brand previews must remain readable in either page theme. */
:root[data-theme] .soda-brand-guide .soda-brand-preview.is-light { color: #20392f; }
:root[data-theme] .soda-brand-guide .soda-brand-preview.is-light p { color: #536154; }
:root[data-theme] .soda-brand-guide .soda-brand-preview.is-dark { color: #edf0e6; }
:root[data-theme] .soda-brand-guide .soda-brand-preview.is-dark p { color: #b5c0b6; }
.soda-brand-header > .soda-brand-downloads { margin-top: 0; }
:root[data-theme] .brand .soda-wordmark { color: var(--soda-ink); background: transparent; transform: none; box-shadow: none; font-size: 39px; }
:root[data-theme] .switch button { background: var(--soda-surface); color: var(--soda-ink); border-color: var(--soda-line); border-radius: 999px; }
:root[data-theme] .switch button[aria-pressed="true"] { background: var(--soda-orange); color: #20392f; border-color: var(--soda-orange); }
@media (max-width: 375px) {
  .header-right #cloudStatus { display: none !important; }
}
@media (max-width: 760px) {
  :root[data-theme] .brand .soda-wordmark { font-size: 32px; }
}
