:root {
  --yt-paper: #f3f0e8;
  --yt-paper-strong: #fffdf7;
  --yt-ink: #101114;
  --yt-muted: #666b72;
  --yt-line: rgba(16, 17, 20, 0.16);
  --yt-blue: #2457ff;
  --yt-cyan: #22d3ee;
  --yt-lime: #b8ff5c;
  --yt-coral: #ff6f61;
  --yt-pink: #ff4da6;
  --yt-violet: #7c5cff;
  --yt-good: #087f5b;
  --yt-warn: #a45b00;
  --yt-bad: #cb2855;
  --yt-radius: 28px;
  --yt-shadow: 0 24px 70px rgba(20, 23, 36, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body.yt-body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--yt-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 10% 0%, rgba(36, 87, 255, 0.13), transparent 26rem),
    radial-gradient(circle at 92% 8%, rgba(255, 77, 166, 0.12), transparent 24rem),
    var(--yt-paper);
}

body.yt-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(16, 17, 20, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 17, 20, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--yt-cyan);
  outline-offset: 3px;
}

.yt-shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px max(46px, env(safe-area-inset-bottom));
}

.yt-nav {
  position: sticky;
  top: 10px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 8px 9px 8px 16px;
  border: 1px solid rgba(16, 17, 20, 0.13);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.8);
  box-shadow: 0 16px 52px rgba(20, 23, 36, 0.1);
  backdrop-filter: blur(20px) saturate(1.3);
}

.yt-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--yt-ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.yt-wordmark::before {
  content: "Y";
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  background: var(--yt-ink);
  font-size: 13px;
  letter-spacing: 0;
}

.yt-wordmark span {
  color: var(--yt-muted);
  font-weight: 750;
}

.yt-navlinks {
  display: flex;
  align-items: center;
  gap: 3px;
}

.yt-navlinks a {
  padding: 9px 10px;
  border-radius: 999px;
  color: #3f444b;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.yt-navlinks a:hover,
.yt-navlinks a.active {
  color: white;
  background: var(--yt-ink);
}

.yt-menu {
  display: none;
  position: relative;
}

.yt-menu > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  color: white;
  background: var(--yt-ink);
  font-size: 12px;
  font-weight: 900;
}

.yt-menu > summary::-webkit-details-marker {
  display: none;
}

.yt-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--yt-line);
  border-radius: 22px;
  background: rgba(255, 253, 247, 0.97);
  box-shadow: var(--yt-shadow);
  backdrop-filter: blur(20px);
}

.yt-menu-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 13px;
  border-radius: 14px;
  color: var(--yt-ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
}

.yt-menu-panel a::after {
  content: "↗";
  color: var(--yt-muted);
}

.yt-menu-panel a:hover,
.yt-menu-panel a.active {
  background: rgba(36, 87, 255, 0.09);
}

.yt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--yt-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.yt-eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.yt-eyebrow.live {
  color: var(--yt-good);
}

.yt-eyebrow.live::before {
  box-shadow: 0 0 0 6px rgba(8, 127, 91, 0.1), 0 0 18px rgba(8, 127, 91, 0.55);
}

.yt-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.yt-status.live { color: var(--yt-good); background: rgba(8, 127, 91, 0.08); }
.yt-status.archive { color: var(--yt-blue); background: rgba(36, 87, 255, 0.07); }
.yt-status.paused { color: var(--yt-bad); background: rgba(203, 40, 85, 0.07); }
.yt-status.experiment { color: #7547b5; background: rgba(124, 92, 255, 0.08); }

/* Landing portal */
.home-hero {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  min-height: 530px;
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid var(--yt-line);
  border-radius: 42px;
  background:
    radial-gradient(circle at 82% 22%, rgba(184, 255, 92, 0.45), transparent 20rem),
    linear-gradient(135deg, rgba(255, 253, 247, 0.95), rgba(231, 237, 255, 0.84));
  box-shadow: var(--yt-shadow);
}

.home-hero::after {
  content: "SIGNAL / SYSTEM / MEMORY";
  position: absolute;
  right: -0.8em;
  bottom: 0.2em;
  max-width: 8ch;
  color: rgba(16, 17, 20, 0.055);
  font-size: clamp(5.6rem, 15vw, 12rem);
  font-weight: 1000;
  line-height: 0.72;
  letter-spacing: -0.12em;
  text-align: right;
  pointer-events: none;
}

.home-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 10ch;
  margin: 28px 0 20px;
  font-size: clamp(3.8rem, 10vw, 8.8rem);
  font-weight: 1000;
  line-height: 0.78;
  letter-spacing: -0.095em;
}

.home-lede {
  position: relative;
  z-index: 1;
  max-width: 58ch;
  margin: 0;
  color: #535860;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.55;
}

.home-counts {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.home-counts span {
  padding: 8px 11px;
  border: 1px solid var(--yt-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: #4b5057;
  font-size: 12px;
  font-weight: 800;
}

.system-section {
  margin-top: 42px;
}

.system-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.system-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(1.8rem, 4vw, 3.3rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.system-heading p {
  max-width: 46ch;
  margin: 0;
  color: var(--yt-muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.system-card {
  position: relative;
  overflow: hidden;
  grid-column: span 6;
  min-height: 225px;
  padding: 22px;
  border: 1px solid var(--yt-line);
  border-radius: var(--yt-radius);
  color: var(--yt-ink);
  text-decoration: none;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: 0 14px 42px rgba(20, 23, 36, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.system-card:hover {
  transform: translateY(-4px);
  border-color: rgba(36, 87, 255, 0.32);
  box-shadow: 0 25px 64px rgba(20, 23, 36, 0.14);
}

.system-card.featured {
  grid-column: span 12;
  min-height: 330px;
  padding: clamp(24px, 4vw, 42px);
  color: white;
  background:
    radial-gradient(circle at 85% 22%, rgba(34, 211, 238, 0.32), transparent 20rem),
    linear-gradient(135deg, #0b1020, #132d45 58%, #163b3c);
  border-color: rgba(255, 255, 255, 0.18);
}

.system-card.featured::after {
  content: "LIVE";
  position: absolute;
  right: -0.08em;
  bottom: -0.16em;
  color: rgba(255, 255, 255, 0.055);
  font-size: clamp(7rem, 22vw, 16rem);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: -0.12em;
}

.system-card.dark {
  color: white;
  background: linear-gradient(145deg, #101114, #27232f);
  border-color: rgba(255, 255, 255, 0.14);
}

.system-card.accent-blue { background: linear-gradient(145deg, #f9fbff, #dfe8ff); }
.system-card.accent-warm { background: linear-gradient(145deg, #fffdf6, #ffe5cf); }
.system-card.accent-violet { background: linear-gradient(145deg, #fdfaff, #e9ddff); }

.system-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.system-card h3 {
  position: relative;
  z-index: 1;
  max-width: 10ch;
  margin: 34px 0 10px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.system-card.featured h3 {
  margin-top: 52px;
  font-size: clamp(3.4rem, 8vw, 6.5rem);
}

.system-card p {
  position: relative;
  z-index: 1;
  max-width: 52ch;
  margin: 0;
  color: var(--yt-muted);
  font-size: 14px;
  line-height: 1.5;
}

.system-card.featured p,
.system-card.dark p {
  color: rgba(255, 255, 255, 0.68);
}

.system-arrow {
  position: absolute;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 18px;
}

.mini-pause {
  position: absolute;
  right: -18px;
  bottom: 38px;
  z-index: 2;
  transform: rotate(-8deg);
  padding: 8px 28px;
  border: 3px solid var(--yt-bad);
  color: var(--yt-bad);
  background: rgba(255, 253, 247, 0.88);
  font-size: 24px;
  font-weight: 1000;
  letter-spacing: 0.16em;
}

.yt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 46px;
  padding: 24px 2px 0;
  border-top: 1px solid var(--yt-line);
  color: var(--yt-muted);
  font-size: 12px;
}

/* Paused system pages */
.paused-hero {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  margin-top: 18px;
  padding: clamp(26px, 5vw, 58px);
  border-radius: 40px;
  color: white;
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 77, 166, 0.22), transparent 24rem),
    linear-gradient(145deg, #090a0f, #191624 54%, #102536);
  box-shadow: 0 32px 90px rgba(14, 15, 26, 0.28);
}

.paused-watermark {
  position: absolute;
  right: -0.09em;
  bottom: -0.1em;
  max-width: 8ch;
  color: rgba(255, 255, 255, 0.055);
  font-size: clamp(5rem, 19vw, 14rem);
  font-weight: 1000;
  line-height: 0.72;
  letter-spacing: -0.11em;
  text-align: right;
  text-transform: uppercase;
  pointer-events: none;
}

.paused-stamp {
  position: absolute;
  top: clamp(110px, 21vw, 210px);
  right: clamp(-30px, 2vw, 40px);
  z-index: 2;
  transform: rotate(-8deg);
  padding: 12px clamp(28px, 5vw, 62px);
  border: clamp(5px, 0.7vw, 9px) solid var(--yt-coral);
  color: var(--yt-coral);
  background: rgba(9, 10, 15, 0.78);
  box-shadow: 0 0 0 6px rgba(255, 111, 97, 0.08);
  font-size: clamp(2.4rem, 8vw, 7rem);
  font-weight: 1000;
  line-height: 0.9;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.paused-content {
  position: relative;
  z-index: 3;
  max-width: 710px;
}

.paused-content h1 {
  max-width: 9ch;
  margin: 30px 0 18px;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.78;
  letter-spacing: -0.1em;
}

.paused-content p {
  max-width: 54ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.55;
}

.paused-facts {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 720px;
  margin-top: 44px;
}

.paused-fact {
  min-height: 108px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
}

.paused-fact span,
.paused-fact strong {
  display: block;
}

.paused-fact span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.paused-fact strong {
  margin-top: 12px;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  letter-spacing: -0.04em;
}

.paused-next {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
  margin-top: 12px;
}

.paused-panel {
  padding: 24px;
  border: 1px solid var(--yt-line);
  border-radius: 28px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: 0 14px 42px rgba(20, 23, 36, 0.07);
}

.paused-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  letter-spacing: -0.055em;
}

.paused-panel p,
.paused-panel li {
  color: var(--yt-muted);
  font-size: 14px;
  line-height: 1.55;
}

.paused-panel ul {
  margin: 14px 0 0;
  padding-left: 19px;
}

.paused-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 11px 15px;
  border-radius: 999px;
  color: white;
  background: var(--yt-ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 1050px) {
  .yt-navlinks {
    display: none;
  }

  .yt-menu {
    display: block;
  }
}

@media (max-width: 720px) {
  .yt-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .yt-nav {
    top: 6px;
    min-height: 52px;
    padding-left: 11px;
  }

  .yt-wordmark {
    font-size: 10px;
    letter-spacing: 0.11em;
  }

  .yt-wordmark span {
    display: none;
  }

  .home-hero {
    min-height: 480px;
    padding: 25px 18px;
    border-radius: 28px;
  }

  .home-hero h1 {
    margin-top: 24px;
    font-size: clamp(3rem, 15vw, 4rem);
    line-height: 0.82;
  }

  .home-hero::after {
    opacity: 0.7;
  }

  .system-section {
    margin-top: 30px;
  }

  .system-heading {
    display: block;
  }

  .system-heading p {
    margin-top: 8px;
    text-align: left;
  }

  .system-card,
  .system-card.featured {
    grid-column: span 12;
    min-height: 205px;
    padding: 18px;
    border-radius: 22px;
  }

  .system-card.featured {
    min-height: 300px;
  }

  .system-card h3,
  .system-card.featured h3 {
    margin-top: 32px;
    font-size: clamp(2.5rem, 13vw, 4.2rem);
  }

  .mini-pause {
    right: -26px;
    bottom: 30px;
    font-size: 18px;
  }

  .yt-footer {
    display: block;
  }

  .yt-footer span:last-child {
    display: block;
    margin-top: 6px;
  }

  .paused-hero {
    min-height: 760px;
    padding: 24px 18px;
    border-radius: 28px;
  }

  .paused-stamp {
    top: 305px;
    right: -24px;
    bottom: auto;
    font-size: clamp(3.1rem, 16vw, 4rem);
  }

  .paused-content h1 {
    font-size: clamp(3rem, 13.5vw, 3.5rem);
  }

  .paused-facts {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 152px;
  }

  .paused-fact {
    min-height: 82px;
  }

  .paused-next {
    grid-template-columns: 1fr;
  }

  .paused-panel {
    padding: 18px;
    border-radius: 22px;
  }
}

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