/* =========================================================
   Excellence By Adeel Kapasi: SHARED THEME for the Class XI-XII app.
   One file for the colours, the header, the footer and the login page, so every subject looks the same.
   Same identity as the Class IX-X app (apps/ixx/theme.css in excellence-app): teal accent, cool mist page,
   Sindh Board = indigo, AKU-EB = rose. Change a colour here once and the whole app follows.
   Loaded AFTER css/app.css (app.css only uses the tokens below).
   ========================================================= */
:root {
  --brand: #0f766e; --brand-2: #14a392; --brand-soft: #dcf3ef;
  --navy: #0f766e; --navy2: #0b5f58; --head: #053f3a; --ongold: #053f3a;
  --gold: #f2b705; --ink: #14213d; --muted: #5b6b82;
  --bg: #f1f5fa; --card: #ffffff; --card2: #f7f9fc; --soft: #e8eef6; --line: #dde5ef; --info: #e4eefb;
  --ok: #1a8f4d; --okbg: #e6f6ec; --okfg: #12633a; --bad: #c0392b; --badbg: #fdeceb; --badfg: #8d2a20; --dirfg: #8a6200;
  --dykbg: #e8f4ff; --dykbd: #bcdcf7; --chalbg: #fff4d6; --chalbd: #f0d68a; --sumbg: #eef7ee; --sumbd: #bfe0c4;
  --hintbg: #efe7ff; --hintfg: #5b3fb0; --axis: #9fb0c7; --keysh: #b5c3d8; --keyact: #dbe6f6;
  --sb: #3d4fb4; --sb-2: #6272d8; --sb-soft: #e6e9fa; --sb-dark: #1d2a73;
  --aku: #d63a6e; --aku-2: #f0688f; --aku-soft: #fde8ef; --aku-dark: #7d1d44;
  --r: 16px; --shadow: 0 2px 10px rgba(15,42,74,.08);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --hero: radial-gradient(rgba(255,255,255,.10) 1.2px, transparent 1.3px) 0 0 / 22px 22px, linear-gradient(135deg, #053f3a 0%, #0f766e 55%, #14a392 100%);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #5eead4; --brand-2: #99f6e4; --brand-soft: #12332f;
  --navy: #0f766e; --navy2: #5eead4; --head: #bdf3ea; --ongold: #053f3a;
  --ink: #e6edf5; --muted: #9db0c4;
  --bg: #0b1417; --card: #121f24; --card2: #0f1a1e; --soft: #1a2a31; --line: #25363e; --info: #16303a;
  --ok: #79d39b; --okbg: #15301f; --okfg: #9be6b6; --bad: #f08f78; --badbg: #3a1f19; --badfg: #f6b3a2; --dirfg: #f2d684;
  --dykbg: #14303f; --dykbd: #25536b; --chalbg: #3a3016; --chalbd: #6b5a24; --sumbg: #15301f; --sumbd: #2c5a3c;
  --hintbg: #2a2347; --hintfg: #c9b8ff; --axis: #5b7388; --keysh: #0a1215; --keyact: #25404a;
  --sb: #9aa8f0; --sb-2: #b7c1f6; --sb-soft: #1d2447; --aku: #f59ab8; --aku-2: #f9b9cf; --aku-soft: #3d1a28;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}
/* board colours: pages of a board take its colour */
body[data-board="sb"]  { --brand: var(--sb);  --brand-2: var(--sb-2);  --brand-soft: var(--sb-soft);  --navy: #3d4fb4; --head: #1d2a73;
  --hero: radial-gradient(rgba(255,255,255,.10) 1.2px, transparent 1.3px) 0 0 / 22px 22px, linear-gradient(135deg, #1d2a73 0%, #3d4fb4 55%, #6272d8 100%); }
body[data-board="aku"] { --brand: var(--aku); --brand-2: var(--aku-2); --brand-soft: var(--aku-soft); --navy: #d63a6e; --head: #7d1d44;
  --hero: radial-gradient(rgba(255,255,255,.10) 1.2px, transparent 1.3px) 0 0 / 22px 22px, linear-gradient(135deg, #7d1d44 0%, #d63a6e 55%, #f0688f 100%); }
:root[data-theme="dark"] body[data-board="sb"]  { --head: #c9d1fb; --navy2: #b7c1f6; }
:root[data-theme="dark"] body[data-board="aku"] { --head: #fbc9d9; --navy2: #f9b9cf; }

body { background: var(--bg); color: var(--ink); }
.hero { background: var(--hero); color: #fff; border-radius: 22px; padding: 1.4rem 1.2rem; margin-bottom: 1rem; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(242,183,5,.35), transparent 70%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-family: var(--serif); }
.sec, .hero h1 { font-family: var(--serif); }

/* ---------- header (same as the other apps: logo, name, line under the name, theme + account buttons) ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .5rem;
  padding: calc(.5rem + env(safe-area-inset-top)) .75rem .5rem;
  background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--brand); color: var(--ink); }
.brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.brand .bt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand b { font-family: var(--serif); font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand b em { font-style: normal; font-weight: 600; color: #b8860b; font-size: .82em; }
:root[data-theme="dark"] .brand b em { color: var(--gold); }
.brand small { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { flex: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink);
  font-size: 1.15rem; display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; padding: 0; }
.iconbtn:active { background: var(--soft); }
.iconbtn:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.top-actions { display: flex; gap: .4rem; flex: none; }

/* ---------- footer (same as the other apps: brand, the two branches, copyright) ---------- */
.site-footer { max-width: 760px; margin: 2.2rem auto 0; padding: 1.3rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; color: #e4f4f1;
  background: radial-gradient(rgba(255,255,255,.07) 1.2px, transparent 1.3px) 0 0 / 22px 22px, linear-gradient(135deg, #053f3a, #0f766e); }
body.kp-on .site-footer { display: none; }
.f-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.f-brand img { width: 40px; height: 40px; border-radius: 10px; }
.f-brand b { font-family: var(--serif); font-size: 1.15rem; color: #fff; }
.f-brand span { color: #f2d684; font-weight: 600; }
.f-brand small { display: block; color: #b9e0d9; font-size: .8rem; }
.f-locs { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.loc { display: flex; flex-direction: column; text-decoration: none; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px; padding: .7rem .85rem; font-weight: 700; min-height: 48px; }
.loc:hover, .loc:active { background: rgba(255,255,255,.16); }
.loc small { color: #f2d684; font-weight: 500; font-size: .78rem; margin-top: 2px; }
.f-copy { margin: .9rem 0 0; font-size: .75rem; color: #9fd0c7; text-align: center; }
@media (max-width: 420px) { .f-locs { grid-template-columns: 1fr; } }

/* ---------- login / account page (switched off for now: the form is shown but disabled) ---------- */
.auth-wrap { display: grid; place-items: start center; padding: .6rem 0 1rem; }
.auth-card { width: 100%; max-width: 440px; padding: 1.3rem 1.2rem; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line); }
.auth-head { display: flex; gap: .75rem; align-items: center; margin-bottom: .9rem; }
.auth-head img { width: 46px; height: 46px; border-radius: 12px; }
.auth-head h2 { margin: 0; font-family: var(--serif); font-size: 1.3rem; color: var(--head); }
.auth-head p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.auth-form { display: grid; gap: .75rem; }
.fld { display: grid; gap: 5px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.fld input { font: inherit; font-weight: 500; color: var(--ink); background: var(--card2); border: 1.5px solid var(--line); border-radius: 12px; padding: 0 .8rem; height: 48px; width: 100%; }
.fld input:focus { outline: 2px solid var(--brand-2); border-color: transparent; }
.fld input:disabled { opacity: .6; cursor: not-allowed; }
.auth-form .btn:disabled { opacity: .5; cursor: not-allowed; }
.auth-msg { padding: .65rem .8rem; border-radius: 10px; font-size: .9rem; font-weight: 600; }
.auth-msg.info { background: var(--info); color: var(--head); }
.auth-links { display: flex; justify-content: space-between; gap: .6rem; margin-top: .9rem; font-size: .9rem; }
.auth-links a { color: var(--brand); font-weight: 600; text-decoration: none; }
.auth-note { color: var(--muted); font-size: .84rem; margin: .7rem 0 0; }

/* ---------- small shared pieces ---------- */
.card { border: 1px solid var(--line); }
.card .x { color: var(--brand); }
.card.board-sb { border-left: 5px solid var(--sb); } .card.board-aku { border-left: 5px solid var(--aku); }
.kicker { color: #f2d684; }
.themerow { display: flex; gap: .5rem; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) { .card, .btn, .iconbtn { transition: background .15s, border-color .15s, transform .1s; } }

/* ---------- class / board picker ---------- */
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.pick { display: flex; flex-direction: column; gap: .15rem; text-align: left; min-height: 76px; padding: .8rem 1rem; border-radius: var(--r); cursor: pointer;
  background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: var(--shadow); }
.pick b { font-family: var(--serif); font-size: 1.15rem; color: var(--head); }
.pick span { font-size: .85rem; color: var(--muted); }
.pick.on { border-color: var(--brand); background: var(--brand-soft); }
.pick.pk-sb.on { border-color: var(--sb); background: var(--sb-soft); } .pick.pk-aku.on { border-color: var(--aku); background: var(--aku-soft); }
.pick:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.btn.light { background: #fff; color: #053f3a; margin-top: .8rem; } .btn:disabled { opacity: .45; cursor: not-allowed; }
.pick[data-g="cls"].on { border-color: #0f766e; background: #dcf3ef; }
:root[data-theme="dark"] .pick[data-g="cls"].on { border-color: #5eead4; background: #12332f; }

/* ---------- home page (same pieces as the IX-X app) ---------- */
.acct-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; padding: .55rem .9rem; margin-bottom: .8rem; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: .88rem; }
.acct-strip span { margin-right: auto; } .acct-strip a { color: var(--brand); font-weight: 700; text-decoration: none; }
.acct-strip.notice { background: var(--brand-soft); border-color: var(--brand); }
.home-hero h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); margin-bottom: .4rem; }
.home-hero .wordmark { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: #fff; margin-bottom: .8rem; }
.home-hero .wordmark img { width: 34px; height: 34px; border-radius: 10px; } .home-hero .wordmark span { color: #f2d684; font-weight: 600; }
.cta-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.btn.outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 1.6rem 0 .7rem; } .section-title h2 { margin: 0; font-size: 1.35rem; color: var(--head); font-family: var(--serif); }
.muted-note { color: var(--muted); font-size: .85rem; text-align: center; margin-top: 1.1rem; }
.subject-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.subject-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.subject-card:active { transform: scale(.99); }
.subject-card .band { height: 84px; position: relative; display: flex; align-items: flex-end; padding: 0 1.1rem .8rem; color: #fff; }
.subject-card .band .code { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .92; }
.subject-card .band .icon { position: absolute; right: 1rem; bottom: -26px; width: 58px; height: 58px; border-radius: 18px; background: var(--card); display: grid; place-items: center; font-size: 1.8rem; box-shadow: var(--shadow); }
.band-sb { background: radial-gradient(rgba(255,255,255,.14) 1.2px, transparent 1.3px) 0 0 / 22px 22px, linear-gradient(135deg, #1d2a73, #4a5dd0); }
.band-aku { background: radial-gradient(rgba(255,255,255,.14) 1.2px, transparent 1.3px) 0 0 / 22px 22px, linear-gradient(135deg, #7d1d44, #e8527f); }
.band-soon { background: linear-gradient(135deg, #5b6474, #8a94a6); }
.subject-card .body { padding: 1.1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.subject-card h3 { font-size: 1.35rem; margin: 0; font-family: var(--serif); color: var(--head); } .subject-card p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.subject-card .meta { display: flex; gap: .35rem; flex-wrap: wrap; }
.subject-card .open { margin-top: auto; padding-top: .3rem; font-weight: 700; color: var(--brand); font-size: .92rem; }
.subject-card.is-soon { opacity: .78; } .subject-card.is-soon .open { color: var(--muted); }
.badge { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); color: var(--muted); }
.badge.ready { background: var(--okbg); color: var(--ok); border-color: transparent; }
.prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; } .prog i { display: block; height: 100%; background: var(--gold); }
.mlabel { color: var(--muted); font-size: .76rem; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.how > div { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1rem; }
.how .n { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; margin-bottom: .5rem; }
.how h4 { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 .25rem; color: var(--head); } .how p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
@media (max-width: 640px) { .how { grid-template-columns: 1fr; } }
