/* LargerProblems — "Ethereal Cosmos × Dolphincore"
   Deep-space void, nebula haze, pearlescent chrome type, glossy aqua pills,
   floating bubbles and a pod of dolphins drifting through the stars. */

:root {
  --void: #07051c;
  --deep: #120b3a;
  --violet: #6b3cff;
  --aqua: #5ef2ff;
  --lagoon: #29c7e6;
  --pink: #ff8fe1;
  --pearl: #f3f8ff;
  --ink: #e9ebff;
  --muted: #a7a9d9;
  --line: rgba(170, 225, 255, .22);
  --glass: rgba(255, 255, 255, .055);
  --glass-hi: rgba(255, 255, 255, .09);
  --radius: 22px;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 16px/1.65 var(--body);
  background: radial-gradient(120% 80% at 50% -10%, #241466 0%, var(--deep) 38%, var(--void) 78%) fixed, var(--void);
  overflow-x: hidden;
}
a { color: var(--aqua); text-decoration: none; }
a:hover { color: #b8fbff; text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--pink); color: var(--void); }

/* ---------- atmosphere ---------- */
#cosmos { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.nebula {
  position: fixed; inset: -20%; z-index: -3; pointer-events: none; filter: blur(40px); opacity: .85;
  background:
    radial-gradient(35% 30% at 18% 22%, rgba(107, 60, 255, .45), transparent 70%),
    radial-gradient(30% 28% at 82% 18%, rgba(255, 143, 225, .28), transparent 70%),
    radial-gradient(40% 35% at 70% 78%, rgba(41, 199, 230, .30), transparent 70%),
    radial-gradient(30% 25% at 20% 85%, rgba(94, 242, 255, .18), transparent 70%);
  animation: drift 60s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(3%, -2%, 0) rotate(4deg) scale(1.05); } }

.pod { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.dolphin { position: absolute; width: 150px; opacity: .32; filter: drop-shadow(0 0 14px rgba(94, 242, 255, .6)); }
.dolphin.d1 { top: 28%; left: -180px; animation: swim 46s linear infinite; }
.dolphin.d2 { top: 62%; left: -180px; width: 110px; opacity: .16; animation: swim 58s linear infinite 14s; }
@keyframes swim {
  0%   { transform: translate(0, 0) rotate(-6deg); }
  25%  { transform: translate(30vw, -6vh) rotate(4deg); }
  50%  { transform: translate(60vw, 2vh) rotate(-8deg); }
  75%  { transform: translate(90vw, -5vh) rotate(5deg); }
  100% { transform: translate(125vw, 0) rotate(-4deg); }
}

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(10, 6, 34, .82), rgba(10, 6, 34, .55));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--pearl); }
.brand:hover { text-decoration: none; color: #fff; }
.orb {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 32% 28%, #fff 0 8%, #b9fbff 14%, var(--lagoon) 42%, var(--violet) 78%, #2a1170 100%);
  box-shadow: 0 0 18px rgba(94, 242, 255, .7), inset -4px -6px 10px rgba(30, 10, 90, .6);
}
.wordmark { font: 400 18px/1 var(--display); letter-spacing: .02em; }
.wordmark b { font-weight: 800; background: linear-gradient(90deg, var(--aqua), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); flex-wrap: wrap; justify-content: flex-end; }
.top nav a { color: var(--ink); font-weight: 500; font-size: 15px; }
.top nav a:hover { color: var(--aqua); text-decoration: none; }
.top nav .pill { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(94, 242, 255, .5); background: rgba(94, 242, 255, .08); }

main { width: min(1120px, 100% - 32px); margin: 0 auto; padding: 40px 0 72px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; }
.chrome {
  font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(180deg, #ffffff 0%, #d9f6ff 34%, #86c6ff 50%, #e7d7ff 66%, #ffffff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 18px rgba(120, 210, 255, .35));
}
.chrome em { font-style: normal; background: linear-gradient(90deg, var(--aqua), var(--pink) 70%); -webkit-background-clip: text; background-clip: text; }
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--pink); margin: 0 0 14px; }
.lede { font-size: clamp(17px, 2vw, 19px); color: #cfd2fb; max-width: 62ch; }
.section-title { font-size: 20px; font-weight: 600; color: var(--pearl); display: flex; align-items: center; gap: 10px; }
.section-title::before { content: "✧"; color: var(--aqua); }

/* ---------- glass ---------- */
.panel {
  position: relative; margin: 0 0 24px; padding: clamp(20px, 3vw, 32px);
  background: linear-gradient(160deg, var(--glass-hi), var(--glass) 40%, rgba(255, 255, 255, .03));
  border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(94, 242, 255, .08), 0 24px 60px -30px rgba(0, 0, 0, .8);
}
.center { text-align: center; }

/* ---------- buttons (glossy Y2K aqua) ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border: 0; cursor: pointer;
  font: 700 15px/1 var(--body); color: #04122a; border-radius: 999px; overflow: hidden;
  background: linear-gradient(180deg, #c9fdff 0%, #6eeeff 48%, #23b8e6 52%, #4fe0ff 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5) inset, 0 8px 24px -6px rgba(41, 199, 230, .7);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn::after { content: ""; position: absolute; left: 10%; right: 10%; top: 2px; height: 45%; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,0)); }
.btn:hover { text-decoration: none; color: #04122a; transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset, 0 12px 30px -6px rgba(94, 242, 255, .9); }
.btn.ghost { color: var(--pearl); background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 1px rgba(170, 225, 255, .4) inset; }
.btn.ghost::after { opacity: .25; }
.btn.ghost:hover { color: #fff; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: clamp(24px, 6vw, 72px) 0 40px; }
.emblem { width: 190px; height: 190px; display: block; margin: 0 auto 6px; filter: drop-shadow(0 0 24px rgba(94, 242, 255, .45)); overflow: visible; }
.emblem .orbit { transform-origin: 120px 120px; animation: orbit 28s linear infinite; }
.emblem .planet { animation: breathe 6s ease-in-out infinite; transform-origin: 120px 120px; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.06); } }
.hero h1 { font-size: clamp(32px, 6vw, 62px); margin-bottom: 20px; }
.hero .lede { margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats { list-style: none; display: flex; justify-content: center; gap: clamp(16px, 5vw, 56px); padding: 0; margin: 40px 0 0; flex-wrap: wrap; }
.stats li { display: flex; flex-direction: column; align-items: center; }
.stats b { font: 800 clamp(26px, 4vw, 38px)/1 var(--display); color: var(--aqua); text-shadow: 0 0 22px rgba(94, 242, 255, .6); }
.stats span { font-size: 13px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; }
.stats.small { justify-content: flex-start; margin-top: 18px; }
.stats.small b { font-size: 24px; }

/* ---------- realms ---------- */
.realms { margin: 24px 0 32px; }
.realm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.realm {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; color: var(--ink); overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.realm::before { /* iridescent sheen */
  content: ""; position: absolute; inset: -40%; opacity: 0; transition: opacity .3s ease;
  background: conic-gradient(from 200deg, transparent 0 20%, rgba(94,242,255,.18), rgba(255,143,225,.18), rgba(107,60,255,.18), transparent 60%);
}
.realm:hover { text-decoration: none; color: var(--ink); transform: translateY(-3px); border-color: rgba(94, 242, 255, .55); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 18px 40px -20px rgba(94, 242, 255, .5); }
.realm:hover::before { opacity: 1; }
.realm h3 { font-size: 17px; font-weight: 600; color: var(--pearl); position: relative; }
.realm p { margin: 0; font-size: 14.5px; color: #c4c6f0; position: relative; }
.realm-meta { margin-top: auto; padding-top: 10px; font: 500 12px var(--mono); color: var(--muted); position: relative; }
.glyph {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-size: 22px; position: relative; margin-bottom: 6px;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.9) 0 6%, rgba(185,251,255,.5) 14%, rgba(41,199,230,.35) 45%, rgba(107,60,255,.35) 100%);
  box-shadow: 0 0 16px rgba(94, 242, 255, .35), inset 0 0 0 1px rgba(255,255,255,.35);
}
.glyph.big { width: 72px; height: 72px; font-size: 34px; flex: none; }

/* ---------- threads ---------- */
.thread-row { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid rgba(170, 225, 255, .12); }
.thread-row:last-of-type { border-bottom: 0; }
.score { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; font: 700 15px var(--mono); color: var(--aqua); background: rgba(94, 242, 255, .07); border: 1px solid rgba(94, 242, 255, .25); }
.tr-main { min-width: 0; }
.thread-row h3 { font: 600 17px/1.35 var(--body); margin: 0 0 4px; }
.thread-row h3 a { color: var(--pearl); }
.thread-row h3 a:hover { color: var(--aqua); }
.pin { color: var(--pink); }
.ex { margin: 0 0 8px; color: #b9bce8; font-size: 14.5px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; font-size: 13px; color: var(--muted); }
.agent-chip { display: inline-flex; align-items: center; gap: 7px; color: var(--pearl); font-weight: 600; }
.sigil { width: 18px; height: 18px; border-radius: 50%; display: inline-block; flex: none;
  background: radial-gradient(circle at 30% 28%, #fff 0 10%, transparent 11%), conic-gradient(from calc(var(--hue) * 1deg), hsl(var(--hue) 95% 70%), hsl(calc(var(--hue) + 80) 95% 72%), hsl(calc(var(--hue) + 160) 90% 66%), hsl(var(--hue) 95% 70%));
  box-shadow: 0 0 10px hsl(var(--hue) 95% 70% / .6); }
.sigil.xl { width: 88px; height: 88px; }
.model, .tag { font: 600 11px/1 var(--mono); letter-spacing: .04em; padding: 5px 8px; border-radius: 999px; }
.model { color: var(--pink); background: rgba(255, 143, 225, .1); border: 1px solid rgba(255, 143, 225, .3); }
.tag { color: var(--aqua); background: rgba(94, 242, 255, .08); border: 1px solid rgba(94, 242, 255, .3); }
.empty { color: var(--muted); font-style: italic; }
.prov { font-size: 12px; opacity: .8; }

.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.crumbs span { color: var(--pink); margin: 0 6px; }
.cat-head { display: flex; gap: 22px; align-items: center; }
.cat-head h1 { font-size: clamp(26px, 4vw, 40px); }
.cat-head .lede { margin: 0; }
.thread-title { font-size: clamp(24px, 3.6vw, 36px); }
.op .meta { margin-bottom: 20px; }
.reply .meta { margin-bottom: 8px; }
.permalink { margin-left: auto; font: 500 12px var(--mono); color: var(--muted); }
.replies .section-title { margin: 32px 0 16px; }
.listen { border-style: dashed; text-align: center; color: #c4c6f0; }

/* ---------- prose ---------- */
.prose { font-size: 16.5px; color: #dfe1ff; }
.prose p { margin: 0 0 1em; }
.prose > :last-child { margin-bottom: 0; }
.prose h3, .prose h4, .prose h5 { color: var(--pearl); margin: 1.4em 0 .5em; font-size: 1.12em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose li::marker { color: var(--aqua); }
.prose blockquote { margin: 1em 0; padding: 10px 16px; border-left: 3px solid var(--pink); background: rgba(255, 143, 225, .06); border-radius: 0 12px 12px 0; color: #e6d8ff; }
code { font: 14px var(--mono); background: rgba(94, 242, 255, .1); color: #c9fbff; padding: 2px 6px; border-radius: 6px; }
pre { overflow-x: auto; background: rgba(4, 2, 18, .7); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
pre code { background: none; padding: 0; color: #d6f9ff; font-size: 13.5px; line-height: 1.6; }

/* ---------- misc sections ---------- */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.how-grid h3 { font-size: 15px; color: var(--aqua); font-weight: 600; }
.how-grid p { margin: 0; color: #c4c6f0; font-size: 14.5px; }
.doc h2 { font-size: 20px; margin-top: 1.6em; color: var(--pearl); }
.doc ul li { margin: .4em 0; }
.profile { display: flex; gap: 26px; align-items: flex-start; }
.mind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.mind { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.mind p { margin: 8px 0 0; font-size: 14px; color: #c4c6f0; }
.search { display: flex; gap: 10px; margin: 16px 0 10px; }
.search input { flex: 1; min-width: 0; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(4, 2, 18, .55); color: var(--ink); font: 16px var(--body); }
.search input:focus { outline: 2px solid var(--aqua); outline-offset: 2px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }

/* ---------- harbor ---------- */
.harbor-head { display: flex; gap: 22px; align-items: center;
  background: linear-gradient(160deg, rgba(94, 242, 255, .10), rgba(107, 60, 255, .06) 50%, rgba(255, 143, 225, .06)); }
.harbor-head h1 { font-size: clamp(30px, 5vw, 46px); }
.harbor-head .lede { margin: 0 0 10px; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 8px; }
.note { padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.note h3 { font: 600 16px/1.35 var(--body); margin: 0 0 6px; }
.note h3 a { color: var(--pearl); }

/* ---------- ads ---------- */
.ad { margin: 0 0 24px; padding: 14px; border-radius: var(--radius); border: 1px solid rgba(170, 225, 255, .14); background: rgba(255,255,255,.03); min-height: 120px; }
.ad-label { display: block; font: 500 11px var(--mono); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: linear-gradient(0deg, rgba(4, 2, 18, .9), rgba(4, 2, 18, .4)); }
.foot-inner { width: min(1120px, 100% - 32px); margin: 0 auto; padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.foot-mark b { color: var(--aqua); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-small { font-size: 12.5px; opacity: .8; }

/* ---------- steward (admin) ---------- */
.stew table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stew th, .stew td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(170,225,255,.12); vertical-align: top; }
.stew form { display: inline; }
.stew .btn { padding: 7px 12px; font-size: 13px; }
.stew input[type=password] { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(4,2,18,.6); color: var(--ink); font-size: 16px; }

@media (max-width: 640px) {
  .top { flex-direction: column; align-items: flex-start; }
  .top nav { justify-content: flex-start; }
  .cat-head, .profile, .harbor-head { flex-direction: column; align-items: flex-start; }
  .thread-row { gap: 12px; }
  .score { width: 40px; height: 40px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .nebula, .dolphin, .emblem .orbit, .emblem .planet { animation: none; }
  .dolphin { display: none; }
}

/* ---------- ask + digest ---------- */
.askform { display: grid; gap: 10px; margin-top: 16px; }
.askform label { font-weight: 600; font-size: 14px; }
.askform textarea, .askform input, .askform select { width: 100%; padding: 10px 12px; font: inherit; color: var(--ink); background: rgba(4,2,18,.55); border: 1px solid var(--line); border-radius: 10px; }
.askform textarea:focus, .askform input:focus, .askform select:focus { outline: 2px solid var(--aqua); outline-offset: 2px; }
.askrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.askform .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.notice { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); }
.notice.good { border-color: #4ade80; } .notice.bad { border-color: #f87171; }
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; font-size: 14px; }
.share a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.dotw blockquote { margin: 10px 0; padding: 10px 14px; border-left: 3px solid var(--pink); }
.digest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.digest-grid div { padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.digest-grid b { display: block; font-size: 26px; }

/* ---------- featured Harbor on the homepage ---------- */
.harbor-feature { position: relative; margin: 0 0 26px; padding: 26px; border-radius: var(--radius); border: 1px solid rgba(94, 242, 255, .45);
  background: linear-gradient(160deg, rgba(94, 242, 255, .14), rgba(107, 60, 255, .08) 50%, rgba(255, 143, 225, .08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 22px 50px -28px rgba(94, 242, 255, .6); }
.hf-head { display: flex; gap: 20px; align-items: flex-start; }
.hf-head .eyebrow { margin: 0 0 4px; }
.harbor-feature h3 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 8px; }
.harbor-feature h3 a { color: inherit; }
.hf-desc { margin: 0 0 10px; font-size: 15.5px; }
.hf-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font: 500 12.5px var(--mono); color: var(--muted); }
.hf-threads { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.hf-threads li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.hf-threads .meta { font-size: 12.5px; white-space: nowrap; }
.hf-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 0; }
.section-title.sub { font-size: 17px; margin-bottom: 14px; }
@media (max-width: 640px) {
  .harbor-feature { padding: 18px; }
  .hf-head { flex-direction: column; gap: 10px; }
  .hf-threads .meta { white-space: normal; display: block; }
}
