/* Light the Sea: a lightkeeper's night chart. Deep-sea navy, parchment coastline, amber reserved for light. */
:root {
  --night: #08121c;
  --panel: #0e1c2a;
  --line: #1d3347;
  --fg: #e9eef2;
  --muted: #93a8b9;
  --coast: #d8c9a0;
  --lamp: #ffc864;
  --lamp-ink: #231804;
  --opt: #79d9e6;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --radius: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--night); color: var(--fg);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  background-image: radial-gradient(ellipse 120% 50% at 50% 0%, #0f2232, transparent 70%);
  background-repeat: no-repeat;
}
a { color: var(--coast); text-underline-offset: 3px; }
a:hover { color: var(--lamp); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--opt); outline-offset: 2px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(8, 18, 28, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 18px; }
.brand svg { width: 16px; height: 22px; }
.top-nav { display: flex; gap: 24px; font-size: 14px; }
.top-nav a { color: var(--muted); text-decoration: none; }
.top-nav a:hover { color: var(--fg); }

/* Hero + player */
.hero { padding-top: 32px; padding-bottom: 48px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; }
.hero h1 { margin: 0; font-size: 48px; font-weight: 900; letter-spacing: -0.01em; font-variation-settings: "opsz" 144; }
.lede { margin: 12px 0 24px; max-width: 34em; color: var(--muted); font-size: 18px; }
.player {
  position: relative; width: 100%; max-width: 620px; aspect-ratio: 4 / 5;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--night);
}
.player.sized { aspect-ratio: auto; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.cover { position: absolute; inset: 0; cursor: pointer; }
.cover img { width: 100%; height: 100%; object-fit: contain; object-position: top; display: block; filter: saturate(0.9) brightness(0.8); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 35%, rgba(8, 18, 28, 0.92) 85%); pointer-events: none; }
.cover-panel { position: absolute; left: 0; right: 0; bottom: 32px; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 16px; }
.btn-play {
  font: 600 18px/1 var(--body); color: var(--lamp-ink); background: var(--lamp); border: 0; border-radius: 999px;
  padding: 16px 32px; min-height: 52px; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); transition: background .15s, transform .15s;
}
.btn-play:hover { background: var(--coast); transform: translateY(-1px); }
.cover-note { margin: 0; font-size: 14px; color: var(--fg); }
.loader { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 24px; color: var(--muted); font-size: 15px; background: var(--night); }
.player[data-gf-state="loading"] .loader { display: flex; }
.lamp { position: relative; width: 140px; height: 140px; border-radius: 50%; border: 1px solid var(--line); overflow: hidden; }
.lamp::before { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 16px var(--lamp); }
.lamp i { position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(255, 200, 100, 0.55), transparent 50deg, transparent 360deg); animation: sweep 1.6s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.play-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  font: 600 14px var(--body); color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.chip:hover { border-color: var(--muted); }
.chip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip[aria-pressed="true"] { color: var(--lamp); border-color: var(--lamp); }
.chip[aria-pressed="true"] svg { fill: var(--lamp); }
.chip .count:empty { display: none; }
.share-msg { font-size: 14px; color: var(--muted); }

/* Prose */
.prose { padding-bottom: 48px; }
.prose h2 { font-size: 28px; margin: 48px 0 12px; }
.prose h3 { font-size: 22px; margin: 32px 0 8px; }
.prose p, .prose li { color: #cfd9e2; }
.prose strong { color: var(--fg); }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--lamp); }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--muted); font-weight: 600; }
.page { padding-top: 48px; }
.page h1 { font-size: 36px; margin: 0 0 8px; }
.updated { font-size: 14px; color: var(--muted); }
.back { margin-top: 48px; }

/* FAQ */
.faq { padding-bottom: 48px; }
.faq h2 { font-size: 28px; margin: 0 0 16px; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--lamp); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: #cfd9e2; }

/* Comments */
.comments { padding-bottom: 64px; }
.comments h2 { font-size: 28px; margin: 0 0 8px; }
.c-sub { margin: 0 0 16px; color: var(--muted); }
.c-form { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.c-form input, .c-form textarea { font: inherit; font-size: 16px; color: var(--fg); background: var(--night); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.c-form textarea { resize: vertical; }
.c-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn { font: 600 15px var(--body); color: var(--lamp-ink); background: var(--lamp); border: 0; border-radius: 8px; padding: 12px 24px; min-height: 44px; cursor: pointer; }
.btn:hover { background: var(--coast); }
.c-msg { font-size: 14px; color: var(--muted); }
.c-replying { display: none; margin: 0; font-size: 14px; color: var(--muted); }
.c-form[data-gf-replying] .c-replying { display: block; }
.link { font: inherit; font-size: 14px; color: var(--coast); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.c-list { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.c-item { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.c-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.c-head time { color: var(--muted); }
.c-owner { display: none; font-size: 12px; color: var(--lamp-ink); background: var(--lamp); border-radius: 4px; padding: 0 6px; }
[data-gf-owner] > .c-head .c-owner { display: inline; }
.c-text { margin: 4px 0; }
.c-to { color: var(--opt); }
.c-replies { margin-left: 16px; padding-left: 16px; border-left: 1px solid var(--line); }
.c-replies .c-item { border-bottom: 0; padding-bottom: 0; margin-top: 12px; }
.c-empty { display: none; color: var(--muted); }
.c-list[data-gf-empty] + .c-empty { display: block; }
.comments:has([data-gf-off]) .c-form { display: none; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.foot p { margin: 0; }
.foot-brand strong { color: var(--fg); font-family: var(--display); }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot nav a { color: var(--muted); }

@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding: 0 16px; }
  .top-nav { gap: 16px; font-size: 13px; }
  .top-nav a[href="/about"] { display: none; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: 32px; }
  .lede { font-size: 16px; }
  .player { border-radius: 8px; }
  .prose h2, .faq h2, .comments h2 { font-size: 24px; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .lamp i { animation: none; } .btn-play { transition: none; } }
