/* ============================================================
   PuppyJun · Cold Station · redesign rev.02
   Editorial darkroom system: warmer black, quieter chrome,
   sharper type pairing, and fewer template-like panels.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* --- core surface --- */
  --bg:         #181715;          /* station ground */
  --bg-raised:  #211f1c;          /* subtle lift */
  --bg-sunk:    #11100e;          /* deeper bands */
  --bg-wash:    #26231f;          /* warm panels */
  --line:       rgba(231, 222, 204, 0.14);
  --line-soft:  rgba(231, 222, 204, 0.08);

  /* --- text (from JAI palette) --- */
  --text:       #f2eee5;
  --text-dim:   #c7bfb1;
  --text-mute:  #8f877c;

  /* --- emphasis (adopted from JAI palette) --- */
  --italic:     #dec76f;
  --bold:       #b7c76a;
  --code:       #df796f;
  --dialogue:   #98b8c4;
  --edit:       #b89ad7;

  /* --- structural accent --- */
  --cinnabar:   #b64a3d;          /* 编号 / section numbers / structural markers */
  --cinnabar-dim: rgba(182, 74, 61, 0.18);
  --shadow:     0 18px 55px rgba(0, 0, 0, 0.34);

  /* --- families --- */
  --display:    'Newsreader', 'Iowan Old Style', 'Times New Roman', serif;
  --serif:      'Newsreader', 'Iowan Old Style', 'Times New Roman', serif;
  --prose:      'Spectral', 'EB Garamond', serif;       /* Body-size serif prose (manifesto etc.) */
  --sans:       'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:       'IBM Plex Mono', 'Menlo', monospace;
  --cn:         'Noto Serif SC', serif;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

body {
  font-size: 16px;
  line-height: 1.72;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
a:hover { color: var(--cinnabar); }

::selection { background: rgba(182,74,61,0.82); color: var(--text); }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #404040; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ============ HEAD-OFF WRAP BUG ============ */
h1, h2, h3, .display-h1, .hero h1, .page-h1 {
  hyphens: none;
  -webkit-hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
  text-wrap: balance;
}
.nobreak { white-space: nowrap; }

/* ============ TOP BAR ============ */
.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  padding: 15px 28px 13px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-mute);
  position: sticky; top: 0; z-index: 50;
  background: rgba(24, 23, 21, 0.94);
  backdrop-filter: blur(18px);
}
.topbar .brand {
  color: var(--text);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 560;
  display: flex; align-items: baseline; gap: 10px;
}
.topbar .brand small {
  color: var(--text-mute);
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
}
.topbar .nav {
  justify-self: center;
  display: flex;
  gap: 18px;
  align-items: center;
  min-width: 0;
}
.topbar .nav a { color: var(--text-mute); }
.topbar .nav a:hover { color: var(--text); }
.topbar .nav a.on { color: var(--cinnabar); }

/* dropdown (bots group) */
.topbar .nav .group { position: relative; }
.topbar .nav .group > .trig {
  color: var(--text-mute);
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer;
}
.topbar .nav .group > .trig::after {
  content: " v"; font-size: 8px; opacity: 0.45;
  transform: translateY(-1px); letter-spacing: 0;
}
.topbar .nav .group.on > .trig { color: var(--cinnabar); }
.topbar .nav .group:hover > .trig,
.topbar .nav .group:focus-within > .trig { color: var(--text); }
.topbar .nav .menu {
  position: absolute; top: 100%; left: -12px;
  background: rgba(24, 23, 21, 0.98);
  border: 1px solid var(--line);
  border-top: 1px solid var(--cinnabar);
  min-width: 220px;
  padding: 6px 0;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.12s, transform 0.12s, visibility 0.12s;
  z-index: 60;
  box-shadow: var(--shadow);
}
.topbar .nav .group:hover .menu,
.topbar .nav .group:focus-within .menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.topbar .nav .menu a {
  display: grid; grid-template-columns: 36px 1fr; gap: 10px;
  padding: 9px 14px 9px 12px;
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--line);
  align-items: baseline;
}
.topbar .nav .menu a:last-child { border-bottom: none; }
.topbar .nav .menu a:hover { background: rgba(168,56,43,0.10); color: var(--cinnabar); }
.topbar .nav .menu a .k {
  font-family: var(--mono); font-size: 9px; color: var(--cinnabar);
  letter-spacing: 0.2em; text-transform: uppercase;
}
.topbar .nav .menu a .l {
  font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--text);
  letter-spacing: 0; text-transform: none; font-weight: 400;
  line-height: 1.2;
}
.topbar .nav .menu a .l small {
  display: block; font-family: var(--mono); font-size: 9px;
  color: var(--text-mute);
  letter-spacing: 0.12em; text-transform: uppercase;
  font-style: normal; margin-top: 3px; font-weight: 400;
}

.topbar .vitals {
  display: flex;
  gap: 14px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.pulse-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--cinnabar);
  border-radius: 50%;
  vertical-align: middle;
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(1); box-shadow: 0 0 0 0 rgba(168,56,43,0.4); }
  50%      { opacity: 1;    transform: scale(1.15); box-shadow: 0 0 0 6px rgba(168,56,43,0); }
}
.topbar .utc {
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.topbar .utc b { color: var(--text); font-weight: 500; margin-right: 4px; }

/* ============ EKG SPACER (pure visual, no data) ============ */
.ekg-bar {
  position: relative;
  height: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunk);
  overflow: hidden;
}
.ekg-track {
  position: absolute;
  top: 50%;
  left: 0;
  width: 200%;
  height: 14px;
  transform: translateY(-50%);
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 4%,
      rgba(182,74,61,0.44) 4.1% 4.25%,
      transparent 4.25% 5%,
      rgba(152,184,196,0.34) 5.1% 5.25%,
      transparent 5.25% 12%,
      rgba(182,74,61,0.44) 12.1% 12.3%,
      transparent 12.3% 25%
    );
  opacity: 0.72;
  animation: ekg-scroll 22s linear infinite;
}
@keyframes ekg-scroll {
  from { transform: translate(0, -50%); }
  to   { transform: translate(-50%, -50%); }
}

/* ============ HERO (home only) ============ */
.hero {
  position: relative;
  min-height: 584px;
  padding: 92px 28px 106px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero .whale {
  position: absolute; inset: 0;
  background: url('../img/whale-glitch-dark.png') center/cover no-repeat;
  opacity: 0.36;
  filter: saturate(0.72) contrast(1.08) brightness(0.82);
}
.hero .whale::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg,
      rgba(24,23,21,0.92) 0%,
      rgba(24,23,21,0.68) 44%,
      rgba(24,23,21,0.30) 100%),
    linear-gradient(180deg,
      rgba(24,23,21,0.12) 0%,
      rgba(24,23,21,0.70) 62%,
      rgba(24,23,21,0.96) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, 1060px);
  max-width: 1060px;
  min-width: 0;
}
.hero h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 420;
  font-size: 92px;
  line-height: 0.98;
  color: var(--text);
  letter-spacing: 0;
  max-width: 980px;
}
.hero h1 em {
  font-style: italic;
  color: var(--text);
}
.hero .tagline {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-mute);
  line-height: 1.8;
  max-width: 54ch;
  margin-top: 34px;
  letter-spacing: 0;
}
.hero .tagline b { color: var(--text); font-weight: 500; }
.hero .tagline em { color: var(--italic); font-style: normal; }

/* hero quotes (replaces tagline on home) */
.hero-quotes {
  margin-top: 36px;
  max-width: min(58ch, 100%);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-mute);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.hero-quotes p {
  margin-bottom: 14px;
}
.hero-quotes p:last-child { margin-bottom: 0; }
.hero-quotes em {
  color: var(--italic);
  font-style: italic;
}
.hero-quotes .cn-quote {
  font-family: var(--cn);
  font-size: 13.5px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  line-height: 1.85;
}
.hero .handle {
  position: absolute;
  top: 26px; right: 28px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  text-align: right;
  line-height: 1.8;
}
.hero .handle b {
  color: var(--text);
  font-weight: 500;
  display: block;
  font-size: 11px;
}

/* ============ GENERIC PAGE HEADER (non-home) ============ */
.page-hdr {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  padding: 11px 28px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-mute);
  align-items: center;
  background: var(--bg-raised);
}
.page-hdr .crumb { color: var(--text-dim); }
.page-hdr .crumb b { color: var(--text); font-weight: 500; }
.page-hdr .id { color: var(--cinnabar); }
.page-hdr .stat { display: flex; align-items: center; gap: 6px; }

/* Page-level H1 (non-home) uses Cormorant Garamond */
.page-h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 430;
  font-size: 72px;
  line-height: 1;
  color: var(--text);
  letter-spacing: 0;
}
.page-h1 em { font-style: italic; color: var(--cinnabar); }

/* ============ SECTION HEADER ============ */
.sec-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 28px 28px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.sec-head .num { color: var(--cinnabar); }
.sec-head .ttl {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 430;
  font-size: 32px;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}
.sec-head .meta {
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1.7;
  font-size: 9px;
}
.sec-head .meta b { color: var(--text); font-weight: 500; }

/* ============ PROSE BLOCK (long-form body on dark) ============ */
.prose {
  font-family: var(--sans);
  font-size: 15.8px;
  line-height: 1.78;
  color: var(--text-dim);
  max-width: 68ch;
}
.prose p + p { margin-top: 1em; }
.prose strong, .prose b { color: var(--bold); font-weight: 600; }
.prose em, .prose i { color: var(--italic); font-style: italic; }
.prose code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--code);
  background: rgba(226,105,105,0.08);
  padding: 1px 6px;
  border-radius: 3px;
}
.prose blockquote {
  margin: 18px 0;
  padding: 14px 20px;
  background: var(--bg-raised);
  border-left: 3px solid var(--dialogue);
  border-radius: 0 6px 6px 0;
  color: var(--dialogue);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
}
.prose a {
  color: var(--cinnabar);
  border-bottom: 1px dashed rgba(168,56,43,0.4);
}
.prose a:hover { border-bottom-color: var(--cinnabar); }

/* ============ ASIDE (plain-text expansion) ============ */
.aside {
  margin: 22px 0;
  padding: 20px 24px;
  background: linear-gradient(90deg, rgba(152,184,196,0.07), rgba(33,31,28,0.94));
  border-left: 3px solid var(--dialogue);
  border-radius: 0 6px 6px 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-dim);
  max-width: 68ch;
}
.aside em { color: var(--italic); font-style: italic; }
.aside b { color: var(--bold); font-weight: 600; }
.aside .aside-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-right: 8px;
}

/* ============ PRINCIPLES GRID (home) ============ */
.principles {
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: transparent;
  border: none;
}
.principle {
  background: linear-gradient(180deg, rgba(38,35,31,0.88), rgba(24,23,21,0.88));
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.principle .n {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--cinnabar);
}
.principle h4 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 470;
  font-size: 22px;
  line-height: 1.2;
  color: var(--text);
}
.principle .desc {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-top: 6px;
}

/* ============ CARDS (sidebar) ============ */
.card {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 18px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.8;
  color: var(--text-dim);
  background: linear-gradient(180deg, rgba(38,35,31,0.88), rgba(24,23,21,0.88));
}
.card .k {
  color: var(--text-mute);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}
.card .k::before { content: '// '; color: var(--cinnabar); }
.card .v {
  color: var(--text);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 430;
  font-size: 18px;
  line-height: 1.5;
}
.card .v em { color: var(--cinnabar); font-style: italic; }
.card hr { border: none; border-top: 1px dashed var(--line); margin: 14px 0; }
.card p {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ============ ROOMS GRID (home nav cards) ============ */
.rooms {
  padding: 28px;
  border-bottom: 1px solid var(--line);
}
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: transparent;
  border: none;
}
.room {
  background: linear-gradient(180deg, rgba(38,35,31,0.82), rgba(24,23,21,0.9));
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 138px;
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.room:hover {
  background: var(--bg-wash);
  border-color: rgba(182,74,61,0.42);
  transform: translateY(-2px);
}
.room .idx {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cinnabar);
}
.room h4 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 470;
  font-size: 22px;
  color: var(--text);
  line-height: 1.15;
}
.room .d {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: auto;
}
.room .arr {
  position: absolute;
  top: 16px; right: 18px;
  color: var(--text-mute);
  font-family: var(--mono);
  font-size: 14px;
  transition: color 0.15s, transform 0.15s;
}
.room:hover .arr { color: var(--cinnabar); transform: translate(3px, -2px); }

/* ============ STATUS LINE (home status) ============ */
.statusline {
  padding: 19px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 18px;
  background: var(--bg-sunk);
}
.statusline .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cinnabar);
  flex-shrink: 0;
}
.statusline .msg {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.statusline .msg em { color: var(--cinnabar); font-style: italic; }
.statusline .date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  flex-shrink: 0;
}
.statusline .date:hover { color: var(--cinnabar); }

/* ============ GOALS (long-form collapsible) ============ */
.goals { padding: 0 28px 28px; }
.goals details {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--bg-raised);
}
.goals summary {
  padding: 14px 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}
.goals summary::-webkit-details-marker { display: none; }
.goals summary::before {
  content: '+';
  color: var(--cinnabar);
  font-size: 14px;
  line-height: 1;
}
.goals details[open] summary::before { content: '−'; }
.goals .body {
  padding: 4px 20px 20px;
  border-top: 1px dashed var(--line);
}
.goal {
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.goal:last-child { border-bottom: none; }
.goal .t {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--text);
  font-weight: 500;
}
.goal .s {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-left: 10px;
}
.goal .d {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-top: 6px;
}

/* ============ CHANGELOG ============ */
.changelog {
  padding: 24px 28px 32px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.9;
  color: var(--text-mute);
  border-top: 1px solid var(--line);
}
.changelog .ttl {
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 9px;
}
.changelog .ttl b {
  color: var(--text);
  display: block;
  font-weight: 400;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 4px;
}
.changelog ul {
  list-style: none;
  columns: 2;
  column-gap: 32px;
}
.changelog li {
  padding: 3px 0;
  break-inside: avoid;
}
.changelog li .dt {
  color: var(--cinnabar);
  margin-right: 10px;
  font-variant-numeric: tabular-nums;
}
.changelog li .tg {
  color: var(--text-mute);
  margin-right: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 9px;
}
.changelog li .v { color: var(--text-dim); }

/* ============ GRID-2 (content + sidebar) ============ */
.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0;
}
.grid-2 > * + * { border-left: 1px solid var(--line); }
.grid-sidebar {
  padding: 28px;
  display: grid;
  gap: 18px;
  align-content: start;
}

/* ============ FOOTER ============ */
.site-footer {
  padding: 28px 28px 48px;
  border-top: 1px solid var(--line);
  background: var(--bg-sunk);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: end;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-mute);
  line-height: 1.9;
}
.site-footer b { color: var(--text); font-weight: 500; }
.site-footer .center {
  text-align: center;
  font-family: var(--cn);
  color: var(--cinnabar);
  letter-spacing: 0.28em;
  font-size: 11px;
  text-transform: none;
}
.site-footer .right { text-align: right; }

/* ============ BOTS · SHARED ============ */
.bots-hero {
  padding: 64px 28px 34px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.bots-hero h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 430;
  font-size: 62px;
  line-height: 1;
  color: var(--text);
  letter-spacing: 0;
}
.bots-hero h1 em { color: var(--cinnabar); font-style: italic; }
.bots-hero .lede {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.95;
  letter-spacing: 0.03em;
}
.bots-hero .lede b { color: var(--text); font-weight: 500; }
.bots-hero .lede em { color: var(--italic); font-style: italic; }

/* sibling strip */
.sibs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunk);
}
.sibs a {
  padding: 20px 22px;
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  transition: background 0.15s;
}
.sibs a:last-child { border-right: none; }
.sibs a:hover { background: rgba(168,56,43,0.06); }
.sibs a.on {
  background: var(--cinnabar-dim);
  border-top: 1px solid var(--cinnabar);
  margin-top: -1px;
}
.sibs a .k {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--cinnabar);
  letter-spacing: 0.14em;
}
.sibs a .t {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--text);
  line-height: 1.1;
  font-weight: 430;
  letter-spacing: 0;
}
.sibs a .t small {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-mute);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-top: 4px;
  font-style: normal;
  font-weight: 400;
}
.sibs a .arr {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--text-mute);
}
.sibs a:hover .arr { color: var(--cinnabar); }
.sibs a.on .t { color: var(--cinnabar); }

/* manifesto-style split row */
.manifesto, .cook-intro, .specs-block {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  align-items: start;
}
.manifesto { padding: 52px 28px 44px; border-bottom: 1px solid var(--line); }
.manifesto .lbl,
.cook-intro .lbl,
.specs-block .lbl {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--cinnabar);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.7;
  padding-top: 4px;
}
.manifesto .lbl b,
.cook-intro .lbl b,
.specs-block .lbl b {
  color: var(--text);
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0;
  text-transform: none;
  display: block;
  margin-top: 6px;
  font-weight: 400;
}
.specs-block .lbl .count {
  color: var(--text-mute);
  margin-top: 8px;
  letter-spacing: 0.12em;
  display: block;
}
.manifesto p {
  font-family: var(--prose);
  font-style: italic;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.65;
  color: var(--text);
  max-width: 58ch;
  letter-spacing: 0;
}
.manifesto p + p {
  margin-top: 16px;
  font-size: 14px;
  font-style: normal;
  font-family: var(--mono);
  color: var(--text-dim);
  line-height: 1.85;
  letter-spacing: 0.02em;
  max-width: 62ch;
}
.manifesto p em { color: var(--italic); font-style: italic; }
.manifesto p b { color: var(--text); font-style: normal; font-weight: 500; }

/* tag cloud */
.specs { padding: 36px 28px 52px; }
.specs-block { margin-bottom: 34px; }
.specs-block:last-child { margin-bottom: 0; }
.cloud { display: flex; flex-wrap: wrap; gap: 8px; max-width: 780px; }
.tag {
  padding: 7px 13px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  background: var(--bg-sunk);
  transition: 0.12s;
  cursor: default;
}
.tag:hover { border-color: var(--cinnabar); color: var(--text); }
.tag.core {
  background: rgba(168,56,43,0.12);
  border-color: var(--cinnabar);
  color: var(--text);
}
.tag.core:hover { background: rgba(168,56,43,0.20); color: var(--cinnabar); }
.tag.rare { font-style: italic; color: var(--text-mute); border-style: dashed; }
.tag.failed { color: var(--cinnabar); border-color: var(--cinnabar); }

.axis-note {
  margin-top: 30px;
  padding: 16px 18px;
  border-left: 3px solid var(--dialogue);
  background: var(--bg-raised);
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.75;
  letter-spacing: 0;
  max-width: 780px;
}
.axis-note b {
  color: var(--cinnabar);
  letter-spacing: 0.12em;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}
.axis-note em { color: var(--italic); font-style: italic; }

/* bots · catalog */
.cat-rail {
  display: grid;
  grid-template-columns: 60px 120px 1fr 140px 80px;
  gap: 18px;
  padding: 13px 28px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.bot {
  border-bottom: 1px solid var(--line);
  padding: 36px 28px 40px;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 220px;
  gap: 30px;
  align-items: start;
}
.bot .thumb {
  width: 128px;
  height: 164px;
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  object-fit: cover;
  display: block;
}
.bot .main .num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--cinnabar);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.bot .main h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 430;
  font-size: 34px;
  line-height: 1.08;
  color: var(--text);
  letter-spacing: 0;
}
.bot .main h3 em { color: var(--cinnabar); font-style: italic; }
.bot .main h3 small {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-top: 8px;
  font-weight: 500;
}
.bot .tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.bot .story {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-dim);
  max-width: 70ch;
}
.bot .story em { color: var(--italic); font-style: italic; }
.bot .story b { color: var(--bold); font-weight: 600; font-style: normal; }
.bot .side {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.07em;
  line-height: 1.85;
  text-align: right;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.bot .side b {
  color: var(--text);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  display: block;
  margin-top: 4px;
  font-weight: 400;
}
.bot .side .label {
  text-transform: uppercase;
  color: var(--cinnabar);
  margin-top: 14px;
  letter-spacing: 0.12em;
  display: block;
}
.bot .side .label:first-of-type { margin-top: 0; }
.bot .side a.jlink {
  display: block;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-align: center;
  transition: 0.12s;
}
.bot .side a.jlink:hover { border-color: var(--cinnabar); color: var(--cinnabar); }

/* bots · cooking (uniform 2-col, no .series variant) */
.cook-intro { padding: 36px 28px 24px; border-bottom: 1px solid var(--line); }
.cook-intro p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.9;
  letter-spacing: 0.02em;
  max-width: 66ch;
}
.cook-intro p em { color: var(--italic); font-style: italic; }
.cook-intro p b { color: var(--text); }

.stove {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
.pot {
  padding: 30px 28px 28px;
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
  position: relative;
  min-height: 200px;
}
.pot:nth-child(2n) { border-right: none; }
.pot:nth-child(-n+2) { border-top: none; }
.pot .id {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-mute);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.pot .id b {
  color: var(--cinnabar);
  letter-spacing: 0.2em;
  font-weight: 500;
}
.pot .id .heat-inline {
  display: inline-flex;
  gap: 3px;
  margin-left: auto;
}
.pot .id .heat-inline i {
  display: block;
  width: 5px;
  height: 12px;
  background: var(--line);
}
.pot .id .heat-inline i.on { background: var(--cinnabar); }
.pot h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 430;
  font-size: 30px;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: 0;
}
.pot h3 em { color: var(--cinnabar); font-style: italic; }
.pot .sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 8px;
}
.pot .note {
  margin-top: 16px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 50ch;
}
.pot .note b { color: var(--bold); font-weight: 600; }
.pot .note em { color: var(--italic); font-style: italic; }
.pot .meta-row {
  margin-top: 18px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.pot .meta-row span b {
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  margin-left: 6px;
  font-weight: 400;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 28px;
  }
  .topbar .nav {
    justify-self: start;
    flex-wrap: wrap;
    gap: 10px 14px;
    width: 100%;
    max-width: 100%;
  }
  .topbar .vitals { flex-wrap: wrap; gap: 10px; }
  .hero {
    min-height: 520px;
    padding-top: 76px;
    padding-bottom: 82px;
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-inner { width: 100%; }
  .hero h1 {
    font-size: 52px;
    max-width: 620px;
  }
  .hero .handle { position: static; text-align: left; margin-bottom: 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 > * + * { border-left: none; border-top: 1px solid var(--line); }
  .principles { grid-template-columns: 1fr; }
  .rooms-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { grid-template-columns: 1fr; text-align: left; }
  .site-footer .right { text-align: left; }
  .statusline {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .statusline .msg { max-width: 100%; }
  .page-h1 { font-size: 48px; }
  .changelog { grid-template-columns: 1fr; }
  .changelog ul { columns: 1; }
}

@media (max-width: 600px) {
  .topbar { font-size: 9px; }
  .topbar .nav {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
    gap: 9px 16px;
  }
  .hero {
    min-height: auto;
    padding: 64px 28px 72px;
  }
  .hero h1 {
    font-size: 36px;
    line-height: 1.06;
    max-width: 11ch;
    overflow-wrap: anywhere;
  }
  .hero-quotes {
    font-size: 13px;
    max-width: 100%;
  }
  .statusline {
    max-width: 100vw;
    overflow: hidden;
  }
  .statusline > * {
    max-width: 100%;
    min-width: 0;
  }
  .statusline .msg {
    display: block;
    width: 100%;
    font-size: 18px;
    line-height: 1.38;
    white-space: normal;
  }
  .principles { padding: 20px; }
  .rooms { padding: 20px; }
  .rooms-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .bots-hero { grid-template-columns: 1fr; gap: 20px; }
  .bots-hero h1 { font-size: 46px; }
  .sibs { grid-template-columns: 1fr; }
  .sibs a { border-right: none; border-bottom: 1px solid var(--line); }
  .manifesto, .cook-intro, .specs-block { grid-template-columns: 1fr; gap: 18px; }
  .bot { grid-template-columns: 88px minmax(0, 1fr); gap: 22px; }
  .bot .thumb { width: 88px; height: 112px; }
  .bot .side {
    grid-column: 1 / -1;
    text-align: left;
    border-left: none;
    padding-left: 0;
    border-top: 1px dashed var(--line);
    padding-top: 16px;
    margin-top: 10px;
  }
  .stove { grid-template-columns: 1fr; }
  .pot { border-right: none; }
}
