:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0b0b0b;
  --panel-strong: #111111;
  --text: #ffffff;
  --muted: #c8c8c8;
  --quiet: #8a8a8a;
  --line: #333333;
  --line-strong: #555555;
  --shadow: #000000;
  --accent: #00ff66;
  --sans: Arial, Helvetica, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050505;
    --panel: #0b0b0b;
    --panel-strong: #111111;
    --text: #ffffff;
    --muted: #c8c8c8;
    --quiet: #8a8a8a;
    --line: #333333;
    --line-strong: #555555;
    --shadow: #000000;
    --accent: #00ff66;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.58;
  overflow-x: hidden;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--accent);
  background: var(--bg);
  transform: translateY(-150%);
}

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

.site-shell {
  width: min(100% - 32px, 1180px);
  max-width: 100vw;
  margin: 16px auto;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 8px 8px 0 var(--shadow);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line-strong);
  background: var(--panel-strong);
  font-family: var(--mono);
}

.logo {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
}

.logo::before {
  color: var(--accent);
  content: ">";
  margin-right: 0.5rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.875rem;
}

.nav a:hover {
  color: var(--accent);
}

main {
  display: grid;
  gap: 1px;
  background: var(--line);
}

main > * {
  min-width: 0;
}

.hero,
.code-section,
.features,
.install-panel,
.status-grid,
.site-footer {
  background: var(--panel);
}

.hero {
  display: grid;
  gap: 1.35rem;
  padding: 4rem 1.5rem 3rem;
}

.kicker {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  width: min(100%, 980px);
  max-width: 980px;
  margin-bottom: 0;
  color: var(--text);
  font-size: 4rem;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.manifesto {
  max-width: 860px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
}

.button.primary {
  border-color: var(--accent);
  color: var(--accent);
}

.button:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

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

.status-grid > div {
  min-width: 0;
  padding: 1rem;
  border-right: 1px solid var(--line);
}

.status-grid > div:last-child {
  border-right: 0;
}

.status-grid strong,
.status-grid span {
  display: block;
}

.status-grid strong {
  margin-bottom: 0.35rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.status-grid span {
  color: var(--muted);
}

.code-section,
.features,
.install-panel {
  padding: 2rem 1.5rem;
}

.section-heading {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

pre {
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.55;
  tab-size: 2;
}

code {
  font-family: inherit;
}

pre code {
  display: block;
  min-width: 100%;
  padding: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line-strong);
  background: var(--line);
}

.feature-card {
  min-width: 0;
  padding: 1rem;
  background: var(--panel-strong);
}

.feature-card p,
.install-panel p,
.site-footer p {
  margin-bottom: 0;
  color: var(--muted);
}

.install-panel {
  display: grid;
  grid-template-columns: minmax(12rem, 0.38fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1rem;
  border-top: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.8rem;
}

/* Compatibility layer for the existing protected brief pages. */
.site {
  width: min(100% - 32px, 1180px);
  max-width: 100vw;
  margin: 16px auto;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 8px 8px 0 var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line-strong);
  background: var(--panel-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero.compact,
.site > .hero {
  min-height: 0;
  padding: 2rem 1.5rem;
}

.hero-bg,
.hero-shade,
.mark,
.image-frame {
  display: none;
}

.hero-copy {
  position: relative;
  display: block;
  width: min(100%, 860px);
  padding: 0;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tagline {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.tabs a {
  display: block;
  padding: 0.75rem 0.9rem;
  background: var(--panel-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.tabs a.active,
.tabs a:hover {
  color: var(--accent);
  text-decoration: none;
}

.content {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
}

.intro-grid,
.columns,
.split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line-strong);
  background: var(--line);
}

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

.panel,
.note,
.notice,
.split > div {
  min-width: 0;
  padding: 1rem;
  border: 0;
  background: var(--panel-strong);
}

.notice {
  border: 1px solid var(--line-strong);
}

.pill-row,
.link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pill,
.link-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.status-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  border: 1px solid var(--line-strong);
  background: var(--panel);
}

.status-table th,
.status-table td {
  padding: 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.status-table th {
  background: var(--panel-strong);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: uppercase;
}

ul,
ol {
  margin: 0.5rem 0 0;
  padding-left: 1.35rem;
}

li {
  margin: 0.35rem 0;
}

.safe-list {
  margin-bottom: 0;
}

.footer {
  padding: 1rem;
  border-top: 1px solid var(--line-strong);
  background: var(--panel-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

@media (min-width: 1500px) {
  .site-shell {
    width: min(100% - 64px, 1320px);
  }

  .site {
    width: min(100% - 64px, 1320px);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .site-shell,
  .site {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    display: block;
  }

  .topbar span {
    display: block;
    margin-bottom: 0.3rem;
  }

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

  .hero {
    padding: 2.35rem 1rem 2rem;
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  .manifesto {
    font-size: 1rem;
  }

  .status-grid,
  .feature-grid,
  .install-panel,
  .intro-grid,
  .columns,
  .split {
    grid-template-columns: 1fr;
  }

  .status-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .status-grid > div:last-child {
    border-bottom: 0;
  }

  .code-section,
  .features,
  .install-panel,
  .content,
  .site > .hero,
  .hero.compact {
    padding: 1.25rem 1rem;
  }

  pre {
    font-size: 0.875rem;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 2rem;
  }

  .button {
    width: 100%;
  }
}
