/* Revise360 brand layer (redesign Stage 3). Loaded after the page's own
 * stylesheets on every site and portal page, so the whole platform shares one
 * identity: the room mark, deep navy and blue, IBM Plex, the mono labels.
 *
 * 1. Brand tokens (--b-*): the identity's values, named once.
 * 2. The light surface's semantic tokens (css/tokens.css) pointed at the brand,
 *    so every component that reads var(--fg), var(--accent) or var(--link)
 *    follows without being edited.
 * 3. The shared shell: header, navigation, labels, buttons, focus, footer.
 * 4. Small fixes where a page drew in amber: the brand uses none.
 *
 * Not touched, on purpose: the 360 rooms, Quiz Mode and the other learning
 * screens (body.player), the Live Slabs, the explainers, the Python editor and
 * the assessments. Their dark surface and its learning amber are content, and
 * stay as they are. */

/* 1. Brand tokens */
:root {
  --b-navy-950:#08101F; --b-navy-900:#0B1430; --b-navy-800:#121E34; --b-navy-700:#1C2C4A;
  --b-navy-600:#2B4470; --b-navy-500:#3C5A87; --b-navy-400:#4E6FA3; --b-navy-300:#8FA6C8;
  --b-blue-800:#163FAF; --b-blue-700:#1F4FE0; --b-blue-600:#2D63FF; --b-blue-400:#5C86FF;
  --b-blue-300:#7EA2FF; --b-blue-200:#A9C1FF; --b-blue-100:#D6E1FF; --b-blue-50:#EEF3FF;
  --b-grey-900:#101828; --b-grey-700:#344054; --b-grey-600:#475467; --b-grey-500:#667085;
  --b-grey-300:#D0D5DD; --b-grey-200:#E4E7EC; --b-grey-100:#F2F4F7; --b-grey-50:#F7F8FB;
  --b-teal-700:#0A6E63; --b-teal-500:#0E9F8E; --b-teal-300:#3CCFB8; --b-teal-100:#DDF5F1;
  --b-coral-700:#B42328; --b-coral-500:#E5484D; --b-coral-300:#FF7A80; --b-coral-100:#FDE4E5;
  --b-text-on-dark:#F0F4FA; --b-soft-on-dark:#B4C4DC;

  --b-font:'IBM Plex Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --b-mono:'IBM Plex Mono',ui-monospace,monospace;
  --b-display:clamp(40px,5.2vw,68px); --b-h2:clamp(30px,3.4vw,42px); --b-h3:clamp(20px,1.7vw,23px);
  --b-lead:clamp(18px,1.5vw,20px); --b-body:17px; --b-small:15px; --b-label:12.5px;

  --b-s1:4px; --b-s2:8px; --b-s3:12px; --b-s4:16px; --b-s5:24px; --b-s6:32px; --b-s7:48px; --b-s8:64px; --b-s9:96px;
  --b-r-s:6px; --b-r-m:10px; --b-r-l:16px; --b-r-xl:24px;
  --b-shadow-1:0 1px 2px rgba(11,20,48,.06),0 1px 3px rgba(11,20,48,.08);
  --b-shadow-2:0 12px 32px -12px rgba(11,20,48,.25);
  --b-shadow-3:0 32px 64px -24px rgba(11,20,48,.4);
  --b-focus:0 0 0 3px #FFFFFF,0 0 0 5px var(--b-blue-600);
  --b-focus-dark:0 0 0 3px var(--b-navy-800),0 0 0 5px var(--b-blue-300);
  --b-ease:cubic-bezier(.2,.7,.2,1); --b-fast:120ms; --b-base:220ms; --b-room:520ms;
}
@media (prefers-reduced-motion: reduce) {
  :root { --b-fast:0ms; --b-base:0ms; --b-room:0ms; }
}

/* 2. The light surface, on the brand */
:root {
  --fg:var(--b-navy-800);
  --accent-hover:var(--b-blue-700);
  --accent-soft:var(--b-blue-50);
  --info:var(--b-blue-700);
  --link:var(--b-blue-700);
  --link-hover:var(--b-blue-800);
  --raise:var(--b-grey-50);
  --r-control:10px;
}
/* The public pages' dark bands and footer: brand navy, with blue where amber was. */
footer.site, .band.dark, .vr-band {
  --bg:var(--b-navy-900); --panel:var(--b-navy-700); --line:var(--b-navy-700);
  --highlight:var(--b-blue-300); --highlight-text:var(--b-blue-300); --edge:var(--b-blue-300);
}

/* 3. The shared shell */
body:not(.player) { -webkit-font-smoothing:antialiased; }

/* the wordmark beside the room mark, as in the logo: Plex Bold, 360 in blue */
.brand-copy b { letter-spacing:-.015em; }
.brand-copy b span { color:var(--b-blue-600); }
.brand-copy small { font-family:var(--b-mono);font-weight:500;letter-spacing:.1em;font-size:12.5px;color:var(--b-grey-600); }
header.top .brand h1, header.top .brand .site-name { letter-spacing:-.02em; }

/* navigation (nav.js builds it into header.bar or header.top on every page) */
.site-nav ul { gap:4px; }
.site-nav a { font:500 15px var(--b-font);color:var(--b-grey-700)!important;border-radius:var(--b-r-m); }
.site-nav a:hover { background:var(--b-grey-100);color:var(--b-navy-800)!important; }
.site-nav a.on { background:transparent;color:var(--b-navy-800)!important;box-shadow:inset 0 -2px var(--b-blue-600);border-radius:0; }
.site-nav a.cta,.site-nav a.me { font-weight:600; }
.site-nav a.cta { background:var(--b-blue-600); }
.site-nav a.cta:hover { background:var(--b-blue-700); }
.portal-nav a[aria-current="page"] { box-shadow:inset 0 -2px var(--b-blue-600); }

/* labels: the mono eyebrow with a small far-wall square */
.kicker,.eyebrow { display:flex;align-items:center;gap:10px;font:500 12.5px/1.4 var(--b-mono)!important;letter-spacing:.14em!important;text-transform:uppercase;color:var(--b-blue-700); }
.kicker::before,.eyebrow::before { content:"";width:12px;height:12px;flex:none;box-sizing:border-box;border:2px solid currentColor;background:radial-gradient(currentColor 0 0) center/6px 6px no-repeat; }
.band.dark .kicker,.surface-dark .eyebrow,.band.dark .eyebrow { color:var(--b-blue-300); }

/* headings: the logo's tracking, not the old tight -.045em */
.info-page h1,.info-page h2,.info-page h3,.home-page h1,.home-page h2 { letter-spacing:-.025em; }
.info-page .info-hero h1 em,.info-page h1 em { color:var(--b-blue-600); }

/* buttons: one radius, one weight */
.btn { border-radius:var(--b-r-m);font-weight:600; }
.text-link { border-bottom:2px solid var(--b-blue-600); }

/* the live explainer's frame (the explainer itself keeps its own layout) */
.xdemo { border-color:var(--b-blue-300)!important;border-radius:var(--b-r-l); }
.xdemo-head { background:var(--b-blue-300)!important;color:var(--b-navy-900)!important; }
.xdemo-live { background:var(--b-navy-900)!important;color:var(--b-blue-300)!important; }

/* the footer: brand navy, the logo, mono column labels */
footer.site { max-width:none!important;margin:0!important;padding:64px max(24px,calc(50% - 600px)) 32px!important;background:var(--b-navy-900);color:var(--b-soft-on-dark);border:0!important;font-size:13.5px; }
footer.site a { color:var(--b-soft-on-dark); }
footer.site a:hover { color:#fff; }
footer.site b { color:#fff; }
.footnav { border-color:var(--b-navy-700)!important;padding-bottom:32px!important;margin-bottom:24px!important; }
.footnav .foot-h { margin:0 0 10px;color:var(--b-text-on-dark);font:500 13px/1.4 var(--b-mono);letter-spacing:.12em;text-transform:uppercase; }
.footnav a { font-size:14.5px!important;color:var(--b-soft-on-dark)!important; }
.footnav a:hover { color:#fff!important; }
.footnav a.foot-mark { display:inline-block;line-height:0; }
.footnav a.foot-mark img { height:36px;width:auto; }
.foot-brand p { color:var(--b-soft-on-dark)!important; }

/* numbered steps sit on the far wall of a small room, as topics do on the homepage.
   The number's own box is the far wall (blue, white text, 4.8:1); the room's
   walls are drawn behind it, so contrast is measured on the colour you see. */
.hiw-steps li > span,.guide-steps li > span,.flow li > span.code,.lesson-sequence li > span {
  position:relative;z-index:0;display:grid!important;place-items:center;width:24px;height:24px;margin:12px;padding:0!important;flex:none;
  background:var(--b-blue-600);color:#fff!important;font:700 12px/1 var(--b-font)!important;letter-spacing:0!important; }
.hiw-steps li > span::before,.guide-steps li > span::before,.flow li > span.code::before,.lesson-sequence li > span::before {
  content:"";position:absolute;inset:-12px;z-index:-1;background:url(../assets/brand/numroom-soft.svg) center/contain no-repeat; }
.hiw-steps li:nth-child(3n+1) > span::before,.guide-steps li:nth-child(3n+1) > span::before { background-image:url(../assets/brand/numroom-ink.svg); }
.signal.amber { background:var(--b-blue-600)!important; }

/* course.html: each topic's link to its page, lined up with the topic title */
.cp-guide { margin:-4px 20px 12px;padding-left:70px; }
.cp-guide a { display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 16px;border:1.5px solid var(--b-grey-300);border-radius:var(--b-r-m);background:#fff;font-weight:600;font-size:14.5px;color:var(--b-navy-800)!important;text-decoration:none; }
.cp-guide a::after { content:"→";color:var(--b-blue-600); }
.cp-guide a:hover { border-color:var(--b-navy-800);background:var(--b-grey-50); }
@media (max-width: 640px) { .cp-guide { padding-left:58px; } }

/* 4. No amber on the site's own pages */
.review-note { background:var(--b-blue-50)!important;color:var(--b-blue-800)!important;border:1px solid var(--b-blue-100)!important;border-left:3px solid var(--b-blue-600)!important; }
.preview-band { background:var(--b-blue-100)!important;color:var(--b-navy-900)!important; }
.rag-a { background:var(--b-blue-50)!important;color:var(--b-blue-800)!important; }
body:not(.player) .tag.warn { background:var(--b-coral-100);color:var(--b-coral-700); }

@media (max-width: 760px) {
  footer.site { padding:48px 20px 28px!important; }
}
