@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --canvas: #07120b;
  --black: #020805;
  --surface: #06100a;
  --surface-raised: #0a1710;
  --line: #1d3b26;
  --line-soft: rgba(75, 119, 83, 0.28);
  --text: #f1fff4;
  --muted: #a6b5a9;
  --quiet: #708076;
  --green: #61ed35;
  --green-dark: #163b1d;
  --danger: #ff4d4d;
  --warning: #ffc329;
  --radius-xl: 20px;
  --radius-lg: 15px;
  --radius-md: 11px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 9%, rgba(28, 121, 49, .34), transparent 32%),
    radial-gradient(circle at 8% 85%, rgba(35, 114, 48, .18), transparent 32%),
    linear-gradient(180deg, #07130b 0%, #07160b 56%, #061209 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, label:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.page-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 5%, rgba(73, 255, 77, .08), transparent 24%);
}

.site-shell {
  width: min(1450px, calc(100% - 28px));
  margin: 12px auto 0;
}

.site-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 30px;
  border: 1px solid var(--line-soft);
  border-bottom: 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: rgba(2, 8, 5, .9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -.035em;
  text-decoration: none;
}
.brand-mark { width: 39px; fill: none; stroke: var(--green); stroke-width: 1.8; }
.brand-mark circle { fill: var(--text); stroke: none; }
.header-actions, .header-nav, .model-status { display: flex; align-items: center; }
.header-actions { gap: 24px; }
.header-nav { gap: 25px; }
.header-nav a { color: var(--muted); font-size: 11px; text-decoration: none; }
.header-nav a:hover { color: var(--text); }
.model-status {
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(8, 19, 12, .72);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: .08em;
}
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(97, 237, 53, .75); }

.hero {
  position: relative;
  min-height: calc(100svh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* justify-content: center; */
  overflow: hidden;
  padding: 56px 24px 32px;
  border: 1px solid var(--line-soft);
  border-top: 0;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background:
    radial-gradient(circle at 50% 55%, rgba(31, 130, 49, .16), transparent 30%),
    linear-gradient(180deg, rgba(2, 8, 5, .92), rgba(2, 10, 6, .97));
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(97, 237, 53, .72) 1.3px, transparent 1.65px);
  background-size: 24px 24px;
  opacity: .39;
  -webkit-mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .55) 68%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .55) 68%, transparent 100%);
}
.signal-lines { position: absolute; inset: 100px -12% 0; z-index: 0; pointer-events: none; opacity: .55; }
.signal-lines i { position: absolute; width: 120%; height: 240px; left: -10%; border-top: 1px solid rgba(70, 161, 83, .2); border-radius: 50%; }
.signal-lines i:nth-child(1) { top: 25px; transform: rotate(4deg); }
.signal-lines i:nth-child(2) { top: 90px; transform: rotate(-3deg); }
.signal-lines i:nth-child(3) { top: 155px; transform: rotate(2deg); }
.signal-lines i:nth-child(4) { top: 215px; transform: rotate(-2deg); }
.hero > *:not(.signal-lines) { position: relative; z-index: 1; }
.eyebrow, .panel-kicker { margin: 0; color: var(--quiet); font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.eyebrow span { color: var(--green); }
.hero h1 { margin: 24px 0 0; font-size: clamp(44px, 5vw, 70px); font-weight: 650; letter-spacing: -.067em; line-height: .95; }
.hero h1 span { color: #b9d5bd; }
.hero-copy { margin: 30px 0 0; color: var(--muted); font-size: clamp(16px, 1.35vw, 19px); line-height: 1.65; }
.hero-copy strong { padding: 2px 7px; border: 1px solid rgba(97, 237, 53, .24); border-radius: 6px; color: var(--green); background: rgba(97, 237, 53, .08); box-shadow: 0 0 22px rgba(97, 237, 53, .15); font-weight: 650; }
.hero-actions { display: flex; justify-content: center; gap: 14px; margin-top: 42px; }
.hero-button { min-width: 190px; min-height: 46px; padding: 0 22px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 650; }
.hero-button-primary { border: 1px solid var(--green); color: #071008; background: linear-gradient(135deg, #80ff45, #55e933); box-shadow: 0 8px 32px rgba(71, 224, 45, .14); }
.hero-button-primary span { margin-right: 10px; }
.hero-button-primary b { margin-left: 10px; font-size: 15px; }
.hero-button-secondary { border: 1px solid #3c5241; color: var(--text); background: rgba(6, 16, 10, .64); }
.hero-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.privacy-note { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; color: var(--muted); font-size: 10px; }
.privacy-note i { color: var(--quiet); }
.detection-cycle {
  min-height: 43px;
  margin: 40px 0 0;
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(21px, 2.15vw, 31px);
  font-weight: 560;
  letter-spacing: -.045em;
  line-height: 1.25;
}
.detection-cycle strong {
  display: inline-block;
  color: var(--green);
  font: inherit;
  text-align: left;
}
.cycle-cursor { display: inline-block; margin-left: 1px; color: var(--green); font: inherit; text-shadow: 0 0 10px rgba(97, 237, 53, .45); }

.workflow-grid { width: min(100%, 1020px); display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: rgba(2, 8, 5, .72); text-align: left; }
.workflow-grid article { min-height: 145px; display: flex; flex-direction: column; justify-content: space-between; padding: 22px 25px; border-right: 1px solid var(--line-soft); }
.workflow-grid article:last-child { border-right: 0; }
.workflow-grid article > span { color: var(--green); font-family: ui-monospace, monospace; font-size: 11px; }
.workflow-grid strong { display: block; font-size: 17px; letter-spacing: -.03em; }
.workflow-grid p { max-width: 300px; margin: 8px 0 0; color: var(--quiet); font-size: 10px; line-height: 1.55; }

.dashboard-shell {
  min-height: 760px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(2, 8, 5, .96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
}
.dashboard-sidebar { display: flex; flex-direction: column; padding: 26px 14px 18px; border-right: 1px solid var(--line-soft); background: #030b07; }
.sidebar-brand { padding: 0 10px 25px; font-size: 16px; }
.sidebar-brand .brand-mark { width: 32px; }
.dashboard-nav { display: grid; gap: 6px; }
.tab-button {
  width: 100%; min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 13px;
  border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; text-align: left;
}
.tab-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tab-button.is-active { border-color: rgba(97, 237, 53, .08); color: var(--green); background: rgba(42, 159, 52, .15); }
.sidebar-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 15px 10px 2px; border-top: 1px solid var(--line-soft); }
.sidebar-foot p, .sidebar-foot strong, .sidebar-foot small { display: block; margin: 0; }
.sidebar-foot strong { color: var(--muted); font-size: 10px; }
.sidebar-foot small { margin-top: 3px; color: var(--quiet); font-size: 9px; }

.dashboard-content { min-width: 0; padding: 28px; }
.tab-panel[hidden] { display: none; }
.panel-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.panel-header h2 { margin: 7px 0 5px; font-size: 24px; font-weight: 620; letter-spacing: -.035em; }
.panel-header > div > p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.state-badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 999px; color: var(--muted); font-size: 9px; }
.state-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.loading-state, .empty-state { min-height: 560px; display: grid; place-content: center; justify-items: center; gap: 12px; border: 1px dashed var(--line); border-radius: var(--radius-lg); color: var(--muted); text-align: center; }
.loading-state p, .empty-state p { margin: 0; font-size: 11px; }
.loader { width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.demo-gallery { margin-bottom: 18px; padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: rgba(5, 14, 8, .78); }
.demo-gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.demo-gallery-heading strong { color: var(--muted); font-size: 8px; letter-spacing: .12em; }
.demo-gallery-heading span { color: var(--quiet); font-size: 9px; }
.demo-grid { display: grid; grid-template-columns: repeat(7, minmax(90px, 1fr)); gap: 8px; }
.demo-grid-featured { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
.demo-grid-featured .demo-card img { aspect-ratio: 16 / 7; }
.demo-grid-featured .demo-card span { padding: 10px; font-size: 10px; font-weight: 650; }
.demo-gallery-subheading { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.demo-card { position: relative; min-width: 0; overflow: hidden; padding: 0; border: 1px solid var(--line-soft); border-radius: 8px; color: var(--text); background: var(--surface); cursor: pointer; text-align: left; }
.demo-card img { width: 100%; aspect-ratio: 16 / 10; display: block; object-fit: cover; opacity: .68; transition: opacity .2s, transform .2s; }
.demo-card span { display: block; overflow: hidden; padding: 8px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.demo-card:hover img, .demo-card.is-active img { opacity: 1; transform: scale(1.025); }
.demo-card.is-active { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 20px rgba(97, 237, 53, .12); }
.demo-result { min-height: 300px; }

.result-viewer { overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: #030b07; }
.viewer-toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); }
.viewer-toolbar > div { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 8px; letter-spacing: .12em; }
.viewer-toolbar > span { color: var(--quiet); font-size: 8px; letter-spacing: .1em; }
.text-button { padding: 6px 0; border: 0; border-bottom: 1px solid var(--green); color: var(--text); background: none; cursor: pointer; font-size: 10px; }
.main-preview { position: relative; min-height: 520px; display: grid; place-items: center; margin: 0; overflow: hidden; border-bottom: 1px solid var(--line-soft); background: #000; }
.main-preview::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(50, 184, 47, .05); }
.preview-image { width: 100%; height: 100%; max-height: 590px; display: block; object-fit: contain; }
.preview-caption { position: absolute; left: 13px; bottom: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(1, 5, 3, .86); font-size: 8px; }
.run-summary { padding: 24px; }
.summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.summary-heading h3 { margin: 7px 0 0; font-size: 17px; letter-spacing: -.025em; }
.review-badge { padding: 6px 8px; border: 1px solid rgba(255, 195, 41, .38); border-radius: 999px; color: var(--warning); background: rgba(255, 195, 41, .09); font-size: 8px; }
.run-context { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(150px, .5fr); gap: 10px; margin: 18px 0 0; }
.run-context > div { padding: 13px 14px; border: 1px solid var(--line-soft); border-radius: 8px; background: rgba(7, 20, 11, .7); }
.run-context dt { color: var(--quiet); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.run-context dd { margin: 6px 0 0; color: var(--text); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; }
.incident-report { max-width: 920px; margin-top: 22px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.incident-report section { padding: 18px 0; border-top: 1px solid var(--line-soft); }
.incident-report section:first-child { padding-top: 0; border-top: 0; }
.incident-report h4 { margin: 0 0 10px; color: var(--text); font-size: 13px; font-weight: 560; letter-spacing: -.01em; }
.incident-report h5 { margin: 15px 0 5px; color: var(--quiet); font-size: 8px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.incident-report p { margin: 0; }
.incident-report ul, .incident-report ol { margin: 6px 0 0; padding-left: 20px; }
.incident-report li { margin: 4px 0; padding-left: 3px; }
.incident-summary { padding-left: 14px; border-left: 2px solid var(--green); }
.report-value { color: var(--text); font-family: "JetBrains Mono", ui-monospace, monospace; }
.evidence-note { margin-top: 10px !important; color: var(--quiet); font-size: 9px; font-style: italic; }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); margin: 20px 0 0; border: 1px solid var(--line-soft); border-radius: var(--radius-md); }
.metric { display: block; padding: 16px; border-right: 1px solid var(--line-soft); }
.metric:last-child { border-right: 0; }
.metric dt { color: var(--quiet); font-size: 9px; }
.metric dd { margin: 8px 0 0; color: var(--text); font-size: 18px; }
.result-note { margin: 18px 0 0; color: var(--quiet); font-size: 9px; line-height: 1.55; }

.upload-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 12px; }
.drop-zone, .upload-detail { min-height: 280px; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: rgba(5, 14, 8, .8); }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px; color: var(--muted); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.drop-zone.is-dragging { border-color: var(--green); background: rgba(55, 177, 53, .08); }
.upload-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 4px; color: var(--text); }
.upload-icon svg { width: 38px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.drop-zone strong { color: var(--text); font-size: 13px; font-weight: 520; }
.drop-zone > span:not(.upload-icon) { color: var(--quiet); font-size: 9px; }
.upload-detail { display: flex; flex-direction: column; padding: 20px; }
.upload-placeholder span { color: var(--green); font-size: 8px; letter-spacing: .12em; }
.upload-placeholder strong { display: block; margin-top: 12px; font-size: 16px; }
.upload-placeholder p { margin: 8px 0 0; color: var(--quiet); font-size: 10px; line-height: 1.5; }
.selected-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 18px; padding: 15px; border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--surface-raised); }
.file-badge { padding: 9px 7px; border-radius: 6px; color: var(--green); background: rgba(60, 177, 55, .12); font-size: 7px; }
.selected-file p, .selected-file strong, .selected-file p span { min-width: 0; display: block; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file strong { font-size: 10px; }
.selected-file p span { margin-top: 4px; color: var(--quiet); font-size: 8px; }
.primary-button { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: auto; padding: 0 16px; border: 1px solid var(--green); border-radius: 8px; color: #061008; background: linear-gradient(135deg, #77ff3e, #55e934); cursor: pointer; font-size: 11px; font-weight: 650; }
.primary-button:disabled { opacity: .35; cursor: not-allowed; filter: grayscale(.5); }
.test-status { min-height: 0; }
.processing-state, .error-state { margin-top: 16px; padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-md); }
.processing-state { display: flex; align-items: center; gap: 14px; background: rgba(37, 177, 3, .05); }
.processing-state p, .error-state p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.processing-state strong, .error-state strong { display: block; margin-bottom: 3px; color: var(--text); }
.error-state { border-color: rgba(255, 77, 77, .3); background: rgba(255, 77, 77, .05); }
.error-state strong { color: var(--danger); }
#test-content:not(:empty) { margin-top: 16px; }

.footer { display: flex; justify-content: space-between; gap: 24px; padding: 24px 6px 32px; color: var(--quiet); font-size: 8px; letter-spacing: .08em; }
.noscript { position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 99; padding: 14px; color: #fff; background: #24100d; text-align: center; }

@media (max-width: 1050px) {
  .dashboard-shell { grid-template-columns: 150px minmax(0, 1fr); }
  .dashboard-content { padding: 22px; }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .metric { border-bottom: 1px solid var(--line-soft); }
  .demo-grid { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
  .demo-grid-featured { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}

@media (max-width: 760px) {
  .site-shell { width: min(100% - 16px, 1450px); margin-top: 8px; }
  .site-header { padding: 0 18px; }
  .header-nav { display: none; }
  .hero { min-height: calc(100svh - 72px); padding-inline: 18px; }
  .hero-copy br { display: none; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-grid article { min-height: 120px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .workflow-grid article:last-child { border-bottom: 0; }
  .dashboard-shell { display: block; }
  .dashboard-sidebar { padding: 12px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .sidebar-brand, .sidebar-foot { display: none; }
  .dashboard-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .tab-button { justify-content: center; }
  .dashboard-content { padding: 18px 12px 20px; }
  .panel-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .state-badge { align-self: flex-start; }
  .upload-card { grid-template-columns: 1fr; }
  .drop-zone, .upload-detail { min-height: 250px; }
  .main-preview { min-height: 360px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(even) { border-right: 0; }
  .demo-grid { display: flex; overflow-x: auto; padding-bottom: 6px; }
  .demo-card { min-width: 125px; }
  .demo-grid-featured .demo-card { min-width: 190px; }
}

@media (max-width: 520px) {
  .site-header { min-height: 60px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 29px; }
  .model-status { padding: 8px 10px; font-size: 7px; }
  .hero h1 { font-size: clamp(42px, 13vw, 58px); }
  .hero-actions { width: 100%; flex-direction: column; }
  .hero-button { width: 100%; }
  .privacy-note { max-width: 280px; flex-wrap: wrap; justify-content: center; line-height: 1.4; }
  .privacy-note i { display: none; }
  .panel-header h2 { font-size: 22px; }
  .main-preview { min-height: 275px; }
  .viewer-toolbar > span { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric dd { font-size: 16px; }
  .run-context { grid-template-columns: 1fr; }
  .footer { flex-direction: column; line-height: 1.5; }
}

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