/* Colors for projects are generated from data and arrive as --h (a hue) on each element.
   Everything else comes from the tokens below. Change the look here. */
:root {
  --bg: #0b1822;
  --card: #10222e;
  --ink: #eaf0f3;
  --mute: #9fb0ba;
  --rule: #1f4551;
  --line: #2a4755;
  --link: #86d6e4;
  --ring: #f2b84b;
  --s: 62%;
  --l: 62%;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f5f4;
    --card: #ffffff;
    --ink: #14212b;
    --mute: #4c5d68;
    --rule: #9db3bb;
    --line: #c5d2d8;
    --link: #0f5f6e;
    --ring: #9a5b00;
    --s: 60%;
    --l: 38%;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: anywhere;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
a { color: var(--link); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

header.site { border-bottom: 1px solid var(--rule); padding-top: env(safe-area-inset-top); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; padding-top: 12px; padding-bottom: 10px; }
.brand { color: var(--ink); font-weight: 700; text-decoration: none; letter-spacing: .02em; padding: 8px 0; }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a { padding: 10px 0; text-decoration: none; }
nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
nav a:hover { text-decoration: underline; }
main { padding-top: 22px; padding-bottom: 48px; }
footer.site { border-top: 1px solid var(--rule); color: var(--mute); font-size: 14px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
footer.site p { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; }
footer.site a { display: inline-block; padding: 10px 0; }
.subscribe { margin: 4px 0 0; font-size: 14px; }
.subscribe a { display: inline-block; padding: 10px 0; }

h1 { font-size: 28px; line-height: 1.2; margin: 6px 0 6px; font-weight: 700; }
h2 { font-size: 21px; line-height: 1.3; margin: 34px 0 10px; padding-top: 18px; border-top: 1px solid var(--rule); font-weight: 700; }
h3 { font-size: 17px; line-height: 1.35; margin: 6px 0 6px; font-weight: 600; }
p { margin: 0 0 12px; }
.lede { color: var(--mute); font-size: 17px; max-width: 60ch; }
.empty, .mute { color: var(--mute); }
.crumb { margin: 0 0 6px; }
.crumb a { display: inline-block; padding: 8px 0; }

.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0; }
.tag { font-size: 13px; padding: 1px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--mute); }
.tag.stage { color: var(--ink); border-color: var(--mute); }
.upd { font-size: 13px; color: var(--mute); margin: 0; }
.tags .upd { margin-left: 4px; }

/* Board */
[hidden] { display: none !important; }
.intro { max-width: 60ch; margin: 0 0 10px; }
.howto { margin: 0 0 18px; max-width: 60ch; }
.howto summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--link); }
.howto div { padding: 0 0 4px; color: var(--mute); }

.filters { margin: 14px 0 2px; }
.frow { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.frow.fade { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.fbtn { flex: none; white-space: nowrap; font: inherit; font-size: 15px; min-height: 44px; padding: 0 14px; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; touch-action: manipulation; }
.fbtn:hover { border-color: var(--mute); }
.fbtn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.fbtn.has { border-color: var(--ink); font-weight: 600; }
.fbtn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.tagpanel { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 10px; }
.status { margin: 2px 0 4px; font-size: 14px; color: var(--mute); }

/* Top of the board */
.glance { color: var(--mute); font-size: 15px; margin: 0 0 6px; max-width: 60ch; }
h2.hd { font-size: 14px; font-weight: 600; color: var(--mute); border: 0; padding: 0; margin: 16px 0 6px; }
.ovbox { position: relative; margin-top: 2px; }
.ovbar { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; border-radius: 4px; background: linear-gradient(90deg,
  hsl(25 var(--s) var(--l)), hsl(74 var(--s) var(--l)), hsl(122 var(--s) var(--l)), hsl(171 var(--s) var(--l)), hsl(220 var(--s) var(--l))); }
.od { position: absolute; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: hsl(var(--h) var(--s) var(--l)); border: 2px solid var(--bg); box-sizing: border-box; }
.od:hover::after, .od:focus-visible::after { content: attr(data-name); position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 2px 8px; border-radius: 4px; font-size: 13px; white-space: nowrap; z-index: 3; }
.od:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.ovcap { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--mute); margin: 6px 0 0; }
.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-list li { border-bottom: 1px solid var(--line); }
.latest-list a { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); text-decoration: none; }
.latest-list a:hover .lt { text-decoration: underline; }
.latest-list .ty { flex: none; font-size: 12px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; }
.latest-list .lt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-list time { flex: none; color: var(--mute); font-size: 13px; white-space: nowrap; }
.tiles > li, .cp { scroll-margin-top: 16px; }

.group h2 { display: flex; align-items: baseline; gap: 10px; }
.count { font-size: 15px; font-weight: 400; color: var(--mute); }
.tiles { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.tile { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; height: 100%; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--mute); }
.thumb { width: 72px; height: 72px; border-radius: 4px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { font-size: 24px; font-weight: 700; color: hsl(var(--h) var(--s) var(--l)); }
.tb h3 { font-size: 18px; margin: 0 0 2px; line-height: 1.25; }
.tb p { margin: 0 0 6px; }
.desc { color: var(--mute); font-size: 15px; line-height: 1.45; }
.stat { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-size: 14px; }
.steps { display: inline-flex; align-items: center; gap: 8px; }
.segs { display: inline-flex; gap: 3px; }
.seg { width: 16px; height: 6px; border-radius: 2px; background: var(--line); }
.seg.on { background: hsl(var(--h) var(--s) var(--l)); }
.stg { font-weight: 600; }
.act { color: var(--mute); }
.latest { font-size: 14px; line-height: 1.45; }
.latest .ty { font-size: 12px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; margin-right: 4px; }
.when { color: var(--mute); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--mute); }
.tagchip { border-style: dashed; }
.sp { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 0 0 4px; }
.rbn { width: 84px; flex: none; display: block; }
.rbn .ribbon { height: 18px; }
.ldot { display: block; width: 12px; height: 12px; margin-left: 6px; border-radius: 50%; background: hsl(var(--h) var(--s) var(--l)); }
.spl { color: var(--mute); min-width: 0; }
.cue { display: inline-block; margin-top: 4px; font-size: 14px; color: var(--link); }
.cue::after { content: " \203A"; }
.tile:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* Ribbons: the fill is generated from the project's own data */
.ribbon { display: block; width: 100%; }
.ribbon polygon { fill: hsl(var(--h) var(--s) var(--l)); }

/* Project page */
.links { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.links a { display: inline-block; padding: 8px 0; }
.plain { margin: 6px 0; padding-left: 20px; }
.spec { margin: 14px 0; }
.srow1 { margin-top: 4px; }
article .stat { font-size: 15px; margin: 8px 0; }
article .chips { margin: 8px 0; }
.actline { color: var(--mute); font-size: 14px; margin: 8px 0 2px; }
.strip { display: block; width: 100%; height: 28px; margin: 0 0 8px; }
.strip line { stroke: var(--line); stroke-width: 2; }
.strip circle { fill: hsl(var(--h) var(--s) var(--l)); fill-opacity: .85; }
.axes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; font-size: 12px; color: var(--mute); gap: 4px; }
.nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; font-size: 13px; color: hsl(var(--h) var(--s) var(--l)); font-weight: 700; }
.srow1 .ribbon { height: 44px; }
.timeline { list-style: none; margin: 14px 0 0 6px; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.cp { position: relative; padding: 0 0 26px; }
.cp::before { content: ""; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--h) var(--s) var(--l)); }
.cpmeta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--mute); }
.badge { font-size: 12px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); }
.badge.b-release { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cp figure { margin: 10px 0; }
.cp img { max-width: 100%; height: auto; border-radius: 4px; display: block; }
figcaption { font-size: 14px; color: var(--mute); margin-top: 4px; }

/* Timeline thumbnails and the pop-up */
.cp .thumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; padding: 0; }
.cp .thumbs figure { margin: 0; width: 96px; }
.cp .thumbs .th { display: block; border-radius: 4px; }
.cp .thumbs .th:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.cp .thumbs img { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; display: block; border: 1px solid var(--line); }
.cp .thumbs figcaption { font-size: 12px; line-height: 1.35; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
dialog.lightbox { max-width: min(96vw, 920px); max-height: 94vh; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .72); }
.lightbox img { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; margin: 0 auto; border-radius: 4px; }
.lbcap { margin: 10px 0 0; font-size: 15px; color: var(--mute); }
.lbbar { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.lbclose { font: inherit; font-size: 15px; min-height: 44px; padding: 0 16px; background: transparent; color: var(--ink); border: 1px solid var(--ink); border-radius: 4px; cursor: pointer; }
.lbclose:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.heroimg { margin: 12px 0; }
.heroimg img { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; border-radius: 6px; }

/* Spectra page */
.sec { display: flex; gap: 6px; letter-spacing: .08em; text-transform: uppercase; font-size: 18px; }
.sec span { color: var(--mute); }
.sgrid { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 8px; }
.gradbar { height: 8px; border-radius: 4px; background: linear-gradient(90deg,
  hsl(25 var(--s) var(--l)), hsl(74 var(--s) var(--l)), hsl(122 var(--s) var(--l)), hsl(171 var(--s) var(--l)), hsl(220 var(--s) var(--l))); }
.srows { list-style: none; margin: 14px 0 0; padding: 0; }
.srow { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr; gap: 4px; }
.slabel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-weight: 600; }
.slabel a { padding: 6px 0; }
.also { font-size: 13px; font-weight: 400; color: var(--mute); }
.srow .ribbon { height: 40px; }
@media (min-width: 720px) {
  .sgrid, .srow { grid-template-columns: 220px 1fr; column-gap: 16px; }
  .sgrid .axes, .sgrid .gradbar { grid-column: 2; }
}

.lightwrap { margin-top: 10px; }
.lightbar { display: block; width: 100%; height: auto; }
.lightbar .tick { stroke: var(--mute); stroke-width: 2; }
.lightbar .ticklabel { fill: var(--mute); font-size: 26px; font-family: system-ui, sans-serif; }
.lightbar .lt line { stroke: hsl(var(--h) var(--s) var(--l)); stroke-width: 4; stroke-linecap: round; }
.lightbar .lt circle { fill: hsl(var(--h) var(--s) var(--l)); stroke: var(--bg); stroke-width: 3; }
.lightlist { list-style: none; margin: 14px 0 0; padding: 0; }
.lightlist li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.sw { width: 12px; height: 12px; border-radius: 50%; background: hsl(var(--h) var(--s) var(--l)); flex: none; align-self: center; }
.nm { color: var(--mute); font-size: 14px; }
.note { color: var(--mute); font-size: 14px; }

@media print { body { background: #fff; color: #000; } header.site nav, .skip { display: none; } }
