/* Sea Ports Corporation — identity site. Tokens follow Design System v1. */
@font-face { font-family: "Marsa"; src: url("assets/fonts/Marsa-Regular.woff2?v=2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Marsa"; src: url("assets/fonts/Marsa-Medium.woff2?v=2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Marsa"; src: url("assets/fonts/Marsa-Bold.woff2?v=2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --port-blue: #0820B1;
  --port-blue-deep: #04157A;
  --port-blue-soft: #E4E8FA;
  --on-port-blue: #FFFFFF;
  --surface: #F6F7FB;
  --surface-raised: #FFFFFF;
  --line: #D5DAEC;
  --ink: #0C1233;
  --ink-muted: #4B5274;
  --alert: #B42318;
  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --header-h: 80px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 400 1rem/1.75 "Marsa", Tahoma, sans-serif; background: var(--surface); color: var(--ink); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 var(--space-4); }
h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); font-weight: 700; }
h2 { font-size: 2rem; }
h3 { font-size: 1.125rem; font-weight: 500; }
p { margin: 0 0 var(--space-4); }
figure { margin: 0; }
ul, ol { margin: 0; padding: 0; }
code { font-family: "Marsa", monospace; font-size: .8125rem; color: var(--ink-muted); }
:focus-visible { outline: 2px solid var(--port-blue); outline-offset: 2px; }
.hero :focus-visible, .site-header :focus-visible, .download-band :focus-visible { outline-color: var(--on-port-blue); }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 8px; top: -100px; background: #fff; padding: var(--space-2) var(--space-4); z-index: 20; }
.skip:focus { top: 8px; }

/* Logo disc: required on blue. Tight white disc, rim about 3% of the emblem width. */
.logo-disc { display: inline-grid; place-items: center; background: #fff; border-radius: 50%; padding: 2px; flex: none; }
.logo-disc img { display: block; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--port-blue); color: var(--on-port-blue); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); position: relative; }
.brand { display: flex; align-items: center; gap: var(--space-2); color: inherit; text-decoration: none; }
.brand .logo-disc img { width: 48px; height: 48px; }
.brand strong { display: block; line-height: 1.4; }
.brand small { display: block; font-size: .75rem; line-height: 1.4; text-align: right; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-header nav a { color: inherit; text-decoration: none; font-size: .8125rem; font-weight: 500; padding: var(--space-2); border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="true"] { border-bottom-color: #fff; }
.menu-btn { display: none; font: 500 .875rem "Marsa", Tahoma, sans-serif; color: #fff; background: transparent; border: 1px solid #fff; border-radius: var(--radius-md); min-height: 44px; padding: 0 var(--space-4); cursor: pointer; }

/* Hero */
.hero { background: var(--port-blue); color: var(--on-port-blue); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-8); align-items: center; padding-block: 72px 56px; }
.eyebrow { font-size: .8125rem; font-weight: 500; }
.lead { font-size: 1.1875rem; line-height: 2; max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-6); }
.hero-mark { display: flex; justify-content: center; }
.logo-disc.xl { padding: 8px; }
.logo-disc.xl img { width: min(280px, 56vw); height: auto; }

/* Wave band, taken from the guide cover */
/* Layers, top first: deep scallops, deep fill, white scallops, white fill. */
.waves { height: 64px; background:
  radial-gradient(circle at 16px 16px, var(--port-blue-deep) 15.5px, transparent 16px) 0 24px / 32px 16px repeat-x,
  linear-gradient(var(--port-blue-deep), var(--port-blue-deep)) 0 39px / 100% 25px no-repeat,
  radial-gradient(circle at 16px 16px, var(--surface) 15.5px, transparent 16px) 0 0 / 32px 16px repeat-x,
  linear-gradient(var(--surface), var(--surface)) 0 15px / 100% 24px no-repeat;
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: var(--space-2) var(--space-6); border-radius: var(--radius-md); font-weight: 500; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--port-blue); color: #fff; }
a.btn-primary:hover { background: var(--port-blue-deep); }
.btn-outline { border-color: var(--port-blue); color: var(--port-blue); background: #fff; }
.btn-outline:hover { background: var(--port-blue-soft); }
.btn-invert { background: #fff; color: var(--port-blue); }
.btn-invert:hover { background: var(--port-blue-soft); }
.btn-ghost { border-color: #fff; color: #fff; }
.btn-ghost:hover { background: var(--port-blue-deep); }

/* Sections */
.section { padding-block: 72px; }
.section-tint { background: var(--port-blue-soft); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-2); border-bottom: 1px solid var(--line); margin-bottom: var(--space-8); }
.section-head span { color: var(--ink-muted); font-weight: 500; }
.section-tint .section-head { border-color: var(--ink-muted); }
.prose { max-width: 48em; }
.big { font-size: 1.375rem; line-height: 1.9; font-weight: 500; color: var(--port-blue); }
.note { color: var(--ink-muted); font-size: .875rem; margin-top: var(--space-4); }
.sub { margin-top: var(--space-8); font-size: 1.25rem; }

.card, .values li, .principle { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); }
.values { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-block: var(--space-8); }
.values li { border-top: 4px solid var(--port-blue); }
.values p, .principle p { margin: 0; font-size: .9375rem; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.principle-primary { background: var(--port-blue); border-color: var(--port-blue); color: #fff; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }

/* Tabs and switch */
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block: var(--space-6); }
.tabs button, .switch button { font: 500 .9375rem "Marsa", Tahoma, sans-serif; min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--ink-muted); background: var(--surface-raised); color: var(--ink); border-radius: var(--radius-md); cursor: pointer; }
.tabs button[aria-selected="true"], .switch button[aria-pressed="true"] { background: var(--port-blue); border-color: var(--port-blue); color: #fff; }
.tabs:not(.ready) { display: none; }

/* Case comparison */
.case { margin-bottom: var(--space-8); }
.case[hidden] { display: none; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.side { display: flex; flex-direction: column; gap: var(--space-2); }
.tag { display: inline-block; font-size: .8125rem; font-weight: 700; padding: 4px var(--space-4); border-radius: 9999px; background: #fff; }
.tag-bad { color: var(--alert); border: 1px solid var(--alert); }
.tag-good { color: #fff; background: var(--port-blue); }
.mock { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); min-height: 280px; }
.mock p:last-child { margin-bottom: 0; }
.mock-title { font-weight: 700; font-size: 1.25rem; }
.verdict { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin: var(--space-6) 0 0; }
.verdict > div { background: #fff; border-radius: var(--radius-md); padding: var(--space-4) var(--space-6); border-top: 4px solid var(--port-blue); }
.verdict > div:first-child { border-top-color: var(--alert); }
.verdict dt { font-weight: 700; color: var(--port-blue); }
.verdict > div:first-child dt { color: var(--alert); }
.verdict dd { margin: var(--space-2) 0 0; font-size: .9375rem; }

/* "Before" mockups intentionally break the guide */
.bad-notice { font-family: "Times New Roman", serif; text-align: center; background: #FFF59D; }
.bn-title { color: #D500F9; font-size: 2rem; font-weight: 700; text-decoration: underline; }
.bn-body { color: #00695C; font-size: 1.25rem; font-style: italic; }
.bn-foot { color: #000; text-align: left; }
.bad-signs { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--space-4); background: #CFCFCF; }
.bad-signs span { padding: var(--space-2) var(--space-4); }
.s1 { background: #FFEB3B; color: #000; font: 700 1.5rem "Times New Roman", serif; transform: rotate(-3deg); }
.s2 { align-self: flex-end; background: #1B5E20; color: #fff; font: 700 1.125rem Impact, sans-serif; letter-spacing: 3px; }
.s3 { background: #fff; color: #6A1B9A; font: italic 1.375rem Arial, sans-serif; border: 3px dashed #6A1B9A; transform: rotate(2deg); }
.s4 { align-self: center; background: #000; color: #FF5252; font: 700 1rem "Courier New", monospace; }
.bad-table { width: 100%; border-collapse: collapse; font-family: "Times New Roman", serif; }
.bad-table td { border: 2px solid #000; padding: 4px; }
.bad-table tr:nth-child(2) { background: #B2FF59; }
.dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; }
.d-green { background: #2E7D32; } .d-yellow { background: #F9A825; } .d-red { background: #C62828; }
.bad-form { font-family: "Times New Roman", serif; color: #555; }
.bf-title { text-align: center; text-decoration: underline; }
.bf-field { border: 1px solid #bbb; height: 40px; }
.bf-error { color: #C62828; font-size: .75rem; margin-top: 4px; }
.bad-logos { display: grid; grid-template-columns: 1fr 1fr; place-items: center; gap: var(--space-4); }
.x-stretch { transform: scale(1.35, .7); }
.x-colour { filter: hue-rotate(130deg) saturate(1.4); }
.x-shadow { filter: drop-shadow(8px 10px 6px rgba(0,0,0,.65)); }
.x-crop { display: inline-block; width: 96px; height: 56px; overflow: hidden; }
.ids { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--space-6); font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 500; text-align: center; font-feature-settings: "tnum"; }
.ids-bad { font-family: Futura, "Century Gothic", "Gill Sans", Arial, sans-serif; font-weight: 400; }

/* "After" mockups */
.doc-head { display: flex; align-items: center; gap: var(--space-4); border-bottom: 2px solid var(--port-blue); padding-bottom: var(--space-4); margin-bottom: var(--space-4); }
.doc-head img { flex: none; }
.doc-head strong, .doc-head small { display: block; }
.doc-head small { color: var(--ink-muted); text-align: right; }
.doc-kicker { color: var(--port-blue); font-weight: 700; font-size: .8125rem; margin-bottom: 0; }
.doc-title { font-weight: 700; font-size: 1.125rem; }
.doc-meta { color: var(--ink-muted); font-size: .8125rem; margin-top: var(--space-4); }
.line-skel { display: block; height: 8px; background: var(--line); border-radius: var(--radius-sm); margin-bottom: var(--space-4); }
.line-skel.short { width: 55%; }
.wayfinding { background: var(--port-blue); border-color: var(--port-blue); color: #fff; }
.wf-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.logo-disc.sm img { width: 48px; height: 48px; }
.wayfinding ul { list-style: none; }
.wayfinding li { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #fff; padding-block: var(--space-2); }
.wayfinding b, .wayfinding small { display: block; }
.wayfinding small { text-align: right; }
.wayfinding i { font-style: normal; font-size: 2rem; }

.scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: .875rem; font-feature-settings: "tnum"; }
.data th, .data td { text-align: right; padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--line); }
.data thead th { color: var(--ink-muted); font-weight: 500; }
.data tr.selected { background: var(--port-blue-soft); }
.pill { display: inline-block; white-space: nowrap; font-size: .8125rem; font-weight: 500; padding: 0 var(--space-4); border-radius: 9999px; background: var(--port-blue-soft); color: var(--port-blue); }
.pill-solid { background: #fff; border: 1px solid var(--port-blue); }
.pill-alert { background: #fff; color: var(--alert); border: 1px solid var(--alert); }
.field { margin-bottom: var(--space-4); }
.label { display: block; font-size: .8125rem; font-weight: 500; }
.input { display: block; border: 1px solid var(--ink-muted); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-4); color: var(--ink-muted); font-size: .875rem; }
.input[dir="ltr"] { text-align: right; color: var(--ink); }
.input-error { border: 2px solid var(--alert); }
.error-text { display: block; color: var(--alert); font-size: .8125rem; margin-top: 4px; }

/* Journey */
.switch { display: flex; gap: var(--space-2); margin-bottom: var(--space-6); }
.journey { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.journey li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6) var(--space-4); }
.journey li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--port-blue); color: #fff; font-weight: 700; margin-bottom: var(--space-4); }
.journey p { font-size: .9375rem; margin: 0; }
.journey q { display: block; margin-top: var(--space-4); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); font-weight: 500; background: var(--port-blue-soft); color: var(--port-blue); quotes: "«" "»"; }
.journey[data-view="after"] .v-before, .journey[data-view="before"] .v-after { display: none; }
.journey[data-view="before"] li::before { background: var(--ink-muted); }
.journey[data-view="before"] q { background: var(--surface); color: var(--ink); border: 1px dashed var(--ink-muted); }
.impact th[scope="row"] { font-weight: 700; }
.impact { min-width: 720px; }

/* Logo */
.logo-intro { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--space-8); align-items: center; }
.logo-stage { display: grid; place-items: center; padding: 72px var(--space-6); }
.logo-stage img { width: min(280px, 100%); height: auto; }
.rules { padding-inline-start: var(--space-6); margin-bottom: var(--space-6); }
.rules li { margin-bottom: var(--space-2); }
.bg-demo, .dont { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding: var(--space-6) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-md); text-align: center; }
.bg-demo > img { margin: var(--space-6); }
.bg-white { background: #fff; }
.bg-surface { background: var(--surface); }
.bg-blue { background: var(--port-blue); color: #fff; }
/* Tight disc: a thin white rim keeps the outer blue ring visible on blue. */
.logo-disc.logo-disc-fit { padding: 3px; margin: calc(var(--space-6) - 3px); }
.downloads { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.dont { background: #fff; border-top: 4px solid var(--alert); }
.dont > span { display: grid; place-items: center; min-height: 120px; }
.dont figcaption { color: var(--alert); font-weight: 500; }

/* Colour */
.swatches { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); margin-top: var(--space-6); }
.swatches button { display: block; width: 100%; text-align: right; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-2); cursor: pointer; }
.swatches button:hover { border-color: var(--port-blue); }
.swatches b { display: block; font-size: .9375rem; }
.swatches code { display: block; direction: ltr; text-align: right; font-size: .75rem; }
.swatches p { font-size: .8125rem; color: var(--ink-muted); margin: var(--space-2) 0 0; }
.chip { display: block; height: 88px; background: var(--c); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.copy-status { min-height: 28px; color: var(--port-blue); font-weight: 500; margin-top: var(--space-2); }
.sample { display: inline-block; white-space: nowrap; padding: 0 var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* Type */
.type-intro { display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--space-8); align-items: center; margin-bottom: var(--space-8); }
.glyphs { font-size: clamp(3rem, 8vw, 5rem); font-weight: 700; color: var(--port-blue); line-height: 1.4; text-align: center; margin: 0; }
.glyphs span { display: block; color: var(--ink); }
.scale { list-style: none; background: #fff; border-radius: var(--radius-md); padding: var(--space-2) var(--space-6); }
.scale li { display: grid; grid-template-columns: 160px 1fr; gap: var(--space-4); align-items: center; padding-block: var(--space-4); border-bottom: 1px solid var(--line); }
.scale li:last-child { border: 0; }
.meta b, .meta code { display: block; }
.meta code { text-align: right; }
.ts-display { font: 700 2.5rem/3.5rem "Marsa", sans-serif; }
.ts-h1 { font: 700 2rem/2.75rem "Marsa", sans-serif; }
.ts-h2 { font: 700 1.5rem/2.25rem "Marsa", sans-serif; }
.ts-h3 { font: 500 1.125rem/1.75rem "Marsa", sans-serif; }
.ts-body { font-size: 1rem; line-height: 1.75rem; }
.ts-small { font-size: .875rem; line-height: 1.5rem; }
.ts-label { font-size: .8125rem; font-weight: 500; }

/* Spacing */
.spaces, .radii { list-style: none; margin-bottom: var(--space-6); }
.spaces li { display: grid; grid-template-columns: 40px 130px 1fr; gap: var(--space-4); align-items: center; padding-block: var(--space-2); }
.spaces i { width: var(--w); height: 24px; background: var(--port-blue); }
.radii { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.radii li { display: flex; flex-direction: column; gap: 4px; font-size: .875rem; }
.radii i { width: 96px; height: 56px; background: var(--port-blue-soft); border: 2px solid var(--port-blue); }
.demo-focus { outline: 2px solid var(--port-blue); outline-offset: 2px; }

/* Writing */
.say { background: #fff; border-radius: var(--radius-md); padding: var(--space-6); border-top: 4px solid var(--port-blue); }
.say figcaption { font-weight: 700; color: var(--port-blue); margin-bottom: var(--space-2); }
.say-no { border-top-color: var(--alert); }
.say-no figcaption { color: var(--alert); }
.say p { margin: 0; }

/* Rollout */
.steps { list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 56px 220px 1fr; gap: var(--space-4); align-items: center; padding-block: var(--space-4); border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); font-size: 1.5rem; font-weight: 700; color: var(--port-blue); }
.download-band { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-4); background: var(--port-blue); color: #fff; border-radius: var(--radius-md); padding: var(--space-8); margin-top: var(--space-8); }
.download-band h3, .download-band p { margin: 0; }

/* Footer */
.site-footer { background: var(--port-blue-deep); color: #fff; }
.waves-footer { height: 24px; background:
  radial-gradient(circle at 16px 0, var(--surface) 15.5px, transparent 16px) 0 0 / 32px 16px repeat-x; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6); padding-block: var(--space-8); }
.footer-row p { margin: 0; }
.footer-meta { margin-inline-start: auto !important; font-size: .875rem; }

/* Responsive */
@media (max-width: 1100px) {
  .menu-btn { display: block; }
  .site-header nav { display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; background: var(--port-blue-deep); padding: var(--space-2); border-radius: 0 0 var(--radius-md) var(--radius-md); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .site-header nav.open { display: flex; }
  .site-header nav a { font-size: 1rem; padding: var(--space-2) var(--space-4); }
  .swatches { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .values, .journey, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .logo-intro, .type-intro, .compare, .verdict, .principles, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .hero-mark { order: -1; }
  .logo-disc.xl { padding: 5px; }
  .logo-disc.xl img { width: 180px; }
}
@media (max-width: 600px) {
  .values, .journey, .grid-3 { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .scale li, .steps li { grid-template-columns: 1fr; gap: var(--space-2); }
  .spaces li { grid-template-columns: 40px 1fr; }
  .spaces span { grid-column: 1 / -1; }
  .section { padding-block: 48px; }
  .ts-display { font-size: 1.75rem; line-height: 2.75rem; }
  .ts-h1 { font-size: 1.5rem; }
  .brand small { display: none; }
}

/* ===== App chrome: hidden on wide screens ===== */
.tabbar, .seg, .lead-short, .more-text { display: none; }
.backdrop { display: none; }

/* ===== Phone: calm app-like layout, one idea per screen =====
   Arabic body line height stays at 28px, touch targets stay at 44px or more. */
@media (max-width: 760px) {
  :root { --header-h: 56px; --tabbar-h: calc(64px + env(safe-area-inset-bottom, 0px)); --gutter: 20px; }
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: .9375rem; line-height: 28px; padding-bottom: var(--tabbar-h); }
  a, button { -webkit-tap-highlight-color: transparent; }
  .wrap { width: auto; margin-inline: 0; padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)); }
  h2 { font-size: 1.375rem; margin-bottom: var(--space-2); }
  h3 { font-size: 1rem; margin-bottom: var(--space-2); }
  p { margin-bottom: var(--space-4); }

  /* App bar */
  .site-header { padding-top: env(safe-area-inset-top, 0px); }
  .header-row { min-height: var(--header-h); position: static; }
  .brand .logo-disc img { width: 36px; height: 36px; }
  .brand strong { font-size: .9375rem; }
  .brand small { display: none; }
  .menu-btn { display: none; }

  /* Bottom tab bar */
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 15; inset-inline: 0; bottom: 0; height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom, 0px); background: #fff; border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; font: 500 .6875rem/16px "Marsa", Tahoma, sans-serif; color: var(--ink-muted); background: none; border: 0; padding: 0; text-decoration: none; cursor: pointer; }
  .tabbar svg { width: 48px; height: 28px; padding: 3px 13px; border-radius: 9999px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar [aria-current="true"], .tabbar [aria-expanded="true"] { color: var(--port-blue); }
  .tabbar [aria-current="true"] svg, .tabbar [aria-expanded="true"] svg { background: var(--port-blue-soft); }
  .tabbar span { white-space: nowrap; }
  .tabbar :focus-visible { outline-offset: -2px; }
  html:not(.js) .more-btn { display: none; }

  /* Section list as a bottom sheet */
  .site-header nav { display: none; position: fixed; top: auto; bottom: var(--tabbar-h); inset-inline: 0; grid-template-columns: 1fr 1fr; gap: var(--space-2); background: #fff; color: var(--ink); padding: var(--space-6) var(--space-4) var(--space-4); border-radius: 16px 16px 0 0; max-height: 70vh; overflow-y: auto; }
  .site-header nav::before { content: ""; position: absolute; top: 8px; left: calc(50% - 20px); width: 40px; height: 4px; border-radius: 9999px; background: var(--line); }
  .site-header nav.open { display: grid; animation: sheet-in .2s ease-out; }
  .site-header nav a { display: flex; align-items: center; min-height: 48px; font-size: .875rem; padding: 0 var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); }
  .site-header nav a[aria-current="true"] { background: var(--port-blue-soft); border-color: var(--port-blue); color: var(--port-blue); }
  .site-header nav a:focus-visible { outline-color: var(--port-blue); }
  .backdrop:not([hidden]) { display: block; position: fixed; z-index: 9; inset: 0; background: rgba(12, 18, 51, .55); }

  /* Hero */
  .hero-grid { gap: 0; padding-block: var(--space-6) 0; }
  .eyebrow { display: none; }
  h1 { font-size: 2.25rem; line-height: 56px; margin-bottom: 12px; }
  .lead { display: none; }
  .actions { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin-top: var(--space-4); }
  .btn { min-height: 48px; padding: var(--space-2) var(--space-4); font-size: .9375rem; line-height: 24px; }
  .hero-mark { display: none; }
  .lead-short { display: block; font-size: 1rem; line-height: 30px; margin: 0; max-width: 22em; }
  .hero .btn-ghost { border-color: transparent; text-decoration: underline; text-underline-offset: 6px; }
  .hero .btn-ghost:hover { background: transparent; }
  .waves { height: 40px; background:
    radial-gradient(circle at 12px 12px, var(--port-blue-deep) 11.5px, transparent 12px) 0 16px / 24px 12px repeat-x,
    linear-gradient(var(--port-blue-deep), var(--port-blue-deep)) 0 27px / 100% 13px no-repeat,
    radial-gradient(circle at 12px 12px, var(--surface) 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x,
    linear-gradient(var(--surface), var(--surface)) 0 11px / 100% 17px no-repeat; }

  /* Sections */
  .section { padding-block: 48px; }
  .section-head { display: block; border: 0; margin-bottom: var(--space-4); }
  .section-head h2 { margin: 0; line-height: 32px; }
  .section-head span { display: none; }
  .big { font-size: 1.0625rem; line-height: 32px; }
  .note { font-size: .8125rem; line-height: 24px; margin-top: 0; }
  .sub { font-size: 1.0625rem; margin-top: 40px; }
  .card { padding: var(--space-4); }

  .values { grid-template-columns: 1fr; gap: 0; margin-block: var(--space-6); background: #fff; border-radius: var(--radius-md); padding-inline: var(--space-4); }
  .values li { border: 0; border-radius: 0; padding: var(--space-4) 0; background: transparent; }
  .values p, .principle p { font-size: .875rem; line-height: 28px; margin: 0; }

  .values li + li { border-top: 1px solid var(--line); }
  .values h3 { margin-bottom: 4px; color: var(--port-blue); font-weight: 700; }
  .prose > p:not(.big), .values p { color: var(--ink-muted); }
  #intro .intro-more:not(.open) { display: none; }
  html:not(.js) #intro .intro-more { display: block; }
  html.js .more-text { display: inline-flex; align-items: center; min-height: 44px; padding: 0; font: 700 .875rem "Marsa", Tahoma, sans-serif; color: var(--port-blue); background: none; border: 0; cursor: pointer; }

  /* Principles: a plain stacked list */
  .principles { grid-template-columns: 1fr; gap: var(--space-2); }
  .principle { border: 0; padding: var(--space-4); }

  /* Cases: sticky chips and one state at a time */
  .tabs { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 5; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: var(--space-2) calc(-1 * var(--gutter)) var(--space-4); padding: 12px var(--gutter); background: var(--port-blue-soft); }
  .tabs::-webkit-scrollbar, .principles::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; border: 0; border-radius: 9999px; font-size: .875rem; }
  .case { margin-bottom: 0; scroll-margin-top: 64px; }
  .case > h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px; background: #fff; border-radius: var(--radius-md); }
  .seg button, .switch button { min-height: 44px; font: 500 .875rem "Marsa", Tahoma, sans-serif; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-muted); cursor: pointer; }
  .seg button[aria-pressed="true"] { background: var(--port-blue); color: #fff; }
  .seg button[data-side="before"][aria-pressed="true"] { background: var(--alert); }
  .compare { gap: 0; }
  .case[data-side] .side > figcaption { display: none; }
  .case[data-side="before"] .side-after, .case[data-side="after"] .side-before { display: none; }
  .mock { padding: var(--space-4); min-height: 240px; }
  .bn-title { font-size: 1.5rem; }
  .bn-body { font-size: 1rem; }
  .mock-title { font-size: 1rem; }
  .doc-head { gap: 12px; padding-bottom: 12px; margin-bottom: 12px; }
  .doc-head img { width: 48px; height: 48px; }
  .doc-title { font-size: 1rem; }
  .data th, .data td { padding: var(--space-2); }
  .wayfinding i { font-size: 1.5rem; }
  .verdict { gap: 0; margin-top: var(--space-4); background: #fff; border-radius: var(--radius-md); overflow: hidden; }
  .verdict > div { border-radius: 0; border: 0; padding: var(--space-4); }
  .verdict > div + div { border-top: 1px solid var(--line); }
  .verdict dd { margin-top: 4px; font-size: .875rem; line-height: 28px; color: var(--ink-muted); }
  .verdict dt { font-size: .875rem; }

  /* Journey: compact timeline */
  .switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-block: var(--space-4); background: #fff; border-radius: var(--radius-md); }
  .journey { grid-template-columns: 1fr; gap: var(--space-2); }
  .journey li { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; align-content: start; padding: var(--space-4); border: 0; }
  .journey li::before { grid-row: 1 / span 3; width: 32px; height: 32px; margin: 0; font-size: .875rem; }
  .journey li > * { grid-column: 2; }
  .journey h3 { margin: 0; }
  .journey p { font-size: .875rem; line-height: 26px; }
  .journey q { margin-top: 12px; padding: var(--space-2) 12px; font-size: .8125rem; }

  /* Impact table becomes cards */
  .impact { min-width: 0; }
  table.data.impact { background: transparent; }
  .impact, .impact tbody, .impact tr, .impact th, .impact td { display: block; }
  .impact thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .impact tr { background: #fff; border: 0; border-radius: var(--radius-md); margin-bottom: 12px; padding: var(--space-4); }
  .data.impact th, .data.impact td { border: 0; padding: 0; }
  .data.impact th[scope="row"] { color: var(--port-blue); margin-bottom: 4px; }
  .impact td { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: var(--space-2); font-size: .8125rem; line-height: 24px; }
  .impact td::before { content: attr(data-label); color: var(--ink-muted); }

  /* Logo */
  .logo-intro { gap: var(--space-4); }
  .logo-stage { padding: 40px var(--space-4); }
  .logo-stage img { width: 168px; }
  .rules { padding-inline-start: 20px; margin-bottom: var(--space-4); }
  .rules li { margin-bottom: 4px; }
  .downloads { display: grid; gap: var(--space-2); }
  .type-intro .btn { width: 100%; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
  .grid-4 { gap: var(--space-2); }
  .bg-demo, .dont { justify-content: space-between; gap: var(--space-2); padding: 12px 4px; font-size: .75rem; line-height: 20px; }
  .bg-demo > img { width: 64px; height: 64px; margin: 4px; }
  .logo-disc.logo-disc-fit { margin: 2px; padding: 2px; }
  .logo-disc-fit img { width: 64px; height: 64px; }
  .dont > span { min-height: 96px; }
  .dont img { width: 72px; height: 72px; }
  .dont .x-crop { width: 72px; height: 42px; }

  /* Colour: list rows */
  .swatches { grid-template-columns: 1fr; gap: 0; background: #fff; border: 0; border-radius: var(--radius-md); margin-top: var(--space-4); }
  .swatches li { padding: 12px var(--space-4); }
  .swatches li + li { border-top: 1px solid var(--line); }
  .swatches button { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 12px; align-items: center; border: 0; border-radius: var(--radius-sm); padding: 0; background: transparent; }
  .swatches .chip { grid-row: 1 / span 2; width: 48px; height: 48px; }
  .swatches b { font-size: .875rem; line-height: 24px; }
  .swatches code { line-height: 20px; }
  .swatches p { margin: 0; padding-inline-start: 60px; line-height: 24px; }
  .copy-status { min-height: 0; margin: 0; }
  .copy-status:not(:empty) { position: fixed; z-index: 14; inset-inline: 16px; bottom: calc(var(--tabbar-h) + 8px); padding: var(--space-2) var(--space-4); background: var(--ink); color: #fff; border-radius: var(--radius-md); text-align: center; font-size: .8125rem; }

  /* Type, spacing, writing, steps */
  .type-intro { gap: var(--space-2); margin-bottom: var(--space-4); }
  .glyphs { font-size: 2.5rem; }
  .glyphs span { display: inline-block; margin-inline: var(--space-4); }
  .scale { padding: 0 var(--space-4); border-radius: var(--radius-md); }
  .scale li { grid-template-columns: 1fr; gap: 0; padding-block: var(--space-2); }
  .meta { display: flex; justify-content: space-between; font-size: .75rem; }
  .ts-display { font-size: 1.5rem; line-height: 40px; }
  .ts-h1 { font-size: 1.3125rem; line-height: 36px; }
  .ts-h2 { font-size: 1.125rem; line-height: 32px; }
  .grid-2 { gap: var(--space-2); }
  .spaces, .radii { margin-bottom: var(--space-4); }
  .spaces li { grid-template-columns: 32px 1fr; column-gap: 12px; row-gap: 0; padding-block: 4px; }
  .spaces span { font-size: .8125rem; line-height: 24px; }
  .radii { flex-wrap: nowrap; gap: var(--space-2); }
  .radii li { flex: 1; min-width: 0; font-size: .75rem; line-height: 20px; }
  .radii i { width: 100%; height: 44px; }
  .say { padding: 12px var(--space-4); }
  .steps li { grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; row-gap: 0; align-items: start; padding-block: 12px; }
  .steps li::before { grid-row: 1 / span 2; font-size: 1.125rem; }
  .steps li > * { grid-column: 2; }
  .steps span { font-size: .8125rem; line-height: 24px; color: var(--ink-muted); }
  .download-band { display: grid; gap: var(--space-4); padding: var(--space-6) var(--space-4); margin-top: var(--space-6); border-radius: var(--radius-md); }

  /* Footer */
  .waves-footer { height: 16px; }
  .footer-row { flex-direction: column; text-align: center; gap: var(--space-2); padding-block: var(--space-8); }
  .footer-meta { margin-inline-start: 0 !important; }
}

@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .site-header nav.open { animation: none !important; } }

@media print {
  .tabbar, .seg { display: none !important; }
  body { padding-bottom: 0; }
  .site-header, .tabs, .switch, .menu-btn { display: none; }
  .case[hidden] { display: block; }
}
