:root {
  --bg: #08090b;
  --bg-soft: #0d0f12;
  --panel: #111419;
  --panel-2: #15181d;
  --line: rgba(255,255,255,.09);
  --text: #f2f3f5;
  --muted: #9a9fa8;
  --accent: #b7ff3c;
  --accent-soft: rgba(183,255,60,.10);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
.container { width: min(calc(100% - 48px), var(--max)); margin: auto; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8,9,11,.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav { height: 72px; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .16em; }
.brand-mark {
  width: 29px; height: 29px; display: grid; place-items: center;
  border: 1px solid rgba(183,255,60,.55);
  color: var(--accent); font-size: 12px; letter-spacing: 0;
}
.desktop-nav { display: flex; gap: 27px; margin-left: auto; }
.desktop-nav a, .nav-github, .nav-readme { color: var(--muted); font-size: 13px; transition: color .2s; }
.desktop-nav a:hover, .nav-github:hover, .nav-readme:hover, .footer-links a:hover { color: var(--text); }
.nav-github { color: var(--text); border: 1px solid var(--line); padding: 8px 13px; }
.nav-readme { border: 1px solid transparent; padding: 8px 4px; }

.hero {
  position: relative; overflow: hidden;
  padding: 128px 0 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(183,255,60,.08), transparent 28%),
    radial-gradient(circle at 15% 10%, rgba(100,120,255,.06), transparent 30%),
    var(--bg);
}
.hero-grid {
  position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}
.hero-content { position: relative; z-index: 1; max-width: 900px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.dot { display: inline-block; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin: 22px 0 25px;
  font-size: clamp(58px, 9vw, 112px);
  line-height: .91;
  letter-spacing: -.065em;
  font-weight: 800;
}
h1 em, h2 span { color: var(--accent); font-style: normal; }
.hero-copy { max-width: 620px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; gap: 11px; margin-top: 34px; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 15px;
  min-height: 48px; padding: 0 20px; font-size: 13px; font-weight: 750;
  border: 1px solid var(--line); transition: transform .2s, background .2s, border-color .2s;
  cursor: pointer;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #090a0b; border-color: var(--accent); }
.button-secondary { background: rgba(255,255,255,.04); }
.button-ghost { background: transparent; color: var(--muted); }
.hero-meta { display: flex; gap: 22px; margin-top: 25px; color: #686d76; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; flex-wrap: wrap; }

.hero-shot-wrap { position: relative; z-index: 2; margin-top: 74px; }
.hero-shot {
  position: relative;
  border: 1px solid rgba(255,255,255,.13);
  background: #101216;
  box-shadow: 0 40px 100px rgba(0,0,0,.55);
}
.window-bar { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.window-bar span { width: 7px; height: 7px; border-radius: 50%; background: #3a3d43; }
.window-bar label { margin-left: 8px; color: #666b73; font: 10px monospace; letter-spacing: .12em; }
.hero-live-close {
  margin-left: auto; width: 22px; height: 22px; display: none; place-items: center;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  font-size: 14px; line-height: 1; cursor: pointer;
}
.hero-live-close:hover { border-color: var(--accent); color: var(--accent); }
.hero-live-close.visible { display: grid; }
.shot-screen {
  aspect-ratio: 16 / 8.5;
  display: grid; place-items: center; overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at center, #22272d, #090a0c 65%);
}
.shot-screen img { height: 100%; width: 100%; object-fit: cover; }
.shot-slideshow .slide {
  grid-area: 1 / 1;
  position: relative; z-index: 1;
  filter: brightness(.34) saturate(.7);
  opacity: 0;
  animation: shot-slide-fade 24s infinite;
}
.shot-slideshow .slide-cover { height: 100%; width: 100%; object-fit: cover; object-position: center; }
.shot-slideshow .slide-debug {
  height: 92%; width: 92%; object-fit: contain; object-position: center;
  mask-image: radial-gradient(ellipse 72% 72% at center, black 45%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at center, black 45%, transparent 100%);
}
.shot-slideshow .slide-contain {
  height: 72%; width: 72%; object-fit: contain; object-position: center;
  mask-image: radial-gradient(ellipse 60% 60% at center, black 15%, transparent 92%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at center, black 15%, transparent 92%);
}
.shot-slideshow .shot-fallback { grid-area: 1 / 1; position: relative; z-index: 2; }
.hero-launch-btn {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 20;
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 20px;
  background: rgba(8,9,11,.85); border: 1px solid var(--accent); color: var(--accent);
  font: 700 12px monospace; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  backdrop-filter: blur(6px); transition: background .2s, transform .2s;
}
.hero-launch-btn:hover { background: rgba(183,255,60,.16); transform: translateX(-50%) translateY(-2px); }
.hero-launch-btn.is-hidden { display: none; }
.hero-launch-icon { font-size: 10px; }
.hero-live { display: none; background: #000; }
.hero-live.active { display: grid; }
.shot-slideshow.is-hidden { display: none; }
.hero-live iframe { width: 100%; height: 100%; border: 0; display: block; }
@keyframes shot-slide-fade {
  0%   { opacity: 0; }
  2%   { opacity: 1; }
  17%  { opacity: 1; }
  20%  { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .shot-slideshow .slide { animation: none; opacity: 0; }
}
.shot-fallback { text-align: center; font-family: monospace; }
.fallback-label { display: block; color: var(--accent); font-size: 12px; letter-spacing: .3em; }
.fallback-title { display: block; margin-top: 5px; font-size: clamp(30px, 6vw, 80px); letter-spacing: -.06em; font-weight: 900; }
.fallback-subtitle { display: block; margin-top: 12px; color: #666b73; font-size: 10px; letter-spacing: .18em; }

.section { padding: 135px 0; border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1.15fr .85fr; gap: 80px; align-items: end; margin-bottom: 55px; }
.section-heading.compact { margin-bottom: 45px; }
h2 { font-size: clamp(45px, 6vw, 76px); line-height: .96; letter-spacing: -.055em; margin: 17px 0 0; }
.section-heading > p, .lead { color: var(--muted); font-size: 16px; max-width: 470px; margin-bottom: 4px; }

.system-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.system-card {
  display: block; min-height: 220px; padding: 25px; background: var(--bg-soft); position: relative;
  transition: background .2s, transform .2s; cursor: pointer;
}
.system-card:hover { background: var(--panel-2); transform: translateY(-3px); z-index: 2; }
.system-card.featured { background: linear-gradient(145deg, var(--accent-soft), var(--bg-soft) 55%); }
.system-number { color: #555a62; font: 10px monospace; }
.system-icon { margin-top: 38px; color: var(--accent); font: 800 18px monospace; letter-spacing: -.05em; }
.system-card h3 { margin: 12px 0 5px; font-size: 17px; line-height: 1.15; }
.system-card p { color: #737881; font: 11px monospace; margin: 0; }

.peripheral-stage { display: flex; align-items: center; gap: 14px; overflow: hidden; }
.peripheral-grid { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.peripheral-card {
  display: block; min-height: 170px; padding: 22px; background: var(--bg-soft);
  transition: background .2s, transform .2s; cursor: pointer;
}
.peripheral-card:hover { background: var(--panel-2); transform: translateY(-3px); z-index: 2; }
.peripheral-icon { color: var(--accent); font: 800 13px monospace; letter-spacing: .08em; }
.peripheral-card h3 { margin: 30px 0 6px; font-size: 15px; line-height: 1.2; }
.peripheral-card p { color: #737881; font-size: 12px; margin: 0; line-height: 1.5; }
.wip-tag { display: inline-block; margin-top: 6px; color: var(--accent); font: 9px monospace; letter-spacing: .06em; text-transform: uppercase; }
.peripheral-nav { flex: none; border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.peripheral-nav:hover { background: rgba(183,255,60,.28); }

.accuracy { background: #0a0c0f; }
.accuracy-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; align-items: center; }
.text-link { display: inline-flex; gap: 12px; color: var(--accent); font-size: 13px; font-weight: 700; margin-top: 22px; }
.test-panel { border: 1px solid var(--line); background: var(--panel); }
.test-row { min-height: 92px; padding: 20px 23px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.test-row:hover, .test-row:focus-visible { background: rgba(255,255,255,.03); outline: none; }
.test-row strong { display: block; font-size: 14px; }
.test-row small { display: block; color: #686e77; margin-top: 3px; font: 10px monospace; }
.status { color: #858b94; font: 9px monospace; letter-spacing: .1em; white-space: nowrap; }
.status-dot { display: inline-block; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; margin-right: 6px; }
.test-footer { padding: 19px 23px; display: flex; justify-content: space-between; gap: 25px; color: #626870; font: 9px monospace; }
.test-footer span:first-child { color: var(--accent); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 55px; align-items: stretch; }
.feature { background: var(--bg); min-height: 235px; padding: 30px; display: flex; flex-direction: column; height: 100%; }
.feature:hover { background: var(--bg-soft); }
.feature-index { color: var(--accent); font: 10px monospace; }
.feature h3 { margin: 55px 0 10px; font-size: 18px; }
.feature p { color: var(--muted); font-size: 13px; max-width: 290px; flex-grow: 1; }
.feature-shot {
  display: block; margin-top: auto; padding: 4px; line-height: 0;
  background: #14171b; border: 1px solid #34373d; border-radius: 6px;
  width: 178px; height: 121px; position: relative;
}
.feature-shot img { display: block; width: 170px; height: 113px; object-fit: cover; border-radius: 3px; }
.feature-shot.feature-slideshow img {
  position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px);
  opacity: 0; animation: fs-fade 20s ease-in-out infinite;
}
@keyframes fs-fade { 0% { opacity: 0; } 3% { opacity: 1; } 27% { opacity: 1; } 30% { opacity: 0; } 100% { opacity: 0; } }
.feature-shot.feature-slideshow-4 img { animation-duration: 16s; }
@media (prefers-reduced-motion: reduce) {
  .feature-shot.feature-slideshow img { animation: none; opacity: 0; }
  .feature-shot.feature-slideshow img:first-child { opacity: 1; }
}

.gallery { background: #0a0c0f; }
.carousel { position: relative; }
.carousel-stage {
  min-height: 340px;
  display: flex; align-items: center; justify-content: center; gap: 22px;
  padding: 10px 0;
}
.carousel-frame {
  --img-scale: 1;
  display: inline-block; font: inherit;
  padding: 6px;
  background: #14171b;
  border: 1px solid #34373d;
  border-radius: 7px;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 60px rgba(0,0,0,.5);
  cursor: zoom-in;
  max-width: min(88%, 900px);
  line-height: 0;
}
.carousel-frame.is-scaled-down {
  --img-scale: 0.5; /* Change this to any scale (0.4, 0.7, etc.) */
}
.carousel-frame img {
  display: block;
  /* Use transform or explicit width calculation so it cannot be ignored */
  width: calc(100% * var(--img-scale));
  max-width: 100%;
  max-height: calc(62vh * var(--img-scale));
  height: auto;
  margin: 0 auto;
  border-radius: 3px;
  transition: opacity .25s ease;
}
.carousel-caption { margin: 18px 4px 0; color: var(--muted); font-size: 13px; text-align: center; }
.carousel-nav {
  flex: none;
  width: 42px; height: 42px; display: grid; place-items: center;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--text);
  font-size: 16px; cursor: pointer;
}
.carousel-nav:hover { background: rgba(183,255,60,.15); border-color: var(--accent); }
.carousel-dots { margin-top: 16px; display: flex; justify-content: center; gap: 8px; }
.carousel-dots span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--line);
  cursor: pointer; transition: background .2s, transform .2s;
}
.carousel-dots span.active { background: var(--accent); transform: scale(1.25); }

.download-card {
  border: 1px solid var(--line); background:
    radial-gradient(circle at 80% 50%, rgba(183,255,60,.08), transparent 35%),
    var(--panel);
  padding: 65px; display: flex; justify-content: space-between; align-items: center; gap: 60px;
}
.download-card p { color: var(--muted); max-width: 500px; margin-top: 18px; }
.download-actions { display: flex; flex-direction: column; gap: 9px; min-width: 220px; }

.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5,6,7,.86);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center; justify-content: center;
  padding: 30px;
}
.overlay.open { display: flex; }
.overlay-close {
  position: absolute; top: 22px; right: 26px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--text); font-size: 20px; line-height: 1;
  cursor: pointer;
}
.overlay-close:hover { background: rgba(255,255,255,.1); }

.lightbox-frame { position: relative; width: min(100%, 1100px); }
.lightbox-frame img { display: block; width: 100%; max-height: 78vh; object-fit: contain; border: 1px solid var(--line); background: #050607; }
.lightbox-caption { margin-top: 14px; color: var(--muted); font-size: 13px; text-align: center; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(8,9,11,.7); border: 1px solid var(--line); color: var(--text);
  font-size: 18px; cursor: pointer;
}
.lightbox-nav:hover { background: rgba(183,255,60,.15); border-color: var(--accent); }
.lightbox-prev { left: -54px; }
.lightbox-next { right: -54px; }
@media (max-width: 900px) {
  .lightbox-prev { left: 6px; } .lightbox-next { right: 6px; }
}

.report-modal {
  width: min(100%, 640px); max-height: 82vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); padding: 34px;
}
.report-modal h3 { font-size: 22px; margin-bottom: 4px; }
.report-modal .report-sub { color: var(--muted); font-size: 12px; font: 11px monospace; letter-spacing: .08em; text-transform: uppercase; }
.report-modal .report-links { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.report-modal .report-links a {
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--line); padding: 12px 16px; font-size: 13px; color: var(--text);
  transition: border-color .2s, background .2s;
}
.report-modal .report-links a:hover { border-color: var(--accent); background: var(--accent-soft); }
.report-modal .report-links a span { color: var(--accent); font-size: 12px; }
.report-modal .report-notes { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.7; }
.report-modal .report-notes strong { color: var(--text); }

footer { border-top: 1px solid var(--line); padding: 35px 0; }

.detail-hero { padding: 150px 0 60px; border-bottom: 1px solid var(--line); }
.back-link { margin-bottom: 20px; display: inline-flex; }
.detail-hero h1 { font-size: clamp(36px, 5vw, 58px); margin: 14px 0 16px; letter-spacing: -.03em; }
.detail-hero .hero-copy { max-width: 640px; font-size: 16px; }
.detail-hero .hero-copy a { color: var(--accent); text-decoration: underline; }
.detail-body { padding: 60px 0 120px; }
.detail-grid { display: flex; flex-direction: column; gap: 20px; }
.detail-panel { width: auto; max-height: none; }

.md-h {
  color: var(--accent); font: 800 12px monospace; letter-spacing: .1em; text-transform: uppercase;
  margin: 30px 0 4px; padding-top: 22px; border-top: 1px solid var(--line);
}
.report-modal > .md-h:first-child, .report-modal > h3 + .md-h { margin-top: 18px; padding-top: 0; border-top: none; }
.detail-panel > div > .md-h:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.detail-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.detail-list li {
  position: relative; padding-left: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.6;
  transition: color .15s;
}
.detail-list li:hover { color: var(--text); }
.detail-list li::before { content: "\2013"; position: absolute; left: 0; color: var(--accent); }
.detail-list-pass li::before { content: "\2713"; color: #6ee79a; }
.detail-list-issue li::before { content: "\00d7"; color: #ff6b6b; }

.detail-list-nested {
  margin: 8px 0 0 2px; padding-left: 14px; border-left: 1px solid var(--line); gap: 6px;
}
.detail-list-nested li { font-size: 12px; color: #6e7378; padding-left: 12px; }
.detail-list-nested li::before { content: "\00b7"; color: #4a4e54; font-weight: 800; }
.detail-list-nested li:hover { color: var(--muted); }

.detail-list-cols { column-count: 2; column-gap: 32px; }
.detail-list-cols li { break-inside: avoid; }
@media (max-width: 700px) { .detail-list-cols { column-count: 1; } }

.detail-empty { color: #555a62; font-style: italic; }
.detail-empty::before { display: none; }
.report-link-pending {
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--line); padding: 12px 16px; font-size: 13px; color: var(--muted);
}
.report-link-pending span { font-size: 11px; letter-spacing: .06em; }
@media (max-width: 900px) {
  .detail-hero { padding: 120px 0 40px; }
  .detail-grid { grid-template-columns: 1fr; }
}
.footer-refs { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 25px; color: #626870; font: 9px monospace; flex-wrap: wrap; }
.footer-refs span:first-child { color: var(--accent); }
.footer-refs a { color: var(--accent); text-decoration: underline; }
.footer-inner { display: flex; align-items: center; gap: 25px; color: #686d75; font-size: 11px; }
.footer-brand { color: var(--text); }
.footer-inner p { margin: 0; }
.footer-links { margin-left: auto; display: flex; gap: 20px; }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .nav-github { margin-left: auto; }
  .nav-readme { display: none; }
  .section { padding: 95px 0; }
  .section-heading, .accuracy-layout { grid-template-columns: 1fr; gap: 30px; }
  .system-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .peripheral-grid { grid-template-columns: repeat(3, 1fr); }
  .carousel-stage { gap: 8px; min-height: 260px; }
  .carousel-frame { max-width: 78%; }
  .download-card { padding: 45px; flex-direction: column; align-items: flex-start; }
  .download-actions { width: 100%; }
}

@media (max-width: 600px) {
  .container { width: min(calc(100% - 30px), var(--max)); }
  .nav { height: 62px; }
  .brand { font-size: 11px; }
  .hero { padding-top: 90px; }
  h1 { font-size: 58px; }
  .hero-copy { font-size: 16px; }
  .hero-shot-wrap { margin-top: 50px; }

  /* Increase vertical height slightly on mobile to avoid overlap */
  .shot-screen {
    aspect-ratio: 16 / 11;
  }

  /* Scale fallback text on mobile viewports */
  .fallback-label { font-size: 9px; letter-spacing: .2em; }
  .fallback-title { font-size: 26px; margin-top: 2px; }
  .fallback-subtitle { font-size: 8px; margin-top: 4px; letter-spacing: .12em; }

  /* Dynamic sizing for launch button */
  .hero-launch-btn {
    bottom: 10px;
    padding: 6px 12px;
    font-size: 9px;
    white-space: nowrap;
  }
  .hero-launch-icon { font-size: 7px; }

  .system-grid, .feature-grid { grid-template-columns: 1fr; }
  .peripheral-grid { grid-template-columns: 1fr 1fr; }
  .carousel-stage { flex-direction: column; min-height: 0; }
  .carousel-frame { max-width: 100%; }
  .test-footer, .footer-refs { flex-direction: column; gap: 7px; }
  .footer-inner { flex-wrap: wrap; }
  .footer-links { width: 100%; margin-left: 0; }
}
