/* iScoreIt Labs — shared styles for /labs pages.
   Colours and type follow the iScoreIt mood board (August 2026).
   Light-ground ramp on white, the brighter ramp on navy; never mix them. */

:root {
  --navy: #0A2540;
  --navy-2: #123E63;
  --navy-raised: #133152;
  --navy-rule: #35587C;
  --navy-text: #B7C6D6;

  /* light-ground ramp (on white) */
  --r1: #2E6BFF;
  --r2: #0087FF;
  --r3: #00A9EE;
  --r4: #00CBC2;
  --r5: #00E38C;

  /* dark-ground ramp (on navy) */
  --d1: #5B8CFF;
  --d2: #1F9BFF;
  --d3: #00BCF5;
  --d4: #00D9C4;
  --d5: #00EE93;

  --ink: #0A2540;
  --ink-2: #40566E;
  --ink-3: #7386A0;
  --rule: #DCE4ED;
  --paper: #FFFFFF;
  --paper-2: #F4F7FA;
  --link: #2E6BFF;      /* passes 4.5:1 on white; #0087FF does not at body size */
  --todo: #FFF3DC;

  --wrap: 1200px;
  --narrow: 720px;
  --gutter: 24px;

  /* type and chrome: same faces and navy bar as the main site */
  --f-display: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --f-body: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --chrome: #061424;
  --chrome-line: rgba(126, 180, 255, 0.14);
  --chrome-text: #A9C3DE;
  --chrome-text-2: #6C89A8;
  --green: #00DC87;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--r1); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { color: var(--ink); font-family: var(--f-display); font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; margin: 0; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { width: 100%; max-width: calc(var(--narrow) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Eyebrow labels: small caps text, pillar shown by a coloured mark beside it */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0; font-family: var(--f-mono); font-size: 12px; line-height: 18px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--r1);
}
.eyebrow::before { content: ""; width: 24px; height: 4px; border-radius: 2px; background: var(--pillar, var(--r2)); }
[data-pillar="field-notes"]  { --pillar: var(--r1); }
[data-pillar="rulebook"]     { --pillar: var(--r2); }
[data-pillar="build-log"]    { --pillar: var(--r4); }
[data-pillar="lead-quality"] { --pillar: var(--r5); }

/* ---------- Site header and footer: same navy chrome as the main site ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(6, 20, 36, 0.96); border-bottom: 1px solid var(--chrome-line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.site-header__inner { display: flex; align-items: center; gap: 26px; min-height: 64px; }
.site-logo { display: inline-flex; flex: 0 0 auto; }
.site-logo img { height: 32px; width: auto; }
.site-nav { display: flex; gap: 6px; flex: 1; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--chrome-text); text-decoration: none; padding: 9px 14px; border-radius: 9px; transition: color 0.15s, background 0.15s; }
.site-nav a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.06); }
.site-nav a[aria-current="page"] { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
.site-cta { display: flex; align-items: center; gap: 18px; }
.site-signin { color: var(--chrome-text); font-size: 15px; font-weight: 500; text-decoration: none; }
.site-signin:hover { color: #FFFFFF; }
.site-cta .btn { min-height: 42px; padding: 0 20px; font-size: 15px; font-weight: 600; border-radius: 11px; }
.btn--green { background: var(--green); color: #04121F; }
.btn--green:hover { background: #12E894; color: #04121F; }

/* phones: the links fold into a menu (no script needed) */
.site-menu { display: none; position: relative; }
.site-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 9px; color: #FFFFFF; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu nav { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; display: grid; padding: 8px; border-radius: 14px; background: #0B2440; border: 1px solid var(--chrome-line); box-shadow: 0 24px 48px -20px rgba(0, 6, 14, 0.8); }
.site-menu nav a { color: var(--chrome-text); text-decoration: none; padding: 12px 14px; border-radius: 9px; font-size: 16px; }
.site-menu nav a:hover, .site-menu nav a[aria-current="page"] { color: #FFFFFF; background: rgba(255, 255, 255, 0.06); }

.site-footer { margin-top: 96px; background: var(--chrome); color: var(--chrome-text-2); font-size: 14px; line-height: 1.6; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: clamp(28px, 4vw, 48px); padding: clamp(52px, 6vw, 72px) 0 44px; }
.site-footer__brand img { height: 38px; width: auto; }
.site-footer__brand p { margin: 16px 0 0; max-width: 30ch; }
.site-footer__mail { display: inline-block; margin-top: 14px; font-family: var(--f-mono); font-size: 13px; color: #00C6FF; text-decoration: none; }
.site-footer h2 { margin-bottom: 18px; font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--chrome-text-2); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.site-footer__col a, .site-footer__legal a { color: var(--chrome-text); text-decoration: none; font-size: 14.5px; }
.site-footer a:hover { color: #FFFFFF; }
.site-footer__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 22px 0; border-top: 1px solid var(--chrome-line); }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer__note { margin: 0; padding: 0 0 28px; font-size: 13px; }

/* ---------- Labs lockup: the real iScoreIt lockup + a typeset "Labs" ---------- */
.labs-lockup { --h: 56px; display: flex; align-items: flex-start; gap: calc(var(--h) * 0.36); }
.labs-lockup img { height: var(--h); width: auto; flex: 0 0 auto; }
.labs-lockup__rule { width: 2px; height: calc(var(--h) * 0.5); margin-top: calc(var(--h) * 0.25); background: var(--navy-rule); flex: 0 0 auto; }
.labs-lockup__word { font-family: var(--f-display); font-size: calc(var(--h) * 0.62); line-height: 1; font-weight: 400; letter-spacing: 0.01em; margin-top: calc(var(--h) * 0.163); color: #FFFFFF; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 8px;
  font: inherit; font-size: 16px; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer;
}
.btn--light { background: #FFFFFF; color: var(--navy); }
.btn--light:hover { background: #E6EDF5; color: var(--navy); }
.btn--navy { background: var(--navy); color: #FFFFFF; }
.btn--navy:hover { background: var(--navy-2); color: #FFFFFF; }

/* ---------- Labs home: hero ---------- */
.labs-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy) 55%, var(--navy-2) 100%);
  color: #FFFFFF; padding: 64px 0 80px;
}
.labs-hero__rings { position: absolute; right: -220px; top: -140px; width: 640px; height: 640px; pointer-events: none; }
.labs-hero .wrap { position: relative; }
.labs-hero h1 { margin-top: 48px; max-width: 860px; color: #FFFFFF; font-size: clamp(34px, 5vw, 52px); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.labs-hero__lede { margin: 16px 0 0; max-width: 640px; font-size: 20px; line-height: 1.6; color: var(--navy-text); }
.labs-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.labs-hero__next { font-size: 16px; color: var(--navy-text); }
.labs-hero__next strong { color: #FFFFFF; }
.ramp { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; display: flex; gap: 3px; }
.ramp span { flex: 1 1 0; }
.ramp--dark span:nth-child(1) { background: var(--d1); }
.ramp--dark span:nth-child(2) { background: var(--d2); }
.ramp--dark span:nth-child(3) { background: var(--d3); }
.ramp--dark span:nth-child(4) { background: var(--d4); }
.ramp--dark span:nth-child(5) { background: var(--d5); }

/* ---------- Labs home: post list ---------- */
.labs-section { margin-top: 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.section-head h2 { font-size: 28px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  min-height: 40px; padding: 0 14px; border-radius: 8px;
  border: 1px solid #D5DDE6; background: #FFFFFF; color: var(--ink);
  font: inherit; font-size: 15px; line-height: 1; cursor: pointer;
}
.filter:hover { border-color: var(--ink-3); }
.filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }

.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.post-card { border: 1px solid var(--rule); border-radius: 12px; background: #FFFFFF; transition: border-color 0.15s; }
.post-card:hover { border-color: var(--ink-3); }
.post-card__link, .post-card__inner { display: block; padding: 28px 28px 24px; color: inherit; text-decoration: none; }
.post-card h3 { margin-top: 12px; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; }
.post-card__link:hover h3 { color: var(--r1); }
.post-card__standfirst { margin: 10px 0 0; max-width: 760px; font-size: 17px; line-height: 1.6; }
.post-card__meta { margin: 14px 0 0; font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 6px; background: #DCEBFF; color: var(--navy); font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.post-list-empty { margin: 16px 0 0; color: var(--ink-2); }

/* ---------- Labs home: pillars, subscribe, audience ---------- */
.labs-pillars { margin-top: 80px; }
.labs-pillars h2 { font-size: 28px; margin-bottom: 24px; }
.pillar-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pillar { background: var(--paper-2); border-radius: 12px; padding: 24px; }
.pillar::before { content: ""; display: block; width: 32px; height: 4px; border-radius: 2px; background: var(--pillar); margin-bottom: 16px; }
.pillar h3 { font-size: 20px; }
.pillar p { margin: 8px 0 0; font-size: 16px; line-height: 1.55; }

.subscribe-band {
  margin-top: 80px; padding: 32px; border-radius: 14px; background: var(--navy); color: var(--navy-text);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
}
.subscribe-band h2 { color: #FFFFFF; font-size: 24px; }
.subscribe-band p { margin: 6px 0 0; max-width: 620px; font-size: 16px; line-height: 1.6; }

.audience { margin-top: 64px; }
.audience h2 { font-size: 20px; }
.audience ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; font-size: 16px; line-height: 1.55; }
.audience li { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 2px solid var(--rule); }
.audience li strong { color: var(--ink); font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.audience__ask { margin: 24px 0 0; font-size: 16px; }

/* ---------- Post page ---------- */
.post-head { padding-top: 48px; }
.crumbs { font-size: 15px; color: var(--ink-2); margin-bottom: 24px; }
.crumbs a { color: var(--ink-2); }
.post-head h1 { margin-top: 16px; font-size: clamp(32px, 4.6vw, 46px); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.standfirst { margin: 20px 0 0; font-size: 21px; line-height: 1.55; color: var(--ink); }
.post-meta { margin: 20px 0 0; padding-bottom: 28px; border-bottom: 1px solid var(--rule); font-size: 15px; color: var(--ink-2); }
.post-meta strong { color: var(--ink); }

.exhibit { margin: 40px auto 0; }
.exhibit__inner { border: 1px solid var(--rule); border-radius: 14px; padding: 28px 28px 20px; }
.exhibit__title { margin: 0 0 20px; font-size: 18px; line-height: 1.4; font-weight: 700; color: var(--ink); }
.exhibit figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; display: grid; grid-template-columns: 120px 48px minmax(0, 1fr); align-items: start; padding: 14px 0; }
.timeline li.is-next { background: var(--paper-2); border-radius: 12px; margin: 0 -14px; padding: 14px; }
/* connector from each dot to the next one */
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 143px; top: 30px; bottom: -30px; width: 2px; background: var(--rule); z-index: 1; }
.timeline li.is-next:not(:last-child)::before { left: 157px; }
.timeline__date { display: flex; flex-direction: column; }
.timeline__date .d { font-size: 28px; line-height: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.timeline__date .y { font-size: 15px; line-height: 20px; font-weight: 700; color: var(--r1); }
.timeline__dot { justify-self: center; margin-top: 8px; width: 16px; height: 16px; border-radius: 50%; background: #B8C6D6; position: relative; z-index: 2; }
.is-next .timeline__dot { background: var(--r2); box-shadow: 0 0 0 5px rgba(0, 135, 255, 0.18); }
.is-main .timeline__dot { background: #FFFFFF; border: 3px solid var(--r2); }
.timeline__body p { margin: 6px 0 0; font-size: 16px; line-height: 1.5; }
.timeline__body p strong { color: var(--ink); }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 6px; font-family: var(--f-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.tag--done { background: #EEF2F6; color: var(--ink-2); }
.tag--next { background: #DCEBFF; color: var(--navy); }
.tag--main { background: #D9F7EA; color: #03754A; }

.post-body { margin-top: 40px; }
.post-body h2 { margin: 40px 0 0; font-size: 26px; }
.post-body p, .post-body ul { margin: 16px 0 0; }
.post-body ul { padding-left: 22px; }
.post-body li + li { margin-top: 8px; }

.method { margin-top: 40px; padding: 24px 28px; border-radius: 12px; background: var(--paper-2); font-size: 16px; line-height: 1.6; }
.method h2 { margin: 0 !important; font-family: var(--f-mono); font-size: 12px !important; line-height: 18px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--r1); }
.method p { margin: 10px 0 0 !important; }

.sources ul { font-size: 16px; }

.post-foot { margin-top: 48px; }
.subscribe-box {
  padding: 28px; border-radius: 14px; background: var(--navy); color: var(--navy-text);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
}
.subscribe-box p { margin: 0; font-size: 17px; line-height: 1.5; max-width: 440px; }
.subscribe-box strong { color: #FFFFFF; }
.next-post { margin: 28px 0 0; font-size: 16px; }
.next-post span { display: block; font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--r1); }
.next-post strong { color: var(--ink); font-size: 19px; }
.back-link { display: inline-block; margin-top: 24px; font-size: 16px; }

/* Placeholders: highlighted so none can ship by accident. Remove the class when the text is final. */
.todo { background: var(--todo); outline: 1px dashed #C99A3B; outline-offset: 2px; color: #5C4300; }

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
  .pillar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audience ul { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .site-header__inner { gap: 12px; }
  .site-nav, .site-signin { display: none; }
  .site-cta { margin-left: auto; }
  .site-menu { display: block; }
  .site-logo img { height: 28px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16.5px; }
  .site-cta .btn { padding: 0 14px; font-size: 14px; }
  .labs-hero { padding: 40px 0 56px; }
  .labs-hero h1 { margin-top: 32px; }
  .labs-hero__lede { font-size: 18px; }
  .labs-hero__rings { right: -360px; top: -220px; opacity: 0.7; }
  .labs-lockup { --h: 40px; }
  .pillar-grid { grid-template-columns: 1fr; }
  .post-card__link, .post-card__inner { padding: 22px 20px 20px; }
  .subscribe-band, .subscribe-box { padding: 24px 20px; }
  .exhibit__inner { padding: 20px 16px 14px; }
  .timeline li, .timeline li.is-next { grid-template-columns: 88px 32px minmax(0, 1fr); }
  .timeline li.is-next { margin: 0 -8px; padding: 14px 8px; }
  .timeline li:not(:last-child)::before { left: 103px; }
  .timeline li.is-next:not(:last-child)::before { left: 111px; }
  .timeline__date .d { font-size: 22px; line-height: 28px; }
  .standfirst { font-size: 19px; }
}
