/* Long-form pages (thesis, user guide) on compute.tlay.io. Palette follows the landing page and the
   TLAY brand kit; the --cds-* names are the colour tokens the diagrams were drawn with. */
:root {
  --navy: #0F1A33;
  --ink: #14213D;
  --body: #2C3A52;
  --quiet: #4A5873;
  --line: #CBD5E3;
  --paper: #FBFCFE;
  --mist: #EEF2F8;
  --accent: #2D498E;
  --accent-light: #448ED3;
  --cds-text-primary: #14213D;
  --cds-text-secondary: #4A5873;
  --cds-chart-axis: #8C9AB3;
  --cds-chart-grid: #DCE3EE;
  --cds-chart-categorical-1: #2D498E;
  --cds-chart-reference-tint: #EEF2F8;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--paper); color: var(--body); font-family: 'Public Sans', 'Helvetica Neue', Arial, sans-serif; font-size: 17px; line-height: 1.65; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }

/* Header and footer */
.site-head { background: var(--navy); color: #E6EDF7; }
.site-head .bar { max-width: 1120px; margin: 0 auto; padding: 14px clamp(16px, 4vw, 40px); display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 14px; min-height: 44px; text-decoration: none; color: #F5F8FC; }
.brand .sep { width: 1px; height: 22px; background: #3A4D73; }
.brand .prod { font-size: 15px; color: #C5D3E8; font-weight: 500; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 15px; }
.site-nav a { color: #E6EDF7; text-decoration: none; padding: 10px 0; display: inline-block; }
.site-nav a[aria-current="page"] { color: #FFFFFF; box-shadow: inset 0 -2px 0 var(--accent-light); }
@media (max-width: 560px) { .brand .sep, .brand .prod { display: none; } .site-head .site-nav a[href="/#join"] { display: none; } .site-head .bar { padding-top: 8px; padding-bottom: 4px; } }
.site-foot { border-top: 1px solid var(--line); margin-top: 72px; }
.site-foot .bar { max-width: 1120px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 40px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; color: var(--quiet); }
.site-foot .row { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-foot a { color: var(--quiet); display: inline-block; padding: 10px 0; }

/* Article hero */
.hero { background: var(--navy); color: #E6EDF7; background-image: radial-gradient(rgba(141, 184, 234, .14) 1px, transparent 1.2px); background-size: 22px 22px; }
.hero .inner { max-width: 1120px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) clamp(16px, 4vw, 40px) clamp(40px, 6vw, 72px); }
.eyebrow { margin: 0 0 14px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 13px; letter-spacing: .13em; text-transform: uppercase; color: #8DB8EA; }
.hero h1 { margin: 0; max-width: 18em; font-family: 'Bricolage Grotesque', 'Helvetica Neue', sans-serif; font-weight: 800; font-size: clamp(38px, 5.6vw, 72px); line-height: 1; letter-spacing: -.025em; color: #F5F8FC; text-wrap: balance; }
.hero .dek { margin: 20px 0 0; max-width: 40em; font-size: clamp(17px, 1.6vw, 20px); color: #C5D3E8; }
.hero .meta { margin: 22px 0 0; font-size: 14px; color: #9DB0CC; }

/* Layout: table of contents + article column */
.layout { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 56px; }
.toc { position: sticky; top: 24px; align-self: start; padding-top: 48px; font-size: 14px; }
.toc p { margin: 0 0 10px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--quiet); }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; color: var(--body); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--accent); }
.toc-mob { display: none; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; padding-top: 28px; }
  .toc-desk { display: none; }
  .toc-mob { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; background: #FFFFFF; }
  .toc-mob summary { cursor: pointer; font-weight: 600; color: var(--ink); min-height: 48px; display: flex; align-items: center; }
  .toc-mob ol { margin-bottom: 12px; }
}

/* Article body */
.article { min-width: 0; max-width: 46em; padding-top: 40px; }
.article h2 { margin: 56px 0 14px; font-family: 'Bricolage Grotesque', 'Helvetica Neue', sans-serif; font-weight: 700; font-size: clamp(26px, 3vw, 34px); line-height: 1.12; letter-spacing: -.015em; color: var(--ink); scroll-margin-top: 16px; }
.article h3 { margin: 34px 0 10px; font-size: 20px; line-height: 1.3; color: var(--ink); scroll-margin-top: 16px; }
.article p { margin: 0 0 16px; }
.article strong { color: var(--ink); }
.article ul, .article ol { margin: 0 0 18px; padding-left: 24px; }
.article li { margin: 0 0 8px; }
.article .lead { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--ink); }
.article .pull { margin: 28px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); font-family: 'Bricolage Grotesque', 'Helvetica Neue', sans-serif; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; font-weight: 700; color: var(--ink); }
.article code { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .88em; background: var(--mist); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.article pre { margin: 0 0 18px; background: var(--navy); color: #D6E0EE; border-radius: 10px; padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.article pre code { background: none; padding: 0; color: inherit; overflow-wrap: normal; }
.table-wrap { margin: 0 0 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; }
.article table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.article th, .article td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.article th { background: var(--mist); color: var(--ink); font-weight: 600; white-space: nowrap; }
.article tr:last-child td { border-bottom: 0; }
.article td code { white-space: nowrap; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.on { background: #D7EEE5; color: #074A39; }
.pill.part { background: var(--mist); color: var(--body); border: 1px solid var(--line); }
.pill.road { background: #F4E6C6; color: #6E4300; }
figure { margin: 24px 0 28px; }
figure .frame { border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; padding: 12px; overflow: hidden; }
figure svg { display: block; width: 100%; height: auto; font-family: 'Public Sans', 'Helvetica Neue', Arial, sans-serif; }
figure img { display: block; width: 100%; height: auto; border-radius: 6px; }
figure a.zoom { display: block; cursor: zoom-in; }
/* Phones: diagrams keep a readable size and scroll sideways instead of shrinking to unreadable text. */
@media (max-width: 700px) {
  figure .frame:has(> svg) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  figure .frame > svg { min-width: 620px; }
}
figcaption { margin-top: 10px; font-size: 14px; color: var(--quiet); }
.callout { margin: 24px 0; padding: 18px 20px; border-radius: 10px; background: var(--mist); border: 1px solid var(--line); }
.callout p:last-child { margin-bottom: 0; }
.cta { margin: 40px 0 0; padding: 28px; border-radius: 12px; background: var(--navy); color: #C5D3E8; }
.cta h2 { margin-top: 0; color: #F5F8FC; }
.cta strong { color: #F5F8FC; }
.cta a { color: #8DB8EA; }
.cta .btn { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 22px; border-radius: 999px; background: var(--accent-light); color: #0A1428; font-weight: 600; text-decoration: none; margin-top: 8px; }
.refs { font-size: 15px; }
