/* Self-hosted ligature font (subset: ASCII + block/box-drawing, calt/liga kept).
   JetBrains Mono — SIL OFL 1.1, see fonts/OFL.txt. Emoji/CJK fall back to system fonts. */
@font-face {
  font-family: "JetBrains Mono Web";
  src: url("fonts/JetBrainsMono-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Wide tables and code blocks scroll sideways on phones. The site is
     dark-only, so their scrollbars should be dark too (this inherits). */
  scrollbar-color: #30382f transparent;
  --ink: #eef7ee;
  --muted: #a6b0a8;
  --paper: #0b0f0d;
  --paper-strong: #141913;
  --line: #30382f;
  --line-dark: #20281f;
  --brand-green: #7ee787;
  --brand-green-pressed: #74d47c;
  --brand-orange: #F7A41D;
  --forest: var(--brand-green);
  --forest-2: #151b23;
  --mint: var(--brand-green);
  --amber: var(--brand-orange);
  --blue: #79c0ff;
  --terminal: #08100c;
  --terminal-2: #101811;
  --mono: "JetBrains Mono Web", ui-monospace, "Cascadia Code", "JetBrains Mono", "Fira Code", Consolas, Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

code,
pre,
kbd {
  font-family: var(--mono);
}

code {
  font-size: 0.92em;
}

kbd {
  display: inline-block;
  min-width: 2.6em;
  padding: 0.12rem 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: #22312d;
  color: var(--mint);
  font-size: 0.78em;
  text-align: center;
  vertical-align: 0.05em;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(11, 15, 13, 0.9);
  color: #f4fff9;
  backdrop-filter: blur(12px);
}

.brand,
.footer > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-icon,
.footer-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(244, 255, 249, 0.78);
  font-size: 0.95rem;
  font-weight: 650;
}

.nav-links a:hover {
  color: #ffffff;
}

.hero {
  color: #f7fff9;
  background: var(--paper);
  border-bottom: 1px solid var(--line-dark);
}

.hero-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 36px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 980px;
  font-size: clamp(4.2rem, 8vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-accent {
  color: var(--amber);
}

.hero-copy {
  max-width: 660px;
  margin: 24px 0 0;
  color: rgba(247, 255, 249, 0.86);
  font-size: clamp(1.1rem, 1.45vw, 1.28rem);
}

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

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: rgba(247, 255, 249, 0.82);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-proof span {
  padding: 7px 10px;
  border: 1px solid rgba(126, 231, 135, 0.42);
  border-radius: 999px;
  background: rgba(126, 231, 135, 0.08);
}

.hero-proof span:first-child {
  border-color: rgba(247, 164, 29, 0.56);
  background: rgba(247, 164, 29, 0.1);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  border: 1px solid transparent;
}

.button.primary {
  background: var(--mint);
  color: var(--paper);
}

.button.primary:hover {
  background: var(--brand-green-pressed);
}

.button.secondary {
  color: #f7fff9;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

.button.secondary:hover {
  border-color: rgba(255, 255, 255, 0.65);
}

.terminal-surface {
  width: 100%;
  margin-top: 28px;
  border: 1px solid rgba(126, 231, 135, 0.34);
  border-top: 3px solid var(--amber);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background: var(--terminal);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(247, 164, 29, 0.08);
}

.surface-top {
  display: flex;
  align-items: end;
  gap: 2px;
  min-height: 42px;
  padding: 8px 10px 0;
  background: var(--terminal-2);
  border-bottom: 1px solid var(--line-dark);
}

.tab {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 7px 7px 0 0;
  color: #80938c;
  font-family: var(--mono);
  font-size: 0.8rem;
  white-space: nowrap;
}

.tab.active {
  color: #e9fff2;
  background: var(--terminal);
}

.tab-spacer {
  flex: 1;
}

.tab-control {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-bottom: 7px;
  color: #b8c8c0;
  border: 1px solid transparent;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1;
}

.tab-control.accent {
  color: var(--amber);
}

.terminal-grid {
  min-height: 216px;
  padding: 24px 26px;
  color: #dbe8df;
  font-family: var(--mono);
  font-size: clamp(0.92rem, 1.35vw, 1.06rem);
  font-feature-settings: "liga" 1, "calt" 1;
  line-height: 1.38;
}

.terminal-grid p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* Keep box-drawing art in one block so rows use the same terminal rhythm and
   stay visually connected. */
.terminal-grid p.box-art {
  margin-top: 0;
}

/* Shade blocks (░▒▓) render as smooth alpha fills — the way TildaZ v0.5.2 draws
   them — instead of the dot-dither the raw glyphs show in a browser font. */
.shade {
  display: inline-block;
  width: 1ch;
  height: 1em;
  vertical-align: text-bottom;
}

.shade-1 { background: color-mix(in srgb, currentColor 25%, transparent); }
.shade-2 { background: color-mix(in srgb, currentColor 50%, transparent); }
.shade-3 { background: color-mix(in srgb, currentColor 75%, transparent); }

.prompt {
  color: var(--amber);
  margin-right: 0.7ch;
}

.muted {
  color: #7d8d87;
}

.output {
  color: var(--mint);
}

.cursor {
  display: inline-block;
  width: 0.66ch;
  height: 1.1em;
  background: var(--mint);
  vertical-align: -0.15em;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.release-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin: 0;
  padding: 18px max(20px, calc((100% - 1120px) / 2));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-strong);
}

.release-band div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  min-width: 0;
}

.release-band strong {
  color: var(--forest);
  font-family: var(--mono);
}

.release-band span {
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.release-band a {
  color: var(--amber);
  font-weight: 800;
  white-space: nowrap;
}

.release-band a:hover {
  color: var(--mint);
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0;
}

.page-hero {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 56px;
}

.page-hero h1 {
  max-width: 980px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.page-hero p:not(.eyebrow) {
  max-width: 780px;
  margin: 24px 0 0;
  color: rgba(247, 255, 249, 0.82);
  font-size: clamp(1.05rem, 1.45vw, 1.28rem);
}

.compact-section {
  padding-top: 36px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2,
.platform-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.feature-grid,
.install-grid,
.doc-list,
.info-grid,
.path-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

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

.path-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.install-step,
.doc-list a,
.platform-panel,
.info-card,
.path-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.feature-card {
  min-height: 220px;
  padding: 22px;
}

.feature-kicker {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-card h3,
.install-step h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.feature-card p,
.install-step p,
.info-card p,
.platform-panel p,
.platform-panel li,
.info-card li,
.doc-list span,
.path-list span,
.footer p {
  color: var(--muted);
}

.feature-card p,
.install-step p,
.info-card p,
.platform-panel p {
  margin: 0;
}

.info-card {
  min-height: 260px;
  padding: 24px;
}

.info-card h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.5rem, 2.6vw, 2.3rem);
  line-height: 1.05;
}

.info-card ul {
  margin: 24px 0 0;
  padding-left: 20px;
}

.info-card li + li {
  margin-top: 8px;
}

.code-card pre {
  margin: 0;
  overflow-x: auto;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.5;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--forest);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

td {
  color: var(--muted);
}

/* Throughput table: the figures are the content, so they take the mono face,
   right alignment, and full ink instead of the muted tone prose tables use. */
.perf-lede {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--muted);
}

.perf-table thead th:not(:first-child),
.perf-table td {
  text-align: right;
}

/* Platform names are proper nouns (macOS), so this table opts out of the
   uppercase header other tables use. */
.perf-table thead th {
  font-size: 0.9rem;
  text-transform: none;
}

.perf-table thead th span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}

.perf-table tbody tr:last-child th {
  border-bottom: 0;
}

.perf-table th[scope="row"] {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: none;
}

.perf-table td {
  color: var(--ink);
  font-family: var(--mono);
}

.perf-notes {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.perf-notes li + li {
  margin-top: 8px;
}

.perf-notes strong {
  color: var(--ink);
}

.perf-notes a {
  color: var(--forest);
  text-decoration: underline;
}

/* Benchmarks page: one section per OS. TildaZ's column and row get a faint
   tint, and the best value in a row or column is bold amber. */
.bench-os h3 {
  margin: 40px 0 14px;
  color: var(--ink);
  font-size: 1.05rem;
}

.bench-machine {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.bench-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.bench-grid .bench-table caption {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  padding: 12px 18px 0;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 0.82rem;
  text-align: left;
}

.bench-table th[scope="row"] {
  white-space: nowrap;
}

.bench-table .tz,
.bench-table .tz-row th,
.bench-table .tz-row td {
  background: rgba(126, 231, 135, 0.08);
}

.bench-table thead th.tz {
  color: var(--brand-green);
}

.bench-table td strong {
  color: var(--amber);
  font-weight: 800;
}

.bench-mark {
  margin-left: 2px;
  color: var(--amber);
  font-size: 0.75em;
}

.bench-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.bench-rules {
  margin-bottom: 24px;
}

.bench-defs + .bench-defs {
  margin-top: 18px;
}

.bench-defs td:first-child {
  color: var(--ink);
  white-space: nowrap;
}

.screenshot-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
  background: #000000;
}

.screenshot-frame figcaption {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 0;
}

.search-path {
  padding-top: 0;
}

.path-list article {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 22px;
}

.path-list strong {
  margin-bottom: 12px;
  color: var(--forest);
  font-family: var(--mono);
  font-size: 0.95rem;
}

.path-list span {
  line-height: 1.55;
}

.platform-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 340px;
  padding: 28px;
}

.platform-panel ul {
  margin: 30px 0 0;
  padding-left: 20px;
}

.platform-panel li + li {
  margin-top: 8px;
}

.install {
  border-top: 1px solid var(--line);
}

.install-step {
  padding: 22px;
}

.install-step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 26px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--paper);
  font-family: var(--mono);
  font-weight: 900;
}

.code-block {
  margin: 18px 0 0;
  padding: 22px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--line-dark);
  background: var(--terminal);
  color: var(--ink);
  font-size: 0.98rem;
}

/* The comment names the OS and the prompt marks the command. Neither is part of
   the command, so neither is copied with it. */
.code-block .code-comment {
  color: var(--amber);
  user-select: none;
}

.code-block .code-prompt {
  color: var(--mint);
  user-select: none;
}

.docs {
  padding-top: 0;
}

.doc-list a {
  display: flex;
  flex-direction: column;
  min-height: 112px;
  padding: 20px;
}

.doc-list strong {
  color: var(--forest);
  font-family: var(--mono);
  margin-bottom: 8px;
}

.doc-list a:hover {
  border-color: #b9c8bd;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 32px;
  border-top: 1px solid var(--line);
  background: var(--paper-strong);
}

.footer p {
  max-width: 740px;
  margin: 0;
  text-align: right;
}

@media (max-width: 860px) {
  .nav {
    padding: 0 20px;
  }

  .nav-links {
    gap: 14px;
    font-size: 0.86rem;
  }

  .nav-links a:nth-child(1),
  .nav-links a:nth-child(2),
  .nav-links a:nth-child(3) {
    display: none;
  }

  .hero-inner,
  .page-hero,
  .section {
    width: calc(100% - 28px);
    max-width: 1120px;
  }

  .page-hero {
    padding: 54px 0 42px;
  }

  .page-hero h1 {
    font-size: clamp(2.7rem, 13vw, 4rem);
    line-height: 1.02;
  }

  .page-hero p:not(.eyebrow) {
    font-size: 1.05rem;
    max-width: 34ch;
  }

  .hero-inner {
    padding-top: 44px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 13vw, 3.9rem);
    line-height: 1.02;
  }

  .hero-copy {
    font-size: 1.05rem;
    max-width: 34ch;
    margin-top: 22px;
  }

  .hero-copy kbd {
    min-width: auto;
    padding-inline: 0.34rem;
  }

  .release-band,
  .platforms,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .release-band {
    padding: 18px 14px;
  }

  .release-band span {
    max-width: 36ch;
  }

  .feature-grid,
  .install-grid,
  .doc-list,
  .info-grid,
  .info-grid.two,
  .info-grid.three,
  .path-list,
  .platforms,
  .bench-grid {
    grid-template-columns: 1fr;
  }

  .platform-panel {
    min-height: auto;
  }

  .terminal-grid {
    padding: 20px 16px;
  }

  .tab {
    min-width: 84px;
  }

  .tab-backend {
    display: none;
  }

  .tab.mobile-hide {
    display: none;
  }

  .footer p {
    text-align: left;
  }
}
