/* =========================================================
   Learn article pages — shared styles
   Loaded by learn/*.html article pages, after css/style.css.

   Scoped entirely to .article-* / .session-table / .keynote /
   .tool-nudge / .compliance so nothing here can reach the rest
   of the site.

   On tokens: these pages run body.theme-light, where style.css
   redefines the tier palette to its light values. Four colours
   have an exact tier token at that scope and use it directly
   (--navy-900, --ink-0, --navy-950, --navy-800).

   The dark components — the session table and the CTA card sit
   deliberately dark on a light page — cannot, because their
   values belong to the dark palette that those names no longer
   carry under theme-light. They use the role tokens defined in
   :root instead, which no theme scope re-declares:
   --surface-dark, --on-dark, --on-dark-muted, --accent-fixed,
   --link, --link-hover, --rule-soft.

   Still literal, with nothing to point them at:
     #3C4759               standfirst — --ink-300 (#48566B) is the nearest
                           token but 6.5 dE lighter, a visible change, so
                           this one keeps its own value
     #5CCBFA               CTA button hover
     #C9D6E6               tool-nudge border on light
     rgba(241,244,249,.12) stacked-row hairline, a heavier alpha
                           than --rule-soft's .1
     rgba(56,189,248,.08)  is-focus tint
     rgba(56,189,248,.45)  is-focus ring
   An alpha cannot be taken from a hex token without relative
   colour syntax, so the four rgba values stay as they are.
   ========================================================= */

.article-wrap{
  max-width:44rem; margin:0 auto; padding:0 1.25rem 4rem;
  background:var(--navy-900); color:var(--ink-0);
}

.article-hero{padding:3.5rem 0 2rem}
.article-hero h1{
  font-family:'Instrument Serif',serif; font-weight:400;
  font-size:clamp(2.1rem,4vw,3.1rem); line-height:1.1;
  color:var(--ink-0); margin:0 0 1rem;
}
.article-standfirst{font-size:1.125rem;line-height:1.65;color:#3C4759;margin:0}

.article-body{font-size:1.0625rem;line-height:1.75;color:var(--ink-0)}
.article-body h2{font-family:var(--font-display);font-size:1.5rem;line-height:1.25;margin:2.75rem 0 .875rem;color:var(--ink-0)}
.article-body h3{font-family:var(--font-display);font-size:1.125rem;margin:1.75rem 0 .5rem;color:var(--ink-0)}
.article-body p{margin:0 0 1.125rem}
.article-body ul{margin:0 0 1.125rem;padding-left:1.25rem}
.article-body li{margin-bottom:.5rem}
.article-body strong{font-weight:600}
.article-body a{color:var(--link);text-decoration:underline;text-underline-offset:2px}
.article-body a:hover{color:var(--link-hover)}
.article-body code{font-family:var(--font-mono);font-size:.9375em;background:var(--navy-950);padding:.1em .35em;border-radius:.25rem}

/* ---------- session table (dark, on the light page) ---------- */
.session-table{width:100%;border-collapse:collapse;margin:1.5rem 0;background:var(--surface-dark);border-radius:.75rem;overflow:hidden}
.session-table caption{caption-side:bottom;padding-top:.75rem;font-size:.875rem;color:var(--ink-500);text-align:left}
.session-table th,.session-table td{padding:.75rem 1rem;text-align:left;border-bottom:1px solid var(--rule-soft)}
.session-table thead th{font-family:var(--font-display);font-size:.8125rem;color:var(--on-dark-muted);font-weight:500}
.session-table tbody td{color:var(--on-dark);font-size:.9375rem}
.session-table tbody tr:last-child td{border-bottom:none}
.session-table .time{font-family:var(--font-mono);font-size:.9375rem;color:var(--accent-fixed);white-space:nowrap}
.session-table tr.is-focus td{background:rgba(56,189,248,.08)}

.keynote{border-left:3px solid var(--accent-fixed);background:var(--navy-950);padding:1rem 1.25rem;border-radius:0 .5rem .5rem 0;margin:1.75rem 0}
.keynote p{margin:0}

.tool-nudge{border:1px solid #C9D6E6;background:var(--navy-800);border-radius:.75rem;padding:1.25rem 1.5rem;margin:1.75rem 0}
.tool-nudge p{margin:0;font-size:1rem;line-height:1.6}

.article-cta{background:var(--surface-dark);border-radius:1rem;padding:2rem;margin:3rem 0 2rem}
.article-cta h2{font-family:var(--font-display);color:var(--on-dark);margin:0 0 .625rem;font-size:1.375rem}
.article-cta p{color:var(--on-dark-muted);margin:0 0 1.25rem;font-size:1rem;line-height:1.6}
.article-cta a{display:inline-block;background:var(--accent-fixed);color:var(--surface-dark);text-decoration:none;font-weight:600;padding:.75rem 1.5rem;border-radius:.5rem}
.article-cta a:hover{background:#5CCBFA}
.article-cta a:focus-visible{outline:2px solid var(--on-dark);outline-offset:2px}

.compliance{font-size:.8125rem;color:var(--ink-500);border-top:1px solid var(--navy-700);padding-top:1.25rem;margin-top:2.5rem}

@media (max-width:520px){
  .session-table th,.session-table td{padding:.625rem .75rem;font-size:.875rem}
  .article-cta,.tool-nudge{padding:1.5rem}

  /* Opt-in via .is-stacked, because not every table using this class needs
     it: the killzone tables hold nowrap time ranges that need about 367px
     against a phone's 335px, so the last column was cut off, while the pip
     article's contract table is short enough to fit. Stacking a table whose
     cells carry no data-label would drop the column headings with nothing to
     replace them. Each stacked row becomes its own block, labelled from the
     column headers via data-label. Desktop keeps the real table. */
  .session-table.is-stacked{display:flex;flex-direction:column;background:transparent;border-radius:0}
  .session-table.is-stacked thead{display:none}
  .session-table.is-stacked tbody{order:1;display:block}
  .session-table.is-stacked caption{order:2;padding-top:.875rem}
  .session-table.is-stacked tr{
    display:block;background:var(--surface-dark);border-radius:.75rem;
    padding:.875rem 1rem;margin-bottom:.625rem;
  }
  .session-table.is-stacked tr:last-child{margin-bottom:0}
  /* the article's own session keeps its highlight, as a ring rather than a tint */
  .session-table.is-stacked tr.is-focus{box-shadow:inset 0 0 0 1px rgba(56,189,248,.45)}
  .session-table.is-stacked tr.is-focus td{background:transparent}
  .session-table.is-stacked td{display:block;padding:0;border-bottom:none}
  .session-table.is-stacked td:first-child{
    font-family:var(--font-display);font-size:1rem;color:var(--on-dark);
    margin-bottom:.5rem;padding-bottom:.5rem;
    border-bottom:1px solid rgba(241,244,249,.12);
  }
  .session-table.is-stacked td[data-label]{
    display:flex;justify-content:space-between;align-items:baseline;
    gap:1rem;padding:.3rem 0;
  }
  .session-table.is-stacked td[data-label]::before{
    content:attr(data-label);
    font-family:var(--font-display);font-size:.8125rem;font-weight:500;
    color:var(--on-dark-muted);white-space:nowrap;
  }
}
