/* orvix — Solana Dev Radar
   One stylesheet. Reference: 1586px-wide design concept (thin rules, monospace, one yellow accent). */

:root {
  --paper: #09090b;
  --paper-2: #121217;
  --paper-3: #181820;
  --ink: #f4f4f6;
  --ink-2: #d1d5db;
  --grey: #9ca3af;
  --grey-2: #6b7280;
  --grey-3: #374151;
  --rule: #272730;
  --rule-soft: #18181f;
  --grid: #1a1a24;
  --yellow: #ffe600;
  --yellow-soft: #4a4300;
  --warn: #ffcc00;

  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', 'Chalkboard SE', cursive;

  --gutter: clamp(16px, 2.84vw, 45px);
  --panel-w: clamp(260px, 19.25vw, 305px);
  --stage-h: 413px;
  --cell: 22px;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: hidden;
}

p,
h1,
h2,
dl,
dd,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: inherit;
  letter-spacing: inherit;
}

svg {
  overflow: visible;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Focus: black outline around a yellow halo — visible on paper, grid and yellow alike. */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--yellow);
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 20;
  padding: 6px 10px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

/* ------------------------------------------------------------------ header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--gutter);
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  text-decoration: none;
  color: var(--ink);
  padding: 2px 0;
}

.brand-robot {
  width: 31px;
  height: 36px;
  display: block;
}

.px-ink {
  fill: var(--ink);
}

.px-eye {
  fill: var(--paper);
}

.brand-dot {
  width: 8px;
  height: 8px;
  margin: 0 0 7px 8px;
  background: var(--yellow);
}

.brand-name {
  margin: 0 0 3px 16px;
  font-size: 22.5px;
  line-height: 1;
  letter-spacing: 0.03em;
  align-self: center;
  padding-top: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.1vw, 33px);
}

.site-nav ul {
  display: flex;
  gap: clamp(16px, 2.2vw, 35px);
}

.site-nav a,
.nav-button {
  display: inline-block;
  padding: 4px 0;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

.site-nav a:hover,
.nav-button:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
}

.site-nav a[aria-current='page'] {
  text-decoration: none;
}

.live-dot {
  position: relative;
  width: 11px;
  height: 11px;
  background: var(--yellow);
  border: 1px solid var(--yellow);
}

/* bigger hit area than the 11px square */
.live-dot::before {
  content: '';
  position: absolute;
  inset: -14px;
}

.live-dot[data-mode='offline'],
.live-dot[data-mode='partial'],
.live-dot[data-mode='cached'] {
  background: var(--paper);
  border-color: var(--ink);
}

.live-dot[data-mode='partial'],
.live-dot[data-mode='cached'] {
  background: linear-gradient(135deg, var(--yellow) 0 50%, var(--paper) 50% 100%);
}

.live-dot:hover {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(0, 714px) 1fr;
  grid-template-areas: 'left center right';
  align-items: start;
  column-gap: 24px;
  padding: 40px var(--gutter) 24px;
}

.meta {
  font-size: 11px;
  line-height: 16.5px;
  letter-spacing: 0.105em;
  text-transform: uppercase;
  color: var(--grey-2);
}

.meta-left {
  grid-area: left;
  padding-top: 26px;
}

.meta-right {
  grid-area: right;
  justify-self: end;
  /* The column is as wide as the 'SOURCE-LINKED / LIVE' tag; longer tags (CONNECTING, PARTLY LIVE)
     grow to the left, so neither the tag's right edge nor the text below ever moves. */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: calc(20 * 0.645em + 8px + 4px);
  padding-top: 28px;
  padding-right: 4px;
}

.meta-right > .live-tag {
  align-self: flex-end;
}

.meta-right > p:not(.live-tag) {
  padding-left: 10px;
}

.meta p span {
  display: block;
}

.meta-dash {
  display: block;
  width: 14px;
  height: 1.5px;
  margin-top: 10px;
  background: var(--grey-2);
}

.meta-right .meta-dash {
  margin-left: 10px;
}

.live-tag {
  display: inline-block;
  margin-bottom: 13px;
  padding: 1px 4px 0;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.045em;
  white-space: nowrap;
}

.live-tag[data-mode='partial'],
.live-tag[data-mode='cached'],
.live-tag[data-mode='offline'],
.live-tag[data-mode='loading'] {
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--yellow);
}

.hero-center {
  grid-area: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

h1 {
  font-size: 29.5px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: center;
}

.period {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 4px;
  background: var(--yellow);
  vertical-align: baseline;
}

.tabs {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  max-width: 714px;
  height: 46px;
  margin-top: 22px;
  border: 1.5px solid var(--rule);
  background: var(--paper);
}

.tab-sep {
  align-self: center;
  color: var(--ink-2);
  font-size: 15px;
  user-select: none;
}

.tab {
  position: relative;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 0 6px;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--grey);
  white-space: nowrap;
}

.tab::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 6px;
  background: var(--yellow);
  transform: translateX(-50%);
}

.tab[aria-pressed='true'] {
  color: var(--ink);
  font-weight: 500;
}

.tab[aria-pressed='true']::after {
  width: min(110px, calc(100% - 20px));
}

.tab:hover .tab-label {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tab:focus-visible {
  outline-offset: -4px;
  box-shadow: inset 0 0 0 5px var(--yellow);
}

.tab-count {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--grey);
  align-self: flex-start;
  margin-top: 11px;
}

.tab-count:empty {
  display: none;
}

.tab-count[data-new='true'] {
  padding: 0 3px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 600;
}

/* screen-reader text only ("3 new"); sighted users see the yellow count */
.tab-new {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.subtitle {
  margin-top: 21px;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.subtitle a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.subtitle a:hover {
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 3px;
}

/* ------------------------------------------------------------------ story */

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-w);
  grid-template-rows: var(--stage-h);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}

.stage {
  position: relative;
  height: var(--stage-h);
  overflow: hidden;
  background-color: var(--paper-2);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-position: -1px -1px;
}

.curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.curve-line,
.curve-arrows path {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.curve-line {
  stroke: url(#curve-fade);
}

.curve-arrows path {
  stroke-width: 1.5;
}

/* decorations */
.decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.note-mono {
  position: absolute;
  left: var(--gutter);
  top: 31px;
  font-size: 9.5px;
  line-height: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-2);
}

.note-dash {
  position: absolute;
  left: var(--gutter);
  top: 63px;
  width: 12px;
  height: 1.5px;
  background: var(--grey-2);
}

.hand {
  font-family: var(--hand);
  color: var(--grey);
}

.note-parts {
  position: absolute;
  left: 66%;
  top: 66px;
  font-size: 15px;
  line-height: 18px;
  letter-spacing: 0.1em;
  color: var(--grey-2);
  transform: rotate(-12deg);
  transform-origin: left top;
  white-space: nowrap;
}

.note-repeat {
  position: absolute;
  left: 91.4%;
  top: 286px;
  font-size: 15px;
  line-height: 20px;
  letter-spacing: 0.06em;
  color: var(--grey);
  transform: rotate(-11deg);
  transform-origin: left top;
}

.hand-dash {
  display: inline-block;
  width: 14px;
  height: 1.5px;
  margin-left: 6px;
  background: var(--yellow);
  vertical-align: middle;
}

.plus {
  position: absolute;
  width: 11px;
  height: 11px;
}

.plus::before,
.plus::after {
  content: '';
  position: absolute;
  background: var(--grey-3);
}

.plus::before {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  transform: translateX(-50%);
}

.plus::after {
  top: 50%;
  left: 0;
  height: 1px;
  width: 100%;
  transform: translateY(-50%);
}

.plus-lg {
  width: 17px;
  height: 17px;
}

.plus-lg::before,
.plus-lg::after {
  background: var(--grey-2);
}

.plus-sm {
  width: 8px;
  height: 10px;
}

.plus-a { left: calc(10.6% - 5px); top: 141px; }
.plus-b { left: calc(25.84% - 5px); top: 227px; }
.plus-c { left: calc(60.9% - 5px); top: 318px; }
.plus-d { left: calc(94.2% - 8px); top: 33px; }
.plus-e { left: calc(87.5% - 4px); top: 131px; }

.arc {
  position: absolute;
  fill: none;
  stroke: var(--rule);
  stroke-width: 1.2;
}

.arc-a {
  left: calc(30.45% - 150px);
  top: 215px;
  width: 300px;
  height: 300px;
}

.arc-b {
  left: calc(65.2% - 120px);
  top: 295px;
  width: 240px;
  height: 240px;
}

/* nodes — each <li> is a zero-size anchor at the node centre (same % as ui/curve.js NODE_POINTS) */
.nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.node-item {
  position: absolute;
  width: 0;
  height: 0;
}

.node-item--network { left: 17.49%; top: 33.9%; }
.node-item--releases { left: 50.51%; top: 42.86%; }
.node-item--saved { left: 82.9%; top: 47.46%; }

.node {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 220px;
  padding: 0 6px 6px;
  transform: translate(-50%, -50px);
  text-align: center;
  pointer-events: auto;
}

.node-num {
  height: 16px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.06em;
}

.node-new {
  display: inline-block;
  margin-left: 6px;
  padding: 0 4px;
  background: var(--yellow);
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.node-ring {
  position: relative;
  width: 52px;
  height: 52px;
  flex: none;
}

.node-ring::before,
.node-ring::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
}

.node-ring::before {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}

.node-ring::after {
  width: 11px;
  height: 11px;
  background: var(--ink);
}

.node.is-focused .node-ring::before {
  width: 52px;
  height: 52px;
  background: radial-gradient(circle closest-side, var(--yellow) 0 76%, var(--paper) 78% 100%);
}

.node:hover .node-ring::before {
  box-shadow: 0 0 0 3px var(--yellow-soft);
}

.node-ticks::before,
.node-ticks::after {
  content: '';
  position: absolute;
  top: -22px;
  width: 1.5px;
  height: 11px;
  background: var(--yellow);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.node-ticks::before {
  left: -25px;
  transform: rotate(-42deg);
}

.node-ticks::after {
  left: 76px;
  transform: rotate(42deg);
}

.node.is-focused .node-ticks::before,
.node.is-focused .node-ticks::after {
  opacity: 1;
}

.node-title {
  margin-top: 5px;
  padding: 2px 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 20px;
  white-space: nowrap;
}

.node.is-focused .node-title {
  background: var(--yellow);
}

.node-desc {
  max-width: 170px;
  margin-top: 5px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.01em;
  color: var(--grey);
}

.node-info {
  max-width: 210px;
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 15px;
  letter-spacing: 0;
  color: var(--ink-2);
}

.node-info-text:empty + .node-new[hidden] {
  display: none;
}

.node-info:has(.node-info-text:empty):has(.node-new[hidden]) {
  display: none;
}

.node:focus-visible {
  outline-offset: 0;
  box-shadow: 0 0 0 3px var(--yellow) inset;
}

/* robot */
.robot-wrap {
  position: absolute;
  left: max(10px, calc(var(--gutter) + 10px));
  bottom: 16px;
  display: flex;
  align-items: flex-start;
}

.robot {
  position: relative;
  display: block;
  width: 72px;
  height: 116px;
  flex: none;
}

.robot-svg {
  display: block;
  width: 72px;
  height: 116px;
}

.robot-shadow {
  fill: #1a1a22;
  opacity: 0.55;
}

.px-spark {
  fill: var(--yellow);
}

.robot-arm {
  transform-box: fill-box;
  transform-origin: 0% 100%;
}

.robot-badge {
  position: absolute;
  right: -8px;
  top: 22px;
  min-width: 20px;
  height: 18px;
  padding: 0 4px;
  background: var(--yellow);
  box-shadow: 0 0 0 1.5px var(--ink);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.robot:hover .robot-body {
  opacity: 0.88;
}

.robot:focus-visible {
  outline-offset: 2px;
}

.robot-speech {
  display: flex;
  flex-direction: column;
  width: 200px;
  margin: 6px 0 0 22px;
  font-size: 19px;
  line-height: 21px;
  letter-spacing: 0.06em;
  color: var(--ink);
  transform: rotate(-8deg);
  transform-origin: left top;
}

.robot-headline {
  max-width: 130px;
}

.robot-wrap[data-state='error'] .robot-headline,
.robot-wrap[data-state='busy'] .robot-headline {
  max-width: 220px;
}

.robot-detail {
  /* Sits to the right of the hand-drawn arrow, which points back at the robot. */
  margin: 4px 0 0 38px;
  font-size: 16px;
  line-height: 18px;
  color: var(--grey);
}

.robot-detail:empty {
  display: none;
}

.robot-wrap[data-state='new'] .robot-detail {
  color: var(--ink);
}

/* Inline, so the highlighter band follows each wrapped line. */
.robot-mark {
  color: var(--ink);
  background: linear-gradient(transparent 55%, var(--yellow) 55% 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.robot-arrow {
  position: absolute;
  left: 96px;
  top: 76px;
  width: 34px;
  height: 26px;
  fill: none;
  stroke: var(--yellow);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: no-preference) {
  .robot[data-state='new'] .robot-body {
    animation: robot-bob 1.6s ease-in-out infinite;
  }

  .robot[data-state='new'] .robot-arm {
    animation: robot-wave 1.6s ease-in-out infinite;
  }

  .robot[data-state='new'] .px-spark-a {
    animation: spark 1.6s steps(2, jump-none) infinite;
  }

  .robot[data-state='new'] .px-spark-b {
    animation: spark 1.6s steps(2, jump-none) 0.8s infinite;
  }

  .robot[data-state='busy'] .px-spark {
    animation: spark 0.9s steps(2, jump-none) infinite;
  }

  .live-dot[data-busy='true'] {
    animation: pulse 0.9s ease-in-out infinite;
  }

}

@keyframes robot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

@keyframes robot-wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-18deg); }
  75% { transform: rotate(12deg); }
}

@keyframes spark {
  0% { opacity: 1; }
  100% { opacity: 0.25; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.6); opacity: 0.5; }
}

/* side panel */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: var(--stage-h);
  padding: 25px 28px 38px 27px;
  border-left: 2px solid var(--rule);
  background: var(--paper);
  overflow: hidden;
}

.plus-panel {
  top: 34px;
  right: 36px;
}

.panel-num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.panel > * {
  flex-shrink: 0;
}

.panel-title {
  margin-top: 9px;
  font-size: clamp(18px, 1.42vw, 22.5px);
  font-weight: 500;
  line-height: 30px;
  letter-spacing: 0.01em;
}

.panel-bar {
  display: block;
  width: 43px;
  height: 10px;
  margin-top: 8px;
  background: var(--yellow);
}

.panel-lead {
  margin-top: 13px;
  font-size: 15px;
  line-height: 20.5px;
  letter-spacing: 0;
  color: var(--ink-2);
}

.panel-facts {
  display: grid;
  align-content: start;
  gap: 9px;
  margin-top: 18px;
  /* The one part of the panel allowed to give way when a long fact meets a short stage. */
  flex-shrink: 1;
  min-height: 0;
  overflow: hidden;
}

.panel-facts:empty {
  display: none;
}

.panel-facts div {
  display: grid;
  gap: 1px;
}

.panel-facts dt {
  font-size: 10px;
  line-height: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}

.panel-facts dd {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 14px;
  line-height: 19px;
  letter-spacing: 0;
  color: var(--grey);
  overflow-wrap: anywhere;
}

.panel-note {
  margin-top: 20px;
  font-size: 15px;
  line-height: 20.5px;
  letter-spacing: 0;
  color: var(--grey);
}

.panel-foot {
  margin-top: auto;
  padding-top: 18px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}

.panel-foot .meta-dash {
  margin: 0 0 12px;
  background: var(--yellow);
}

/* ------------------------------------------------------------------ table */

.updates {
  padding: 12px var(--gutter) 0;
  outline: none;
}

.feed-caption {
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.01em;
  color: var(--grey);
}

.caption-main[data-tone='live']::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--yellow);
  box-shadow: 0 0 0 1px var(--ink);
  vertical-align: 1px;
}

.caption-line {
  color: var(--warn);
}

.caption-line::before {
  content: '! ';
  font-weight: 600;
}

.feed {
  width: 100%;
  margin-top: 13px;
  border-collapse: collapse;
  table-layout: fixed;
}

.feed th {
  padding: 0 22px 8px;
  border-bottom: 1.5px solid var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.feed th.col-source { width: 22%; }
.feed th.col-update { width: 44%; }
.feed th.col-date { width: 14%; }
.feed th.col-action { width: 20%; }

.feed td {
  padding: 10px 22px 11px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  line-height: 19px;
  letter-spacing: 0.01em;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.feed tr.is-new td:first-child {
  box-shadow: inset 3px 0 0 var(--yellow);
}

.cell-source {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}

.row-kind {
  display: block;
  width: 100%;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}

.new-mark {
  display: inline-block;
  padding: 0 5px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  line-height: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.row-title {
  font-weight: 500;
  color: var(--ink);
}

.row-tags {
  display: inline;
  margin-left: 10px;
}

.row-tag {
  display: inline-block;
  margin: 0 5px 2px 0;
  padding: 0 5px;
  border: 1px solid var(--rule);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 15px;
  letter-spacing: 0.08em;
  color: var(--grey);
  vertical-align: 1px;
}

.row-tag[data-tone='hot'] {
  border-color: var(--ink);
  color: var(--ink);
}

.row-summary {
  margin-top: 2px;
  font-size: 13px;
  line-height: 18px;
  color: var(--grey);
}

/* highlights: one compact line, "a · b · c", ellipsised */
.row-highlights {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  line-height: 17px;
  color: var(--grey);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.row-highlights li {
  display: inline;
}

.row-highlights li + li::before {
  content: ' · ';
  color: var(--grey-3);
}

.cell-date time {
  display: block;
  white-space: nowrap;
}

.row-rel {
  display: block;
  font-size: 12px;
  color: var(--grey);
}

.cell-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}

.source-link {
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
}

.source-link:hover {
  border-bottom-color: var(--ink);
}

.save-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 1px 0;
  color: var(--grey);
  white-space: nowrap;
}

.save-toggle::before {
  content: '';
  width: 9px;
  height: 9px;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.save-toggle:hover {
  color: var(--ink);
}

.save-toggle[aria-pressed='true'] {
  color: var(--ink);
}

.save-toggle[aria-pressed='true']::before {
  background: var(--yellow);
  box-shadow: 0 0 0 1.5px var(--ink);
}

.feed-empty td {
  padding: 22px;
  color: var(--grey);
}

.empty-title {
  color: var(--ink-2);
}

.empty-action {
  margin-left: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feed-more {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.more-button,
.pill-button {
  padding: 7px 16px;
  border: 1.5px solid var(--rule);
  font-size: 13px;
  letter-spacing: 0.06em;
  background: var(--paper);
}

.more-button:hover,
.pill-button:hover {
  box-shadow: inset 0 -5px 0 var(--yellow);
}

.noscript {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  display: flex;
  align-items: center;
  min-height: 60px;
  margin-top: 66px;
  padding: 0 var(--gutter) 24px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--grey);
}

.raw-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--grey);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.raw-link:hover {
  color: var(--ink);
}

.ext-icon {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
}

.footer-rule {
  flex: none;
  width: 1.5px;
  height: 28px;
  margin: 0 36px 0 32px;
  background: var(--rule);
}

.footer-rule-end {
  margin: 0 34px 0 auto;
}

.footer-flow {
  color: var(--grey);
}

.footer-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ dialogs */

.dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--yellow);
}

.dialog::backdrop {
  background: rgba(17, 17, 17, 0.32);
}

.dialog-head {
  position: relative;
  padding: 22px 56px 14px 26px;
  border-bottom: 1px solid var(--rule);
}

.dialog-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.dialog-head h2 {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

.dialog-close:hover {
  background: var(--yellow);
}

.dialog-body {
  display: grid;
  gap: 12px;
  padding: 18px 26px 26px;
  font-size: 13.5px;
  line-height: 20px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.dialog-list {
  display: grid;
  gap: 8px;
}

.dialog-list li {
  position: relative;
  padding-left: 16px;
}

.dialog-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  background: var(--yellow);
  box-shadow: 0 0 0 1px var(--ink);
}

.dialog-list a {
  overflow-wrap: anywhere;
}

.raw-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}

.dialog-fine {
  font-size: 12px;
  color: var(--grey);
}

/* ------------------------------------------------------------------ responsive */

/* Narrower side panel: win back the room a two-line fact needs. */
@media (max-width: 1400px) and (min-width: 1001px) {
  .panel {
    padding-bottom: 24px;
  }

  .panel-facts {
    gap: 7px;
    margin-top: 14px;
  }
}

@media (max-width: 1240px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'left right'
      'center center';
    row-gap: 18px;
    padding-top: 26px;
  }

  .meta-left,
  .meta-right {
    padding-top: 0;
  }

  .meta p span {
    display: inline;
    white-space: nowrap;
  }

  .meta p span + span::before {
    content: '/ ';
  }

  .hero .meta-dash {
    display: none;
  }

  .meta-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: auto;
    text-align: right;
  }

  .meta-right > .live-tag {
    align-self: auto;
  }

  .live-tag {
    margin-bottom: 4px;
  }

  .meta-right > p:not(.live-tag) {
    padding-left: 0;
  }
}

@media (max-width: 1100px) {
  .note-repeat,
  .plus-b,
  .plus-e {
    display: none;
  }
}

/* Tablets: tighter cells so the date and "view source" never touch. */
@media (max-width: 1100px) and (min-width: 681px) {
  .feed th,
  .feed td {
    padding-left: 12px;
    padding-right: 12px;
  }

  .feed th.col-source { width: 18%; }
  .feed th.col-update { width: 40%; }
  .feed th.col-date { width: 19%; }
  .feed th.col-action { width: 23%; }

  .row-rel {
    white-space: nowrap;
  }
}

/* Below this the robot's speech would run into node 02, so the panel stacks under the stage. */
@media (max-width: 1000px) {
  .story {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--stage-h) auto;
  }

  .panel {
    min-height: 0;
    border-left: 0;
    border-top: 2px solid var(--rule);
    padding: 24px var(--gutter) 28px;
  }

  .panel-foot {
    padding-top: 22px;
  }

  .plus-panel {
    right: var(--gutter);
  }

  .note-parts {
    display: none;
  }

  .node {
    width: 190px;
  }
}

@media (max-width: 900px) {
  .footer-flow {
    display: none;
  }

  .site-footer {
    justify-content: space-between;
  }

  .footer-rule {
    display: none;
  }
}

/* Phones: the curve can't carry three labelled nodes, so the story becomes a list. */
@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .site-header {
    height: 56px;
  }

  .brand-robot {
    width: 24px;
    height: 27px;
  }

  .brand-name {
    font-size: 19px;
    margin-left: 12px;
  }

  .site-nav a,
  .nav-button {
    font-size: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: 'center' 'left';
    padding: 26px var(--gutter) 22px;
    row-gap: 14px;
  }

  .meta-left {
    display: none;
  }

  .meta-right {
    grid-area: left;
    align-items: center;
    text-align: center;
  }

  .meta-right > p:not(.live-tag) {
    display: none;
  }

  h1 {
    font-size: 22px;
    letter-spacing: 0.05em;
  }

  .tabs {
    height: auto;
    min-height: 44px;
    margin-top: 18px;
  }

  .tab {
    font-size: 13px;
    padding: 12px 2px;
    letter-spacing: 0.02em;
    flex-direction: column;
    gap: 0;
  }

  .tab-count,
  .tab-new {
    position: absolute;
    top: 3px;
    right: 3px;
    margin: 0;
  }

  .tab-new {
    top: 6px;
    right: auto;
    left: 5px;
  }

  .tab[aria-pressed='true']::after {
    width: calc(100% - 12px);
  }

  .subtitle {
    font-size: 13px;
    margin-top: 16px;
  }

  .story {
    grid-template-rows: auto auto;
  }

  .stage {
    height: auto;
    padding: 22px var(--gutter) 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .curve,
  .decor {
    display: none;
  }

  .nodes {
    position: static;
    display: grid;
    gap: 8px;
    pointer-events: auto;
    order: 2;
  }

  .node-item {
    position: static;
    width: auto;
    height: auto;
  }

  .node {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-areas:
      'ring num'
      'ring title'
      'ring desc'
      'ring info';
    align-items: start;
    justify-items: start;
    column-gap: 14px;
    width: 100%;
    padding: 8px 6px;
    transform: none;
    text-align: left;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    border-radius: 4px;
    color: var(--ink);
  }

  .node-num { grid-area: num; margin: 0; }
  .node-ring { grid-area: ring; align-self: center; }
  .node-title { grid-area: title; margin: 2px 0 0 -8px; white-space: normal; }
  .node-desc { grid-area: desc; max-width: none; margin-top: 2px; }
  .node-info { grid-area: info; max-width: none; margin-top: 4px; }

  .node-ticks {
    display: none;
  }

  .robot-wrap {
    position: relative;
    left: auto;
    bottom: auto;
    order: 1;
  }

  .robot,
  .robot-svg {
    width: 54px;
    height: 87px;
  }

  .robot-arrow {
    display: none;
  }

  .robot-speech {
    width: auto;
    flex: 1;
    margin: 18px 0 0 18px;
    transform: rotate(-4deg);
  }

  .robot-headline {
    max-width: none;
  }

  .panel-title {
    font-size: 21px;
  }

  /* table rows become stacked cards */
  .feed,
  .feed tbody,
  .feed tr,
  .feed td {
    display: block;
    width: 100%;
  }

  .feed thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .feed {
    border-top: 1.5px solid var(--ink);
  }

  .feed tr {
    position: relative;
    padding: 12px 0 14px;
    border-bottom: 1px solid var(--rule);
  }

  .feed tr.is-new {
    box-shadow: inset 3px 0 0 var(--yellow);
    padding-left: 12px;
  }

  .feed tr.is-new td:first-child {
    box-shadow: none;
  }

  .feed td {
    padding: 0;
    border: 0;
  }

  .feed td + td {
    margin-top: 6px;
  }

  .feed td.cell-date {
    display: flex;
    gap: 10px;
    align-items: baseline;
  }

  .cell-date time,
  .row-rel {
    display: inline;
  }

  .feed-empty td {
    padding: 18px 0;
  }

  .site-footer {
    margin-top: 44px;
    flex-wrap: wrap;
    gap: 8px 16px;
  }
}

/* Phones: one highlight per line (each still ellipsised) instead of one clipped run. */
@media (max-width: 680px) {
  .row-highlights li {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .row-highlights li + li::before {
    content: none;
  }

  .robot-detail {
    margin-left: 0;
  }

  /* Bigger touch targets for the two row actions, without growing the card. */
  .cell-action .source-link {
    display: inline-block;
    padding-block: 12px;
    margin-block: -12px;
  }

  .cell-action .source-link:hover {
    border-bottom-color: transparent;
    text-decoration: underline;
  }

  .cell-action .save-toggle {
    padding-block: 12px;
    margin-block: -12px;
  }
}

@media (max-width: 400px) {
  .site-nav {
    gap: 14px;
  }

  .site-nav ul {
    gap: 12px;
  }

  .brand-name {
    margin-left: 8px;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .tab-sep {
    display: none;
  }

  .tab {
    flex: 1 1 50%;
  }

  .tab:nth-of-type(n + 3) {
    border-top: 1px solid var(--rule);
  }

  .tab:nth-of-type(even) {
    border-left: 1px solid var(--rule);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header nav,
  .robot-wrap,
  .save-toggle,
  .feed-more,
  .site-footer {
    display: none;
  }
}

/* ------------------------------------------------------------------ Dark Mode Cyberpunk Accents */

.brand-dot {
  box-shadow: 0 0 10px rgba(255, 230, 0, 0.6);
}

.period {
  box-shadow: 0 0 10px rgba(255, 230, 0, 0.6);
}

.panel-bar {
  box-shadow: 0 0 10px rgba(255, 230, 0, 0.4);
}

.tab[aria-pressed='true'] {
  color: var(--yellow);
}

.tab[aria-pressed='true']::after {
  box-shadow: 0 0 10px rgba(255, 230, 0, 0.6);
}

.node.is-focused .node-title {
  color: #000;
  font-weight: 600;
}

.node.is-focused .node-ring::before {
  border-color: var(--yellow);
  box-shadow: 0 0 16px rgba(255, 230, 0, 0.35);
}

.node-ticks::before,
.node-ticks::after {
  background: var(--yellow);
}

.new-mark,
.node-new,
.live-tag {
  color: #000 !important;
}

.robot-badge {
  color: #000 !important;
}

.feed tbody tr {
  transition: background 0.15s ease;
}

.feed tbody tr:hover td {
  background: var(--paper-2);
}

.feed th {
  color: var(--grey);
  border-bottom: 1.5px solid var(--rule);
}

.more-button,
.pill-button {
  color: var(--ink);
  background: var(--paper-2);
  border-color: var(--rule);
  transition: all 0.2s ease;
}

.more-button:hover,
.pill-button:hover {
  background: var(--yellow);
  color: #000;
  border-color: var(--yellow);
  box-shadow: 0 0 14px rgba(255, 230, 0, 0.4);
}

.save-toggle:hover {
  color: var(--yellow);
}

.source-link:hover {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

.dialog {
  border: 1.5px solid var(--yellow);
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.85), 8px 8px 0 var(--yellow);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.dialog-close:hover {
  background: var(--yellow);
  color: #000;
}

/* ------------------------------------------------------------------ Mobile High-Contrast Dark Mode */
@media (max-width: 680px) {
  .stage {
    background: var(--paper);
  }

  .nodes {
    gap: 12px;
  }

  .node {
    background: var(--paper-2) !important;
    border: 1px solid var(--rule) !important;
    border-radius: 4px;
    padding: 12px 14px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: border-color 0.2s ease, background 0.2s ease;
  }

  .node.is-focused {
    border-color: var(--yellow) !important;
    background: #15151c !important;
    box-shadow: 0 0 18px rgba(255, 230, 0, 0.2) !important;
  }

  .node-num {
    color: var(--yellow) !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
  }

  .node-title {
    color: var(--ink) !important;
    font-size: 15px;
    font-weight: 600;
  }

  .node.is-focused .node-title {
    background: var(--yellow) !important;
    color: #000 !important;
    font-weight: 700;
  }

  .node-desc {
    color: #d1d5db !important; /* High contrast readable light grey */
    font-size: 13px !important;
    line-height: 18px !important;
  }

  .node-info {
    color: #9ca3af !important;
    font-size: 12px !important;
  }

  .robot-speech {
    color: var(--ink) !important;
  }

  .robot-detail {
    color: #d1d5db !important;
  }

  .feed {
    border-top-color: var(--rule) !important;
  }

  .feed tr {
    border-bottom-color: var(--rule) !important;
    background: var(--paper);
  }

  .feed tr.is-new {
    box-shadow: inset 3px 0 0 var(--yellow) !important;
  }

  .row-title {
    color: var(--ink) !important;
  }

  .row-summary {
    color: #d1d5db !important;
  }
}
