/* PRO360 Kids — one stylesheet, three moods:
   .shell-kid    big, colourful, high-contrast targets for small fingers
   .shell-parent calm and readable
   .shell-admin  dense and neutral, built for scanning tables            */

:root {
  --ink:        #1E2233;
  --ink-soft:   #5A6079;
  --ink-faint:  #8B90A6;
  --line:       #E4E7F0;
  --bg:         #F6F7FB;
  --card:       #FFFFFF;

  --purple: #6C5CE7;
  --purple-d:#5546CE;
  --green:  #00B894;
  --blue:   #0984E3;
  --orange: #E17055;
  --red:    #D63031;
  --yellow: #FDCB6E;
  --teal:   #00CEC9;

  --radius:   14px;
  --radius-l: 22px;
  --shadow:   0 1px 2px rgba(30,34,51,.06), 0 8px 24px rgba(30,34,51,.06);
  --shadow-l: 0 12px 40px rgba(30,34,51,.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1rem; }

.wrap      { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-wide { max-width: 1400px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-slim { max-width: 460px;  margin: 0 auto; padding: 0 1.25rem; }

.muted   { color: var(--ink-soft); }
.faint   { color: var(--ink-faint); font-size: .85rem; }
.center  { text-align: center; }
.right   { text-align: right; }
.mt      { margin-top: 1.25rem; }
.mt-2    { margin-top: 2.25rem; }
.mb      { margin-bottom: 1.25rem; }
.nowrap  { white-space: nowrap; }
/* Wraps like .row-between does. Without it a file input — which carries a wide
   intrinsic minimum — pushes its sibling button past the viewport on phones,
   scrolling the whole page sideways. */
.row     { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
/* Inputs carry width:100%, which would claim the whole row and bump a sibling
   button onto its own line. Let them shrink instead, down to a floor that still
   fits a word or two — below that, wrapping is genuinely the better layout. */
.row > input, .row > select { flex: 1 1 12rem; min-width: 0; }
/* File inputs ignore the usual box sizing and report their own width. */
input[type="file"] { max-width: 100%; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack   { display: flex; flex-direction: column; gap: 1rem; }

/* ------------------------------------------------------------------ header */

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.topbar-in { display: flex; align-items: center; gap: 1.25rem; height: 62px; }
.brand {
  font-weight: 800; font-size: 1.2rem; color: var(--ink);
  display: flex; align-items: center; gap: .5rem; letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.brand-logo { height: 38px; width: auto; display: block; }
/* The wordmark's navy is invisible on the dark admin bar, and no filter makes
   near-black legible there — so give it a light plate to sit on instead. */
.shell-admin .brand-logo {
  height: 30px; background: #fff; border-radius: 9px; padding: 4px 9px;
}
.nav { display: flex; gap: .35rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a, .nav button.linklike {
  padding: .45rem .75rem; border-radius: 9px; color: var(--ink-soft);
  font-size: .92rem; font-weight: 500;
}
.nav a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.nav a.on { background: #EFECFE; color: var(--purple-d); font-weight: 600; }

.lang-pill {
  border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem;
  font-size: .82rem; font-weight: 600; color: var(--ink-soft); background: var(--card);
}
.lang-pill:hover { border-color: var(--purple); color: var(--purple); text-decoration: none; }

/* ------------------------------------------------------------------ layout */

/* padding-block, not the shorthand: `.page` shares an element with `.wrap*`,
   and a shorthand here silently zeroes the wrap's side padding — which is what
   pushed page content flush against the edge of the white sheet. */
.page { padding-block: 2rem 4rem; }
.page-head { margin-bottom: 1.5rem; }
.page-head h1 { margin-bottom: .15rem; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
}
.card-flat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card h3 { margin-bottom: .75rem; }

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
/* auto-fill, not auto-fit: a subject with a single game keeps a card-sized
   card instead of stretching across the whole row. */
.grid-games { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }

/* ------------------------------------------------------------------ button */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .6rem 1.15rem; border-radius: 10px; border: 1px solid transparent;
  background: var(--purple); color: #fff; font-weight: 600; font-size: .93rem;
  font-family: var(--font); cursor: pointer; transition: .15s ease;
}
.btn:hover { background: var(--purple-d); text-decoration: none; color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); border-color: var(--ink-faint); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #B02525; }
.btn-green { background: var(--green); }
.btn-green:hover { background: #009B7D; }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: .85rem 1.7rem; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------- forms */

label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], select, textarea {
  width: 100%; padding: .62rem .8rem; border: 1px solid var(--line);
  border-radius: 10px; font-size: .95rem; font-family: var(--font);
  color: var(--ink); background: var(--card);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(108,92,231,.14);
}
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; color: var(--ink); }
.check input { width: auto; }
.hint { font-size: .8rem; color: var(--ink-faint); margin-top: .25rem; }

/* ------------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th {
  text-align: left; padding: .7rem .9rem; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-faint); background: #FAFBFD;
  border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 700;
}
td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFBFD; }

/* ------------------------------------------------------------------ badges */

.tag {
  display: inline-block; padding: .18rem .55rem; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .01em;
  background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line);
}
.tag-green  { background: #E4F8F2; color: #007F68; border-color: #BFEDE0; }
.tag-blue   { background: #E5F2FD; color: #06639F; border-color: #C4E1FA; }
.tag-orange { background: #FDEDE7; color: #B84A2E; border-color: #F8D6C9; }
.tag-red    { background: #FDEAEA; color: #A82121; border-color: #F8CFCF; }
.tag-purple { background: #EFECFE; color: var(--purple-d); border-color: #DCD6FC; }
.tag-grey   { background: #F0F1F5; color: var(--ink-faint); }

/* ------------------------------------------------------------------- flash */

.flash {
  padding: .8rem 1.1rem; border-radius: 11px; margin-bottom: 1rem;
  font-size: .92rem; font-weight: 500; border: 1px solid;
}
.flash-success { background: #E4F8F2; color: #00755F; border-color: #BFEDE0; }
.flash-error   { background: #FDEAEA; color: #A82121; border-color: #F8CFCF; }
.flash-warn    { background: #FEF6E3; color: #97690A; border-color: #FAE7BC; }

/* -------------------------------------------------------------- stat tiles */

.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
}
.stat-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em;
              color: var(--ink-faint); font-weight: 700; margin-bottom: .3rem; }
.stat-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat-sub   { font-size: .8rem; color: var(--ink-faint); margin-top: .2rem; }

/* ------------------------------------------------------------------- bars */

.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--purple); border-radius: 999px; transition: width .5s ease; }
.bar-green > span { background: var(--green); }

.spark { display: flex; align-items: flex-end; gap: 5px; height: 90px; }
.spark-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.spark-bar { width: 100%; background: var(--purple); border-radius: 6px 6px 2px 2px; min-height: 3px; opacity: .85; }
.spark-lab { font-size: .68rem; color: var(--ink-faint); }

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

.hero { padding: 4rem 0 3rem; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); max-width: 20ch; margin: 0 auto 1rem; }
.hero p  { font-size: 1.1rem; color: var(--ink-soft); max-width: 60ch; margin: 0 auto 2rem; }
.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero-emoji { font-size: 3rem; letter-spacing: .4rem; margin-bottom: 1rem; }
.hero-logo { width: min(430px, 80vw); height: auto; margin: 0 auto 1.5rem; display: block; }

.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.feat-icon { font-size: 1.8rem; margin-bottom: .5rem; }
.feat h3 { font-size: 1.02rem; }
.feat p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

.section { padding: 3rem 0; }
.section-head { text-align: center; margin-bottom: 2rem; }

.plan {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 1.6rem; display: flex; flex-direction: column; position: relative;
}
.plan-hi { border-color: var(--purple); border-width: 2px; box-shadow: var(--shadow-l); }
.plan-flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--purple); color: #fff; font-size: .72rem; font-weight: 800;
  padding: .25rem .8rem; border-radius: 999px; letter-spacing: .03em; white-space: nowrap;
}
.plan-price { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; margin: .4rem 0 0; }
.plan-per { font-size: .85rem; color: var(--ink-faint); margin-bottom: 1rem; }
.plan-feats { list-style: none; padding: 0; margin: 0 0 1.4rem; flex: 1; }
.plan-feats li { padding: .3rem 0 .3rem 1.5rem; position: relative; font-size: .9rem; color: var(--ink-soft); }
.plan-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

/* -------------------------------------------------------------- kid shell */

.shell-kid { background: linear-gradient(170deg, #EFECFE 0%, #F6F7FB 42%); min-height: 100vh; }
.shell-kid .topbar { background: rgba(255,255,255,.88); backdrop-filter: blur(10px); }

.kid-hello { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.kid-avatar {
  width: 66px; height: 66px; border-radius: 20px; background: var(--card);
  display: grid; place-items: center; font-size: 2.1rem; box-shadow: var(--shadow);
  border: 2px solid #fff;
}
.kid-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }

.kid-stats { display: flex; gap: .6rem; flex-wrap: wrap; }
.kid-stat {
  background: var(--card); border-radius: 999px; padding: .4rem .95rem;
  font-weight: 700; font-size: .9rem; box-shadow: var(--shadow); display: flex;
  align-items: center; gap: .35rem; border: 1px solid rgba(255,255,255,.7);
}

.subject-head {
  display: flex; align-items: center; gap: .6rem; margin: 2rem 0 .9rem;
  font-size: 1.05rem; font-weight: 800; color: var(--ink);
}
.subject-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.game-card {
  background: var(--card); border-radius: var(--radius-l); padding: 1.15rem;
  box-shadow: var(--shadow); border: 2px solid transparent; position: relative;
  display: flex; flex-direction: column; transition: .18s ease; text-decoration: none;
  color: inherit; overflow: hidden;
}
a.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-l); text-decoration: none; }
.game-card.locked { opacity: .62; }
.game-icon {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.7rem; margin-bottom: .7rem; color: #fff;
}
.game-title { font-weight: 800; font-size: 1.02rem; margin-bottom: .15rem; }
.game-desc  { font-size: .82rem; color: var(--ink-soft); margin-bottom: .9rem; flex: 1; }
.game-foot  { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.game-stars { letter-spacing: .1rem; font-size: .95rem; }
.lock-flag {
  position: absolute; top: .8rem; right: .8rem; background: var(--bg);
  border-radius: 999px; padding: .2rem .6rem; font-size: .72rem; font-weight: 700;
  color: var(--ink-faint); border: 1px solid var(--line);
}

.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.1rem; }
.pick-card {
  background: var(--card); border-radius: var(--radius-l); padding: 1.6rem 1rem;
  text-align: center; box-shadow: var(--shadow); transition: .18s ease; color: inherit;
  border: 2px solid transparent;
}
.pick-card:hover { transform: translateY(-4px); border-color: var(--purple); text-decoration: none; box-shadow: var(--shadow-l); }
.pick-avatar { font-size: 3rem; margin-bottom: .4rem; }
.pick-name { font-weight: 800; font-size: 1.1rem; }

/* ---------------------------------------------------------------- gameplay */

.play-shell { max-width: 720px; margin: 0 auto; padding: 1.25rem; }
.play-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.play-progress { flex: 1; height: 12px; background: rgba(255,255,255,.7); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.06); }
.play-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--purple), var(--teal)); border-radius: 999px; transition: width .35s ease; }
.play-count { font-weight: 800; font-size: .92rem; color: var(--ink-soft); white-space: nowrap; }

.q-card {
  background: var(--card); border-radius: 26px; padding: 2rem 1.75rem;
  box-shadow: var(--shadow-l); text-align: center;
}
.q-media { font-size: 2.6rem; line-height: 1.35; margin-bottom: 1rem; word-break: break-word; }
.q-media.counting { font-size: 2rem; letter-spacing: .35rem; }
.q-prompt { font-size: 1.32rem; font-weight: 700; margin-bottom: 1.6rem; line-height: 1.4; }

.choices { display: grid; gap: .75rem; }
.choices.two-up { grid-template-columns: 1fr 1fr; }
.choice {
  padding: 1.05rem 1rem; border-radius: 16px; border: 2px solid var(--line);
  background: var(--card); font-size: 1.08rem; font-weight: 700; cursor: pointer;
  font-family: var(--font); color: var(--ink); transition: .12s ease; text-align: center;
}
.choice:hover:not(:disabled) { border-color: var(--purple); background: #FBFAFF; }
.choice.picked   { border-color: var(--purple); background: #EFECFE; }
.choice.right    { border-color: var(--green); background: #E4F8F2; color: #00674F; }
.choice.wrong    { border-color: var(--red); background: #FDEAEA; color: #A82121; }
.choice:disabled { cursor: default; }

.type-input {
  font-size: 1.5rem; text-align: center; padding: .9rem; font-weight: 700;
  letter-spacing: .02em; border-radius: 14px; border-width: 2px;
}

.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.match-col { display: grid; gap: .6rem; }
.match-item {
  padding: .85rem .6rem; border-radius: 14px; border: 2px solid var(--line);
  background: var(--card); font-weight: 800; font-size: 1.05rem; cursor: pointer;
  font-family: var(--font); color: var(--ink); transition: .12s ease;
}
.match-item:hover:not(:disabled) { border-color: var(--purple); }
.match-item.sel  { border-color: var(--purple); background: #EFECFE; }
.match-item.done { border-color: var(--green); background: #E4F8F2; color: #00674F; cursor: default; }
.match-item:disabled { cursor: default; }

.feedback { margin-top: 1.25rem; font-size: 1.05rem; font-weight: 800; min-height: 1.6rem; }
.feedback.ok  { color: var(--green); }
.feedback.no  { color: var(--red); }
.feedback small { display: block; font-weight: 600; color: var(--ink-soft); font-size: .85rem; margin-top: .2rem; }

/* ----------------------------------------------------------------- results */

.result-card {
  background: var(--card); border-radius: 26px; padding: 2.4rem 1.75rem;
  box-shadow: var(--shadow-l); text-align: center; max-width: 480px; margin: 2rem auto;
}
.result-stars { font-size: 3rem; letter-spacing: .35rem; margin-bottom: .6rem; }
.result-score { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.result-rewards { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin: 1.4rem 0; }
.reward {
  background: var(--bg); border-radius: 14px; padding: .65rem 1rem; font-weight: 800;
  font-size: .95rem; border: 1px solid var(--line);
}
.reward small { display: block; font-size: .7rem; color: var(--ink-faint); font-weight: 700;
                text-transform: uppercase; letter-spacing: .04em; }
.unlock-note {
  background: #E4F8F2; color: #00674F; border-radius: 12px; padding: .75rem;
  font-weight: 700; margin-bottom: 1rem; border: 1px solid #BFEDE0;
}
.badge-pop {
  background: #FEF6E3; border: 1px solid #FAE7BC; color: #8A5F05; border-radius: 12px;
  padding: .75rem; font-weight: 700; margin-bottom: .6rem;
}
.badge-chip {
  display: inline-flex; flex-direction: column; align-items: center; gap: .2rem;
  width: 78px; padding: .6rem .3rem; border-radius: 14px; background: var(--card);
  border: 1px solid var(--line); text-align: center;
}
.badge-chip .ic { font-size: 1.5rem; }
.badge-chip .nm { font-size: .65rem; font-weight: 700; color: var(--ink-soft); line-height: 1.2; }
.badge-chip.off { opacity: .32; filter: grayscale(1); }

/* ----------------------------------------------------------- competitions */

.comp-card {
  background: var(--card); border-radius: var(--radius-l); padding: 1.2rem;
  box-shadow: var(--shadow); border: 2px solid transparent; display: flex;
  flex-direction: column; gap: .6rem; color: inherit; transition: .18s ease;
}
a.comp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-l); text-decoration: none; }
.comp-card.closed { opacity: .62; }
.comp-head { display: flex; align-items: center; gap: .7rem; }
.comp-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.45rem; color: #fff; flex: none;
}
.comp-title { font-weight: 800; font-size: 1.02rem; line-height: 1.25; }
.comp-meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

.code-chip {
  display: inline-flex; align-items: center; gap: .5rem; font-family: ui-monospace,
  SFMono-Regular, Menlo, monospace; font-weight: 800; font-size: 1.35rem;
  letter-spacing: .22em; background: #EFECFE; color: var(--purple-d);
  border: 2px dashed #C9C0FA; border-radius: 14px; padding: .7rem 1.1rem;
}
.code-chip.small { font-size: .95rem; letter-spacing: .14em; padding: .3rem .6rem;
                   border-style: solid; border-width: 1px; }

.board { width: 100%; border-collapse: collapse; }
.board th { background: transparent; border-bottom: 1px solid var(--line); }
.board td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); }
.board tr.me td { background: #EFECFE; }
.board tr.me td:first-child { border-radius: 10px 0 0 10px; }
.board tr.me td:last-child  { border-radius: 0 10px 10px 0; }
.rank-pill {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 999px; font-weight: 800; font-size: .85rem;
  background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line);
}
.rank-1 { background: #FEF3C7; color: #92660A; border-color: #FBDF8A; }
.rank-2 { background: #EDF0F5; color: #55617A; border-color: #DBE0EA; }
.rank-3 { background: #FBEADF; color: #96551F; border-color: #F3D6C0; }

.notif-dot {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff;
  font-size: .72rem; font-weight: 800; margin-left: .1rem;
}
.comp-card.unread { border-color: var(--purple); background: #FBFAFF; }

.comp-banner {
  background: linear-gradient(135deg, var(--purple), var(--teal)); color: #fff;
  border-radius: var(--radius-l); padding: 1.3rem 1.5rem; margin-bottom: 1.25rem;
}
.comp-banner h1, .comp-banner h2 { color: #fff; margin-bottom: .2rem; }
.comp-banner p { color: rgba(255,255,255,.9); margin: 0; font-size: .92rem; }

.locked-feature {
  background: var(--card); border: 2px dashed var(--line); border-radius: var(--radius-l);
  padding: 2.5rem 1.5rem; text-align: center;
}

/* ------------------------------------------------------------ admin shell */

.shell-admin { background: #F4F5F9; }
.shell-admin .topbar { background: var(--ink); border-bottom-color: #2C3145; }
.shell-admin .brand { color: #fff; }
.shell-admin .nav a { color: #A9AFC6; }
.shell-admin .nav a:hover { background: #2C3145; color: #fff; }
.shell-admin .nav a.on { background: var(--purple); color: #fff; }
.shell-admin .lang-pill { background: transparent; border-color: #3A4058; color: #A9AFC6; }
/* The admin bar carries nine sections; tighten it so it stays on one line on a
   laptop, and wrap cleanly below that rather than colliding. */
.shell-admin .nav { gap: .1rem; row-gap: .35rem; }
.shell-admin .nav a { padding: .35rem .5rem; font-size: .82rem; }
@media (max-width: 1280px) {
  .shell-admin .nav a { padding: .3rem .42rem; font-size: .77rem; }
}

.admin-title { display: flex; align-items: center; gap: .6rem; }
.admin-title .tag { background: var(--purple); color: #fff; border-color: var(--purple); }

/* ------------------------------------------------------------------ footer */

.footer {
  border-top: 1px solid var(--line); padding: 2rem 0; margin-top: 3rem;
  font-size: .85rem; color: var(--ink-faint);
}

/* ------------------------------------------------------------------ mobile */

@media (max-width: 640px) {
  h1 { font-size: 1.55rem; }
  .topbar-in { height: auto; padding: .6rem 0; flex-wrap: wrap; }
  .nav { width: 100%; margin-left: 0; }
  .nav a { padding: .4rem .55rem; font-size: .86rem; }
  .field-row { grid-template-columns: 1fr; }
  .choices.two-up { grid-template-columns: 1fr; }
  .q-card { padding: 1.5rem 1.15rem; }
  .q-prompt { font-size: 1.15rem; }
  .page { padding-block: 1.25rem 3rem; }
}

@media print {
  .topbar, .footer, .btn { display: none; }
}

/* ---- subject picking on the plans page ---------------------------------- */
.tier-head { margin: 1.5rem 0 .75rem; }
.subject-chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .5rem; }
.pick-subjects { margin: .75rem 0; display: flex; flex-direction: column; gap: .3rem; }
.pick-label { font-weight: 700; font-size: .85rem; display: flex; justify-content: space-between; gap: .5rem; }
.pick-subjects .check { font-size: .85rem; font-weight: 500; display: flex; gap: .4rem; align-items: baseline; }
/* A disabled box means "you have picked enough", not "this is unavailable" —
   fade the label so it reads as a limit rather than a fault. */
.pick-subjects input:disabled + * , .pick-subjects .check:has(input:disabled) { opacity: .5; }
