/* PATRICK.OS - modern synth / lofi blog */

:root {
  --bg-0: #080713;
  --bg-1: #111024;
  --bg-2: #19172f;
  --panel: rgba(18, 17, 35, 0.78);
  --panel-strong: rgba(24, 22, 45, 0.92);
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(109, 229, 255, 0.28);
  --fg-0: #fff7f0;
  --fg-1: #eee4ec;
  --fg-2: #c7bbce;
  --fg-3: #9f95ad;
  --hot: #ff5d9e;
  --pink: #f6a6d7;
  --magenta: #c88cff;
  --violet: #7c6cff;
  --cyan: #6de5ff;
  --teal: #5ff1d1;
  --gold: #ffd36e;
  --lime: #b8f36a;
  --orange: #ff9d66;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --soft: 0 0 42px rgba(109, 229, 255, 0.14);
  --ff-display: "Audiowide", "Space Grotesk", system-ui, sans-serif;
  --ff-chrome: "Audiowide", "Space Grotesk", system-ui, sans-serif;
  --ff-body: "Space Grotesk", system-ui, sans-serif;
  --ff-ui: "Space Mono", ui-monospace, monospace;
  --ff-mono: "Space Mono", ui-monospace, monospace;
}

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

html,
body {
  min-height: 100%;
  background: var(--bg-0);
  color: var(--fg-0);
  font-family: var(--ff-body);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: 18px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px 14px;
  border: 1px solid var(--cyan);
  border-radius: 8px;
  background: #090816;
  color: #fff;
  font-family: var(--ff-ui);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(109, 229, 255, 0.9);
  outline-offset: 3px;
}

p {
  line-height: 1.7;
}

h1,
h2,
h3,
h4 {
  color: var(--fg-0);
  font-family: var(--ff-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
  text-wrap: balance;
}

.row {
  display: flex;
  align-items: center;
}

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mono { font-family: var(--ff-mono); }
.dim { color: var(--fg-2); }

.os-app {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.grid-bg,
.scanline,
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grid-bg {
  z-index: -4;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 93, 158, 0.24), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(109, 229, 255, 0.18), transparent 26%),
    radial-gradient(circle at 68% 82%, rgba(255, 211, 110, 0.12), transparent 26%),
    linear-gradient(155deg, #080713 0%, #121023 38%, #211331 64%, #111024 100%);
}

.grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

.grid-bg::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -18%;
  height: 46%;
  background:
    linear-gradient(180deg, rgba(109,229,255,0), rgba(109,229,255,0.12)),
    repeating-linear-gradient(90deg, transparent 0 70px, rgba(109,229,255,0.24) 70px 72px),
    repeating-linear-gradient(0deg, rgba(255,93,158,0.18) 0 2px, transparent 2px 34px);
  transform: perspective(640px) rotateX(64deg);
  transform-origin: 50% 0;
  filter: blur(0.2px);
}

.scanline {
  z-index: 40;
  opacity: 0.18;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(255,255,255,0.08) 3px 4px);
  mix-blend-mode: overlay;
}

.noise {
  z-index: 39;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.hud {
  position: fixed;
  top: 16px;
  left: 18px;
  right: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 9, 22, 0.62);
  box-shadow: var(--soft);
  color: var(--fg-1);
  font-family: var(--ff-ui);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(18px);
}

.os-rec-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: var(--hot);
  box-shadow: 0 0 14px var(--hot);
}

.os-viewport {
  position: relative;
  z-index: 2;
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 28px;
}

.os-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 8, 20, 0.46);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
}

.os-stage {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: calc(100vh - 104px);
}

.left-rail {
  position: sticky;
  top: 76px;
  align-self: start;
  width: 250px;
  min-height: calc(100vh - 104px);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(20,18,39,0.92), rgba(12,11,27,0.84)),
    radial-gradient(circle at 30% 10%, rgba(255,93,158,0.16), transparent 30%);
}

.os-rail-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.os-rail-brand strong,
.os-rail-brand small {
  display: block;
}

.os-rail-brand strong {
  font-family: var(--ff-display);
  font-size: 21px;
}

.os-rail-brand small {
  margin-top: 4px;
  color: var(--fg-2);
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.os-rail-section,
.os-search span {
  color: var(--fg-3);
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.os-rail-section {
  padding: 20px 16px 8px;
}

.rail-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 16px;
  border-left: 2px solid transparent;
  color: var(--fg-1);
  font-family: var(--ff-ui);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.rail-item .code {
  color: var(--fg-3);
  font-family: var(--ff-ui);
  font-size: 13px;
}

.rail-item:hover,
.rail-item.active {
  color: #fff;
  background: rgba(255,255,255,0.055);
}

.rail-item.active {
  border-left-color: var(--cyan);
  box-shadow: inset 4px 0 0 rgba(109, 229, 255, 0.32);
}

.os-channel-strip {
  display: contents;
}

.os-search {
  display: grid;
  gap: 8px;
  padding: 18px 16px 8px;
}

.os-search input,
.os-newsletter input {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: rgba(255,255,255,0.055);
  color: #fff;
}

.os-search input::placeholder,
.os-newsletter input::placeholder {
  color: var(--fg-2);
}

.os-search input:focus,
.os-newsletter input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(109,229,255,0.11);
}

.os-course-card,
.win95,
.vhs-card,
.os-featured {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
}

.os-course-card {
  width: calc(100% - 32px);
  margin: 0 16px 14px;
  overflow: hidden;
  color: inherit;
  text-align: left;
}

.win95-bar,
.os-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.045);
  color: var(--fg-2);
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.btn-row {
  display: flex;
  gap: 5px;
}

.win95-btn {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  color: var(--fg-2);
  font-size: 10px;
}

.os-course-body {
  padding: 12px;
}

.os-course-body strong {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
}

.os-course-body span {
  display: block;
  margin-top: 7px;
  color: var(--fg-2);
  font-family: var(--ff-ui);
  font-size: 11px;
}

.pbar {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.pbar > i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--hot), var(--gold));
}

.os-rail-status {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--line);
  color: var(--fg-3);
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.8;
}

.os-content {
  min-width: 0;
  background:
    radial-gradient(circle at 44% 0%, rgba(109,229,255,0.08), transparent 32%),
    linear-gradient(180deg, rgba(18,17,35,0.58), rgba(10,9,22,0.74));
}

.os-index {
  padding-bottom: 26px;
}

.synth-hero {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8,7,19,0.04), rgba(8,7,19,0.42)),
    radial-gradient(circle at 50% 58%, rgba(255,211,110,0.34), transparent 15%),
    linear-gradient(180deg, #111326 0%, #25203d 48%, #5b244f 73%, #ff8a67 100%);
}

.synth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 7, 19, 0.42) 0%, transparent 24%),
    linear-gradient(0deg, rgba(8, 7, 19, 0.68) 0%, transparent 36%);
}

.os-hero {
  min-height: 610px;
  margin: 22px;
  box-shadow: var(--shadow);
}

.hero-sun {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 42%;
  width: min(360px, 42vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background:
    repeating-linear-gradient(180deg, transparent 0 20px, rgba(17,16,36,0.78) 20px 26px),
    radial-gradient(circle, #fff4b9 0 20%, var(--gold) 32%, var(--orange) 52%, var(--hot) 75%, transparent 76%);
  filter: drop-shadow(0 0 42px rgba(255,93,158,0.42));
  opacity: 0.92;
}

.os-palms,
.os-mountains {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 27%;
  width: 100%;
  pointer-events: none;
}

.os-mountains {
  z-index: 1;
  height: 140px;
  opacity: 0.72;
}

.os-palms {
  z-index: 2;
  height: 210px;
  opacity: 0.9;
}

.os-hero::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -5%;
  height: 39%;
  background:
    repeating-linear-gradient(90deg, transparent 0 56px, rgba(109,229,255,0.28) 56px 58px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.14) 0 2px, transparent 2px 26px);
  transform: perspective(520px) rotateX(62deg);
  transform-origin: 50% 0;
  z-index: 2;
}

.os-hero-top,
.os-hero-title,
.os-hero-bottom {
  position: relative;
  z-index: 5;
}

.os-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 28px 0;
  flex-wrap: wrap;
}

.os-hero-top > span {
  color: rgba(255,255,255,0.76);
  font-family: var(--ff-ui);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.os-hero-title {
  padding: 50px 28px 0;
  text-align: center;
}

.os-hero-title h1 {
  font-size: clamp(58px, 10vw, 150px);
  line-height: 0.88;
  text-transform: uppercase;
}

.chrome-text {
  color: transparent;
  background: linear-gradient(180deg, #fffdf8 0%, #ffd9ed 34%, #ff78ad 58%, #7ce8ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 16px 34px rgba(0,0,0,0.38));
}

.glow-cyan {
  color: #f7fdff;
  text-shadow: 0 0 22px rgba(109,229,255,0.48);
}

.os-hero-title h2 {
  margin-top: 20px;
  font-family: var(--ff-ui);
  font-size: clamp(13px, 1.5vw, 18px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.os-hero-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  padding: 0 26px;
  text-align: center;
}

.os-hero-bottom p {
  max-width: 760px;
  margin: 0 auto 18px;
  color: rgba(255,255,255,0.94);
  text-shadow: 0 2px 22px rgba(0,0,0,0.52);
}

.os-hero-bottom strong {
  color: #fff;
}

.neon-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(109,229,255,0.34);
  border-radius: 999px;
  background: rgba(109,229,255,0.08);
  color: var(--cyan);
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.neon-pill.hot,
.neon-pill.mag {
  border-color: rgba(255,93,158,0.34);
  background: rgba(255,93,158,0.1);
  color: var(--pink);
}

.btn-vhs,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 16px;
  border-radius: 8px;
  font-family: var(--ff-ui);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.btn-vhs {
  border: 1px solid rgba(255,255,255,0.32);
  background: linear-gradient(135deg, var(--cyan), var(--hot) 58%, var(--gold));
  color: #090816;
  box-shadow: 0 14px 36px rgba(255,93,158,0.22);
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.btn-vhs:hover,
.btn-ghost:hover,
.vhs-card:hover,
.os-featured:hover {
  transform: translateY(-2px);
}

.btn-ghost:hover,
.vhs-card:hover,
.os-featured:hover {
  border-color: rgba(109,229,255,0.38);
  box-shadow: 0 18px 48px rgba(0,0,0,0.22), 0 0 42px rgba(109,229,255,0.12);
}

.os-section {
  padding: 24px 22px;
  border-top: 1px solid var(--line);
}

.os-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.os-section-head span,
.os-section-head em {
  color: var(--fg-3);
  font-family: var(--ff-ui);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.os-section-head h2 {
  margin-top: 6px;
  font-size: clamp(28px, 3.2vw, 42px);
}

.os-channel-grid,
.os-post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.os-post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vhs-card {
  overflow: hidden;
  color: inherit;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.os-channel-body {
  min-height: 185px;
  padding: 18px;
}

.os-channel-body b {
  display: block;
  color: var(--channel-color);
  font-family: var(--ff-display);
  font-size: 34px;
  line-height: 1;
}

.os-channel-body h3 {
  margin-top: 12px;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 24px;
}

.os-channel-body p,
.os-post-body p,
.os-featured p,
.os-newsletter p,
.os-reader header p {
  color: var(--fg-1);
}

.os-channel-body p {
  min-height: 72px;
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.55;
}

.os-channel-body span {
  display: block;
  margin-top: 12px;
  color: var(--channel-color);
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.os-featured {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  padding: 14px;
  color: inherit;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.os-featured h3 {
  margin-top: 14px;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: 0;
}

.os-featured p {
  max-width: 760px;
  margin: 13px 0 22px;
  font-size: 15px;
}

.thumb {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255,211,110,0.62), transparent 20%),
    linear-gradient(180deg, #121426 0%, #30264b 48%, #89405f 72%, #ff9d66 100%);
}

.thumb::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -8%;
  height: 42%;
  background:
    repeating-linear-gradient(90deg, transparent 0 36px, rgba(109,229,255,0.34) 36px 38px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.18) 0 2px, transparent 2px 22px);
  transform: perspective(320px) rotateX(62deg);
  transform-origin: 50% 0;
}

.thumb img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  mix-blend-mode: soft-light;
}

.os-reader > .os-thumb img {
  opacity: 0.36;
}

.thumb .label,
.thumb .timecode,
.thumb .play-overlay {
  position: absolute;
  z-index: 2;
}

.thumb .label,
.thumb .timecode {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(8,7,19,0.52);
  color: #fff;
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.thumb .label {
  top: 10px;
  left: 10px;
}

.thumb .timecode {
  right: 10px;
  bottom: 10px;
}

.thumb .play-overlay {
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.86);
  font-family: var(--ff-display);
  font-size: 42px;
  text-shadow: 0 0 24px rgba(109,229,255,0.42);
}

.os-thumb.compact {
  min-height: 170px;
  border-radius: 8px 8px 0 0;
}

.os-post-tile {
  display: flex;
  flex-direction: column;
}

.os-post-body {
  padding: 15px;
}

.os-post-body h3 {
  margin-top: 10px;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.16;
}

.os-post-body p {
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.58;
}

.os-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.os-tags span {
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  color: var(--fg-2);
  font-family: var(--ff-ui);
  font-size: 10px;
}

.os-newsletter {
  overflow: hidden;
  margin: 8px 22px 22px;
}

.os-newsletter-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 20px;
  align-items: center;
  padding: 20px;
}

.os-newsletter h3 {
  font-size: 28px;
}

.os-newsletter p {
  margin-top: 7px;
}

.os-newsletter form {
  display: flex;
  gap: 10px;
}

.os-newsletter .btn-vhs {
  justify-self: end;
}

.os-about {
  scroll-margin-top: 86px;
}

.os-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(180px, 260px);
  gap: 18px;
  align-items: stretch;
  max-width: 1080px;
}

.os-about-grid p {
  color: var(--fg-1);
  font-size: 17px;
}

.about-avatar-scene {
  width: 100%;
  min-height: 220px;
  max-height: 300px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 18px 48px rgba(0,0,0,0.28);
}

.os-reader {
  padding: 32px clamp(20px, 4vw, 58px) 70px;
}

.os-reader header {
  max-width: 860px;
  margin-top: 26px;
}

.os-reader header h1 {
  margin-top: 18px;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.03;
  letter-spacing: 0;
}

.os-reader header p {
  max-width: 820px;
  margin-top: 16px;
  font-size: 19px;
}

.os-reader > .os-thumb {
  max-width: 980px;
  min-height: 360px;
  margin: 28px 0;
}

.guide-outline {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 980px;
  margin: 26px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
}

.guide-outline > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--cyan);
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-outline > span .asset-icon {
  width: 28px;
  height: 28px;
}

.guide-outline > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-outline button {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  color: var(--fg-1);
  font-size: 13px;
}

.guide-outline button:hover {
  border-color: rgba(109,229,255,0.42);
  color: #fff;
}

.markdown-body {
  max-width: 68ch;
  color: var(--fg-1);
  font-size: 18px;
  line-height: 1.78;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 1.7em 0 0.55em;
  font-family: var(--ff-body);
  font-weight: 700;
  letter-spacing: 0;
  scroll-margin-top: 130px;
}

.markdown-body h2 { font-size: 32px; }
.markdown-body h3 { font-size: 24px; }

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body pre,
.markdown-body hr {
  margin: 1em 0;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.25em;
}

.markdown-body li + li {
  margin-top: 0.35em;
}

.markdown-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.markdown-body code {
  padding: 0.13em 0.35em;
  border-radius: 6px;
  background: rgba(109,229,255,0.1);
  color: #e8fbff;
  font-family: var(--ff-ui);
  font-size: 0.9em;
}

.markdown-body pre {
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
}

.md-diagram {
  overflow: auto;
  margin: 1.35em 0;
  padding: 18px;
  border: 1px solid rgba(109,229,255,0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0%, rgba(109,229,255,0.09), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.md-diagram .mermaid {
  min-width: 620px;
  color: var(--fg-0);
  font-family: var(--ff-body);
  text-align: center;
}

.md-diagram figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -18px -18px 18px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: var(--cyan);
  font-family: var(--ff-ui);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.md-diagram figcaption em {
  color: rgba(255,247,240,0.58);
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: none;
}

.md-diagram svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.md-diagram.diagram-error {
  border-color: rgba(255,93,158,0.42);
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
}

.markdown-body blockquote {
  padding: 16px 18px;
  border-left: 3px solid var(--hot);
  border-radius: 0 8px 8px 0;
  background: rgba(255,93,158,0.08);
  color: #fff;
}

.markdown-body img {
  max-width: 100%;
  border-radius: 8px;
}

.markdown-body hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.os-related {
  margin-top: 44px;
}

/* Medium-inspired synthwave homepage */
.home-mode .hud {
  display: none;
}

.home-mode .os-viewport {
  width: min(1440px, calc(100% - 36px));
  padding: 28px 0;
}

.home-mode .os-frame {
  overflow: visible;
  border-color: rgba(255,255,255,0.12);
  background: rgba(11, 10, 24, 0.72);
  box-shadow: 0 28px 90px rgba(0,0,0,0.36);
}

.home-mode .os-stage {
  display: block;
}

.home-mode .left-rail {
  display: none;
}

.home-mode .os-content {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015) 24%, rgba(8,7,19,0.2)),
    rgba(12, 11, 25, 0.7);
}

.medium-home {
  padding: 78px 0 34px;
}

.home-masthead {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: 0 clamp(18px, 4vw, 56px) 44px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(8,7,19,0.92), rgba(8,7,19,0.62) 42%, rgba(8,7,19,0.18)),
    linear-gradient(180deg, rgba(8,7,19,0.08), rgba(8,7,19,0.7)),
    radial-gradient(circle at 18% 18%, rgba(255,93,158,0.24), transparent 26%),
    radial-gradient(circle at 80% 20%, rgba(109,229,255,0.18), transparent 24%),
    url("assets/avatar/rooftop-hero.png") center 44% / cover no-repeat,
    linear-gradient(165deg, rgba(18,16,39,0.96), rgba(34,20,51,0.95) 48%, rgba(12,11,28,0.98));
}

.home-masthead::before {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -19%;
  height: 48%;
  background:
    repeating-linear-gradient(90deg, transparent 0 74px, rgba(109,229,255,0.3) 74px 76px),
    repeating-linear-gradient(0deg, rgba(255,93,158,0.18) 0 2px, transparent 2px 34px);
  transform: perspective(680px) rotateX(64deg);
  transform-origin: 50% 0;
  opacity: 0.74;
}

.home-topbar {
  position: fixed;
  top: 28px;
  left: 50%;
  width: min(1440px, calc(100% - 36px));
  transform: translateX(-50%);
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(240px, 340px) minmax(220px, 310px);
  gap: 14px;
  align-items: center;
  min-height: 78px;
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255,255,255,0.13);
  background: rgba(13, 12, 28, 0.9);
  backdrop-filter: blur(18px);
}

.home-brand,
.home-navlinks,
.home-jump,
.home-search {
  display: flex;
  align-items: center;
}

.home-brand {
  gap: 10px;
  color: #fff;
  font-family: var(--ff-ui);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-navlinks {
  gap: 18px;
  color: var(--fg-2);
  font-size: 14px;
}

.home-navlinks a:hover {
  color: #fff;
}

.home-jump,
.home-search {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.075);
  backdrop-filter: blur(16px);
}

.home-jump span,
.home-search span {
  margin-right: 10px;
  color: var(--cyan);
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-jump select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
}

.home-jump select option,
.home-jump select optgroup {
  background: #111024;
  color: #fff;
}

.home-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
}

.home-search input::placeholder {
  color: var(--fg-3);
}

.home-title-block {
  position: relative;
  z-index: 2;
  max-width: 920px;
  padding-top: clamp(56px, 8vw, 108px);
}

.home-title-block > span,
.home-section-title span,
.home-side-card > span,
.story-meta span:first-child {
  font-family: var(--ff-ui);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-title-block > span {
  color: var(--pink);
}

.home-title-block h1 {
  max-width: 980px;
  margin-top: 16px;
  color: #fffaf5;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(58px, 8vw, 116px);
  line-height: 0.94;
  text-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(255,93,158,0.16);
}

.home-title-block p {
  max-width: 660px;
  margin-top: 22px;
  color: rgba(255,247,240,0.86);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.48;
}

.home-signal-divider {
  position: absolute;
  left: clamp(18px, 4vw, 56px);
  bottom: 8px;
  z-index: 3;
  width: min(760px, calc(100% - 36px));
  height: 56px;
  object-fit: contain;
  object-position: left center;
  opacity: 0.9;
  pointer-events: none;
}

.asset-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(109,229,255,0.26));
}

.topic-nav {
  position: sticky;
  top: 106px;
  z-index: 20;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(12, 11, 25, 0.88);
  backdrop-filter: blur(16px);
}

.topic-nav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 14px 7px 8px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: var(--fg-2);
  white-space: nowrap;
}

.topic-nav .asset-icon {
  width: 30px;
  height: 30px;
}

.topic-nav button.active,
.topic-nav button:hover {
  border-color: color-mix(in srgb, var(--topic-color) 62%, white 0%);
  background: color-mix(in srgb, var(--topic-color) 15%, transparent);
  color: #fff;
}

.topic-nav em {
  color: var(--topic-color);
  font-family: var(--ff-ui);
  font-size: 11px;
  font-style: normal;
}

.publication-hero,
.home-shell,
.os-about,
.os-newsletter {
  width: min(1180px, calc(100% - 36px));
  margin-left: auto;
  margin-right: auto;
}

.publication-hero {
  padding: 38px 0 22px;
}

.publication-lead {
  display: grid;
  grid-template-columns: minmax(320px, 1.12fr) minmax(300px, 0.88fr);
  gap: clamp(24px, 4vw, 54px);
  width: 100%;
  align-items: center;
  color: inherit;
  text-align: left;
}

.publication-lead .os-thumb {
  min-height: 430px;
  border-color: rgba(255,255,255,0.13);
  box-shadow: 0 22px 70px rgba(0,0,0,0.32);
}

.publication-lead .os-thumb img {
  opacity: 0.58;
}

.publication-lead-copy h2 {
  margin-top: 16px;
  color: #fffaf5;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.02;
}

.publication-lead-copy p {
  margin-top: 16px;
  color: var(--fg-1);
  font-size: 18px;
}

.story-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--fg-3);
  font-size: 13px;
}

.story-meta span + span::before {
  content: "/";
  margin-right: 10px;
  color: rgba(255,255,255,0.22);
}

.home-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 330px);
  gap: clamp(30px, 5vw, 62px);
  padding: 24px 0 34px;
}

.home-section-title {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.home-section-title span {
  grid-column: 1 / -1;
}

.home-section-title h2 {
  color: #fffaf5;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(34px, 4vw, 54px);
}

.home-section-title em {
  color: var(--fg-3);
  font-style: normal;
}

.story-list {
  display: grid;
}

.story-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  width: 100%;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-align: left;
}

.story-row:hover h3,
.publication-lead:hover h2 {
  color: var(--pink);
}

.story-copy h3 {
  margin-top: 9px;
  color: #fffaf5;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
}

.story-copy p {
  margin-top: 10px;
  color: var(--fg-2);
  font-size: 16px;
}

.story-row .os-thumb {
  min-height: 150px;
  align-self: stretch;
}

.story-row .os-thumb img {
  opacity: 0.48;
}

.home-sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
  position: sticky;
  top: 82px;
}

.home-side-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
}

.home-side-card > span {
  color: var(--cyan);
}

.home-side-card h3 {
  margin-top: 10px;
  color: #fffaf5;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.1;
}

.home-side-card p {
  margin-top: 10px;
  color: var(--fg-2);
  font-size: 15px;
}

.topic-card,
.mini-list {
  display: grid;
  gap: 10px;
}

.topic-card button,
.mini-list button {
  width: 100%;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: inherit;
  text-align: left;
}

.topic-card button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 10px;
}

.topic-card button .asset-icon {
  grid-row: span 2;
  align-self: center;
  width: 38px;
  height: 38px;
}

.topic-card button strong,
.mini-list button strong {
  display: block;
  color: #fffaf5;
  font-size: 15px;
}

.topic-card button strong {
  color: var(--topic-color);
}

.topic-card button small,
.mini-list button small {
  display: block;
  margin-top: 4px;
  color: var(--fg-3);
  font-size: 13px;
  line-height: 1.45;
}

.medium-home .os-about,
.medium-home .os-newsletter {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
}

/* Medium-inspired reading mode for long-form posts */
.reading-mode {
  background: #f8f6f1;
  color: #242424;
}

.reading-mode .grid-bg,
.reading-mode .scanline,
.reading-mode .noise {
  display: none;
}

.reading-mode .hud {
  position: sticky;
  top: 0;
  left: auto;
  right: auto;
  margin: 0;
  min-height: 54px;
  border-width: 0 0 1px;
  border-color: rgba(36,36,36,0.12);
  border-radius: 0;
  background: rgba(248,246,241,0.92);
  box-shadow: none;
  color: #59544d;
  backdrop-filter: blur(14px);
}

.reading-mode .hud span:first-child {
  color: #242424 !important;
  text-shadow: none !important;
}

.reading-mode .hud .row span:not(:first-child) {
  display: none;
}

.reading-mode .os-rec-dot,
.reading-mode .hud .dim,
.reading-mode .hud > div:last-child {
  display: none;
}

.reading-mode .os-viewport {
  width: 100%;
  padding: 0;
}

.reading-mode .os-frame {
  border: 0;
  border-radius: 0;
  background: #f8f6f1;
  box-shadow: none;
  backdrop-filter: none;
}

.reading-mode .os-stage {
  display: block;
  min-height: 100vh;
}

.reading-mode .left-rail {
  display: none;
}

.reading-mode .os-content {
  min-height: 100vh;
  background: #f8f6f1;
}

.reading-mode .os-reader {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 46px 0 88px;
}

.reading-mode .os-reader > .btn-ghost {
  min-height: auto;
  padding: 0;
  border: 0;
  margin-left: max(0px, calc((100% - 740px) / 2));
  background: transparent;
  color: #5f5a52;
  font-family: var(--ff-body);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

.reading-mode .os-reader > .btn-ghost::before {
  content: "\2190";
  margin-right: 8px;
}

.reading-mode .os-reader header {
  max-width: 740px;
  margin: 38px auto 0;
}

.reading-mode .os-reader header .row {
  gap: 8px;
}

.reading-mode .neon-pill,
.reading-mode .os-tags span {
  border-color: rgba(36,36,36,0.12) !important;
  background: rgba(36,36,36,0.045);
  color: #6b6259 !important;
  box-shadow: none;
  font-family: var(--ff-body);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.reading-mode .mono.dim {
  color: #777068;
  font-family: var(--ff-body);
}

.reading-mode .os-reader header h1 {
  margin-top: 18px;
  color: #242424;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 1.03;
}

.reading-mode .os-reader header p {
  max-width: 720px;
  margin-top: 18px;
  color: #5f5a52;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.45;
}

.reading-mode .guide-outline {
  max-width: 740px;
  margin: 28px auto 0;
  border-color: rgba(36,36,36,0.12);
  background: #fffdf8;
}

.reading-mode .guide-outline > span {
  color: #777068;
}

.reading-mode .guide-outline button {
  border-color: rgba(36,36,36,0.12);
  background: rgba(36,36,36,0.035);
  color: #242424;
}

.reading-mode .guide-outline button:hover {
  border-color: rgba(36,36,36,0.34);
  background: rgba(36,36,36,0.06);
}

.reading-mode .os-reader > .os-thumb {
  max-width: 1032px;
  min-height: 420px;
  margin: 36px auto 46px;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
}

.reading-mode .os-reader > .os-thumb::before,
.reading-mode .os-reader > .os-thumb .label,
.reading-mode .os-reader > .os-thumb .timecode,
.reading-mode .os-reader > .os-thumb .play-overlay {
  display: none;
}

.reading-mode .os-reader > .os-thumb img {
  opacity: 0.92;
  mix-blend-mode: normal;
}

.reading-mode .markdown-body {
  max-width: 700px;
  margin: 0 auto;
  color: #242424;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.72;
}

.reading-mode .markdown-body h1,
.reading-mode .markdown-body h2,
.reading-mode .markdown-body h3,
.reading-mode .markdown-body h4 {
  margin: 2.1em 0 0.55em;
  color: #242424;
  font-family: var(--ff-body);
  font-weight: 700;
  line-height: 1.18;
}

.reading-mode .markdown-body h2 {
  font-size: 32px;
}

.reading-mode .markdown-body h3 {
  font-size: 24px;
}

.reading-mode .markdown-body p,
.reading-mode .markdown-body ul,
.reading-mode .markdown-body ol,
.reading-mode .markdown-body blockquote,
.reading-mode .markdown-body pre,
.reading-mode .markdown-body hr {
  margin: 1.1em 0;
}

.reading-mode .markdown-body ul,
.reading-mode .markdown-body ol {
  padding-left: 1.35em;
}

.reading-mode .markdown-body li + li {
  margin-top: 0.45em;
}

.reading-mode .markdown-body a {
  color: #242424;
  text-decoration-color: rgba(36,36,36,0.36);
}

.reading-mode .markdown-body blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 22px;
  border-left: 3px solid #242424;
  border-radius: 0;
  background: transparent;
  color: #242424;
  font-size: 1.08em;
  font-style: italic;
}

.reading-mode .markdown-body code {
  background: rgba(36,36,36,0.07);
  color: #242424;
}

.reading-mode .markdown-body pre {
  margin-left: calc((700px - min(700px, 100%)) / 2);
  border-color: rgba(36,36,36,0.12);
  background: #efebe3;
  color: #242424;
}

.reading-mode .md-diagram {
  max-width: 1032px;
  margin: 1.8em 50% 1.8em;
  transform: translateX(-50%);
  width: min(1032px, calc(100vw - 72px));
  border-color: rgba(36,36,36,0.12);
  background: #fffdf8;
  box-shadow: 0 1px 0 rgba(36,36,36,0.06);
}

.reading-mode .os-related {
  max-width: 1032px;
  margin: 76px auto 0;
  padding-top: 34px;
  border-top: 1px solid rgba(36,36,36,0.12);
}

.reading-mode .os-related .os-section-head span,
.reading-mode .os-related .os-section-head em {
  color: #777068;
  text-shadow: none;
}

.reading-mode .os-related .os-section-head h2 {
  color: #242424;
  font-family: var(--ff-body);
}

.reading-mode .os-related .vhs-card {
  background: #fffdf8;
  color: #242424;
  border-color: rgba(36,36,36,0.12);
  box-shadow: none;
}

.reading-mode .os-related .os-post-body h3,
.reading-mode .os-related .os-post-body p {
  color: #242424;
}

/* Synthwave publication reader: match the homepage while keeping the Medium column */
.reading-mode {
  background: var(--bg-0);
  color: var(--fg-0);
}

.reading-mode .grid-bg,
.reading-mode .scanline,
.reading-mode .noise {
  display: block;
}

.reading-mode .hud {
  position: fixed;
  top: 28px;
  left: 50%;
  right: auto;
  width: min(1440px, calc(100% - 36px));
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 8px;
  background: rgba(13, 12, 28, 0.9);
  color: var(--fg-2);
  backdrop-filter: blur(18px);
}

.reading-mode .hud span:first-child {
  color: #fff !important;
}

.reading-mode .os-viewport {
  width: min(1440px, calc(100% - 36px));
  padding: 106px 0 28px;
}

.reading-mode .os-frame {
  overflow: visible;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(11, 10, 24, 0.72);
  box-shadow: 0 28px 90px rgba(0,0,0,0.36);
  backdrop-filter: blur(18px);
}

.reading-mode .os-content {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015) 24%, rgba(8,7,19,0.2)),
    rgba(12, 11, 25, 0.7);
}

.reading-mode .os-reader {
  width: min(1180px, calc(100% - 36px));
  padding-top: 54px;
  padding-bottom: 150px;
}

.reading-mode .os-reader > .btn-ghost {
  color: var(--cyan);
}

.reading-mode .os-reader header h1 {
  color: #fffaf5;
  text-shadow: 0 20px 60px rgba(0,0,0,0.42), 0 0 30px rgba(255,93,158,0.14);
}

.reading-mode .os-reader header p {
  color: rgba(255,247,240,0.82);
}

.reading-mode .neon-pill,
.reading-mode .os-tags span {
  border-color: rgba(255,255,255,0.13) !important;
  background: rgba(255,255,255,0.06);
  color: var(--fg-1) !important;
}

.reading-mode .mono.dim {
  color: var(--fg-3);
}

.reading-mode .guide-outline {
  border-color: rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.045);
}

.reading-mode .guide-outline > span {
  color: var(--cyan);
}

.reading-mode .guide-outline button {
  border-color: rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.055);
  color: var(--fg-1);
}

.reading-mode .guide-outline button:hover {
  border-color: rgba(109,229,255,0.42);
  background: rgba(109,229,255,0.08);
  color: #fff;
}

.article-visual-panel {
  position: relative;
  display: grid;
  align-items: end;
  max-width: 1032px;
  min-height: 430px;
  margin: 36px auto 46px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  background: #101426;
  box-shadow: 0 22px 70px rgba(0,0,0,0.32);
}

.article-visual-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-visual-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7,8,18,0.9), rgba(7,8,18,0.48) 46%, rgba(7,8,18,0.08)),
    linear-gradient(0deg, rgba(7,8,18,0.78), transparent 46%);
}

.article-visual-copy {
  position: relative;
  z-index: 2;
  width: min(620px, calc(100% - 180px));
  padding: clamp(24px, 5vw, 46px);
}

.article-visual-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
}

.article-visual-copy > span {
  color: var(--cyan);
  font-family: var(--ff-ui);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.article-visual-copy h2 {
  margin-top: 12px;
  color: #fffaf5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 4.2vw, 58px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
}

.article-visual-copy div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.article-visual-copy em {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,247,240,0.82);
  font-family: var(--ff-ui);
  font-size: 12px;
  font-style: normal;
}

.article-avatar-chip {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  width: clamp(82px, 12vw, 138px);
  aspect-ratio: 1;
  border: 1px solid rgba(109,229,255,0.4);
  border-radius: 999px;
  background: rgba(7,8,18,0.72);
  object-fit: cover;
  box-shadow: 0 0 0 8px rgba(7,8,18,0.34), 0 18px 46px rgba(0,0,0,0.42);
}

.article-visual-divider {
  position: absolute;
  left: clamp(18px, 4vw, 46px);
  right: clamp(18px, 4vw, 46px);
  bottom: 10px;
  z-index: 2;
  width: min(760px, calc(100% - 210px));
  height: 46px;
  object-fit: contain;
  object-position: left center;
  opacity: 0.72;
  pointer-events: none;
}

.reading-mode .os-reader > .os-thumb {
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: 0 22px 70px rgba(0,0,0,0.32);
}

.reading-mode .os-reader > .os-thumb img {
  opacity: 0.62;
  mix-blend-mode: soft-light;
}

.reading-mode .markdown-body {
  color: rgba(255,247,240,0.9);
}

.reading-mode .markdown-body h1,
.reading-mode .markdown-body h2,
.reading-mode .markdown-body h3,
.reading-mode .markdown-body h4 {
  color: #fffaf5;
}

.reading-mode .markdown-body a {
  color: var(--cyan);
  text-decoration-color: rgba(109,229,255,0.42);
}

.reading-mode .markdown-body blockquote {
  border-left-color: var(--hot);
  background: rgba(255,93,158,0.08);
  color: #fffaf5;
}

.reading-mode .markdown-body code {
  background: rgba(109,229,255,0.1);
  color: #e8fbff;
}

.reading-mode .markdown-body pre {
  border-color: rgba(255,255,255,0.13);
  background: rgba(0,0,0,0.34);
  color: var(--fg-1);
}

.reading-mode .md-diagram {
  border-color: rgba(109,229,255,0.22);
  background:
    radial-gradient(circle at 20% 0%, rgba(109,229,255,0.09), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.reading-mode .os-related {
  border-top-color: rgba(255,255,255,0.13);
}

.reading-mode .os-related .os-section-head span,
.reading-mode .os-related .os-section-head em {
  color: var(--fg-3);
}

.reading-mode .os-related .os-section-head h2,
.reading-mode .os-related .os-post-body h3,
.reading-mode .os-related .os-post-body p {
  color: #fffaf5;
}

.reading-mode .os-related .vhs-card {
  background: rgba(255,255,255,0.045);
  color: var(--fg-0);
  border-color: rgba(255,255,255,0.13);
}

.article-float-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 45;
  display: grid;
  grid-template-columns: auto minmax(240px, 440px) auto;
  gap: 10px;
  align-items: center;
  width: min(720px, calc(100% - 32px));
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(13, 12, 28, 0.92);
  box-shadow: 0 18px 58px rgba(0,0,0,0.34);
  opacity: 0.34;
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
  transition: opacity 160ms ease, box-shadow 160ms ease;
}

.article-float-nav:hover,
.article-float-nav:focus-within {
  opacity: 1;
  box-shadow: 0 18px 58px rgba(0,0,0,0.48);
}

.article-float-nav button,
.article-float-nav label {
  min-height: 40px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
}

.article-float-nav button {
  padding: 0 14px;
  color: var(--fg-1);
  font-size: 13px;
}

.article-float-nav label {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 12px;
}

.article-float-nav span {
  flex: 0 0 auto;
  margin-right: 10px;
  color: var(--cyan);
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-float-nav select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
}

.article-float-nav option {
  background: #111024;
  color: #fff;
}

.chart-demo {
  max-width: 1032px;
  margin: 1.45em 50%;
  width: min(1032px, calc(100vw - 72px));
  overflow: hidden;
  border: 1px solid rgba(109,229,255,0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0%, rgba(109,229,255,0.1), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateX(-50%);
}

.chart-demo figcaption {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: var(--cyan);
  font-family: var(--ff-ui);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chart-demo-canvas {
  position: relative;
  min-height: 260px;
  padding: 22px;
  background:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}

.chart-demo-canvas > * {
  display: none;
}

.demo-kpi {
  place-items: center;
  min-height: 210px;
  text-align: center;
}

.demo-kpi strong {
  color: #fffaf5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 500;
}

.demo-kpi span {
  color: var(--fg-2);
  font-size: 16px;
}

.demo-bars {
  align-items: end;
  gap: 14px;
  height: 210px;
  padding: 18px 8px 0;
}

.demo-bars i {
  flex: 1;
  height: var(--h);
  min-height: 24px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, var(--cyan), var(--hot));
  box-shadow: 0 0 26px rgba(109,229,255,0.14);
}

.demo-line {
  height: 210px;
}

.demo-line svg {
  width: 100%;
  height: 100%;
}

.demo-line path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 5;
  filter: drop-shadow(0 0 10px rgba(109,229,255,0.32));
}

.demo-line path.fill {
  fill: rgba(109,229,255,0.12);
  stroke: none;
  filter: none;
}

.demo-donut {
  place-items: center;
  min-height: 210px;
}

.demo-donut i {
  width: 172px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: conic-gradient(var(--hot) 0 42%, var(--cyan) 42% 68%, rgba(255,255,255,0.14) 68%);
  mask: radial-gradient(circle, transparent 0 42%, #000 43%);
}

.demo-donut span {
  position: absolute;
  color: #fffaf5;
  font-family: var(--ff-ui);
  font-size: 22px;
}

.demo-funnel {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 210px;
}

.demo-funnel i {
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--cyan), var(--hot));
}

.demo-funnel i:nth-child(1) { width: 82%; }
.demo-funnel i:nth-child(2) { width: 64%; }
.demo-funnel i:nth-child(3) { width: 46%; }
.demo-funnel i:nth-child(4) { width: 30%; }

.demo-heat {
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  min-height: 210px;
}

.demo-heat i {
  min-height: 30px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--hot) calc(var(--v) * 1%), rgba(109,229,255,0.18));
}

.demo-scatter {
  position: relative;
  min-height: 210px;
}

.demo-scatter i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(109,229,255,0.46);
}

.demo-flow {
  align-items: center;
  justify-content: space-around;
  min-height: 210px;
}

.demo-flow i {
  width: 26%;
  height: 84px;
  border-radius: 50% 20% 50% 20%;
  background: linear-gradient(90deg, rgba(109,229,255,0.74), rgba(255,93,158,0.66));
  filter: blur(0.2px);
}

.chart-demo-kpi .demo-kpi,
.chart-demo-bullet .demo-kpi,
.chart-demo-line .demo-line,
.chart-demo-area .demo-line,
.chart-demo-combo .demo-line,
.chart-demo-pareto .demo-line,
.chart-demo-bar .demo-bars,
.chart-demo-horizontal .demo-bars,
.chart-demo-multiples .demo-bars,
.chart-demo-radar .demo-line,
.chart-demo-stacked .demo-bars,
.chart-demo-waterfall .demo-bars,
.chart-demo-histogram .demo-bars,
.chart-demo-donut .demo-donut,
.chart-demo-treemap .demo-heat,
.chart-demo-heatmap .demo-heat,
.chart-demo-scatter .demo-scatter,
.chart-demo-boxplot .demo-scatter,
.chart-demo-funnel .demo-funnel,
.chart-demo-sankey .demo-flow {
  display: flex;
}

.chart-demo-heatmap .demo-heat,
.chart-demo-treemap .demo-heat {
  display: grid;
}

.chart-demo-scatter .demo-scatter,
.chart-demo-boxplot .demo-scatter {
  display: block;
}

.chart-demo-area .demo-line path.fill,
.chart-demo-combo .demo-line path.fill {
  fill: rgba(255,93,158,0.16);
}

.chart-demo figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chart-demo figcaption span,
.chart-demo figcaption em {
  min-width: 0;
}

.chart-demo figcaption em {
  color: rgba(255,247,240,0.58);
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: none;
}

.chart-code-output {
  min-height: 360px;
  padding: 0;
}

.chart-code-output > * {
  display: block;
}

.chart-output-img {
  display: block;
  width: 100%;
  min-height: 360px;
  object-fit: contain;
  background: #fafbfc;
}

.chart-svg {
  display: block;
  width: 100%;
  min-height: 360px;
}

.chart-svg .axis {
  stroke: rgba(255,255,255,0.2);
  stroke-width: 1.5;
}

.chart-svg .target-line {
  stroke: rgba(255,247,240,0.58);
  stroke-width: 2;
}

.chart-svg .dashed {
  stroke-dasharray: 7 7;
}

.chart-svg text {
  fill: rgba(255,247,240,0.74);
  font-family: var(--ff-ui);
  font-size: 13px;
}

.chart-svg .chart-heading {
  fill: #fffaf5;
  font-size: 18px;
  font-weight: 700;
}

.chart-svg .axis-label {
  fill: rgba(255,247,240,0.62);
  font-size: 12px;
}

.chart-svg .center,
.chart-svg .funnel-label,
.chart-svg .node-label {
  text-anchor: middle;
}

.chart-svg .left {
  text-anchor: end;
}

.chart-svg .value-label {
  fill: rgba(255,247,240,0.82);
  font-size: 12px;
  font-weight: 700;
}

.chart-svg .hot {
  fill: var(--hot);
  stroke: var(--hot);
}

.chart-svg .bar,
.chart-svg .node,
.chart-svg .box {
  fill: rgba(109,229,255,0.38);
  stroke: rgba(109,229,255,0.55);
}

.chart-svg .bar.accent,
.chart-svg .node.accent {
  fill: rgba(255,93,158,0.66);
  stroke: rgba(255,93,158,0.86);
}

.chart-svg .bar.muted,
.chart-svg .band.muted {
  fill: rgba(255,255,255,0.14);
  stroke: rgba(255,255,255,0.16);
}

.chart-svg .bar.cyan,
.chart-svg .area.cyan {
  fill: rgba(109,229,255,0.42);
}

.chart-svg .bar.gold,
.chart-svg .area.gold {
  fill: rgba(255,214,102,0.5);
}

.chart-svg .bar.danger {
  fill: rgba(255,93,158,0.45);
  stroke: rgba(255,93,158,0.7);
}

.chart-svg .band {
  fill: rgba(109,229,255,0.16);
}

.chart-svg .band.strong {
  fill: rgba(109,229,255,0.28);
}

.chart-svg .line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(109,229,255,0.24));
}

.chart-svg .line.hot {
  stroke: var(--hot);
}

.chart-svg .line.mini {
  stroke-width: 3;
}

.chart-svg .area {
  opacity: 0.82;
}

.chart-svg .area.pink {
  fill: rgba(255,93,158,0.36);
}

.chart-svg .dot {
  fill: var(--cyan);
  stroke: rgba(255,255,255,0.84);
  stroke-width: 2;
}

.chart-svg .dot.hot {
  fill: var(--hot);
}

.chart-svg .panel {
  fill: rgba(255,255,255,0.045);
  stroke: rgba(255,255,255,0.12);
}

.chart-svg .radar-grid {
  fill: rgba(255,255,255,0.035);
  stroke: rgba(255,255,255,0.18);
  stroke-width: 2;
}

.chart-svg .radar-shape {
  stroke-width: 3;
  opacity: 0.74;
}

.chart-svg .radar-shape.cyan {
  fill: rgba(109,229,255,0.28);
  stroke: var(--cyan);
}

.chart-svg .radar-shape.hot {
  fill: rgba(255,93,158,0.24);
  stroke: var(--hot);
}

.chart-svg .donut-bg {
  fill: none;
  stroke: rgba(255,255,255,0.12);
  stroke-width: 44;
}

.chart-svg .donut-slice {
  fill: none;
  stroke-width: 44;
  transform: rotate(-90deg);
  transform-origin: 270px 188px;
}

.chart-svg .donut-slice.one {
  stroke: var(--hot);
  stroke-dasharray: 275 380;
}

.chart-svg .donut-slice.two {
  stroke: var(--cyan);
  stroke-dasharray: 176 480;
  stroke-dashoffset: -275;
}

.chart-svg .donut-hole {
  fill: rgba(13,12,28,0.92);
}

.chart-svg .kpi-label {
  fill: #fffaf5;
  font-size: 28px;
  font-weight: 700;
}

.chart-svg .tile,
.chart-svg .funnel-step {
  stroke: rgba(255,255,255,0.24);
}

.chart-svg .tile.hot,
.chart-svg .funnel-step.s0 {
  fill: rgba(255,93,158,0.62);
}

.chart-svg .tile.cyan,
.chart-svg .funnel-step.s1 {
  fill: rgba(109,229,255,0.46);
}

.chart-svg .tile.gold,
.chart-svg .funnel-step.s2 {
  fill: rgba(255,214,102,0.52);
}

.chart-svg .tile.muted,
.chart-svg .funnel-step.s3 {
  fill: rgba(255,255,255,0.16);
}

.chart-svg .tile-label {
  fill: #fffaf5;
  font-weight: 700;
}

.chart-svg .flow {
  fill: none;
  stroke-linecap: round;
  opacity: 0.72;
}

.chart-svg .flow.thick {
  stroke-width: 48;
}

.chart-svg .flow.medium {
  stroke-width: 34;
}

.chart-svg .flow.thin {
  stroke-width: 22;
}

.chart-svg .flow.cyan {
  stroke: var(--cyan);
}

.chart-svg .flow.hot {
  stroke: var(--hot);
}

.chart-svg .flow.gold {
  stroke: var(--gold);
}

.chart-svg .median {
  stroke: #fffaf5;
  stroke-width: 3;
}

.chart-svg .heat {
  stroke: rgba(255,255,255,0.16);
}

.chart-svg .heat.v0 { fill: rgba(255,255,255,0.08); }
.chart-svg .heat.v1 { fill: rgba(109,229,255,0.22); }
.chart-svg .heat.v2 { fill: rgba(109,229,255,0.38); }
.chart-svg .heat.v3 { fill: rgba(255,214,102,0.5); }
.chart-svg .heat.v4 { fill: rgba(255,93,158,0.58); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 24px;
  min-height: 360px;
  align-content: center;
}

.kpi-grid div {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
}

.kpi-grid span,
.kpi-grid em {
  display: block;
  color: rgba(255,247,240,0.62);
  font-family: var(--ff-ui);
  font-size: 13px;
  font-style: normal;
}

.kpi-grid strong {
  display: block;
  margin: 12px 0 8px;
  color: #fffaf5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 500;
  line-height: 0.95;
}

.os-state {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.os-state > .win95 {
  width: min(720px, 100%);
  overflow: hidden;
}

.os-state-body,
.os-empty .os-state-body {
  padding: 22px;
  color: var(--fg-1);
}

.os-state-body h1,
.os-state-body h3 {
  margin-bottom: 10px;
}

@media (max-width: 1180px) {
  .home-topbar {
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 320px) minmax(200px, 280px);
  }

  .home-navlinks {
    display: none;
  }

  .publication-lead {
    grid-template-columns: 1fr;
  }

  .publication-lead .os-thumb {
    min-height: 360px;
  }

  .home-shell {
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .os-stage {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .left-rail {
    width: 230px;
  }

  .os-channel-grid,
  .os-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .home-mode .os-viewport {
    width: calc(100% - 20px);
    padding-top: 10px;
  }

  .medium-home {
    padding-top: 176px;
  }

  .home-masthead {
    min-height: 560px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    top: 10px;
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    padding: 14px 18px;
  }

  .home-jump,
  .home-search {
    width: 100%;
  }

  .topic-nav {
    top: 176px;
  }

  .home-title-block {
    padding-top: 48px;
  }

  .topic-nav {
    padding-left: 18px;
    padding-right: 18px;
  }

  .publication-hero,
  .home-shell,
  .os-about,
  .os-newsletter {
    width: calc(100% - 28px);
  }

  .story-row {
    grid-template-columns: 1fr;
  }

  .story-row .os-thumb {
    min-height: 220px;
    order: -1;
  }

  .home-sidebar {
    grid-template-columns: 1fr;
  }

  .hud {
    top: 10px;
    left: 10px;
    right: 10px;
    font-size: 11px;
  }

  .os-viewport {
    width: calc(100% - 20px);
    padding-top: 64px;
  }

  .os-stage {
    grid-template-columns: 1fr;
  }

  .left-rail {
    position: relative;
    top: 0;
    width: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-section,
  .nav-item,
  .continue-section,
  .os-course-card,
  .os-rail-status,
  .channel-section {
    display: none;
  }

  .os-rail-brand {
    padding: 14px;
  }

  .os-search {
    order: 2;
    padding: 12px 14px 8px;
  }

  .os-channel-strip {
    order: 3;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 14px 14px;
  }

  .channel-item {
    flex: 0 0 auto;
    grid-template-columns: 22px auto;
    min-width: 132px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.045);
  }

  .channel-item .mono {
    display: none;
  }

  .os-hero {
    min-height: 560px;
    margin: 14px;
  }

  .os-hero-title {
    padding-top: 42px;
  }

  .os-hero-title h1 {
    font-size: clamp(50px, 15vw, 92px);
  }

  .os-hero-title h2 {
    letter-spacing: 0.11em;
  }

  .os-section,
  .os-reader {
    padding-left: 14px;
    padding-right: 14px;
  }

  .os-channel-grid,
  .os-post-grid,
  .os-featured,
  .os-newsletter-body,
  .os-about-grid {
    grid-template-columns: 1fr;
  }

  .os-newsletter form {
    flex-direction: column;
  }

  .os-newsletter .btn-vhs {
    justify-self: stretch;
  }

  .guide-outline {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-float-nav {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .article-float-nav button,
  .article-float-nav label {
    width: 100%;
  }

  .chart-demo {
    width: calc(100vw - 28px);
  }

  .chart-demo figcaption,
  .md-diagram figcaption {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-visual-panel {
    min-height: 360px;
  }

  .article-visual-copy {
    width: 100%;
    padding-right: 128px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .medium-home {
    padding-top: 168px;
  }

  .home-topbar {
    min-height: auto;
  }

  .topic-nav {
    top: 168px;
  }

  .home-masthead {
    min-height: 520px;
  }

  .home-title-block h1 {
    font-size: clamp(42px, 15vw, 62px);
  }

  .home-title-block p {
    font-size: 19px;
  }

  .publication-lead .os-thumb {
    min-height: 260px;
  }

  .publication-lead-copy h2 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .article-visual-panel {
    min-height: 420px;
  }

  .article-visual-shade {
    background:
      linear-gradient(0deg, rgba(7,8,18,0.88), rgba(7,8,18,0.18) 54%),
      linear-gradient(90deg, rgba(7,8,18,0.68), rgba(7,8,18,0.12));
  }

  .article-visual-copy {
    align-self: end;
    padding: 24px;
    padding-bottom: 124px;
  }

  .article-avatar-chip {
    right: 20px;
    bottom: 20px;
    width: 94px;
  }

  .article-visual-divider {
    width: calc(100% - 148px);
    height: 38px;
  }

  .home-section-title {
    grid-template-columns: 1fr;
  }

  .hud {
    justify-content: flex-start;
  }

  .hud > div:last-child {
    display: none;
  }

  .os-channel-strip {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .channel-item {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  .os-hero {
    min-height: 540px;
  }

  .os-hero-top {
    padding: 16px 16px 0;
  }

  .os-hero-title {
    padding: 32px 16px 0;
  }

  .os-hero-title h1 {
    font-size: clamp(42px, 14vw, 58px);
    line-height: 0.92;
  }

  .os-hero-title h2,
  .os-hero-top > span {
    font-size: 12px;
  }

  .os-hero-bottom {
    bottom: 20px;
    padding: 0 16px;
  }

  .os-hero-bottom p {
    font-size: 15px;
  }

  .btn-vhs,
  .btn-ghost {
    width: 100%;
  }

  .md-diagram {
    padding: 12px;
  }

  .md-diagram .mermaid {
    min-width: 520px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .os-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .scanline,
  .noise {
    opacity: 0.02;
  }

  .btn-vhs:hover,
  .btn-ghost:hover,
  .vhs-card:hover,
  .os-featured:hover {
    transform: none;
  }
}
