/* SCRIPT Initiative brand tokens and components. Source of truth for all lab pages.
   Public page links this file; the build script inlines it into the hub, RA pages, and password screens. */

:root {
  --navy: #1F3A5F;
  --forest: #2F6B47;
  --sage: #A9C7A6;
  --surface: #FFFFFF;
  --surface-tint: #F1F5EF;
  --ink: #22302A;
  --ink-muted: #55615A;
  --line: #D9E1D8;
  --on-navy: #FFFFFF;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --navy: #A7BDDA;
    --forest: #8CC49E;
    --surface: #14202E;
    --surface-tint: #1B2B3D;
    --ink: #EEF2EC;
    --ink-muted: #AEB9B2;
    --line: #2F4155;
    --on-navy: #14202E;
  }
  .logo-light { display: none !important; }
  .logo-dark { display: inline-block !important; }
}
.logo-dark { display: none; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.lab {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}
.lab a { color: var(--navy); }
.lab a:hover { color: var(--forest); }
.lab :focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; border-radius: 4px; }

/* type scale */
.lab .display { font-family: var(--font-mono); font-weight: 600; font-size: clamp(32px, 7vw, 48px); line-height: 1.17; color: var(--navy); margin: 0; }
.lab .label { font-family: var(--font-mono); font-weight: 400; font-size: 12px; line-height: 16px; text-transform: uppercase; letter-spacing: .12em; color: var(--forest); margin: 0 0 8px; }
.lab .title { font-weight: 600; font-size: clamp(26px, 5vw, 32px); line-height: 1.25; color: var(--navy); margin: 0; }
.lab h2, .lab .heading { font-weight: 600; font-size: 22px; line-height: 30px; color: var(--navy); margin: 0 0 16px; }
.lab h3, .lab .subhead { font-weight: 500; font-size: 17px; line-height: 26px; color: var(--forest); margin: 0 0 4px; }
.lab .caption { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.lab p { margin: 0 0 16px; }

/* layout */
.lab .wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.lab section { padding: 40px 0 0; scroll-margin-top: 24px; }
.lab .page-end { height: 64px; }

/* header bar (hub and RA pages) */
.lab-bar { border-bottom: 1px solid var(--line); background: var(--surface); }
.lab-bar .in { max-width: 880px; margin: 0 auto; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lab-bar img { height: 40px; width: auto; display: inline-block; }
.lab-bar nav { display: flex; gap: 16px; font-size: 14px; font-weight: 500; flex-wrap: wrap; }
.lab-bar nav a { text-decoration: none; }
.lab-bar nav a:hover { text-decoration: underline; }
.lab-hero { padding: 40px 0 0; }
.lab-hero p.lead { margin: 8px 0 24px; color: var(--ink-muted); }

/* frequency bars: each bar is about 1/2, 1/3, 1/4 ... of the first */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 40px; margin-top: 24px; }
.bars span { display: block; width: 12px; background: var(--sage); border-radius: 2px 2px 0 0; }
.bars span:nth-child(1) { height: 100%; }
.bars span:nth-child(2) { height: 50%; }
.bars span:nth-child(3) { height: 33%; }
.bars span:nth-child(4) { height: 25%; }
.bars span:nth-child(5) { height: 20%; }
.bars span:nth-child(6) { height: 17%; }

/* components */
.lab .card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.lab .card.tint, .lab .tint { background: var(--surface-tint); }
.lab .grid { display: grid; gap: 16px; }
.lab .card > :last-child { margin-bottom: 0; }
.lab .btn { display: inline-flex; align-items: center; font: inherit; font-weight: 600; text-decoration: none; background: var(--navy); color: var(--on-navy); border: 1px solid var(--navy); border-radius: 4px; padding: 10px 20px; cursor: pointer; }
.lab .btn:hover { color: var(--on-navy); background: var(--forest); border-color: var(--forest); }
.lab ul.plain { margin: 0; padding-left: 20px; }
.lab ul.plain li { margin-bottom: 8px; }
.lab .muted { color: var(--ink-muted); }
.lab .soon { color: var(--ink-muted); }
.lab .todo { border: 1px dashed var(--forest); border-radius: 4px; padding: 0 6px; color: var(--ink-muted); }
.lab .announce { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.lab .announce time { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--forest); }
.lab table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: 8px; }
.lab th, .lab td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lab tr:last-child th, .lab tr:last-child td { border-bottom: 0; }
.lab th { width: 42%; font-weight: 600; background: var(--surface-tint); }

/* onboarding checklist */
.lab .steps { list-style: none; margin: 0; padding: 0; }
.lab .steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lab .steps li:last-child { border-bottom: 0; }
.lab .steps .box { flex: none; width: 22px; height: 22px; margin-top: 2px; border: 2px solid var(--line); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; }
.lab .steps li.done .box { border-color: var(--forest); }
.lab .steps li.done .box svg { display: block; }
.lab .steps .box svg { display: none; stroke: var(--forest); }
.lab .steps li.done .text { color: var(--ink-muted); }

/* login band on the public page */
.lab .login { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--surface-tint); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.lab .login h2 { margin: 0 0 4px; }
.lab .login p { margin: 0; }

/* footer */
.lab-foot { margin-top: 64px; background: var(--navy); color: var(--on-navy); padding: 24px 16px; font-size: 14px; }
.lab-foot .in { max-width: 880px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.lab-foot img { width: 28px; height: 28px; flex: none; }
.lab-foot p { margin: 0; }

.lab .ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.lab .ig-post { display: block; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-tint); }
.lab .ig-post img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.lab .ig-post:hover img, .lab .ig-post:focus-visible img { transform: scale(1.03); }
@media (max-width: 640px) { .lab .ig-grid { grid-template-columns: repeat(2, 1fr); } }
