/* ═══════════════════════════════════════════════════════════════════════════
   design/learn.css — the IB SEHS course page, set like the landing page.

   The landing sells a book: serif display, one hairline rhythm, ruled lists.
   The course page was a dashboard — icon chips, rounded cards, coloured
   COURSE / READ / REF pills, a ⌘K search box. A student who clicked "Begin"
   arrived somewhere that did not look like the thing they had just been
   promised.

   This sheet does not rebuild the page: the hub is generated by
   ib-sehs-course.js and owns its DOM. It re-cuts what is already there into
   the landing's language —

     · header aligned to the same column the content uses
     · hero typography from the same ramp, no floating "% overall" badge
     · resource cards become ruled index rows with no icons and no pills
     · the primary action keeps the site's navy button recipe

   Loaded last on ib-sehs-learn.html only (body.ib-learn-page).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══ 1. the column ═════════════════════════════════════════════════════════ */
/* Three frames were running down this page at once:
     · the hub, 68rem wide with a 2.6rem gutter → text starts at x=218 (1440);
     · the header, forced to max-width:none by vitalite-skin.css, so the
       wordmark started at x=0, 218px left of the first heading;
     · the lower bands (figures, study pack), which sit in the site-wide
       820px `.container` — 100px in from the left and 5px short on the right.
   One frame for all three. */
body.ib-learn-page{
  --learn-frame:68rem;
  --learn-gutter:clamp(1.4rem,4vw,2.6rem);
}
body.ib-learn-page .lin-topbar .lin-topbar-inner,
body.ib-learn-page main .container{
  max-width:var(--learn-frame);
  width:100%;
  margin:0 auto;
  padding-left:var(--learn-gutter);
  padding-right:var(--learn-gutter);
}
body.ib-learn-page header.lin-topbar{
  border-bottom:1px solid var(--line)!important;
  background:var(--canvas);
  -webkit-backdrop-filter:none;backdrop-filter:none;
}
body.ib-learn-page .lin-topbar-inner{min-height:64px}

/* the wordmark is the landing's wordmark, not the app's bold sans */
body.ib-learn-page .lin-brand{
  font-family:var(--font-sans);
  font-size:clamp(1.2rem,1.6vw,1.4rem);
  font-weight:var(--w-semibold);
  letter-spacing:-.035em;
  color:var(--ink);
}
body.ib-learn-page .lin-brand em{
  font-style:italic;font-weight:var(--w-medium);
  color:var(--accent);letter-spacing:-.02em;
}

/* the ⌘K badge is an editor's tell, and the search reads fine as a rule */
body.ib-learn-page .lin-search-kbd,
body.ib-learn-page .lin-kbd,
body.ib-learn-page .kbd{display:none!important}

/* the section switcher was a bordered chip; it is a nav item */
body.ib-learn-page .sec-chip{
  border:0!important;background:none!important;
  padding:0 .1rem!important;
  color:var(--ink-2);
  border-radius:0!important;
}
body.ib-learn-page .sec-chip:hover{color:var(--ink);background:none!important}
body.ib-learn-page .sec-chip-label,
body.ib-learn-page .sec-caret{font-size:var(--t-label);letter-spacing:var(--tr-label);text-transform:uppercase;font-weight:var(--w-bold)}

/* ═══ 2. hub frame ══════════════════════════════════════════════════════════ */
/* #pageTop carried `margin-top:-52px` to compensate for a 52px tab bar that no
   longer exists. With the 65px bar above it, that pulled the kicker and the H1
   up UNDER the header — the first thing on the page was half a word. */
body.ib-learn-page #pageTop{margin-top:0!important;height:0}
body.ib-learn-page .ib-hub{
  max-width:68rem;
  padding-bottom:clamp(2rem,5vw,3.5rem);
}
body.ib-learn-page .ib-pane-min-height{min-height:0!important}

/* ── hero ─────────────────────────────────────────────────────────────────── */
/* the hero carried a navy rule across the whole page, one line above the
   tabs' own hairline: two rules 20px apart doing the same job. */
body.ib-learn-page .ib-hero{margin-bottom:var(--s5);border-bottom:0!important}
/* ...and it was a frosted glass panel: backdrop-filter:saturate(1.6) over the
   page tinted the whole hero rectangle a lighter navy in dark mode, with a
   hard edge at exactly the hero's box. No card, no glass — it is a title. */
body.ib-learn-page .ib-hero{
  -webkit-backdrop-filter:none;backdrop-filter:none;
  background:none;box-shadow:none;
}
body.ib-learn-page .ib-hero__kicker{
  display:block;
  padding:0;border-radius:0;background:none;
  color:var(--accent);
  font-family:var(--font-sans);
  font-size:var(--t-label);font-weight:var(--w-bold);
  letter-spacing:var(--tr-label);text-transform:uppercase;
}
body.ib-learn-page .ib-hero__title{
  font-family:var(--font-display);
  font-size:var(--t-display);
  font-weight:var(--w-medium);
  letter-spacing:var(--tr-serif);
  line-height:1.02;
  margin:.55rem 0 .6rem;
}
body.ib-learn-page .ib-hero__sub{
  font-family:var(--font-sans);
  font-size:var(--t-lead);
  line-height:1.5;
  color:var(--ink-2);
  max-width:46ch;
}
/* the progress figure is a quiet line, not a floating badge */
body.ib-learn-page .ib-hero__stat{
  display:inline-flex;align-items:baseline;gap:.45em;
  margin-top:var(--s3);padding:0;border:0;border-radius:0;background:none;
  color:var(--ink-3);
  font-size:var(--t-xs);
}
body.ib-learn-page .ib-hero__stat b{
  font-family:var(--font-sans);
  font-size:var(--t-xs);font-weight:var(--w-bold);
  color:var(--ink-2);font-variant-numeric:tabular-nums;
}

/* ── tabs: underlined section nav, like the masthead ──────────────────────── */
body.ib-learn-page .ib-tabs{
  gap:var(--s5);
  border-bottom:1px solid var(--line);
  /* the "start here" band opens with its own rule; 19px apart the two read as
     a doubled line, 32px apart they read as two edges. */
  margin-bottom:var(--s6);
}
body.ib-learn-page .ib-tab{
  padding:0 0 .7rem;
  border:0;border-radius:0;background:none;
  font-family:var(--font-sans);
  font-size:var(--t-sm);font-weight:var(--w-semibold);
  letter-spacing:0;
  color:var(--ink-3);
  box-shadow:none;
  position:relative;
}
body.ib-learn-page .ib-tab::after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;
  background:var(--accent);transform:scaleX(0);transform-origin:left;
  transition:transform var(--dur-2) var(--ease);
}
body.ib-learn-page .ib-tab.is-on{color:var(--ink);background:none}
body.ib-learn-page .ib-tab.is-on::after{transform:scaleX(1)}
body.ib-learn-page .ib-tab:hover{color:var(--ink);background:none}

/* ── "start here": a ruled line, not a gradient card ──────────────────────── */
/* One rule, not two. The band used to open with its own `--line-strong` edge
   and close with a hairline; the tabs above it already carry a hairline, and
   three full-width rules inside 80px read as a mistake. It keeps the bottom
   edge (which separates it from the Learn index) and lets the tab rail be its
   top edge. */
body.ib-learn-page .ib-cta{
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  border-radius:0;
  background:none!important;
  padding:var(--s5) 0;
  margin:0 0 var(--s6);
  align-items:center;
}
body.ib-learn-page .ib-cta__txt{gap:.3rem}
body.ib-learn-page .ib-cta__eyebrow{
  color:var(--accent);
  font-size:var(--t-label);font-weight:var(--w-bold);
  letter-spacing:var(--tr-label);
}
body.ib-learn-page .ib-cta__title{
  font-family:var(--font-display);
  font-size:var(--t-h3);
  font-weight:var(--w-medium);
  letter-spacing:var(--tr-serif);
  line-height:1.2;
}
body.ib-learn-page .ib-cta__sub{font-size:var(--t-sm);color:var(--ink-3)}
/* the site's primary button: navy fill, uppercase .74rem, .089em tracking */
body.ib-learn-page .ib-cta__go{
  min-height:44px;
  padding:0 1.1rem;
  border:1px solid var(--ink);
  border-radius:0;
  background:var(--ink);
  color:var(--canvas);
  font-size:.74rem;font-weight:var(--w-bold);
  letter-spacing:.089em;text-transform:uppercase;
  gap:.55em;
  transition:background var(--dur-2) var(--ease),border-color var(--dur-2) var(--ease);
}
body.ib-learn-page .ib-cta__go:hover{background:var(--accent);border-color:var(--accent);color:#fff}
body.ib-learn-page .ib-cta__go svg{width:14px;height:14px}

/* ── section headings ─────────────────────────────────────────────────────── */
body.ib-learn-page .ib-rsec{
  margin:var(--s7) 0 var(--s3);
  font-family:var(--font-display);
  font-size:var(--t-h2);
  font-weight:var(--w-medium);
  letter-spacing:var(--tr-serif);
  line-height:1.1;
  padding-top:var(--s4);
  border-top:1px solid var(--line-strong);
}

/* ── resource cards → ruled index rows ───────────────────────────────────── */
body.ib-learn-page .ib-rgrid,
body.ib-learn-page .ib-rgrid.bento{
  display:block;
  gap:0;
}
body.ib-learn-page .ib-rtile{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:"title meta" "desc desc";
  align-items:baseline;
  gap:.15rem var(--s5);
  width:100%;
  min-height:0;
  margin:0;
  padding:var(--s4) 0;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  border-radius:0!important;
  background:none!important;
  box-shadow:none;
  text-align:left;
  transform:none!important;
}
body.ib-learn-page .ib-rtile:hover{background:var(--surface-2);border-color:var(--line)}
body.ib-learn-page .ib-rtile:focus-visible{outline:2px solid var(--focus);outline-offset:2px}

/* the icon chip is the dashboard's signature; the row does not need it */
body.ib-learn-page .ib-rtile__ico{display:none}

/* let the three text nodes become the tile's own grid children */
body.ib-learn-page .ib-rtile__txt{display:contents}
body.ib-learn-page .ib-rtile__txt strong{
  grid-area:title;
  font-family:var(--font-display);
  font-size:var(--t-h3);
  font-weight:var(--w-medium);
  letter-spacing:var(--tr-serif);
  line-height:1.2;
  color:var(--ink);
}
body.ib-learn-page .ib-rtile__txt > span{
  grid-area:desc;
  font-family:var(--font-sans);
  font-size:var(--t-sm);
  line-height:1.5;
  color:var(--ink-2);
  max-width:52ch;
}
body.ib-learn-page .ib-rtile__txt em{
  grid-area:meta;
  justify-self:end;
  font-family:var(--font-sans);
  font-style:normal;
  font-size:var(--t-label);
  font-weight:var(--w-bold);
  letter-spacing:var(--tr-label);
  text-transform:uppercase;
  color:var(--ink-3);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
/* COURSE / READ / REF / QUIZ / RECALL — five coloured labels doing no work */
body.ib-learn-page .ib-rtile .bt-tag{display:none!important}

/* ═══ 3. the study-pack band ════════════════════════════════════════════════ */
/* Same page, same language: the bento cards were rounded, filled, and stamped
   with coloured pills (PDF · TWO EDITIONS / 30 MCQS / DATA QS / 24 MARKS).
   Flat them out and let the label be a label. */
body.ib-learn-page .bento .bt,
body.ib-learn-page .bento .bt:hover{
  background:transparent;
  border:1px solid var(--line);
  border-radius:0;
  box-shadow:none;
  transform:none;
}
body.ib-learn-page .bento .bt:hover{border-color:var(--line-2);background:var(--surface-2)}
body.ib-learn-page .bt-tag,
body.ib-learn-page .bt-tag--gold,
body.ib-learn-page .bt-tag--green,
body.ib-learn-page .bt-tag--amber{
  align-self:flex-start;
  padding:0!important;
  border:0!important;border-radius:0!important;
  background:none!important;
  color:var(--accent)!important;
  font-size:var(--t-label);
  font-weight:var(--w-bold);
  letter-spacing:var(--tr-label);
  text-transform:uppercase;
}
body.ib-learn-page .bt-title{
  font-family:var(--font-display);
  font-size:var(--t-h3);
  font-weight:var(--w-medium);
  letter-spacing:var(--tr-serif);
  line-height:1.22;
  color:var(--ink);
}
body.ib-learn-page .bt-body{font-size:var(--t-sm);line-height:1.55;color:var(--ink-2)}
body.ib-learn-page .bt-go{
  color:var(--accent);
  font-size:var(--t-sm);font-weight:var(--w-semibold);
  border-bottom:1px solid var(--line-2);
  padding-bottom:.1em;
}

/* ═══ 4. the rail's half-disc ═══════════════════════════════════════════════ */
/* Left as designed. The semicircle sidebar is the navigation affordance on
   every journal page: a frosted half-disc whose flat side sits ON the edge and
   blooms into the menu on hover. Nudging it inward (tried at 24px and 40px)
   stops it being clipped but leaves a half-circle floating with a straight
   left side, which reads as broken rather than as a tab. Changing it properly
   means changing the shell for every page, not restyling one. */

/* ═══ 5. small screens ══════════════════════════════════════════════════════ */
@media (max-width:720px){
  body.ib-learn-page .ib-hub{padding-top:1rem}
  body.ib-learn-page .ib-hero__title{font-size:clamp(2rem,9vw,2.6rem)}
  body.ib-learn-page .ib-rsec{font-size:var(--t-h3)}
  body.ib-learn-page .ib-cta{flex-direction:column;align-items:stretch;gap:var(--s4)}
  body.ib-learn-page .ib-cta__go{justify-content:center}
  body.ib-learn-page .ib-rtile{grid-template-areas:"title" "desc" "meta";gap:.15rem}
  body.ib-learn-page .ib-rtile__txt em{justify-self:start;margin-top:.3rem}
  /* the stamp is pinned to the card's top-right; once the card is 320px wide
     it lands on top of the heading ("…typeset" printed through "PDF · TWO
     EDITIONS"). Back into the flow, above the title. */
  body.ib-learn-page .bento .bt-tag{
    position:static;top:auto;right:auto;bottom:auto;left:auto;
    order:-1;align-self:flex-start;
    margin:0 0 .45rem;
  }
}
