/* Steadyline Labs: tokens and layout per BRAND.md */
:root {
  color-scheme: light dark;
  --bg: #F7F6F2;
  --surface: #FFFFFF;
  --ink: #15181D;
  --ink2: #4B525D;
  --muted: #646C78;
  --line: #E7E4DE;
  --line2: #CFCBC3;
  --chip: #EFEDE8;
  --shadow: 0 1px 2px rgba(28, 24, 18, .04), 0 4px 14px rgba(28, 24, 18, .035);
  --line-live: #D9D5CD;
  --shadow-live: 0 1px 2px rgba(28, 24, 18, .05), 0 10px 30px rgba(28, 24, 18, .07);
  --pad-x: clamp(16px, 5vw, 48px);
  --head: "Instrument Sans", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #100F0E;
    --surface: #181715;
    --ink: #ECEEF1;
    --ink2: #A6ADB8;
    --muted: #8A929E;
    --line: #2A2825;
    --line2: #4A4742;
    --chip: #23211E;
    --shadow: 0 1px 2px rgba(0, 0, 0, .30);
    --line-live: #3A3733;
    --shadow-live: 0 1px 2px rgba(0, 0, 0, .30), 0 10px 30px rgba(0, 0, 0, .30);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }

a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line2);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--ink); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--head);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.logo .labs { color: var(--ink2); }
.logo svg { width: 28px; height: 28px; flex: none; }
.logo .tile { fill: var(--ink); }
.logo .glyph { fill: var(--bg); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-nav a { text-decoration: none; color: var(--ink2); }
.site-nav a:hover { color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: var(--head); font-weight: 600; margin: 0; }
h1 { font-size: clamp(44px, 9vw, 88px); line-height: 1.02; letter-spacing: -0.025em; }
.tagline {
  margin: 20px 0 0;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.4;
  color: var(--ink2);
  max-width: 34ch;
  text-wrap: balance;
}
@media (min-width: 768px) { .tagline { max-width: none; white-space: nowrap; } }
.section-label {
  font-family: var(--body);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }

/* Hero */
.hero { padding-top: clamp(48px, 9vw, 112px); padding-bottom: clamp(40px, 6vw, 64px); }

/* Line motif: the line is the road, the point is the traveller on it. Static by design. */
.line-motif { margin-top: 40px; }
.line-motif .point { width: 8px; height: 8px; border-radius: 2px; background: var(--ink); margin-bottom: 6px; }
.line-motif .line { height: 2px; background: var(--ink); }
/* Hero: the road spans the content column and fades out over its last 40%, carrying on into the distance. */
.hero .line-motif { margin-top: clamp(28px, 4vw, 44px); }
.hero .line-motif .line { background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 62%, transparent 100%); }
.hero .line-motif .point { width: 9px; height: 9px; margin-bottom: 2px; }

/* Sections: separated by space only, so the road is the one full line on the page */
.section > .wrap { padding-top: clamp(40px, 6vw, 64px); padding-bottom: clamp(40px, 6vw, 64px); }
#products .section-label { margin-bottom: 24px; }

/* App cards */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
  container-type: inline-size;
}
.app-grid > .app-card--wide, .app-grid > .lab-row { grid-column: 1 / -1; }
.app-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow);
}
/* Tether Link Utility, the one product that is out: full width, links bottom right */
.app-card--wide {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
}
.app-card--wide .app-head { flex: 1 1 380px; min-width: 0; }
.app-card--wide .app-head p { max-width: 480px; }
.app-card--wide .badges { margin-top: 18px; }
.app-card--wide .app-links { margin: 0; padding: 0; border-top: 0; }
/* The released product stands out without motion: deeper soft shadow, slightly darker border */
.app-card--wide { border-color: var(--line-live); box-shadow: var(--shadow-live); }
/* Coming from the lab: one compact row for apps still in development */
.lab-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: clamp(16px, 2.4vw, 22px) clamp(20px, 3vw, 28px);
}
.lab-icons { display: flex; gap: 8px; flex: none; }
.lab-icons img, .lab-icons video { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; display: block; }
.lab-icons video { background: var(--chip); }
.lab-icons video::-webkit-media-controls,
.lab-icons video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.lab-text { flex: 1 1 220px; min-width: 0; }
.lab-text h3 { font-size: 19px; line-height: 1.25; }
.lab-text p { margin: 3px 0 0; font-size: 15px; color: var(--muted); }
.app-head { display: flex; gap: 16px; align-items: flex-start; }
.app-head img, .app-head video { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.app-head video { display: block; object-fit: cover; background: var(--chip); }
/* iOS (Low Power Mode, data saver) can block autoplay and draws a large play button over the icon; keep the poster clean. */
.app-head video::-webkit-media-controls,
.app-head video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.app-tile { width: 64px; height: 64px; border-radius: 14px; flex: none; border: 1px solid var(--line); background: repeating-linear-gradient(135deg, var(--chip) 0 6px, var(--line) 6px 12px); }
.app-head p { margin: 6px 0 0; color: var(--ink2); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  padding: 4px 12px;
  border-radius: 999px;
}
.badge.available { background: var(--chip); color: var(--ink); }
.badge.available::before { content: ""; width: 6px; height: 6px; background: var(--ink); }
.badge.soon { border: 1px dashed var(--line2); color: var(--ink2); padding: 3px 11px; }
.badge.new { background: #1A1A1A; color: #FFFFFF; }
@media (prefers-color-scheme: dark) {
  .badge.new { background: #F2F2F2; color: #111111; }
  .app-card, .launch-island { border-color: rgba(255, 255, 255, .08); }
}
@media (max-width: 600px) { .app-card { padding: 16px; } }
.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.app-note { color: var(--muted); }

/* About / Contact rows */
.row { display: flex; flex-wrap: wrap; gap: 16px 32px; }
.row > .section-label { flex: 1 1 180px; margin: 0; }
.row > .row-body { flex: 3 1 420px; max-width: 62ch; }
.about-text { margin: 0; font-size: clamp(18px, 2.1vw, 21px); line-height: 1.55; }
.contact-label { color: var(--muted); font-size: 14px; }
.contact-primary { display: flex; flex-direction: column; gap: 4px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.contact-primary .contact-label { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.contact-main { font-family: var(--head); font-weight: 600; font-size: clamp(20px, 2.4vw, 24px); text-decoration: none; overflow-wrap: anywhere; }
.contact-main:hover { text-decoration: underline; }
#contact .section-label { margin: 0 0 20px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-icon { width: 28px; height: 28px; border-radius: 7px; flex: none; object-fit: cover; }
.contact-mark { display: grid; place-items: center; background: var(--chip); color: var(--ink); }
.contact-mark svg { width: 15px; height: 15px; fill: currentColor; }
.contact-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.contact-text .contact-label { min-width: 80px; }
.contact-text a { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .contact-text { flex-direction: column; align-items: flex-start; }
  .contact-text .contact-label { min-width: 0; }
  .contact-text a { font-size: min(16px, 4vw); }
}

/* Footer */
.site-footer { color: var(--muted); font-size: 14px; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 28px;
  padding-bottom: 40px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); font-weight: 400; }
.site-footer a:hover { color: var(--ink); }

/* Prose pages (privacy) */
.page { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 64px); }
.page h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.05; }
.page .meta { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.prose { max-width: 62ch; margin-top: 32px; }
.prose p, .prose ul { margin: 0 0 16px; }
.prose ul { padding-left: 20px; }

/* 404 */
.notfound .label { margin: 0 0 12px; }
.notfound p { margin: 16px 0 0; color: var(--ink2); }
.notfound .line-motif { max-width: 480px; }
.notfound .back { display: inline-block; margin-top: 32px; }

/* Launch island: a calm pill above the hero title, one config per launch in index.html */
.launch-island {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  height: 40px;
  padding: 0 6px 0 8px;
  margin-bottom: clamp(24px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}
.launch-island[hidden] { display: none; }
.launch-icon { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.launch-text { font-weight: 500; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.launch-link { flex: none; }
.launch-list { display: contents; list-style: none; margin: 0; padding: 0; }
.launch-item { display: contents; }
.launch-copy { display: contents; }
.launch-note { display: none; }
.launch-more { display: none; }
/* Two or more pieces of news: a small stacked card, links inline under each item, one close button top-right (Design, 28 Oct) */
.launch-links { display: contents; }
.launch-island.is-multi {
  display: block;
  position: relative;
  max-width: 640px;
  height: auto;
  padding: 16px 52px 16px 20px;
  border-radius: 14px;
  white-space: normal;
}
.launch-island.is-multi .launch-list { display: block; min-width: 0; }
.launch-island.is-multi .launch-item { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; }
.launch-island.is-multi .launch-item + .launch-item { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.launch-island.is-multi .launch-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.launch-island.is-multi .launch-text { overflow: visible; font-weight: 600; }
.launch-island.is-multi .launch-note { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; text-wrap: pretty; }
.launch-island.is-multi .launch-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 14px; line-height: 1.4; }
.launch-island.is-multi .launch-link { font-weight: 600; white-space: nowrap; }
.launch-island.is-multi .launch-more { display: inline; font-weight: 400; white-space: nowrap; }
.launch-island.is-multi .launch-sep { display: none; }
.launch-island.is-multi .launch-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; }
@media (max-width: 600px) {
  .launch-island.is-multi { padding: 16px 48px 16px 16px; }
  .launch-island.is-multi .launch-note { font-size: 13px; }
  /* the close button sits only at the top, so the link row may use the space under it and stays on one line */
  .launch-island.is-multi .launch-links { margin-right: -36px; }
}
.launch-sep { width: 1px; height: 18px; background: var(--line); flex: none; }
.launch-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.launch-close:hover { background: var(--chip); color: var(--ink); }
.launch-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.launch-close svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (max-width: 600px) { .launch-island { font-size: 14px; } }
@media (max-width: 380px) { .launch-island { font-size: 13px; gap: 6px; } }
/* Launch fireworks: one canvas behind the hero text, never over the nav */
.hero { position: relative; overflow: hidden; }
.hero > .wrap { position: relative; z-index: 1; }
.fireworks-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* Card hero preview: always inside its own card. Mouse: the image opens at the top of the card on hover/focus. Touch: it sits there permanently. */
.app-card { --card-pad: clamp(20px, 3vw, 28px); }
.app-hero-wrap {
  display: grid;
  flex: none;
  width: calc(100% + 2 * var(--card-pad));
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 0;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
}
.app-hero-wrap > div { min-height: 0; overflow: hidden; background: var(--hero-bg, transparent); }
.app-card--wide .app-hero-wrap { flex-basis: calc(100% + 2 * var(--card-pad)); }
.app-hero { display: block; width: 100%; height: auto; aspect-ratio: 1024 / 500; object-fit: cover; }
@media (hover: hover) and (pointer: fine) {
  .app-hero-wrap {
    grid-template-rows: 0fr;
    margin-top: 0;
    margin-bottom: -20px;
    transition: grid-template-rows 0s, margin 0s;
  }
  .app-hero { opacity: 0; transition: opacity 0s; }
  .has-hero:hover .app-hero-wrap,
  .has-hero:focus-within .app-hero-wrap {
    grid-template-rows: 1fr;
    margin-top: calc(-1 * var(--card-pad));
    margin-bottom: 0;
    transition: grid-template-rows 220ms ease-out 250ms, margin 220ms ease-out 250ms;
  }
  /* Wide card is a wrapping flex row: an empty line still gets the 20px row gap, so the top padding gives it back */
  .app-card--wide.has-hero { padding-top: calc(var(--card-pad) - 20px); }
  .app-card--wide .app-hero-wrap { margin-bottom: 0; }
  .app-card--wide.has-hero:hover .app-hero-wrap,
  .app-card--wide.has-hero:focus-within .app-hero-wrap { margin-top: calc(20px - var(--card-pad)); }
  /* The wide card opens a calm 280px band so the page below does not jump far */
  .app-card--wide .app-hero { max-height: 280px; object-fit: contain; }
  .has-hero:hover .app-hero,
  .has-hero:focus-within .app-hero { opacity: 1; transition: opacity 180ms ease-out 330ms; }
}
@media (prefers-reduced-motion: reduce) {
  .app-hero-wrap, .app-hero,
  .has-hero:hover .app-hero-wrap, .has-hero:hover .app-hero,
  .has-hero:focus-within .app-hero-wrap, .has-hero:focus-within .app-hero { transition: none; }
}

/* App pages (/tether-link-utility/, /bil-at/): one product per page, same tokens and cards as the home page */
.app-card h3 a { text-decoration: none; }
.app-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--line2); }
.crumbs { margin: 0 0 28px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line2); }
.crumbs a { color: var(--ink2); font-weight: 400; }
.app-intro { display: flex; flex-wrap: wrap; gap: 20px 24px; align-items: center; }
.app-intro img { width: 96px; height: 96px; border-radius: 22px; flex: none; box-shadow: var(--shadow); }
.app-intro > div { flex: 1 1 260px; min-width: 0; }
.app-intro .lede { margin: 10px 0 0; font-size: clamp(18px, 2.1vw, 21px); line-height: 1.45; color: var(--ink2); }
.app-intro .badges { margin-top: 16px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 32px; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 500; }
.btn-primary:hover { opacity: .88; }
.app-shot { margin: 40px 0 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--hero-bg, var(--chip)); max-width: 800px; }
.app-shot img { width: 100%; height: auto; aspect-ratio: 800 / 391; object-fit: cover; }
.facts { margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; max-width: 62ch; }
.facts dt { color: var(--muted); font-size: 14px; padding-top: 2px; }
.facts dd { margin: 0; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }
.prose h2 { font-size: 22px; line-height: 1.25; margin: 40px 0 12px; }
.page .back-block { margin-top: 48px; max-width: 480px; }
.page .back-block .line-motif { margin: 0 0 20px; }

/* Lab notes (/notes/): vertical timeline, newest first.
   One rail (the brand line, stood upright) with a big "now" circle on top,
   a small typed circle per note, and the brand square closing the line. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.timeline {
  --date-w: 9.5em; --col-gap: 20px; --rail: 48px; --node: 32px;
  --rail-x: calc(var(--date-w) + var(--col-gap) + var(--rail) / 2);
  position: relative; margin: 40px 0 0; padding-bottom: 8px; max-width: 72ch;
}
.timeline::before { content: ""; position: absolute; left: calc(var(--rail-x) - 1px); top: 24px; bottom: 8px; width: 2px; background: var(--line2); }
.timeline::after { content: ""; position: absolute; left: calc(var(--rail-x) - 4px); bottom: 0; width: 8px; height: 8px; border-radius: 2px; background: var(--ink); }
.timeline-now, .note {
  position: relative; display: grid; column-gap: var(--col-gap);
  grid-template-columns: var(--date-w) var(--rail) minmax(0, 1fr);
  grid-template-areas: "meta node body";
}
.timeline-now { padding-bottom: 36px; }
.notes { list-style: none; margin: 0; padding: 0; }
.note { padding-bottom: 30px; scroll-margin-top: 24px; }
.note-node, .now-node { grid-area: node; justify-self: center; position: relative; z-index: 1; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--surface); }
.note-node { width: var(--node); height: var(--node); border: 1.5px solid var(--line2); }
.now-node { width: 48px; height: 48px; border: 2px solid var(--ink); box-shadow: var(--shadow); }
.note-node svg, .now-node svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.now-node svg { width: 24px; height: 24px; }
.note-node .solid, .now-node .solid, #i-brand rect, #i-teaser path { fill: currentColor; stroke: none; }
.note--launch .note-node { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.note--brand .note-node, .note--teaser .note-node { background: var(--chip); }
.note-meta { grid-area: meta; margin: 0; padding-top: 5px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; color: var(--muted); font-size: 14px; line-height: 1.6; }
.timeline-now .note-meta { padding-top: 12px; font-family: var(--head); font-weight: 600; color: var(--ink2); }
.note-type { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5; }
.note-body { grid-area: body; min-width: 0; padding-top: 3px; }
.note h2 { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.note h2 a { text-decoration: none; }
.note h2 a:hover { text-decoration: underline; text-decoration-color: var(--line2); }
.note p:not(.note-meta) { margin: 6px 0 0; color: var(--ink2); }
.now-title { margin: 0; padding-top: 9px; font-family: var(--head); font-weight: 600; font-size: 19px; line-height: 1.3; }
.now-sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.note:target .note-body { background: var(--chip); border-radius: 8px; margin: -6px -10px 0; padding: 9px 10px 8px; }
@media (max-width: 600px) {
  .timeline { --date-w: 0px; --col-gap: 12px; --rail: 40px; --rail-x: calc(var(--rail) / 2); }
  .timeline-now, .note { grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-areas: "node meta" "node body"; }
  .note-meta { flex-direction: row; flex-wrap: wrap; gap: 0 10px; align-items: baseline; text-align: left; }
  .timeline-now .note-meta { padding-top: 0; }
  .timeline-now .note-body { padding-top: 0; }
  .now-node { width: 40px; height: 40px; }
  .now-node svg { width: 20px; height: 20px; }
  .now-title { padding-top: 0; }
  .note-body { padding-top: 0; }
  .timeline-now { padding-bottom: 28px; }
}
.about-more { margin: 16px 0 0; }
