/* The brand site, styled BY the brand: every colour is a token from tokens.css
   (light default, dark via prefers-color-scheme or [data-theme]). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--background); color: var(--text);
  font-family: var(--font-text); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--secondary); }
code, .mono { font-family: var(--font-data); font-size: 0.86em; }
img, svg, canvas { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--background); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }

/* ── Bar ─────────────────────────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  height: 64px; padding: 0 clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--background) 72%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.bar-brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.bar-brand svg { height: 22px; width: auto; color: var(--mark); }
.bar-nav { display: flex; gap: 20px; font-size: 14px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.bar-nav a { text-decoration: none; color: var(--secondary); white-space: nowrap; }
.bar-nav a:hover { color: var(--text); }
.bar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.theme { background: none; border: 1px solid var(--border); color: var(--text); width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.tools { position: relative; }
.tools summary { list-style: none; cursor: pointer; font-size: 14px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; }
.tools summary::-webkit-details-marker { display: none; }
.tools-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 6px; box-shadow: 0 20px 40px -18px rgb(0 0 0 / 0.35); }
.tools-menu a { display: flex; flex-direction: column; padding: 9px 12px; border-radius: 9px; text-decoration: none; font-size: 14px; font-weight: 500; }
.tools-menu a span { font-weight: 400; color: var(--secondary); font-size: 12.5px; }
.tools-menu a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
@media (max-width: 760px) { .bar-nav { display: none; } }

/* ── Type ────────────────────────────────────────────────────────────── */
.eyebrow { font-family: var(--font-data); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); margin: 0 0 14px; }
.h2 { font-family: var(--font-brand); font-weight: 500; font-size: clamp(30px, 4.6vw, 56px); letter-spacing: -0.04em; line-height: 1.06; margin: 0 0 36px; max-width: 22ch; }
.h3 { font-family: var(--font-brand); font-weight: 500; font-size: 24px; letter-spacing: -0.02em; margin: 56px 0 18px; }
.lede { font-size: 18px; line-height: 1.55; color: var(--secondary); max-width: 62ch; margin: 0 0 24px; }
.note, .hint { color: var(--secondary); font-size: 14px; max-width: 70ch; }
.hint { margin: -20px 0 20px; }

/* ── Layout ──────────────────────────────────────────────────────────── */
.sec { padding: clamp(64px, 9vw, 120px) clamp(16px, 5vw, 72px); max-width: 1320px; margin: 0 auto; border-top: 1px solid var(--border); }
.grid2, .grid3, .grid4 { display: grid; gap: 24px; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.ruled { border-top: 1.5px solid var(--text); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.ruled .k { font-family: var(--font-data); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.ruled .v { font-family: var(--font-brand); font-weight: 500; font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; }
.ruled .u { color: var(--secondary); font-size: 15px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px; font: 500 15px/1 var(--font-text); text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn-solid { background: var(--button-bg); color: var(--button-fg); }
.btn-solid:hover { color: var(--button-fg); opacity: 0.88; }
.btn-line { background: transparent; color: var(--text); border-color: var(--outline); }
.btn-line:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: min(86vh, 860px); display: flex; align-items: center; overflow: hidden; }
.hero-tide { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 32% 50%, color-mix(in srgb, var(--background) 82%, transparent) 0%, transparent 72%); }
.hero-copy { position: relative; z-index: 1; padding: 96px clamp(16px, 5vw, 72px); max-width: 1320px; width: 100%; margin: 0 auto; }
.hero-lockup { margin: 18px 0 26px; line-height: 0; }
.hero-lockup svg { height: clamp(56px, 10vw, 128px); width: auto; color: var(--mark); }
.hero-tag { font-family: var(--font-brand); font-weight: 500; font-size: clamp(22px, 3vw, 40px); letter-spacing: -0.032em; margin: 0 0 12px; }
.hero-sub { color: var(--secondary); font-size: 17px; max-width: 52ch; margin: 0; }

/* ── Mark ────────────────────────────────────────────────────────────── */
.mark-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 48px; align-items: center; }
.mark-stage { aspect-ratio: 1; border-radius: 24px; display: grid; place-items: center; background: radial-gradient(90% 70% at 50% 42%, #2A2E36 0%, #0B0D10 70%); }
.mark-stage svg { width: 68%; height: auto; }
.rings { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.rings th { text-align: left; font: 400 12px var(--font-data); letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); padding: 0 0 10px; border-bottom: 1.5px solid var(--text); }
.rings td { padding: 12px 0; border-bottom: 1px solid var(--border); }
.rings td:last-child { color: var(--secondary); }
.tool { margin-top: 56px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: clamp(18px, 3vw, 32px); }
.tool .h3 { margin-top: 0; }
.tool-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; font-size: 14px; margin: 18px 0; }
.tool-row label { display: flex; align-items: center; gap: 8px; color: var(--secondary); }
.tool-row select, .tool-row input[type=number] { font: inherit; color: var(--text); background: var(--background); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.tool-row input[type=number] { width: 92px; }
.tool-out { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 24px; align-items: center; }
/* minmax(0, …), not 1fr: a 1fr track grows to its content's min width, and the
   one-line URL below is wider than a phone. */
@media (max-width: 560px) { .tool-out { grid-template-columns: minmax(0, 1fr); } .tool-preview { max-width: 240px; } }
.tool-preview { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--border); display: grid; place-items: center;
  background: repeating-conic-gradient(color-mix(in srgb, var(--text) 6%, transparent) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.tool-preview img { width: 72%; height: auto; }
.tool-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; min-width: 0; }
.url { display: block; width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; white-space: nowrap; padding: 10px 12px; background: var(--background); border: 1px solid var(--border); border-radius: 10px; color: var(--secondary); }

/* ── Lockups, misuse ─────────────────────────────────────────────────── */
.lockups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.lockup-card { border-radius: 20px; padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; gap: 36px; justify-content: center; min-height: 280px; border: 1px solid var(--border); }
.lockup-card.on-dark { background: radial-gradient(90% 90% at 30% 20%, #2A2E36 0%, #0B0D10 70%); color: #fff; border-color: transparent; }
.lockup-card.on-light { background: #F4F2EC; color: #0B0D10; }
.lockup-card img { height: auto; }
.rules { margin-top: 40px; }
.misuse { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.misuse .demo { height: 160px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: #F4F2EC; }
.misuse .demo img { width: 96px; height: 96px; }
.misuse p { margin: 0; font-size: 15px; display: flex; gap: 10px; }
.misuse p::before { content: "✕"; font-family: var(--font-data); color: var(--label); }

/* ── Colour ──────────────────────────────────────────────────────────── */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.swatch { display: flex; flex-direction: column; align-self: stretch; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.swatch .chip-c { height: 120px; display: flex; align-items: flex-end; padding: 12px 14px; font: 12px var(--font-data); }
.swatch .meta { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.swatch .nm { font-family: var(--font-brand); font-weight: 500; font-size: 20px; }
.swatch .hx { font-family: var(--font-data); font-size: 13px; color: var(--secondary); }
.swatch .rl { font-size: 13.5px; color: var(--secondary); line-height: 1.35; }
.swatches.small .chip-c { height: 64px; }
.lights { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }
.light-card { padding: 26px; display: flex; flex-direction: column; gap: 10px; min-height: 300px; color: #0B0D10; }
.light-card .hx { font: 13px var(--font-data); opacity: 0.7; }
.light-card .nm { font-family: var(--font-brand); font-weight: 500; font-size: 32px; letter-spacing: -0.03em; }
.light-card .use { font-size: 15px; }
.light-card .not { font-size: 14px; opacity: 0.7; margin-top: auto; }

/* ── Type ────────────────────────────────────────────────────────────── */
.font-card .aa { font-size: 88px; line-height: 1; margin: 6px 0; }
.font-card .sample { font-size: 22px; line-height: 1.35; }
.scale { margin-top: 48px; display: flex; flex-direction: column; gap: 14px; }
.scale-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: baseline; border-top: 1px solid var(--border); padding-top: 14px; }
.scale-row .k { font: 12px var(--font-data); letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.scale-row .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Modes ───────────────────────────────────────────────────────────── */
.mode { border-radius: 22px; padding: clamp(20px, 3vw, 34px); display: flex; flex-direction: column; gap: 14px; border: 1px solid rgb(11 13 16 / 0.1); }
.mode .top { display: flex; justify-content: space-between; align-items: center; }
.mode .top svg { height: 26px; width: auto; }
.mode .card { border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.mode .card b { font-family: var(--font-brand); font-weight: 500; font-size: 24px; letter-spacing: -0.02em; }
.mode .row { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; font-size: 15px; }
.mode .row span:last-child { display: flex; align-items: center; gap: 10px; font: 13px var(--font-data); }
.mode .row i { width: 20px; height: 20px; border-radius: 6px; display: inline-block; }

/* ── Tide ────────────────────────────────────────────────────────────── */
.tides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.tide-card { margin: 0; position: relative; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; }
.tide-card.dark { background: #0B0D10; } .tide-card.light { background: #F4F2EC; border: 1px solid var(--border); }
.tide-card canvas { width: 100%; height: 100%; }
.tide-card figcaption { position: absolute; left: 14px; bottom: 12px; font: 12px var(--font-data); letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; }
.tide-card.dark figcaption { background: rgb(11 13 16 / 0.8); color: #fff; } .tide-card.light figcaption { background: rgb(244 242 236 / 0.9); color: #0B0D10; }
.bullets { color: var(--secondary); padding-left: 18px; max-width: 72ch; }
.bullets li { margin: 6px 0; }

/* ── OS ──────────────────────────────────────────────────────────────── */
/* Slide 15 of Brand Book v5: both rows on the Apple-grey panel, dark first. */
.ladder-panel { background: #F5F5F7; border-radius: 18px; padding: clamp(18px, 3vw, 36px); display: flex; flex-direction: column; gap: 26px; overflow-x: auto; }
.ladder { display: flex; align-items: flex-end; gap: 26px; }
.ladder figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.ladder figcaption { font: 12px var(--font-data); color: #86868B; }
.menubars { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.menubar { height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font: 14px -apple-system, system-ui, sans-serif; box-shadow: 0 10px 24px -16px rgb(0 0 0 / 0.5); }
.menubar .l, .menubar .r { display: flex; gap: 18px; align-items: center; }
.menubar .l b { font-weight: 600; }
/* Brand Book v5: the status item is the mark alone — no tile, no highlight — 16 pt. */
.menubar .ico { display: grid; place-items: center; }
.menubar .ico img { width: 16px; height: 16px; }
.menubar.dark { background: #0A0710; color: #fff; }
.menubar.dark .ico img { filter: invert(1); }
.menubar.light { background: rgb(246 246 248 / 0.96); color: #1D1D1F; }
@media (max-width: 560px) { .menubar .l span, .menubar .r > span:not(.ico) { display: none; } }
.menubar-cap { font: 12px var(--font-data); color: var(--label); letter-spacing: 0.1em; text-transform: uppercase; }

/* ── Assets & endpoints ──────────────────────────────────────────────── */
.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; margin-top: 32px; }
.asset { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.asset .pv { height: 150px; display: grid; place-items: center; padding: 18px; }
.asset .pv img { max-height: 100%; max-width: 100%; width: auto; }
.asset .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.asset .t { font-weight: 500; font-size: 15px; }
.asset .u { font-size: 13px; color: var(--secondary); line-height: 1.35; }
.asset .dl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.asset .dl a { font: 12px var(--font-data); padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; }
.asset .dl a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.endpoints { width: 100%; border-collapse: collapse; font-size: 14px; }
.endpoints td { padding: 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.endpoints td:first-child { font-family: var(--font-data); font-size: 13px; padding-right: 18px; word-break: break-all; width: 46%; }
.endpoints td:last-child { color: var(--secondary); }

/* ── Rollout ─────────────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { font: 14px var(--font-text); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; }
.chip.on { background: var(--button-bg); color: var(--button-fg); border-color: var(--button-bg); }
.clarify { border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; margin-bottom: 24px; background: var(--surface); }
.clarify h3 { margin: 0 0 10px; font: 500 20px var(--font-brand); letter-spacing: -0.02em; }
.clarify ol { margin: 0; padding-left: 20px; } .clarify li { margin: 8px 0; } .clarify li span { color: var(--secondary); display: block; font-size: 14px; }
.rollout { display: flex; flex-direction: column; gap: 16px; }
.ro { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); padding: 20px 22px; display: grid; gap: 14px; }
.ro-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ro-head h3 { margin: 0; font: 500 19px/1.3 var(--font-brand); letter-spacing: -0.015em; flex: 1 1 280px; }
.tag { font: 11px var(--font-data); letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--secondary); }
.tag.replace { background: var(--text); color: var(--background); border-color: var(--text); }
.tag.decide { border-color: var(--text); color: var(--text); }
.tag.on-brand { color: #3BB273; border-color: #3BB273; }
.tag.keep { border-style: dashed; }
.tag.shipped { background: #3BB273; color: #fff; border-color: #3BB273; }
.ro-shipped { margin: 6px 0 0; font-size: 14px; }
.clarify ul { margin: 0; padding-left: 20px; } .clarify ul li { margin: 6px 0; }
.ro-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .ro-cmp { grid-template-columns: 1fr; } }
.ro-side { border-radius: 12px; padding: 14px; background: var(--background); display: flex; flex-direction: column; gap: 10px; }
.ro-side .lbl { font: 11px var(--font-data); letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.ro-side p { margin: 0; font-size: 14.5px; }
.ro-side .img { height: 110px; display: grid; place-items: center; border-radius: 10px; background: repeating-conic-gradient(color-mix(in srgb, var(--text) 6%, transparent) 0 25%, transparent 0 50%) 0 0 / 14px 14px; }
.ro-side .img img { max-height: 96px; max-width: 90%; width: auto; }
.ro-body { font-size: 14.5px; display: grid; gap: 6px; }
.ro-body .files { font: 12.5px var(--font-data); color: var(--secondary); word-break: break-all; }
.ro-body b { font-weight: 500; }
.ro-approve { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.ro-approve input { width: 18px; height: 18px; accent-color: var(--text); }
.approve-bar { position: sticky; bottom: 16px; margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 12px 12px 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 16px 40px -20px rgb(0 0 0 / 0.4); }

/* ── Footer, toast ───────────────────────────────────────────────────── */
.foot { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding: 40px clamp(16px, 5vw, 72px); border-top: 1px solid var(--border); color: var(--secondary); font-size: 14px; }
.foot svg { height: 20px; width: auto; color: var(--mark); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: 0.2s; background: var(--text); color: var(--background); padding: 10px 16px; border-radius: 999px; font-size: 14px; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
