/* One Man Fleet — homepage prototype. Colour values follow Docs/02-brand-ci.md (D-008, D-009). */

:root {
  --red: #EC2C23; --red-deep: #851914; --red-text: #B31C13;
  --navy: #1A1A2E; --navy-2: #262643;
  --mute-d: #B9B9C9; --line-d: #3A3A55; --link-d: #FF6A60; --field-d: #7A7A95;
  --gutter: 80px; --header-h: 68px;
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Light mode tokens (also the base). */
:root, [data-theme="light"] {
  --bg: #FFFFFF; --bg-2: #F2F2F2; --ink: #231F20; --ink-2: #666666; --line: #DFDFDF;
  --field: #808080; --link: #B31C13; --focus: #0F3460; --tick: #999999; --dial: #666666;
  --sky-top: #FFFFFF; --sky-low: #F2F2F2; --scene-ink: #231F20; --scene-fill: #DFDFDF; --scene-label: #666666;
  --horizon-light: 0; --tip-scale: 0.6; --header-bg: #FFFFFF;
  color-scheme: light;
}

/* Dark mode tokens; .on-navy sections use the same set in every mode. */
[data-theme="dark"], .on-navy {
  --bg: #1A1A2E; --bg-2: #262643; --ink: #FFFFFF; --ink-2: #B9B9C9; --line: #3A3A55;
  --field: #7A7A95; --link: #FF6A60; --focus: #FFFFFF; --tick: #B9B9C9; --dial: #DFDFDF;
  --sky-top: #1A1A2E; --sky-low: #262643; --scene-ink: #FFFFFF; --scene-fill: #262643; --scene-label: #B9B9C9;
  --horizon-light: 1; --tip-scale: 1; --header-bg: #1A1A2E;
}
[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Inter", "Noto Sans Thai", system-ui, sans-serif; font-size: 18px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color 150ms linear, color 150ms linear;
}
body.lang-th { font-family: "Noto Sans Thai", "Inter", system-ui, sans-serif; line-height: 1.75; }
img, svg { display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: "JetBrains Mono", "Noto Sans Thai", monospace; letter-spacing: 0.04em; }
.lang-th .mono { letter-spacing: 0; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--red-deep); color: #fff; padding: 10px 16px; border-radius: 4px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(1280px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); position: relative; }

/* ---------- type ---------- */
.display { font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: clamp(52px, 7.8vw, 112px); line-height: 1.02; letter-spacing: -0.035em; }
.lang-th .display { font-family: "Noto Sans Thai", sans-serif; font-size: clamp(44px, 6.4vw, 92px); line-height: 1.3; letter-spacing: 0; }
.h2 { font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: clamp(30px, 2.8vw, 40px); line-height: 1.2; letter-spacing: -0.015em; }
.lang-th .h2 { font-family: "Noto Sans Thai", sans-serif; line-height: 1.4; letter-spacing: 0; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 640px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-family: "JetBrains Mono", "Noto Sans Thai", monospace; font-size: 13px; letter-spacing: 0.06em; color: var(--ink-2); margin-bottom: 14px; }
.lang-th .eyebrow { font-family: "Noto Sans Thai", sans-serif; letter-spacing: 0; font-size: 14px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--red); flex: none; }
.note { font-size: 14px; color: var(--ink-2); margin-top: 14px; }
.note a, .lead a, .answer a.link, .tags a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-thickness 180ms var(--ease-out), text-decoration-color 180ms; }
.note a:hover, .answer a.link:hover, .tags a:hover { text-decoration-thickness: 3px; text-decoration-color: var(--red); }

/* ---------- buttons ---------- */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 18px; border-radius: 4px; background: var(--red); color: #fff; font-family: "Inter Tight", "Noto Sans Thai", sans-serif; font-weight: 700; font-size: 19px; line-height: 1; text-decoration: none; white-space: nowrap; transition: transform 160ms var(--ease-out), box-shadow 160ms; }
.lang-th .btn-primary { font-family: "Noto Sans Thai", sans-serif; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 4px rgba(236, 44, 35, 0.18); }
.btn-primary.block { width: 100%; height: 52px; }
.btn-outline { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px; border: 1px solid var(--ink); border-radius: 4px; font-weight: 600; font-size: 16px; text-decoration: none; transition: background 160ms, color 160ms; }
.btn-outline:hover { background: var(--ink); color: var(--bg); }

.site-footer .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand-word { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.2em; white-space: nowrap; }
.e-pin { transform-origin: 124px 118px; transform-box: view-box; }
.logo-mark .tick { stroke: var(--tick); stroke-width: 1.2; transition: stroke 120ms; }
.logo-mark .tick.on { stroke: var(--red); }
.logo-mark .dial { fill: none; stroke: var(--dial); stroke-width: 2; }
.logo-mark .north { fill: var(--red); }
.logo-mark .south { fill: var(--dial); }
.logo-mark .needle { transform-origin: 20px 20px; transform-box: view-box; transition: transform 250ms var(--ease-out); }

.mega-title { font-family: "JetBrains Mono", "Noto Sans Thai", monospace; font-size: 12px; letter-spacing: 0.08em; color: var(--ink-2); text-transform: uppercase; margin-bottom: 12px; }

.site-footer .lang { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; height: 34px; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.site-footer .lang b { color: var(--ink); }
.theme-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; font-size: 15px; cursor: pointer; }
.theme-opt:hover { background: var(--bg-2); }
.theme-opt input { accent-color: var(--red); }

.theme-inline { display: flex; border: 1px solid var(--line); border-radius: 22px; padding: 3px; }
.theme-inline .theme-opt { padding: 0 12px; height: 36px; font-size: 14px; border-radius: 18px; }
.theme-inline .theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-inline .theme-opt:has(input:checked) { background: var(--ink); color: var(--bg); }
.theme-inline .theme-opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--navy); color: #fff; border: 1px solid var(--line-d); border-left: 3px solid var(--red); border-radius: 6px; padding: 12px 18px; font-size: 15px; transition: opacity 200ms, transform 200ms var(--ease-out); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Thai is never letter-spaced or upper-cased (CI ฎ). */
.lang-th .mega-title, .lang-th .search-results .grp, .lang-th .search-hint, .lang-th .radar-hdg, .lang-th .card .meta { letter-spacing: 0; text-transform: none; font-family: "Noto Sans Thai", "JetBrains Mono", sans-serif; }

/* ---------- hero: sky and sea run edge to edge; everything else sits on one centred stage ---------- */
.hero-pin { position: relative; height: 160vh; }
.hero { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: linear-gradient(#2f5f99 0 52%, #16335f 52% 100%); color: #fff; touch-action: pan-y; }
[data-theme="dark"] .hero { background: linear-gradient(#0a0c1e 0 52%, #0a1228 52% 100%); }
.sea { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 700ms ease; }
.scene-on .sea { opacity: 1; }
.hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; z-index: 1; pointer-events: none; background: linear-gradient(transparent, var(--bg)); opacity: var(--leave, 0); }
.stage { position: absolute; left: 0; top: 0; z-index: 2; transform-origin: 0 0; pointer-events: none; width: 1440px; height: 900px; }
.stage > * { position: absolute; }
.stage::before { content: ""; position: absolute; left: -4000px; right: -4000px; top: -1000px; height: 1450px; pointer-events: none; background: linear-gradient(to bottom, rgba(22, 66, 126, 0.7) 1000px, rgba(22, 66, 126, 0.68) 1210px, rgba(22, 66, 126, 0.62) 1262px, rgba(22, 66, 126, 0.2) 1350px, rgba(22, 66, 126, 0.05) 1410px, rgba(22, 66, 126, 0)); }
[data-theme="dark"] .stage::before { background: linear-gradient(to bottom, rgba(4, 6, 18, 0.35) 1000px, rgba(4, 6, 18, 0)); }
/* At night the live scene paints this itself, under its stars: above the page it held them to two thirds of white. */
.stage::before { transition: opacity 700ms ease; }
.scene-on[data-theme="dark"] .stage::before { opacity: 0; }
/* The still image is the real scene photographed, so it lines up with the stage exactly. */
.still { z-index: -1; left: -480px; top: 0; width: 2400px; height: 900px; background: center / 100% 100% no-repeat; transition: opacity 700ms ease; }
.stage[data-l="wide"] .still { background-image: url("still/day.webp"); }
[data-theme="dark"] .stage[data-l="wide"] .still { background-image: url("still/night.webp"); }
.stage[data-l="tall"] .still { left: -85px; width: 600px; height: 860px; background-image: url("still/day-s.webp"); }
[data-theme="dark"] .stage[data-l="tall"] .still { background-image: url("still/night-s.webp"); }
.scene-on .still { opacity: 0; }
@property --lr { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --base { syntax: "<color>"; inherits: true; initial-value: #fff; }
.stage { --lead-gray: #EAEDF1; }
[data-theme="dark"] .stage { --lead-gray: #B4B9C3; }
.stage .slogan { left: 720px; width: max-content; top: 84px; margin: 0; color: inherit; text-align: center; font-weight: 500; white-space: nowrap; transform: translateX(-50%) translateY(var(--rise, 0px)); pointer-events: auto; cursor: default; --lr: 0px; --base: #fff; transition: --lr 420ms var(--ease-out), --base 420ms ease; }
.lang-th .stage .slogan { font: 500 58px/1.2 "Noto Sans Thai", sans-serif; }
.lang-en .stage .slogan { top: 86px; font: 600 54px/1.12 "Inter Tight", "Inter", sans-serif; letter-spacing: -0.015em; }
.stage .slogan .slogan-lead { display: block; margin-bottom: 2px; text-align: left; color: var(--lead-gray); font: 400 max(15px, calc(12.5px / var(--s, 1)))/1.35 "Noto Sans Thai", "Inter", sans-serif; letter-spacing: 0; transition: color 420ms ease; }
.stage .slogan-body { display: block; }
/* Light on the letters: warm where the pointer is, a drawn red line beneath. Only while pointing, so at rest the words are plain white. */
.stage .slogan.lit { --lr: 250px; --base: #C9D0DA; }
.stage .slogan.lit.lit-out { --lr: 0px; --base: #fff; }
.stage .slogan.lit .slogan-body { color: transparent; background: radial-gradient(circle var(--lr) at var(--lx, 50%) var(--ly, 50%), #FFF4DC 0, #fff 42%, rgba(255, 255, 255, 0) 100%), linear-gradient(var(--base), var(--base)); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 20px rgba(255, 224, 176, 0.26)); }
.stage .slogan.lit .slogan-lead { color: #fff; }
/* The course: as the pointer crosses the slogan, a point of light draws a red wake after it, from the
   first word to "together", which lights up when the route arrives. */
.stage .slogan-end { position: relative; display: flex; align-items: center; gap: 10px; width: 0; min-width: 100%; margin-top: 2px; --route: 0; }
.stage .slogan-route { flex: 1; min-width: 0; height: 10px; overflow: visible; }
.stage .slogan-route path { fill: none; stroke: var(--red); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--route)); }
.stage .route-light { position: absolute; left: calc((100% - var(--tail-w, 90px) - 10px) * var(--route)); top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 3px rgba(255, 90, 70, 0.9), 0 0 26px 8px rgba(236, 44, 35, 0.35); opacity: 0; transition: opacity 240ms; pointer-events: none; }
.stage .slogan.lit:not(.lit-out) .route-light { opacity: 1; }
.stage .slogan-tail { flex: none; color: var(--lead-gray); font: 400 max(15px, calc(12.5px / var(--s, 1)))/1.3 "Noto Sans Thai", "Inter", sans-serif; letter-spacing: 0; white-space: nowrap; transition: color 300ms ease, text-shadow 300ms ease; }
.lang-en .stage .slogan-tail { font-family: "Inter", sans-serif; font-size: max(14.5px, calc(12px / var(--s, 1))); }
.stage .slogan-end.arrived .slogan-tail { color: #fff; text-shadow: 0 0 14px rgba(255, 200, 160, 0.85), 0 0 2px rgba(255, 90, 70, 0.8); }
.lang-en .stage .slogan .slogan-lead { font-family: "Inter", sans-serif; font-size: max(14.5px, calc(12px / var(--s, 1))); }
.stage .big { width: 480px; top: 220px; text-align: center; pointer-events: auto; text-decoration: none; color: inherit; border-radius: 12px; padding: 4px 10px; --focus: #fff; }
.stage .big h2 { position: relative; display: inline-block; white-space: nowrap; font: 600 max(20px, calc(15px / var(--s, 1)))/1.16 "Inter Tight", "Inter", "Noto Sans Thai", sans-serif; letter-spacing: 0.004em; }
.stage .big h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 550ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.stage .big:hover h2::after, .stage .big:focus-visible h2::after, .stage .big.on h2::after { transform: scaleX(1); }
.stage .big p { position: absolute; left: 50%; top: calc(100% + 8px); width: max-content; max-width: 30em; margin: 0; }
.ship-hit { display: block; pointer-events: auto; cursor: pointer; }
/* What a ship or a topic is, shown as you point at it: two lines at most, under a red line that draws itself. */
.stage .ship-tip { width: 26em; }
.stage .ship-tip, .stage .big p { padding: 8px 14px; border-radius: 0 0 8px 8px; background: rgba(10, 12, 30, 0.88); backdrop-filter: blur(8px); color: #fff; font-size: max(13.5px, calc(12px / var(--s, 1))); font-weight: 400; line-height: 1.42; text-align: center; text-wrap: balance; pointer-events: none; opacity: 0; transition: opacity 240ms ease, transform 320ms var(--ease-out); }
.stage .ship-tip { transform: translate(-50%, -8px); }
.stage .big p { transform: translate(-50%, -8px); }
.stage .ship-tip::before, .stage .big p::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--red); transform: scaleX(0); transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1) 60ms; }
.stage .ship-tip.on { opacity: 1; transform: translate(-50%, 0); }
/* The note sits under the ship's name: the scene's two corner buttons step aside while it shows. */
.hero:has(.ship-tip.on) .hero-foot { opacity: 0; pointer-events: none; }
.stage .big:hover p, .stage .big:focus-visible p, .stage .big.on p { opacity: 1; transform: translate(-50%, 0); }
.stage .ship-tip.on::before, .stage .big:hover p::before, .stage .big:focus-visible p::before, .stage .big.on p::before { transform: scaleX(1); }
.stage .tag { transform: translate(-50%, 0); padding: 2px 4px; color: #fff; font: 500 max(13px, calc(11.5px / var(--s, 1)))/1.2 "Inter", "Noto Sans Thai", sans-serif; white-space: nowrap; pointer-events: auto; text-decoration: none; text-shadow: 0 1px 6px rgba(4, 10, 30, 0.8); background: linear-gradient(var(--red), var(--red)) 0 100% / 0 2px no-repeat; transition: background-size 300ms var(--ease-out); --focus: #fff; }
.stage .tag:hover, .stage .tag:focus-visible, .stage .tag.on { background-size: 100% 2px; }
.stage:not([data-placed]) .big, .stage:not([data-placed]) .tag { visibility: hidden; }
.stage[data-l="tall"] .slogan { left: 215px; top: 70px; }
.stage[data-l="tall"] .slogan .slogan-lead { font-size: max(14px, calc(12px / var(--s, 1))); margin-bottom: 0; }
.stage[data-l="tall"] .ship-tip { display: none; }
.stage[data-l="tall"] .slogan-body > span { display: block; white-space: nowrap; }
.lang-th .stage[data-l="tall"] .slogan { font-size: 38px; line-height: 1.2; }
.lang-en .stage[data-l="tall"] .slogan { top: 70px; font-size: 36px; line-height: 1.14; }
.stage[data-l="tall"] .slogan-tail { font-size: max(14px, calc(12px / var(--s, 1))); }
.stage[data-l="tall"] .slogan-route, .stage[data-l="tall"] .route-light { display: none; }
.stage[data-l="tall"] .slogan-end { justify-content: flex-end; }
.stage[data-l="tall"] .big { width: 190px; top: 214px; padding: 0; }
.stage[data-l="tall"] .big h2 { font-size: 14.5px; white-space: normal; line-height: 1.16; letter-spacing: 0; }
.stage[data-l="tall"] .big p { max-width: 190px; font-size: 12.5px; }
.stage[data-l="tall"] .tag { padding: 1px 2px; width: max-content; max-width: 72px; white-space: normal; text-align: center; line-height: 1.15; font-size: max(10.5px, calc(10px / var(--s, 1))); }
.hero-foot { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; pointer-events: none; }
.hero-foot > * { pointer-events: auto; }
.hero-foot { opacity: calc(1 - var(--leave, 0)); }
.hero-foot:focus-within { opacity: 1; }
.pause { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line-d); color: var(--mute-d); font-family: "JetBrains Mono", "Noto Sans Thai", monospace; font-size: 12px; }
.hero-foot .pause { color: #fff; background: rgba(26, 26, 46, 0.78); }
.pause .pl { display: none; }
.pause[aria-pressed="true"] .p1, .pause[aria-pressed="true"] .p2 { display: none; }
.pause[aria-pressed="true"] .pl { display: inline; }
.cue { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(26, 26, 46, 0.78); color: #fff; font-family: "JetBrains Mono", "Noto Sans Thai", monospace; font-size: 13px; text-decoration: none; }
.lang-th .cue { font-family: "Noto Sans Thai", sans-serif; font-size: 14px; }
.cue span { color: #FF6A60; animation: bob 2.4s ease-in-out 1.5s 2; }
.cue:focus-visible { opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; } /* never hide it from keyboard users */
@keyframes bob { 50% { transform: translateY(4px); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- sections ---------- */
.sec { padding: 64px 0; position: relative; scroll-margin-top: 64px; }
.divider { position: relative; z-index: 2; height: 2px; background: var(--red); margin-bottom: 40px; transform-origin: left; }
.sec-intro { max-width: 720px; }
.sec-intro.center { margin: 0 auto; text-align: center; }
.sec-intro.center .eyebrow { justify-content: center; }
.sec-intro .lead { margin-top: 14px; }
.sec-intro.center .lead { margin-left: auto; margin-right: auto; }


/* 2 · the radar: every piece of work is a contact on the screen */
/* The compass travels from the sea to this screen (drawn in screen pixels), under every word (z-index 2+). */
.travel { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1; opacity: 0; }
.sec-intro { position: relative; z-index: 2; }
.travel .t-disc { fill: #101124; stroke: rgba(120, 140, 170, 0.55); stroke-width: 1.5; }
.travel .t-orbit { fill: none; stroke: #fff; stroke-opacity: 0.22; }
.travel .t-glass { fill: none; stroke: rgba(205, 225, 245, 0.92); stroke-width: 3; }
.travel .t-ticks { fill: none; stroke: #fff; stroke-opacity: 0.55; stroke-width: 8; stroke-dasharray: 1.5 9; }
.travel .t-north { fill: #EC2C23; }
.travel .t-north2 { fill: #A81B14; }
.travel .t-south { fill: #F4F6FB; }
.travel .t-south2 { fill: #AEB8CA; }
.travel .t-hub { fill: #E9EDF5; }
.fleet-strip { padding-bottom: 40px; }
/* The fleet holds still while the ships sail in. Only on a screen tall enough to show the whole section. */
.fleet-pin.pin-on .fleet-stick { position: sticky; }
.fleet-pin.pin-on .berths { overflow: hidden; }
.fleet-pin .sailing { transition: none; will-change: transform; }
/* Layers that travel at their own speed, in the range measured on award sites: words a little faster than the page, a picture slower inside its frame. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .sec-intro { animation: words-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    @keyframes words-rise { from { translate: 0 56px; } to { translate: 0 0; } }
    .feed-card .thumb img { scale: 1.12; animation: thumb-drift linear both; animation-timeline: view(); }
    @keyframes thumb-drift { from { translate: 0 -6px; } to { translate: 0 6px; } }
  }
}
.radar-sec .divider, .fleet-strip .divider { z-index: 0; }
.fleet-grid { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 32px; }
.radar-panel { position: sticky; top: 88px; background: var(--navy); border: 1px solid var(--line-d); border-radius: 12px; padding: 16px; color: #fff; }
.radar { width: 100%; height: auto; }
.radar .ring { fill: none; stroke: #fff; stroke-opacity: 0.22; }
.radar .rtk { stroke: #fff; stroke-opacity: 0.4; }
.radar .rdeg { fill: #B9B9C9; font-family: "JetBrains Mono", monospace; font-size: 12px; }
.radar .sector { fill: #EC2C23; fill-opacity: 0; transition: fill-opacity 500ms ease; }
.radar .sector.on { fill-opacity: 0.1; }
.radar .sweep { transform-origin: 260px 260px; transition: transform 1100ms var(--ease-out); }
.radar .bearing { stroke: #FF6A60; stroke-width: 1.4; stroke-dasharray: 3 4; opacity: 0; transition: opacity 160ms; }
.radar .bearing.show { opacity: 1; }
.radar .target { cursor: pointer; transition: opacity 400ms; }
.radar .target.dim { opacity: 0.32; }
.radar .t-hit { fill: transparent; }
.radar .t-dot { fill: #fff; transition: fill 160ms, r 160ms; }
.radar .t-ring { fill: none; stroke: #FF6A60; stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.radar .target.on .t-dot { fill: #FF6A60; r: 6.5px; }
.radar .target.on .t-ring { opacity: 1; }
.radar .target.ping .t-ring { animation: ping 900ms var(--ease-out) both; }
@keyframes ping { 0% { transform: scale(0.3); opacity: 1; } 100% { transform: scale(2.1); opacity: 0; } }
.radar-topics .topic { position: absolute; top: 30%; max-width: 40%; min-height: 38px; padding: 4px 12px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 19px; background: rgba(16, 17, 36, 0.86); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.2; --focus: #fff; transition: border-color 200ms, background 200ms; }
.radar-topics .t-entre { left: 5%; }
.radar-topics .t-ai { right: 5%; }
.radar-topics .topic:hover { border-color: #fff; }
.radar-topics .topic[aria-selected="true"] { background: #B31C13; border-color: #FF6A60; }
.radar-hdg { position: absolute; left: 28px; top: 24px; font-size: 12px; color: var(--link-d); }
.fleet-grid { position: relative; }
.lock { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 3; }
.lock path { fill: none; stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 520ms var(--ease-out), opacity 160ms; }
.lock.show path { stroke-dashoffset: 0; opacity: 1; }
.feed-lead { font-size: 18px; color: var(--ink-2); margin-bottom: 18px; }
.feed-panel { animation: fade 280ms ease both; }
.feed { display: grid; gap: 14px; }
.feed-card a { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; transition: border-color 200ms, background 200ms, transform 220ms var(--ease-out); }
.feed-card a:hover, .feed-card.on a { border-color: var(--red); background: var(--bg-2); }
.feed-card.ping a { animation: card-ping 700ms var(--ease-out); }
@keyframes card-ping { 0% { border-color: var(--red); box-shadow: 0 0 0 0 rgba(236, 44, 35, 0.4); } 100% { box-shadow: 0 0 0 10px rgba(236, 44, 35, 0); } }
.thumb { display: block; border-radius: 6px; overflow: hidden; background: var(--bg-2); aspect-ratio: 16 / 9; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
.feed-card a:hover .thumb img, .feed-card.on .thumb img { transform: scale(1.05); }
.feed-body { display: block; min-width: 0; }
.feed-meta { display: block; font-size: 13px; color: var(--ink-2); }
.feed-title { display: block; margin-top: 2px; font-family: "Inter Tight", "Noto Sans Thai", sans-serif; font-size: 20px; font-weight: 700; line-height: 1.35; }
.lang-th .feed-title { font-family: "Noto Sans Thai", sans-serif; font-size: 19px; line-height: 1.5; }
.feed-demo { display: inline-block; margin-top: 6px; padding: 0 8px; border: 1px solid var(--field); border-radius: 4px; font-size: 12px; color: var(--ink-2); }

/* 3 · the fleet: five ships on one long red waterline */
.status { font-size: 13px; border: 1px solid var(--field); border-radius: 4px; padding: 1px 8px; }
.berths { --sea-top: 120px; --sea-h: 80px; --sea: none; position: relative; display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 0; margin: 40px auto 0; padding: 0 max(var(--gutter), calc((100vw - 1280px) / 2)); overflow-x: auto; scrollbar-width: thin;
  background:
    linear-gradient(transparent, var(--bg)) 0 calc(var(--sea-top) + var(--sea-h) - 26px) / 100% 34px no-repeat local,
    linear-gradient(var(--red), var(--red)) 0 var(--sea-top) / 100% 2px no-repeat local,
    var(--sea) 0 var(--sea-top) / auto calc(var(--sea-h) + 8px) repeat-x local; }
.berths[data-near] { --sea: url("strip/day.webp"); }
[data-theme="dark"] .berths[data-near] { --sea: url("strip/night.webp"); }
.berth a { position: relative; display: flex; flex-direction: column; height: 100%; padding: 0 18px 20px 0; text-decoration: none; color: inherit; }
.berth-ship { position: relative; display: flex; align-items: flex-end; justify-content: center; height: calc(var(--sea-top) + var(--sea-h)); margin: 0 -18px 22px 0; padding: 0 10px 6px; }
.berth-ship img { max-width: 100%; max-height: 170px; width: auto; height: auto; transform-origin: 50% 100%; -webkit-mask-image: linear-gradient(#000 74%, transparent 97%); mask-image: linear-gradient(#000 74%, transparent 97%); transition: transform 460ms var(--ease-out), filter 460ms var(--ease-out); }
.berth a:hover .berth-ship img, .berth a:focus-visible .berth-ship img { transform: translateY(-8px) scale(1.04); filter: brightness(1.08); }
[data-theme="dark"] .for-day, [data-theme="light"] .for-night { display: none; }
.berth-name { display: flex; align-items: center; gap: 8px; align-self: flex-start; font-family: "Inter Tight", "Noto Sans Thai", sans-serif; font-size: 20px; font-weight: 700; background: linear-gradient(var(--red), var(--red)) 0 100% / 0 2px no-repeat; transition: background-size 320ms var(--ease-out); }
.berth a:hover .berth-name, .berth a:focus-visible .berth-name { background-size: 100% 2px; }
.lang-th .berth-name { font-family: "Noto Sans Thai", sans-serif; }
.berth-logo { width: 24px; height: 24px; }
.berth-what { margin-top: 2px; font-size: 15px; line-height: 1.5; color: var(--ink-2); flex: 1; }
.berth .status { align-self: flex-start; margin-top: 10px; }
.berth-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--link); text-decoration: underline; text-underline-offset: 4px; }
.berth-go svg { transition: transform 200ms var(--ease-out); }
.berth a:hover .berth-go svg { transform: translateX(4px); }

/* The short page each ship has before it leads anywhere else. */
.ship-landing main { padding-top: 64px; }
.ship-hero { position: relative; display: flex; flex-direction: column; align-items: center; padding: 56px var(--gutter) 40px; background: linear-gradient(#0a0c1e, #1A1A2E); color: #fff; overflow: hidden; }
[data-theme="light"] .ship-hero { background: linear-gradient(#9fc4e2, #dfe9f2); color: #231F20; }
.ship-hero-art img { max-width: min(520px, 80vw); max-height: 320px; width: auto; height: auto; }
.ship-hero-words { text-align: center; margin-top: 20px; }
.ship-hero-words h1 { display: flex; align-items: center; justify-content: center; gap: 12px; font-family: "Inter Tight", "Noto Sans Thai", sans-serif; font-size: clamp(36px, 5vw, 64px); line-height: 1.2; }
.lang-th .ship-hero-words h1 { font-family: "Noto Sans Thai", sans-serif; }
.ship-hero-words p { font-size: 19px; }
.ship-about .wrap { max-width: 860px; }
.ship-about .h2 { margin-top: 14px; }
.ship-about .lead { margin-top: 12px; }
.ship-note { margin-top: 18px; padding: 12px 16px; border-left: 3px solid var(--red); background: var(--bg-2); font-size: 16px; }
.ship-status-line { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: 16px; }
.ship-back { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; font-weight: 600; color: var(--link); text-decoration: underline; text-underline-offset: 4px; }
.ship-back svg { transform: rotate(180deg); }

/* 4 · captain's log */
.log-top { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs [role="tab"] { height: 44px; padding: 0 16px; font-size: 16px; font-weight: 600; color: var(--ink-2); position: relative; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--red); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
.card { border-top: 1px solid var(--ink); padding-top: 16px; }
.card-art { width: 100%; height: auto; aspect-ratio: 320 / 120; background: var(--bg-2); border-radius: 6px; margin-bottom: 16px; }
.card-art .a { stroke: var(--ink); fill: none; stroke-width: 1.3; }
.card-art .r { stroke: var(--red); fill: none; stroke-width: 1.6; }
.card-art .f { fill: var(--bg); stroke: var(--ink); stroke-width: 1.3; }
.card-art .tx { fill: var(--ink); font-family: "JetBrains Mono", monospace; font-size: 13px; }
.card .meta { font-size: 12px; color: var(--ink-2); }
.card .demo { display: inline-block; margin-top: 10px; font-family: "JetBrains Mono", "Noto Sans Thai", monospace; font-size: 12px; color: var(--ink-2); border: 1px dashed var(--field); border-radius: 4px; padding: 1px 8px; }
.lang-th .card .demo { font-family: "Noto Sans Thai", sans-serif; }
.card h3 { font-family: "Inter Tight", "Noto Sans Thai", sans-serif; font-size: 22px; line-height: 1.3; margin-top: 8px; }
.lang-th .card h3 { font-family: "Noto Sans Thai", sans-serif; line-height: 1.5; }
.card h3 a { text-decoration: none; background-image: linear-gradient(var(--red), var(--red)); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 260ms var(--ease-out); }
.card h3 a:hover { background-size: 100% 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.tags a { display: inline-block; font-size: 18px; padding: 6px 2px; }
.log .note { margin-top: 32px; }

/* ---------- the Content pages: one log, numbered across articles, videos and podcasts ---------- */
.content-page main { padding-top: 92px; background: var(--bg); }
.nb { white-space: nowrap; }
.cl-demo { display: inline-block; white-space: nowrap; font-size: 12px; color: var(--ink-2); border: 1px dashed var(--field); border-radius: 4px; padding: 1px 8px; }
.cl-warn { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--link); }
.cl-warn-page { margin: 14px 0 0; }
.cl-glyph { display: inline-block; width: 34px; height: 30px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 3px rgba(10, 12, 30, 0.35)); }
.cl-glyph.crop { object-fit: cover; object-position: 50% 0; }
.cl-mid { width: 56px; height: 50px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 5px rgba(10, 12, 30, 0.34)); }
.cl-mid.crop { object-fit: cover; object-position: 50% 0; }
[data-theme="dark"] .cl-mid, [data-theme="dark"] .cl-glyph, .on-navy .cl-glyph { filter: brightness(1.2) drop-shadow(0 0 6px rgba(205, 220, 245, 0.55)); }
.cl-hero { position: relative; padding: 24px 0 0; }
.cl-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 32px; align-items: end; }
.cl-title { font: 700 clamp(56px, 7.2vw, 104px)/1.16 "Inter Tight", "Noto Sans Thai", sans-serif; margin-top: 10px; overflow-wrap: anywhere; text-wrap: balance; }
.cl-feature h2, .cl-read h1, .cl-watch h1, .cl-listen h1, .cl-row-title, .cl-way-title { text-wrap: balance; }
.lang-th .cl-title { font-family: "Noto Sans Thai", sans-serif; }
.cl-sub { font-size: 19px; color: var(--ink-2); max-width: 620px; margin-top: 12px; }
.cl-count { display: flex; align-items: baseline; gap: 16px; margin: 30px 0 34px; flex-wrap: wrap; }
.cl-count-gap { height: 36px; }
.cl-num { font: 600 clamp(64px, 6.4vw, 92px)/1 "Inter Tight", sans-serif; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cl-count small { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 15px; color: var(--ink-2); }
.cl-book { position: relative; justify-self: end; width: min(500px, 100%); height: auto; margin-bottom: -14px; z-index: 2; filter: drop-shadow(0 22px 22px rgba(10, 12, 30, 0.34)); }
.cl-book-sm { width: auto; max-width: 100%; max-height: 280px; }
.cl-water { height: 2px; background: var(--red); position: relative; z-index: 1; }
.cl-bar { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cl-types, .cl-sort { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.cl-types a { display: inline-flex; align-items: center; gap: 12px; min-height: 64px; padding: 4px 16px 4px 10px; border-radius: 6px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.cl-types a:first-child { padding-left: 16px; }
.cl-types a:hover { color: var(--ink); background: var(--bg-2); }
.cl-types a[aria-current="page"] { color: var(--ink); background: var(--bg-2); box-shadow: inset 0 -2px 0 var(--red); }
.cl-sort a, .cl-soon { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--ink-2); font-weight: 600; text-decoration: none; position: relative; white-space: nowrap; }
.cl-soon small { font-weight: 400; font-size: 12px; }
.cl-sort a[aria-current="page"] { color: var(--ink); }
.cl-sort a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; background: var(--red); }
.cl-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding: 12px 0 0; font-size: 15px; color: var(--ink-2); }
.cl-topics + .cl-topics { padding-top: 4px; }
.cl-topics b { color: var(--ink); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; min-width: 150px; }
.cl-topics a { color: inherit; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; white-space: nowrap; }
.cl-topics a:hover, .cl-topics a[aria-current="page"] { color: var(--link); text-decoration: underline; text-underline-offset: 4px; }
.cl-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 44px; align-items: center; padding: 40px 0; border-bottom: 1px solid var(--line); }
.cl-feature-img { display: block; overflow: hidden; border-radius: 4px; }
.cl-thumb { position: relative; display: block; overflow: hidden; border-radius: 4px; background: var(--navy); }
.cl-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 700ms var(--ease-out); }
.cl-thumb.is-object img { object-fit: contain; padding: 6%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5)); }
/* A video shows it can play; a podcast shows it can be heard. */
.cl-thumb[data-kind="video"]::after, .cl-thumb[data-kind="podcast"]::after { content: ""; position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; background: #fff center / 14px no-repeat; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.cl-thumb[data-kind="video"]::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 1.5v11l9.5-5.5z' fill='%23EC2C23'/%3E%3C/svg%3E"); }
.cl-thumb[data-kind="podcast"]::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M1 5v4M4.5 2.5v9M8 4v6M11.5 1.5v11' stroke='%23EC2C23' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); }
.cl-feature:hover .cl-thumb img { transform: scale(1.03); }
.cl-no { font: 500 14px/1.5 "JetBrains Mono", "Noto Sans Thai", monospace; color: var(--ink-2); }
.lang-th .cl-no { font-family: "Noto Sans Thai", sans-serif; }
.cl-no b { color: var(--link); font-weight: 600; }
.cl-feature h2 { font: 700 clamp(30px, 3vw, 42px)/1.24 "Inter Tight", "Noto Sans Thai", sans-serif; margin: 14px 0 12px; }
.lang-th .cl-feature h2 { font-family: "Noto Sans Thai", sans-serif; line-height: 1.34; }
.cl-feature h2 a { text-decoration: none; background: linear-gradient(var(--red), var(--red)) 0 100% / 0 2px no-repeat; transition: background-size 320ms var(--ease-out); }
.cl-feature h2 a:hover { background-size: 100% 2px; }
.cl-list { list-style: none; padding: 0; margin: 0; }
.cl-row > a { display: grid; grid-template-columns: 96px 64px minmax(0, 1fr) 160px; gap: 22px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.cl-row.last > a { border-bottom: 0; }
.cl-row .n { font: 600 34px/1 "Inter Tight", sans-serif; font-variant-numeric: tabular-nums; }
.cl-row-words { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.cl-row-title { font: 600 22px/1.4 "Inter Tight", "Noto Sans Thai", sans-serif; }
.lang-th .cl-row-title { font-family: "Noto Sans Thai", sans-serif; line-height: 1.45; }
.cl-row > a:hover .cl-row-title { color: var(--link); }
.cl-row-img { width: 160px; }
.cl-end { font-size: 14px; color: var(--ink-2); padding: 10px 0 64px; }
.cl-empty { padding: 36px 0 30px; font-size: 18px; color: var(--ink-2); }
.cl-end a { display: inline-block; padding: 6px 0; color: var(--link); }
.cl-empty a { color: var(--link); display: inline-block; padding: 4px 0; }
.cl-index { list-style: none; padding: 12px 0 72px; margin: 0; columns: 2; column-gap: 64px; }
.cl-index li { break-inside: avoid; }
.cl-index a { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; text-decoration: none; color: inherit; font: 600 24px/1.4 "Inter Tight", "Noto Sans Thai", sans-serif; }
.cl-index i { flex: 1; border-bottom: 1px dotted var(--field); transform: translateY(-6px); }
.cl-index b { font: 500 15px/1.4 "JetBrains Mono", "Noto Sans Thai", monospace; color: var(--ink-2); }
.cl-index a:hover span { color: var(--link); }
.cl-index-h { font: 700 22px/1.4 "Inter Tight", "Noto Sans Thai", sans-serif; }
.cl-index-sm { padding-top: 4px; }
.cl-index-sm a { font-size: 18px; padding: 6px 0; }
/* one entry */
.cl-progress { position: fixed; left: 0; right: 0; top: 64px; z-index: 30; height: 2px; background: transparent; }
.cl-progress i { display: block; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; }
.cl-read { padding: 48px 0 64px; }
.cl-read-grid { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 48px; justify-content: center; align-items: start; }
.cl-toc { position: sticky; top: 96px; font-size: 14px; color: var(--ink-2); }
.cl-toc p { font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.cl-toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.cl-toc a { color: inherit; text-decoration: none; display: block; padding: 4px 0; }
.cl-toc a:hover { color: var(--link); }
.cl-time { font: 500 13px/1 "JetBrains Mono", monospace; color: var(--link); margin-right: 6px; }
.cl-read h1 { font: 700 clamp(34px, 3.6vw, 50px)/1.24 "Inter Tight", "Noto Sans Thai", sans-serif; margin: 12px 0 14px; }
.lang-th .cl-read h1, .lang-th .cl-watch h1, .lang-th .cl-listen h1 { font-family: "Noto Sans Thai", sans-serif; line-height: 1.34; }
.cl-read-head { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 24px; align-items: end; }
.cl-read-obj { width: 170px; height: auto; filter: drop-shadow(0 12px 14px rgba(10, 12, 30, 0.34)); }
.cl-read-img { margin-top: 24px; }
.cl-toc-inline { display: none; }
.cl-toc-inline summary { font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.cl-toc-inline summary::-webkit-details-marker { display: none; }
.cl-toc-inline summary::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--red); transition: transform 180ms; }
.cl-toc-inline[open] summary::before { transform: rotate(90deg); }
.cl-toc-inline ol { list-style: none; padding: 0 0 10px; margin: 0; }
.cl-toc-inline a { display: flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.cl-read .col h2 { font: 700 26px/1.34 "Inter Tight", "Noto Sans Thai", sans-serif; margin-top: 36px; scroll-margin-top: 96px; }
.cl-read .col p { font-size: 19px; line-height: 1.85; margin-top: 12px; }
.cl-tags { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 36px !important; font-size: 16px !important; }
.cl-tags a { color: var(--link); }
.cl-details { margin-top: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.cl-details summary { font-weight: 600; cursor: pointer; min-height: 28px; }
.cl-watch, .cl-listen { background: var(--navy); color: #fff; padding: 44px 0 40px; }
.content-page.cl-entry main { padding-top: 64px; }
.cl-watch h1, .cl-listen h1 { font: 700 clamp(34px, 3.6vw, 50px)/1.24 "Inter Tight", "Noto Sans Thai", sans-serif; margin: 12px 0 14px; }
.cl-watch .cl-no, .cl-listen .cl-no { color: var(--mute-d); }
.cl-watch .cl-no b, .cl-listen .cl-no b, .cl-watch .cl-warn, .cl-listen .cl-warn { color: var(--link-d); }
.cl-watch .cl-demo, .cl-listen .cl-demo { color: var(--mute-d); border-color: var(--field-d); }
.cl-watch-head { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 32px; align-items: end; margin-bottom: 20px; }
.cl-watch-obj { width: 220px; height: auto; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.5)); }
.cl-frame { position: relative; overflow: hidden; border-radius: 6px; box-shadow: 0 0 0 1px rgba(205, 225, 245, 0.25), 0 24px 60px rgba(0, 0, 0, 0.45); }
.cl-frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cl-frame .cl-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.cl-play { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px 0 16px; border-radius: 24px; background: #fff; color: #1A1A2E; font-weight: 700; font-size: 16px; }
.cl-play:hover { background: #EDEFF6; }
.cl-play-mark { width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--red); }
[aria-pressed="true"] .cl-play-mark { width: 12px; height: 16px; border: 0; border-left: 4px solid var(--red); border-right: 4px solid var(--red); }
.cl-consent { margin-top: 12px; font-size: 13px; color: var(--mute-d); max-width: 780px; }
.cl-consent-light { color: var(--ink-2); padding-top: 4px; }
.cl-status { min-height: 1.4em; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--link-d); }
.cl-listen-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 40px; align-items: center; }
.cl-listen blockquote { margin: 26px 0 0; padding-left: 18px; border-left: 2px solid var(--red); font-size: 24px; line-height: 1.5; color: #fff; }
.cl-listen-obj { width: auto; max-width: 100%; max-height: 360px; justify-self: center; filter: drop-shadow(0 0 22px rgba(205, 220, 245, 0.28)) drop-shadow(0 18px 18px rgba(0, 0, 0, 0.5)); }
.cl-player { position: sticky; bottom: 0; z-index: 20; background: var(--navy-2); color: #fff; padding: 10px 0; border-top: 1px solid var(--line-d); }
.cl-player .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cl-track { flex: 1; min-width: 120px; height: 3px; background: var(--line-d); border-radius: 2px; overflow: hidden; }
.cl-track i { display: block; width: 0; height: 100%; background: var(--red); transition: width 1.2s linear; }
.playing .cl-track i { width: 22%; }
.cl-player .cl-status { margin: 0; flex: 0 1 auto; }
/* set your next heading */
.cl-next { background: var(--navy); color: #fff; padding: 56px 0 72px; position: relative; overflow: hidden; }
.cl-next .head { text-align: center; }
.cl-next h2 { font: 700 clamp(34px, 3.6vw, 52px)/1.3 "Inter Tight", "Noto Sans Thai", sans-serif; }
.lang-th .cl-next h2 { font-family: "Noto Sans Thai", sans-serif; }
.cl-next .note { color: var(--mute-d); font-size: 17px; margin-top: 6px; }
.cl-dial { position: relative; width: min(500px, 90%); aspect-ratio: 560 / 190; margin: 20px auto 22px; }
.cl-dial img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cl-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* The needle lies flat on the dial: squashed to the dial's own perspective, turned inside it. */
.cl-dial svg .cl-needle { transform: scale(1, 0.34) rotate(var(--a, 0deg)); transition: transform 1100ms cubic-bezier(0.3, 1.25, 0.5, 1); }
.cl-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cl-ways-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 880px; margin: 0 auto; }
.cl-ways-1 { grid-template-columns: minmax(0, 520px); justify-content: center; }
.cl-way { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 24px; border: 1px solid var(--line-d); border-radius: 6px; text-decoration: none; color: #fff; background: rgba(255, 255, 255, 0.02); transition: border-color 200ms, background 200ms; }
.cl-way.on, .cl-way:hover, .cl-way:focus-visible { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 2px 0 var(--red); }
.cl-way .dir { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--link-d); }
.cl-way-title { font: 600 21px/1.42 "Inter Tight", "Noto Sans Thai", sans-serif; }
.lang-th .cl-way-title { font-family: "Noto Sans Thai", sans-serif; }
.cl-way-why { color: var(--mute-d); font-size: 15px; line-height: 1.6; }
.cl-back { display: table; margin: 26px auto 0; padding: 8px 4px; color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  .cl-dial svg .cl-needle, .cl-feature-img img, .cl-way, .cl-track i { transition: none; }
}
@media (max-width: 1099px) {
  .cl-read-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cl-read-grid > .cl-toc:has(a) { display: none; }
  .cl-toc { position: static; }
  .cl-toc-inline { display: block; margin-top: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
}
@media (max-width: 767px) {
  .content-page main { padding-top: 76px; }
  .content-page.cl-entry main { padding-top: 64px; }
  .cl-hero { padding-top: 8px; }
  .cl-hero .wrap { grid-template-columns: minmax(0, 1fr) 120px; gap: 6px 10px; }
  .cl-hero .wrap > div { display: contents; }
  .cl-hero .eyebrow, .cl-title, .cl-sub { grid-column: 1 / -1; }
  .cl-title { font-size: 42px; margin-top: 0; }
  .cl-sub { font-size: 16px; margin-top: 0; }
  .cl-count { margin: 4px 0 12px; gap: 10px; }
  .cl-count-gap { height: 8px; }
  .cl-num { font-size: 52px; }
  .cl-count small { font-size: 13px; }
  .cl-book { width: 120px; max-height: 120px; object-fit: contain; margin: 0 0 -4px; justify-self: end; }
  .cl-bar { padding: 6px 0 0; border-bottom: 0; gap: 4px; }
  .cl-sort, .cl-topics { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  /* A fading edge says there is more to swipe to. */
  .cl-topics { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 32px; }
  .cl-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; width: 100%; }
  .cl-types a, .cl-types a:first-child { flex-direction: column; justify-content: center; min-height: 66px; padding: 4px 2px; gap: 2px; font-size: 14px; }
  .cl-topics b { min-width: 0; white-space: nowrap; flex: none; position: sticky; left: 0; z-index: 1; background: var(--bg); padding-right: 8px; }
  .cl-types .cl-mid { width: 36px; height: 32px; }
  .cl-mid { width: 42px; height: 40px; }
  .cl-topics a { min-height: 44px; }
  .cl-index { columns: 1; }
  .cl-read-head { grid-template-columns: minmax(0, 1fr) 84px; gap: 10px; }
  .cl-read-obj { width: 84px; }
  .cl-thumb[data-kind]::after { width: 26px; height: 26px; background-size: 11px; right: 6px; bottom: 6px; }
  .cl-sort a, .cl-soon { flex: none; }
  .cl-topics { padding: 6px 0 0; gap: 14px; font-size: 14px; }
  .cl-topics + .cl-topics { padding-top: 2px; }
  .cl-feature { grid-template-columns: 1fr; gap: 12px; padding: 12px 0 22px; }
  .cl-feature h2 { font-size: 26px; margin: 10px 0 8px; }
  .cl-row > a { grid-template-columns: 40px 44px minmax(0, 1fr); gap: 10px; padding: 16px 0; }
  .cl-row .n { font-size: 20px; }
  .cl-row > a { grid-template-columns: 36px minmax(0, 1fr) 84px; }
  .cl-row > a > .cl-mid { display: none; }
  .cl-row-img { width: 84px; }
  .cl-row-title { font-size: 17px; }
  .cl-demo { white-space: normal; }
  .cl-index a { font-size: 19px; }
  .cl-watch-head, .cl-listen-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cl-watch-obj { width: 120px; order: -1; }
  .cl-listen-obj { max-height: 150px; order: -1; justify-self: start; }
  .cl-listen blockquote { font-size: 19px; }
  .cl-read { padding: 28px 0 48px; }
  .cl-read .col p { font-size: 17px; }
  .cl-next { padding: 48px 0 56px; }
  .cl-dial { margin: 18px auto 16px; }
  .cl-ways, .cl-ways-2 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cl-way { padding: 16px 16px 18px; }
  .cl-way-title { font-size: 18px; }
}

/* ---------- footer (navy in every mode) ---------- */
.site-footer { background: var(--navy); color: #fff; padding: 72px 0 28px; border-top: 2px solid var(--red); }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(0, 0.8fr)) 1.3fr; gap: 40px; }
.foot-brand .brand { color: #fff; }
.slogans { display: flex; flex-direction: column; margin-top: 14px; font-size: 14px; color: var(--mute-d); }
.slogans span:last-child { font-family: "Noto Sans Thai", sans-serif; color: var(--link-d); font-weight: 500; }
.foot-col li + li { margin-top: 8px; }
.foot-col a { text-decoration: none; font-size: 15px; color: #fff; }
.foot-col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-console { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.foot-console .lang { border: 1px solid var(--line-d); border-radius: 22px; height: 40px; padding: 0 14px; }
.foot-base { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line-d); font-size: 13px; color: var(--mute-d); }

/* ---------- scroll-driven reveals (only where supported) ---------- */
@supports (animation-timeline: view()) {
  .divider { animation: draw linear both; animation-timeline: view(); animation-range: entry 10% cover 30%; }
  @keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- pause + reduced motion ---------- */
html.paused .radar *, html.paused .cue span { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
/* Laptop widths: tighten the header before it would wrap (measured by tools/header-fit.js). */
@media (max-width: 1399px) {
  :root { --gutter: 40px; } /* header and content share one gutter, so they stay aligned */
  .brand-word { font-size: 13px; letter-spacing: 0.16em; }
}
@media (max-width: 1199px) {
  :root { --gutter: 40px; }
  .fleet-grid { grid-template-columns: 1fr; }
  .radar-panel { position: relative; top: 0; max-width: 520px; }
  .foot-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 767px) {
  :root { --gutter: 20px; --header-h: 60px; }
  body { font-size: 16px; }
  .hero-pin { height: 150vh; }
  .radar .rdeg { font-size: 18px; }
  .radar-topics .topic { font-size: 13px; padding: 4px 10px; top: 28%; }
  .radar-topics .t-entre { left: 4%; }
  .radar-topics .t-ai { right: 4%; }
  .lead { font-size: 16px; }
  .sec { padding: 40px 0; }
  .fleet-strip { padding-bottom: 8px; }
  .divider { margin-bottom: 28px; }
  .fleet-grid { gap: 28px; margin-top: 32px; }
  .feed-card a { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 8px; }
  .feed-title, .lang-th .feed-title { font-size: 16px; line-height: 1.4; }
  .feed-meta { font-size: 12px; }
  .berths { --sea-top: 84px; --sea-h: 66px; display: flex; gap: 0; padding: 0 12px 14px; margin-top: 28px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .berth { flex: 0 0 78%; scroll-snap-align: center; }
  .berth a { padding-right: 12px; }
  .berth-ship { margin-right: -12px; }
  .berth-ship img { max-height: 134px; }
  .radar-hdg span { display: none; }
  .cards { grid-template-columns: 1fr; gap: 28px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand, .foot-console { grid-column: 1 / -1; }
}
