/* Mr Ova's Teaching Portal : shared look for the home page and every subject page.
   Offline: system fonts only, no external files. */
:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --ink: #2f3a48;
  --muted: #7a8494;
  --line: #e6e3dc;
  --mint: #dcf1e6;   --mint-d: #2f6b55;
  --lilac: #e8e3f6;  --lilac-d: #5a4a8c;
  --peach: #fbe4d6;  --peach-d: #9a5632;
  --sky: #dcedf8;    --sky-d: #2e6286;
  --butter: #f8f0d2; --butter-d: #8a7322;
  --rose: #f6dfe8;   --rose-d: #8c3e62;
  --radius: 18px;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171a20; --paper: #1f232b; --ink: #e7eaf0; --muted: #9aa3b2; --line: #2e333d;
    --mint: #1f3a2f;   --mint-d: #9fdcbf;
    --lilac: #2c2742;  --lilac-d: #c8bdf0;
    --peach: #3d2a20;  --peach-d: #f2bf9e;
    --sky: #1d3141;    --sky-d: #a6d2f0;
    --butter: #3a3420; --butter-d: #ecd88e;
    --rose: #3b2430;   --rose-d: #f0b3cc;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* masthead */
.mast { padding-top: 56px; padding-bottom: 28px; }
.mast .kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.mast h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.02; margin: 0; font-weight: 750; letter-spacing: -.02em; }
.mast h1.two-line .owner { display: block; font-weight: 400; color: var(--muted); letter-spacing: -.01em; }
.mast h1 .dot { display: inline-block; width: .32em; height: .32em; border-radius: 50%; background: var(--mint-d); margin-left: .08em; vertical-align: baseline; }
.mast p.lead { color: var(--muted); font-size: 17px; max-width: 620px; margin: 14px 0 0; }
.crumb { font-size: 14px; color: var(--muted); margin: 28px 0 0; }
.crumb a { text-decoration: none; border-bottom: 1px solid var(--line); }
.crumb a:hover { color: var(--ink); }
.crumb a.home-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px 7px 13px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--paper); color: var(--ink); font-weight: 600; transition: border-color .15s, transform .15s; }
.crumb a.home-btn:hover { border-color: var(--muted); transform: translateX(-2px); }
.crumb a.home-btn span { color: var(--muted); }

/* subject cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; padding: 10px 0 40px; }
.card { position: relative; display: flex; flex-direction: column; min-height: 230px; padding: 22px 22px 20px; border-radius: var(--radius);
  background: var(--tint); color: var(--ink); text-decoration: none; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
a.card:hover, a.card:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(40, 50, 70, .10); outline: none; }
.card .glyph { position: absolute; right: -6px; bottom: -22px; font-size: 118px; font-weight: 800; line-height: 1; color: var(--deep); opacity: .13;
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace; letter-spacing: -.04em; pointer-events: none; user-select: none; }
.card .board { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--deep); font-weight: 650; }
.card h2 { font-size: 24px; line-height: 1.15; margin: 8px 0 4px; font-weight: 720; }
.card .code { font-size: 15px; color: var(--deep); font-weight: 650; }
.card .note { font-size: 14px; color: var(--ink); opacity: .78; margin-top: 10px; max-width: 85%; }
.card .go { margin-top: auto; padding-top: 18px; font-size: 14px; font-weight: 650; color: var(--deep); }
.card .go::after { content: " \2192"; }
.card.soon { opacity: .62; }
.card.soon .go { color: var(--muted); }
.card.soon .go::after { content: ""; }
.t-mint { --tint: var(--mint); --deep: var(--mint-d); }
.t-lilac { --tint: var(--lilac); --deep: var(--lilac-d); }
.t-peach { --tint: var(--peach); --deep: var(--peach-d); }
.t-sky { --tint: var(--sky); --deep: var(--sky-d); }
.t-butter { --tint: var(--butter); --deep: var(--butter-d); }
.t-rose { --tint: var(--rose); --deep: var(--rose-d); }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 22px; padding-bottom: 40px; font-size: 13.5px; color: var(--muted); }
.foot { border-top: 0; }
.foot::before { content: ''; display: block; border-top: 1px solid var(--line); margin: -22px 0 22px; }
.foot b { color: var(--ink); font-weight: 650; }
.foot p { margin: 0 0 6px; max-width: 760px; }

/* subject page */
.bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 6px 0 18px; }
.tabs { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 4px; }
.tabs button { font: inherit; font-size: 14px; border: 0; background: transparent; color: var(--muted); padding: 7px 16px; border-radius: 99px; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.search { flex: 1 1 220px; max-width: 320px; font: inherit; font-size: 14px; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.progress { font-size: 13.5px; color: var(--muted); }
.section { margin: 26px 0 0; }
.section h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 650; }
.units { display: grid; gap: 10px; }
.unit { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; }
.unit .num { font-weight: 750; font-size: 20px; color: var(--deep); background: var(--tint); border-radius: 10px; text-align: center; padding: 8px 0; }
.unit .ttl { font-weight: 650; font-size: 16px; margin: 2px 0 4px; }
.unit .meta { font-size: 13px; color: var(--muted); }
.unit .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.unit .links a { font-size: 13.5px; text-decoration: none; padding: 6px 12px; border-radius: 99px; background: var(--tint); color: var(--deep); font-weight: 600; }
.unit .links a:hover, .unit .links a:focus-visible { outline: 2px solid var(--deep); outline-offset: 1px; }
.unit .links a small { font-weight: 500; opacity: .75; }
.unit.todo { background: transparent; border-style: dashed; }
.unit.todo .num { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.unit.todo .ttl { color: var(--muted); font-weight: 550; }
.empty { color: var(--muted); font-size: 14px; padding: 20px 0; }

@media (max-width: 560px) {
  .mast { padding-top: 34px; }
  .unit { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .unit .num { font-size: 16px; }
  .card { min-height: 200px; }
}
@media print { .tabs, .search, .card .glyph { display: none; } }

/* teaching tracker (assets/tracker.js): unit status colours, legend, teacher bar.
   Students see the colours read-only; teacher mode (?teacher) makes the numbers clickable. */
:root { --amber: #fbe3b4; --amber-d: #8a5a12; --green: #cdebd3; --green-d: #23663a; }
@media (prefers-color-scheme: dark) { :root { --amber: #4a3818; --amber-d: #f5cf85; --green: #1e4029; --green-d: #a5e0b4; } }
.unit .num { position: relative; }
button.num { font: inherit; font-weight: 750; font-size: 20px; width: 100%; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, transform .1s; }
button.num:hover { transform: scale(1.04); }
button.num:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.unit .num.s-working, .unit.todo .num.s-working { background: var(--amber); color: var(--amber-d); border: 1px solid var(--amber-d); }
.unit .num.s-covered, .unit.todo .num.s-covered { background: var(--green); color: var(--green-d); border: 1px solid var(--green-d); }
.unit .num.s-working::after, .unit .num.s-covered::after { position: absolute; top: -7px; right: -7px; width: 16px; height: 16px; border-radius: 50%;
  font-size: 10px; line-height: 16px; font-weight: 800; color: var(--paper); }
.unit .num.s-working::after { content: '\2022'; background: var(--amber-d); }
.unit .num.s-covered::after { content: '\2713'; background: var(--green-d); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; color: var(--muted); margin: -6px 0 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--line); }
.legend .lw { background: var(--amber); border-color: var(--amber-d); }
.legend .lc { background: var(--green); border-color: var(--green-d); }
.legend b { color: var(--ink); font-weight: 650; }
.tbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  max-width: calc(100% - 32px); padding: 8px 8px 8px 14px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 8px 26px rgba(40, 50, 70, .14); font-size: 13.5px; }
.tbar.dirty { border-color: var(--amber-d); }
.tbar-tag { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.tbar-msg { color: var(--ink); }
.tbar button { font: inherit; font-size: 13.5px; font-weight: 650; border: 0; border-radius: 99px; padding: 7px 14px; cursor: pointer; background: var(--ink); color: var(--bg); }
.tbar button.ghost { background: transparent; color: var(--muted); }
.tbar button.ghost:hover { color: var(--ink); }
@media (max-width: 560px) { button.num { font-size: 16px; } .tbar { border-radius: 16px; } }
@media print { .legend, .tbar { display: none; } }

/* unit resource chips (subject page): Teach / Students / Marking rows */
.unit .links { align-items: center; margin-top: 8px; }
.unit .links + .links { margin-top: 6px; }
.unit .lk { width: 64px; flex: none; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.chip { display: inline-flex; align-items: stretch; border-radius: 99px; background: var(--tint); color: var(--deep); overflow: hidden; font-size: 13.5px; }
.chip b { padding: 6px 4px 6px 12px; font-weight: 650; }
.unit .links .chip a { background: transparent; border-radius: 0; padding: 6px 10px; font-weight: 600; color: var(--deep); text-decoration: none; }
.unit .links .chip a + a { box-shadow: inset 1px 0 0 var(--paper); }
.unit .links .chip a.main { padding-left: 12px; font-weight: 650; }
.unit .links .chip a:last-child { padding-right: 12px; }
.unit .links .chip a:hover, .unit .links .chip a:focus-visible { background: var(--deep); color: var(--tint); outline: none; }
.chip.ms { background: transparent; box-shadow: inset 0 0 0 1px var(--deep); }
.unit .links .chip.ms a + a, .unit .links .chip.ms b + a { box-shadow: none; }
@media (max-width: 560px) { .unit .lk { width: 100%; } }
.chip b, .chip a, .tbar span { white-space: nowrap; }
.tbar.warn { border-color: var(--rose-d); }
.tbar.warn .tbar-msg { color: var(--rose-d); }
.tbar-msg { max-width: 560px; }
.tbar { flex-wrap: nowrap; width: max-content; max-width: calc(100% - 32px); }
.tbar-msg { white-space: normal !important; }
@media (max-width: 560px) { .tbar { flex-wrap: wrap; } }

/* ---------------------------------------------------------------------
   Flex1 home page (/index.php) and the KS3 page (/learn/ks3/ and /teach/ks3/).
   Added in phase 5. Only new class names, so nothing above changes for the
   portal's own pages. This file is the one copy of the portal's look:
   the website serves static/portal.css for every request for assets/portal.css.
   --------------------------------------------------------------------- */
.topnav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 10px; padding-top: 18px; font-size: 14px; }
.topnav .who { color: var(--muted); margin-right: 4px; }
.topnav a, .topnav button { font: inherit; font-weight: 600; text-decoration: none; padding: 7px 16px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); cursor: pointer; transition: border-color .15s; }
.topnav a:hover, .topnav button:hover, .topnav a:focus-visible, .topnav button:focus-visible { border-color: var(--muted); outline: none; }
.topnav a.solid { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.topnav form { margin: 0; display: inline; }
.topnav + .mast { padding-top: 34px; }
.card .go a { color: var(--deep); font-weight: 650; text-decoration: none; border-bottom: 1px solid currentColor; }
.card.soon .go a::after { content: " \2192"; }
.card.soon .go a:focus-visible { outline: 2px solid var(--deep); outline-offset: 3px; border-radius: 4px; }
.hello { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
@media (max-width: 560px) {
  .topnav { justify-content: flex-start; }
  .topnav .who { flex-basis: 100%; }
  .topnav + .mast { padding-top: 26px; }
}
.mast .crumb + .kicker { margin-top: 18px; }
.topnav + .mast > .crumb:first-child { margin-top: 0; }
/* ---------------------------------------------------------------------
   Flex1 Campus (phase 5b): logo, product cards and the public landing
   pages (/learn/, /teach/ ...). Folded in from the brand mock-up's
   home.css. Only new class names, so the portal's own pages are unchanged.
   --------------------------------------------------------------------- */
.topnav a.logo { margin-right: auto; padding: 4px 0; border: 0; background: none; border-radius: 4px; }
.topnav a.logo img { display: block; width: 150px; height: auto; }
.topnav a.logo:focus-visible { outline: 2px solid var(--muted); outline-offset: 4px; }

/* home page masthead: the big logo with its tagline (outlined SVG, the same on every device) */
.mast.brand { padding-top: 40px; }
.mast.brand h1 { margin: 0; line-height: 0; }
.mast.brand img { display: block; width: clamp(240px, 46vw, 440px); height: auto; }
.hello { margin: 22px 0 0; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.mast > .hello:first-child { margin: 0 0 10px; }

/* product names, as in the logo: bold "flex1", light product word */
.fx { font-weight: 750; letter-spacing: -.02em; }
.pw { font-weight: 400; }
.card .board + h2 { margin-top: 8px; }
.card h2:first-of-type { margin-top: 0; }

/* product cards a signed-in person cannot open (they still lead to the landing page) */
.card.locked { opacity: .62; }
.card.locked .go { color: var(--muted); }
a.card.soon .go::after, a.card.locked .go::after { content: " \2192"; }

/* landing pages */
.land .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.land .actions .small { flex-basis: 100%; margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.actions .btn { display: inline-flex; align-items: center; min-height: 42px; padding: 0 20px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font-weight: 650; font-size: 15px; text-decoration: none; transition: border-color .15s; }
.actions .btn:hover, .actions .btn:focus-visible { border-color: var(--muted); outline: none; }
.actions .btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* "Request access" on a product still being built is a form button: same look as the links. */
.actions form { margin: 0; }
.actions button.btn { font-family: inherit; cursor: pointer; }
.land .state { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 99px; background: var(--tint); color: var(--deep); font-weight: 650; font-size: 14px; }
.land-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 34px; align-items: start; padding-bottom: 30px; }
.land-body .points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.land-body .points li { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.land-body .points b { display: block; font-size: 16px; margin-bottom: 4px; }
.land-body .points span { font-size: 14.5px; color: var(--muted); }
.land-body .points li.extra { background: var(--tint); border-color: transparent; }
.land-body .points li.extra span { color: var(--deep); font-weight: 600; }

/* the pictures: drawn in HTML with made-up names */
.shot { margin: 0; }
.shot figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.mock { background: var(--tint); border-radius: var(--radius); padding: 18px; display: grid; gap: 8px; font-size: 14px; }
.mock-head { font-weight: 700; color: var(--deep); margin-bottom: 4px; }
.mock-head small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.mock-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--paper); border-radius: 10px; padding: 9px 12px; }
.mock-row b { color: var(--deep); }
.mock .chip { display: inline-block; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 99px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.mock .chip.ok { background: var(--mint); color: var(--mint-d); }
.mock .chip.mid { background: var(--butter); color: var(--butter-d); }
.mock .chip.help { background: var(--rose); color: var(--rose-d); }
.mock .chip.solid { background: var(--ink); color: var(--bg); }
.mock .heat { display: grid; grid-template-columns: 56px repeat(4, minmax(0, 1fr)); gap: 5px; background: var(--paper); border-radius: 10px; padding: 12px; font-size: 13px; align-items: center; }
.mock .heat b { text-align: center; color: var(--muted); font-weight: 600; }
.mock .heat i { height: 24px; border-radius: 6px; background: var(--line); }
.mock .heat i.h1 { background: var(--rose); } .mock .heat i.h2 { background: var(--butter); } .mock .heat i.h3 { background: var(--mint); }
.mock .front { text-align: center; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--paper); border-radius: 8px; padding: 6px; }
.mock .desks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mock .desks span { background: var(--paper); border-radius: 8px; padding: 10px 4px; text-align: center; font-size: 13px; font-weight: 600; }
.mock .flash { background: var(--paper); border-radius: 14px; padding: 26px 22px; display: grid; gap: 8px; text-align: center; }
.mock .flash small { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mock .flash b { font-size: 24px; color: var(--deep); }
.mock .flash span { color: var(--muted); }

@media (max-width: 760px) {
  .land-body { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 560px) {
  .mast.brand { padding-top: 26px; }
  .topnav a.logo { flex-basis: 100%; }
  .topnav a.logo img { width: 130px; }
  .mock-row { grid-template-columns: 44px minmax(0, 1fr); }
  .mock-row .chip { grid-column: 2; justify-self: start; }
}

/* ">flex1 learn" / ">flex1 teach" on the portal's own pages (2026-11-06): the chevron as in the logo */
.gt { color: var(--mint-d); font-weight: 800; margin-right: .05em; }
.crumb a.home-btn .fx { font-weight: 750; }
.crumb a.home-btn .pw { font-weight: 400; }

/* Home page sections (2026-11-06): "For teachers" and "For students and everyone" */
.home-sec + .home-sec { margin-top: 6px; }
.sec-title { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 650; margin: 8px 0 4px; }
.home-none a { color: var(--ink); }
