/* ============================================================
   AegeanWorks — design system
   Zero dependencies. System fonts. Dark by design.
   ============================================================ */

:root {
  --bg: #04060c;
  --bg-soft: #070b14;
  --bg-alt: #060a13;
  --panel: #0a111d;
  --panel-2: #0d1524;
  --line: rgba(148, 163, 184, 0.13);
  --line-2: rgba(148, 163, 184, 0.22);
  --text: #e9eefb;
  --muted: #9aa8c0;
  --dim: #7f8ea8;
  --cyan: #67e8f9;
  --teal: #22d3ee;
  --violet: #a78bfa;
  --pink: #f472b6;
  --archived: #c9a86a;
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

section[id] {
  scroll-margin-top: 88px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(34, 211, 238, 0.11), transparent 68%),
    radial-gradient(820px 520px at 92% 6%, rgba(167, 139, 250, 0.10), transparent 70%),
    radial-gradient(700px 500px at 50% 110%, rgba(34, 211, 238, 0.055), transparent 70%);
}

.page-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 30%, transparent 78%);
}

main { position: relative; z-index: 1; }

img, svg { display: block; max-width: 100%; }

::selection { background: rgba(103, 232, 249, 0.26); color: #fff; }

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--cyan);
  color: #04121a;
  font-weight: 700;
  border-radius: 8px;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

#main:focus { outline: none; }

.wrap {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(4, 6, 12, 0.88);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand-mark { width: 30px; height: 30px; }
.brand-word {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.brand-word span {
  background: linear-gradient(100deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  font-size: 0.885rem;
  font-weight: 500;
  color: var(--muted);
}
.site-nav a {
  position: relative;
  padding: 6px 0;
  transition: color 0.18s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: right 0.28s var(--ease);
}
.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { right: 0; }

.header-cta { margin-left: 0; }

.site-nav .nav-github { display: none; }

.nw { white-space: nowrap; }

.noscript-nav {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 15, 0.96);
  font-size: 0.86rem;
  color: var(--muted);
}
.noscript-nav a:hover { color: var(--cyan); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 4px auto;
  background: var(--text);
  transition: transform 0.22s var(--ease), opacity 0.18s var(--ease);
}
.site-header[data-open="true"] .nav-toggle span:first-child { transform: translateY(2.75px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.885rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn svg { transition: transform 0.2s var(--ease); }
[hidden] { display: none !important; }
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn:disabled:hover,
.btn[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(100deg, #8ef0fb 0%, #67e8f9 45%, #b9a4fd 100%);
  color: #04121a;
  box-shadow: 0 8px 26px -12px rgba(103, 232, 249, 0.7);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -12px rgba(103, 232, 249, 0.75);
}
.btn-primary:hover svg { transform: translateX(2px); }

.btn-ghost {
  border-color: var(--line-2);
  color: var(--text);
  background: rgba(255, 255, 255, 0.015);
}
.btn-ghost:hover {
  border-color: rgba(103, 232, 249, 0.42);
  background: rgba(103, 232, 249, 0.06);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(56px, 8vw, 104px) 0 clamp(36px, 5vw, 64px);
  overflow: hidden;
}

.hero-aurora {
  position: absolute;
  top: -30%;
  left: 50%;
  width: 1200px;
  height: 800px;
  transform: translateX(-50%);
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(34, 211, 238, 0.14), transparent 70%) 30% 30% / 55% 55% no-repeat,
    radial-gradient(closest-side, rgba(167, 139, 250, 0.13), transparent 70%) 68% 40% / 50% 50% no-repeat;
  filter: blur(10px);
  opacity: 0.9;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: #8fa6c4;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px 2px rgba(103, 232, 249, 0.55);
}

h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4.5vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.036em;
  font-weight: 700;
  text-wrap: balance;
}
.br-wide { display: none; }

@media (min-width: 1120px) {
  .br-wide { display: inline; }
}
h1 .grad {
  background: linear-gradient(96deg, #e9eefb 0%, #9ff4ff 38%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 34rem;
  margin: 24px 0 0;
  font-size: clamp(1rem, 1.35vw, 1.11rem);
  line-height: 1.65;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 30rem;
  margin: 46px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero-stats div { display: flex; flex-direction: column-reverse; gap: 4px; }
.hero-stats dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--dim);
}
.hero-stats dd {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #e9eefb, #9ff4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 320px;
}
.orbit {
  width: min(100%, 520px);
  height: auto;
  overflow: visible;
}
.spin-ring {
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: spin 70s linear infinite;
}
.orbit-nodes {
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: spin 72s linear infinite;
}
.orbit-nodes .node {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: spin-reverse 72s linear infinite;
}
.node rect { filter: drop-shadow(0 6px 18px rgba(2, 8, 20, 0.7)); }
.core { filter: drop-shadow(0 12px 34px rgba(34, 211, 238, 0.18)); }

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(8, 14, 24, 0.86);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.hero-chip b { color: var(--text); font-weight: 600; }
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ---------- Strip ---------- */

.strip {
  position: relative;
  z-index: 1;
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 17, 29, 0.55), rgba(4, 6, 12, 0.2));
}
.strip-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.strip-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 22px 26px;
  border-left: 1px solid var(--line);
}
.strip-item:first-child { border-left: 0; padding-left: 0; }
.strip-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.strip-value { font-size: 0.86rem; color: #c4d0e2; }

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: clamp(64px, 9vw, 116px) 0;
}
.section-alt {
  background: linear-gradient(180deg, rgba(8, 13, 23, 0.5), rgba(4, 6, 12, 0) 70%);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(34px, 5vw, 56px);
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.3vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
  font-weight: 700;
  text-wrap: balance;
}
.section-lede {
  margin: 18px 0 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}
.section-head-row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.section-head-row > div { max-width: 42rem; }

/* ---------- Capabilities ---------- */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.cap {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.008));
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.cap:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, 0.3);
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.06), rgba(255, 255, 255, 0.01));
}
.cap-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 11px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  background: rgba(103, 232, 249, 0.07);
  color: var(--cyan);
}
.cap-icon svg { width: 20px; height: 20px; }
.cap h3 {
  margin: 0 0 9px;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.012em;
}
.cap p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.62;
  color: var(--muted);
}

/* ---------- Principles ---------- */

.principles {
  margin-top: clamp(44px, 6vw, 72px);
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.principles-title {
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 500;
}
.principle-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 46px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.principle-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
}
.principle-list li > span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cyan);
  padding-top: 3px;
}
.principle-list b {
  font-size: 0.95rem;
  font-weight: 640;
  letter-spacing: -0.01em;
}
.principle-list p {
  margin: 5px 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Work ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(167, 139, 250, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.006));
  transition: transform 0.32s var(--ease), border-color 0.32s var(--ease);
}
.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(103, 232, 249, 0.09), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, 0.3);
}
.work-card:hover::after { opacity: 1; }
.work-card-wide {
  grid-column: span 2;
  padding: 38px 34px 32px;
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(80% 130% at 100% 100%, rgba(167, 139, 250, 0.10), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.006));
}
.work-art {
  position: absolute;
  top: 50%;
  right: 24px;
  width: 150px;
  pointer-events: none;
  transform: translateY(-50%);
  opacity: 0.5;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.work-card:hover .work-art { opacity: 0.8; transform: translateY(-50%) scale(1.03); }
.work-card h3, .work-card p, .work-tag, .work-meta, .work-link { position: relative; z-index: 1; }

@media (max-width: 900px) {
  .work-art { display: none; }
}
.work-index {
  position: absolute;
  top: 18px;
  right: 24px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.4);
}
.work-tag {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
}
.work-card h3 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.work-card-wide h3 { font-size: clamp(1.6rem, 2.6vw, 2rem); }
.work-card p {
  margin: 0 0 20px;
  max-width: 46ch;
  font-size: 0.92rem;
  line-height: 1.66;
  color: var(--muted);
}
.work-meta {
  margin-top: auto;
  padding-top: 4px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--dim);
}
.work-note {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--dim);
}
.work-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #b9ecf7;
}
.work-link svg { transition: transform 0.2s var(--ease); }
.work-card:hover .work-link svg { transform: translate(2px, -2px); }

/* ---------- Filters ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.filter-status {
  margin: -8px 0 20px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  min-height: 1em;
}
.filter-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: -8px 0 20px;
}
.filter-meta .filter-status { margin: 0; }
.atlas-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  color: var(--dim);
}
.atlas-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dim);
}
.atlas-status[data-mode="live"]::before,
.atlas-status[data-mode="cached"]::before {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}
.atlas-status[data-mode="partial"]::before {
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}
.atlas-status[data-mode="rate-limited"]::before,
.atlas-status[data-mode="offline"]::before,
.atlas-status[data-mode="stale"]::before {
  background: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}
.work-card[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.topic-filters {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin-top: 2px;
}
.topic-filters.is-expanded {
  max-height: clamp(180px, 40vh, 320px);
  padding-right: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}
.topic-filters.is-expanded::-webkit-scrollbar { width: 8px; }
.topic-filters.is-expanded::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
}
.topic-chip {
  padding: 5px 9px;
  border: 1px dashed var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.topic-chip:hover {
  color: var(--text);
  border-color: rgba(103, 232, 249, 0.35);
}
.topic-chip:focus-visible,
.sort-wrap select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.topic-chip.is-active {
  color: #04121a;
  border-style: solid;
  border-color: transparent;
  background: linear-gradient(100deg, #8ef0fb, #b9a4fd);
}
.topic-chip.topic-more {
  border-color: rgba(103, 232, 249, 0.35);
  color: var(--text);
  font-weight: 600;
}

.project-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}
.search-wrap {
  position: relative;
  display: flex;
  flex: 1 1 320px;
  min-width: 0;
}
#project-search {
  width: 100%;
  min-height: 44px;
  padding: 10px 42px 10px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #05080f;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}
#project-search::placeholder { color: var(--dim); }
#project-search:not(:placeholder-shown) ~ .search-key { display: none; }
#project-search:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.search-key {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.62rem;
}
.sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sort-wrap select {
  min-height: 44px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #05080f;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
}
.project-clear { min-height: 44px; }

/* ---------- Project grid ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.project {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Skip layout and paint for the 70+ cards below the fold. */
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.006));
  transition: transform 0.26s var(--ease), border-color 0.26s var(--ease), background 0.26s var(--ease);
}
.project::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.26s var(--ease);
}
.project:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.28);
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.055), rgba(255, 255, 255, 0.008));
}
.project:hover::before { opacity: 1; }

/* Archived projects read as a warm, quieter card with an explicit status badge. */
.project[data-archived="true"] {
  opacity: 0.82;
  border-style: dashed;
  border-color: rgba(201, 168, 106, 0.28);
  background: linear-gradient(180deg, rgba(201, 168, 106, 0.055), rgba(255, 255, 255, 0.004));
}
.project[data-archived="true"]::before {
  background: linear-gradient(180deg, var(--archived), transparent);
}
.project[data-archived="true"]:hover,
.project[data-archived="true"]:focus-within {
  opacity: 1;
  border-color: rgba(201, 168, 106, 0.5);
  background: linear-gradient(180deg, rgba(201, 168, 106, 0.09), rgba(255, 255, 255, 0.008));
}
.project[data-archived="true"] h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.project[data-archived="true"] h3::after {
  content: "ARCHIVED";
  padding: 2px 8px;
  border: 1px solid rgba(201, 168, 106, 0.34);
  border-radius: 999px;
  background: rgba(201, 168, 106, 0.07);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--archived);
}

.project-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 11px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--line-2);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}
.project-mark.has-logo {
  padding: 0;
  border-color: transparent;
  background: #05080f;
}
.project-mark.has-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mark-ai { color: #a5f3fc; border-color: rgba(34, 211, 238, 0.3); background: rgba(34, 211, 238, 0.09); }
.mark-research { color: #c4b5fd; border-color: rgba(167, 139, 250, 0.3); background: rgba(167, 139, 250, 0.09); }
.mark-health { color: #f9a8d4; border-color: rgba(244, 114, 182, 0.26); background: rgba(244, 114, 182, 0.08); }
.mark-tools { color: #7dd3fc; border-color: rgba(125, 211, 252, 0.28); background: rgba(125, 211, 252, 0.08); }
.mark-play { color: #fcd34d; border-color: rgba(252, 211, 77, 0.26); background: rgba(252, 211, 77, 0.07); }

.project h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
  font-weight: 650;
  letter-spacing: -0.014em;
}
.project p {
  margin: 0 0 16px;
  font-size: 0.83rem;
  line-height: 1.58;
  color: var(--muted);
}
.project-facts {
  display: block;
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--dim);
  overflow-wrap: anywhere;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.project-tags .tag {
  font-style: normal;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--dim);
}
.project.is-hidden { display: none; }

/* ---------- Games ---------- */

.game-groups {
  display: grid;
  gap: 26px;
}
.game-group-title {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.game-group-lede {
  margin: 0 0 14px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.game-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.game-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent, #b3a1f7);
}
.game-card figure {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg, #10111a);
}
.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-card-body {
  padding: 12px 14px 14px;
}
.game-card-body h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
}
.game-card-body p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}
.game-teaser {
  border: 1px dashed var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--card) 60%, transparent);
}
.game-teaser figure {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.game-teaser img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.75;
}

/* ---------- Research ---------- */

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.research {
  position: relative;
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.005));
  transition: border-color 0.26s var(--ease), transform 0.26s var(--ease);
}
.research:hover { border-color: rgba(167, 139, 250, 0.32); transform: translateY(-3px); }
.research-no {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--violet);
}
.research h3 {
  margin: 10px 0 8px;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.research p {
  margin: 0 0 16px;
  font-size: 0.865rem;
  line-height: 1.62;
  color: var(--muted);
}
.research a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #c9bcfb;
  border-bottom: 1px solid rgba(167, 139, 250, 0.3);
  padding-bottom: 2px;
}
.research a:hover { color: #e3dbff; }
.research:last-child:nth-child(odd) { grid-column: span 2; }

/* ---------- Licensing ---------- */

.license-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.license-card {
  display: flex;
  flex-direction: column;
  padding: 32px 30px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006));
}
.license-card-accent {
  border-color: rgba(103, 232, 249, 0.3);
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(103, 232, 249, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.006));
}
.license-tier {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
}
.license-card h3 {
  margin: 10px 0 4px;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.022em;
}
.license-price {
  margin: 0 0 22px;
  font-size: 0.88rem;
  color: var(--cyan);
}
.license-card ul {
  display: grid;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.license-card li {
  position: relative;
  padding-left: 22px;
  font-size: 0.875rem;
  color: var(--muted);
}
.license-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 10px;
  height: 5px;
  border-left: 1.5px solid var(--cyan);
  border-bottom: 1.5px solid var(--cyan);
  transform: rotate(-45deg);
}
.license-card li a {
  color: #c9d6e8;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}
.license-card li a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}
.license-card .btn { margin-top: auto; align-self: flex-start; }
.license-note {
  max-width: 60rem;
  margin: 22px 0 0;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--dim);
}
.license-note a {
  color: var(--muted);
  border-bottom: 1px solid var(--line-2);
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  padding: clamp(56px, 7vw, 80px) 0 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.6), rgba(3, 5, 10, 0.95));
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 0.6fr));
  gap: 40px;
}
.footer-brand p {
  max-width: 30ch;
  margin: 16px 0 0;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--muted);
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h2 {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
}
.footer-col a {
  width: fit-content;
  font-size: 0.86rem;
  color: var(--muted);
  transition: color 0.18s var(--ease);
}
.footer-col a:hover { color: var(--cyan); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--dim);
}
.footer-bottom p { margin: 0; }
.footer-slim { padding-top: 34px; }
.footer-slim .footer-bottom { margin-top: 0; border-top: 0; }
.error-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.7fr)); gap: 28px; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-visual { min-height: 0; }
  .orbit { width: min(100%, 440px); }
  .hero-stats { margin-top: 34px; }
  .strip-inner { grid-template-columns: minmax(0, 1fr); }
  .strip-item { border-left: 0; padding: 16px 0; border-top: 1px solid var(--line); }
  .strip-item:first-child { border-top: 0; }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .work-card-wide { grid-column: span 1; padding: 30px 26px 26px; }
  .research-grid { grid-template-columns: minmax(0, 1fr); }
  .research:last-child:nth-child(odd) { grid-column: span 1; }
  .license-grid { grid-template-columns: minmax(0, 1fr); }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .principle-list { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 780px) {
  .site-nav {
    position: fixed;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: 10px 20px 20px;
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    background: #05080f;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  }
  .js .site-nav {
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
  }
  .site-nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
  }
  .site-nav a:last-child { border-bottom: 0; }
  .js .site-header[data-open="true"] .site-nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(2, 4, 8, 0.68);
    pointer-events: auto;
  }
  .js .nav-toggle { display: block; }
  .header-cta { display: none; }
  .site-nav .nav-github { display: block; }
  .noscript-nav { display: flex; }
  .script-failed .header-inner {
    flex-wrap: wrap;
    height: auto;
    min-height: 72px;
    padding-block: 10px;
  }
  .script-failed .site-nav {
    position: static;
    flex-basis: 100%;
    order: 3;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0;
    padding: 8px 0 2px;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .script-failed .site-nav a {
    width: auto;
    padding: 4px 0;
    border: 0;
    font-size: 0.84rem;
  }
  .script-failed .nav-toggle { display: none; }
  .script-failed .site-nav .nav-github { display: block; }
  .header-inner { gap: 14px; }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 1.75rem, var(--maxw)); }
  h1 { font-size: clamp(2.15rem, 9.2vw, 2.9rem); }
  .hero { padding-top: 34px; }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .hero-stats dd { font-size: 1.4rem; }
  .hero-stats dt { font-size: 0.6rem; letter-spacing: 0.06em; }
  .hero-chip { margin-top: 4px; }
  .orbit .node text { font-size: 14px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .cap-grid { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 30px; }
  .work-card { padding: 26px 22px 22px; }
  .license-card { padding: 26px 22px 24px; }
  .filters { gap: 6px; }
  .topic-chip { padding: 7px 10px; font-size: 0.66rem; }
  .filter-meta { flex-direction: column; align-items: flex-start; }
  .project-toolbar { align-items: stretch; }
  .search-wrap { flex-basis: 100%; }
  .sort-wrap { flex: 1 1 auto; }
  .sort-wrap select { flex: 1 1 160px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom { margin-top: 34px; }
}

@media (max-width: 640px) {
  .readme-content pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.72rem;
  }
}

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

/* ---------- Play ---------- */

.live-page { padding-top: clamp(40px, 5vw, 64px); }
.live-wrap { max-width: 1100px; }
.live-title {
  margin: 12px 0 16px;
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.live-lede { max-width: 68ch; }
.live-license {
  margin: 10px 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
}
.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 30px;
}
.live-grid[hidden],
.live-player[hidden] { display: none; }
.live-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006)),
    rgba(8, 12, 21, 0.7);
}
.live-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.live-card-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #05080f;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
}
.live-card-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.live-card h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}
.live-status {
  margin: 4px 0 0;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.live-description {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}
.live-meta {
  margin: 0 0 16px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}
.live-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.live-command {
  display: block;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.67rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.live-reason {
  margin: 10px 0 0;
  color: var(--dim);
  font-size: 0.74rem;
  line-height: 1.55;
}
.live-empty {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.live-player {
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: #05080f;
  box-shadow: 0 36px 80px -54px rgba(0, 0, 0, 0.95);
}
.live-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.live-kicker {
  margin: 0 0 4px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.live-heading h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: -0.025em;
}
.live-heading h2:focus-visible { outline-offset: 4px; }
.live-version {
  margin: 5px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}
.live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.live-frame-wrap { background: #04060c; }
.live-frame {
  display: block;
  width: 100%;
  height: min(820px, calc(100dvh - 150px));
  border: 0;
  background: #04060c;
}
.live-frame-status {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.live-frame-status[hidden] { display: none; }
.live-frame-status p {
  margin: 0 0 12px;
  color: var(--muted);
}
.live-frame-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.live-note {
  margin: 0;
  padding: 10px 20px 12px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
}
.live-noscript {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.live-noscript ul { margin: 10px 0 0; padding-left: 20px; }
.live-noscript a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Live (home) ---------- */

.live-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.live-home-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006));
  transition: border-color 0.26s var(--ease);
}
.live-home-card:hover,
.live-home-card:focus-within {
  border-color: rgba(103, 232, 249, 0.32);
}
.live-home-slider {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #05080f;
  outline: none;
}
.live-home-slider::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 72px;
  background: linear-gradient(180deg, transparent, rgba(4, 6, 12, 0.78));
  pointer-events: none;
  z-index: 1;
}
.live-home-slider:focus-visible {
  box-shadow: inset 0 0 0 2px var(--cyan);
}
.live-home-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.live-home-track::-webkit-scrollbar { display: none; }
.live-home-track figure {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
}
.live-home-track img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.live-home-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(4, 6, 12, 0.72);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
}
.live-home-nav:hover,
.live-home-nav:focus-visible {
  border-color: rgba(103, 232, 249, 0.55);
  color: var(--cyan);
}
.live-home-prev { left: 10px; }
.live-home-next { right: 10px; }
.live-home-dots {
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.live-home-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}
.live-home-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(233, 238, 251, 0.38);
}
.live-home-dot.is-active::after { background: var(--cyan); }
.live-home-dot:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.live-home-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px 18px;
}
.live-home-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.3;
}
.live-home-name a { color: var(--text); text-decoration: none; }
.live-home-name a:hover { color: var(--cyan); }
.live-home-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--dim);
}
.live-home-description {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.live-home-links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 10px;
}
.live-home-open {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.live-home-open::after { content: " \2192"; }
.live-home-open:hover { text-decoration: underline; }
.live-home-dossier {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.live-home-dossier:hover { color: var(--cyan); text-decoration: underline; }
.live-home-fallback {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 780px) {
  .live-toolbar { align-items: flex-start; }
  .live-actions { width: 100%; }
  .live-frame { height: 70vh; }
}
@media (max-width: 560px) {
  .live-grid { grid-template-columns: minmax(0, 1fr); }
  .live-card { padding: 18px; }
  .live-toolbar { padding: 14px; }
  .live-frame { height: 68vh; }
}

/* ---------- Project dossier ---------- */

.project-page { padding-top: clamp(40px, 5vw, 64px); }
.project-detail { max-width: 920px; }
.project-status {
  margin: 0 0 24px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.7rem;
}
.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.back-link:hover { color: var(--text); }
.dossier-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  grid-template-areas:
    "intro preview"
    "body body";
  column-gap: clamp(28px, 4vw, 56px);
  row-gap: 24px;
  align-items: start;
}
.dossier-intro { grid-area: intro; padding-top: 6px; }
.dossier-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}
.dossier-kicker .eyebrow { margin: 0; }
.dossier-logo {
  width: 40px;
  height: 40px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #05080f;
  object-fit: contain;
}
.dossier-intro .eyebrow { margin: 0 0 14px; }
.dossier-preview { grid-area: preview; }
.dossier-body { grid-area: body; }
.dossier-hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.dossier-preview {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: #05080f;
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.95);
}
.dossier-preview a { display: block; }
.dossier-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  background: #05080f;
}
.dossier-preview figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.dossier-preview figcaption a { color: var(--muted); text-decoration: underline; }
.dossier-preview figcaption:empty { display: none; }
.dossier-body .project-detail-facts { margin-top: 0; }
.project-detail-lede {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}
.project-detail-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px 22px;
  margin: 30px 0 22px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.project-detail-facts dt {
  margin-bottom: 4px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project-detail-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
}
.project-detail-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 24px;
}
.project-topic {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
}
.project-topic:hover {
  border-color: rgba(103, 232, 249, 0.35);
  color: var(--text);
}
.project-topic-more { border-style: dashed; }
.dossier-body .hero-actions { margin-top: 0; }
.project-gallery {
  margin-top: 38px;
}
.gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 14px;
}
.project-gallery h2 {
  margin: 0;
  font-size: 1.15rem;
}
.gallery-note {
  margin: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
}
.gallery-slider {
  position: relative;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 12, 21, 0.7);
  outline: none;
}
.gallery-slider:focus-visible {
  box-shadow: 0 0 0 2px var(--cyan);
}
.gallery-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #05080f;
}
.gallery-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
}
.gallery-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gallery-open:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -3px;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(4, 6, 12, 0.78);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
}
.gallery-nav:hover,
.gallery-nav:focus-visible {
  border-color: rgba(103, 232, 249, 0.55);
  color: var(--cyan);
}
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 10px 0 6px;
}
.gallery-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.gallery-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(233, 238, 251, 0.35);
}
.gallery-dot.is-active::after { background: var(--cyan); }
.gallery-dot:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.gallery-caption-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 8px 16px 14px;
  border-top: 1px solid var(--line);
}
.gallery-caption {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.45;
}
.gallery-meta {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}
.gallery-meta a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gallery-meta a:hover { color: var(--text); }
body.lightbox-open { overflow: hidden; }
.gallery-lightbox {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  height: min(880px, calc(100vh - 32px));
  height: min(880px, calc(100dvh - 32px));
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: #05080f;
  color: var(--text);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}
.gallery-lightbox:not([open]) { display: none; }
.gallery-lightbox::backdrop {
  background: rgba(2, 4, 9, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.lightbox-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid var(--line);
}
.lightbox-kicker {
  margin: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lightbox-counter {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}
.lightbox-button,
.lightbox-nav {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 21, 36, 0.85);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.lightbox-button {
  width: 40px;
  height: 40px;
  padding: 0;
}
.lightbox-button:hover,
.lightbox-nav:hover:not([disabled]) {
  border-color: rgba(103, 232, 249, 0.45);
  background: rgba(103, 232, 249, 0.1);
}
.lightbox-close { margin-left: 4px; }
.lightbox-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 1.6vw, 20px);
  padding: 14px clamp(8px, 1.6vw, 18px);
  background:
    radial-gradient(70% 70% at 50% 30%, rgba(34, 211, 238, 0.06), transparent 70%),
    #04060c;
}
.lightbox-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
}
.lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: #05080f;
}
.lightbox-nav {
  width: 44px;
  height: 44px;
  padding: 0;
}
.lightbox-nav[disabled] { opacity: 0.35; cursor: default; }
.lightbox-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
}
.lightbox-copy { min-width: 0; }
.lightbox-caption {
  margin: 0 0 3px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.lightbox-meta {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}
.lightbox-meta a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lightbox-meta a:hover { color: var(--text); }
.lightbox-original {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.lightbox-original:hover {
  border-color: rgba(103, 232, 249, 0.4);
  color: var(--text);
}
.lightbox-counter[hidden],
.lightbox-meta[hidden],
.lightbox-nav[hidden] { display: none; }
@media (max-width: 640px) {
  .gallery-lightbox {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .lightbox-top { padding: 10px 12px; }
  .lightbox-kicker { display: none; }
  .lightbox-stage {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }
  .lightbox-figure { padding-bottom: 48px; }
  .lightbox-nav {
    position: absolute;
    bottom: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    background: rgba(4, 6, 12, 0.82);
  }
  .lightbox-nav[id="lightbox-prev"] { left: 12px; }
  .lightbox-nav[id="lightbox-next"] { right: 12px; }
  .lightbox-bottom { padding: 12px; }
}
.readme-card {
  margin-top: 38px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0)),
    rgba(8, 12, 21, 0.7);
}
.readme-card h2 {
  margin: 0 0 18px;
  font-size: 1.15rem;
}
.readme-content {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.72;
  overflow-wrap: anywhere;
}
.readme-content h2,
.readme-content h3,
.readme-content h4 {
  margin: 26px 0 10px;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.readme-content h2 { font-size: 1.35rem; }
.readme-content h3 { font-size: 1.1rem; }
.readme-content h4 { font-size: 0.95rem; }
.readme-content p { margin: 0 0 14px; }
.readme-content ul,
.readme-content ol { margin: 0 0 16px; padding-left: 22px; }
.readme-content li { margin-bottom: 5px; }
pre:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.readme-content pre {
  margin: 0 0 16px;
  padding: 14px 16px;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #05080f;
  font-size: 0.76rem;
  line-height: 1.55;
}
.readme-content code {
  font-family: var(--mono);
  font-size: 0.92em;
}
.readme-content blockquote {
  margin: 0 0 16px;
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--line-2);
  color: var(--dim);
}
.readme-content hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.readme-status {
  margin: 16px 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.68rem;
}
.readme-credit {
  margin: 10px 0 0;
  color: var(--dim);
  font-size: 0.7rem;
}
.project-error {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 12, 21, 0.8);
}
.project-error h1 {
  margin: 10px 0 16px;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

@media (max-width: 560px) {
  .readme-card { padding: 20px; }
  .project-detail-facts { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* ---------- License verifier ---------- */

.verify-section { padding-top: clamp(48px, 6vw, 72px); }
.verify-wrap { max-width: 1080px; }
.verify-title {
  margin: 10px 0 16px;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.verify-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  align-items: start;
}
.verify-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0)),
    rgba(8, 12, 21, 0.82);
}
.verify-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.verify-help,
.verify-note {
  margin: 6px 0 14px;
  color: var(--dim);
  font-size: 0.78rem;
  line-height: 1.6;
}
.verify-form textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #05080f;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.55;
}
.verify-form textarea:focus,
.verify-form input[type="text"]:focus,
.verify-file:focus-within {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.verify-form.is-dragging {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2);
}
.verify-id-lookup {
  margin: 20px 0 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.verify-id-lookup legend {
  padding: 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}
.verify-id-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.verify-id-row input {
  flex: 1 1 190px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #05080f;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
}
.verify-id-row input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.verify-id-row .btn { min-height: 44px; }
.verify-result-actions { margin-top: 18px; }
.verify-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.verify-file {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--muted) !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  cursor: pointer;
}
.verify-file:hover { border-color: var(--teal); color: var(--text) !important; }
.verify-file input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.verify-project {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.verify-form input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #05080f;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
}
.verify-optional { color: var(--dim); font-weight: 400; }
.verify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.verify-runtime {
  margin: 16px 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.55;
}
.verify-runtime.is-error { color: #fca5a5; }
.verify-register-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.verify-register h2,
.verify-cli h2,
.verify-result h2 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}
.verify-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}
.verify-count { margin: 0 0 6px; color: var(--text); }
.verify-meta {
  margin: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.68rem;
}
.verify-rule {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.verify-steps {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.83rem;
}
.verify-note { margin: 0 0 10px; }
.verify-result { margin-top: 24px; }
.verify-result-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.verify-result-head h2 { margin: 0; }
.verify-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.verify-badge.is-valid {
  border-color: rgba(134, 239, 172, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}
.verify-badge.is-warning {
  border-color: rgba(252, 211, 77, 0.35);
  background: rgba(245, 158, 11, 0.1);
  color: #fcd34d;
}
.verify-badge.is-danger {
  border-color: rgba(252, 165, 165, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}
.verify-summary { margin: 14px 0; color: var(--text); }
.verify-reasons {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.83rem;
}
.verify-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 18px;
  margin: 0;
  font-size: 0.82rem;
}
.verify-facts dt {
  padding-top: 2px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.verify-facts dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
#result-register { margin-top: 14px; }
.verify-cli { margin-top: 24px; }
.verify-noscript { margin-top: 24px; }
.verify-noscript h2 { margin-top: 0; }
.verify-cli pre {
  overflow-x: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #05080f;
  font-size: 0.76rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.verify-cli code { font-family: var(--mono); }

.license-verify {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 24px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.07), rgba(167, 139, 250, 0.05)),
    rgba(8, 12, 21, 0.8);
}
.license-verify-title {
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--text);
}
.license-verify-copy {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.85rem;
}
.license-verify .btn { flex: 0 0 auto; }

@media (max-width: 980px) and (min-width: 781px) {
  .header-inner { gap: 18px; }
  .site-nav { gap: 18px; font-size: 0.82rem; }
}

@media (max-width: 900px) {
  .dossier-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "preview"
      "body";
    row-gap: 26px;
  }
}

@media (max-width: 900px) {
  .verify-grid { grid-template-columns: minmax(0, 1fr); }
  .verify-form-row { grid-template-columns: minmax(0, 1fr); }
  .verify-facts { grid-template-columns: minmax(0, 1fr); }
  .verify-facts dt { padding-top: 10px; }
}

@media (max-width: 560px) {
  .verify-card { padding: 20px; }
  .verify-actions .btn { width: 100%; }
  .license-verify { flex-direction: column; align-items: flex-start; padding: 20px; }
  .license-verify .btn { width: 100%; }
}

@media print {
  .verify-form,
  .verify-register,
  .verify-cli { display: none !important; }
}

@media print {
  html,
  body { background: #04060c; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .reveal,
  .js .reveal { opacity: 1; transform: none; transition: none !important; }
  /* content-visibility skips offscreen cards on screen; print needs them all. */
  .project,
  .game-group,
  .work-card { content-visibility: visible; }
  /* The default Active filter hides archived cards on screen; print shows all. */
  .project[hidden],
  .project.is-hidden { display: flex !important; }
  .site-header,
  .page-grid,
  .hero-aurora,
  .nav-toggle,
  .filters,
  .skip { display: none !important; }
  a { text-decoration: underline; }
}

/* ---------- Trust pages ---------- */

.trust-section { padding-top: clamp(44px, 5vw, 68px); }
.trust-wrap { max-width: 860px; }
.trust-title {
  margin: 10px 0 16px;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.trust-card {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0)),
    rgba(8, 12, 21, 0.72);
}
.trust-card h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}
.trust-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.trust-card p:last-child { margin-bottom: 0; }
.trust-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}
.trust-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  line-height: 1.55;
}
.trust-table th,
.trust-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.trust-table th {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.trust-table td { color: var(--muted); }
.trust-table tr:first-child th { border-top: 0; }
.trust-meta {
  color: var(--dim) !important;
  font-family: var(--mono);
  font-size: 0.68rem !important;
}
.trust-card code {
  font-family: var(--mono);
  font-size: 0.92em;
  overflow-wrap: anywhere;
}
.trust-card a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 620px) {
  .trust-card { padding: 18px; }
  .trust-table-wrap { overflow: visible; }
  .trust-table { min-width: 0; }
  .trust-table thead { display: none; }
  .trust-table,
  .trust-table tbody,
  .trust-table tr,
  .trust-table td { display: block; width: 100%; }
  .trust-table tr { padding: 12px 0; border-top: 1px solid var(--line); }
  .trust-table tr:first-child { border-top: 0; }
  .trust-table td { padding: 2px 0; border: 0; }
  .trust-table td:first-child {
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }
  .trust-table td + td { display: block; padding-top: 8px; }
  .trust-table td + td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--dim);
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }
}

/* ---------- Editor page ---------- */

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

.editor-page {
  position: fixed;
  inset: 72px 0 0 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  background: #04060c;
}

.editor-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #04060c;
}

.editor-noscript {
  position: absolute;
  inset: 50% auto auto 50%;
  max-width: 28rem;
  margin: 0;
  padding: 16px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted);
  text-align: center;
  transform: translate(-50%, -50%);
}

.editor-noscript a {
  color: var(--cyan);
}

@media (max-width: 780px) {
  .editor-page {
    inset: 72px 0 0 0;
  }
}

.script-failed .editor-page {
  position: static;
  height: auto;
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
}
