/* Trie static site styles. Everything is local: no external fonts or assets. */

@font-face {
  font-family: "Tektur";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(fonts/tektur-latin.woff2) format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-latin.woff2) format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-500-latin.woff2) format("woff2");
}

:root {
  color-scheme: light dark;

  --bg: #f6f4f0;
  --surface: #ffffff;
  --ink: #14161a;
  --ink-soft: #3a3f47;
  --muted: #646a73;
  --line: #e2ded7;
  --accent: #e8541e;
  --accent-text: #c2410c;
  --panel: #14161a;
  --panel-ink: #f6f4f0;
  --panel-soft: #c9cdd3;
  --panel-line: #33373e;

  --display: "Tektur", "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --sans: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1e2126;
    --ink: #f6f4f0;
    --ink-soft: #c9cdd3;
    --muted: #a7adb6;
    --line: #33373e;
    --accent: #f0703f;
    --accent-text: #f2a07b;
    --panel: #f6f4f0;
    --panel-ink: #14161a;
    --panel-soft: #3a3f47;
    --panel-line: #e2ded7;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-text);
}

p,
li,
dd,
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

/* Visible focus for keyboard users. */
:focus {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.container {
  max-width: 66rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  transform: translateY(-200%);
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
}

.skip-link:focus {
  transform: none;
}

/* Header */

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: auto;
  height: 1.75rem;
}

/* The mark is a single ink-coloured image; in dark mode invert it to the light ink. */
@media (prefers-color-scheme: dark) {
  .brand-mark {
    filter: invert(1) brightness(1.045);
  }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.site-nav a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* Type */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.12;
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 7vw, 4.6rem);
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

h3 {
  font-size: 1.35rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

/* Hero */

.hero {
  text-align: center;
  padding: 3.5rem 0 4.5rem;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  max-width: 16em;
  margin: 0 auto;
}

.lede {
  max-width: 34rem;
  margin: 1.5rem auto 2rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
  padding: 0.5rem 0.55rem 0.5rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.pill-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
}

.pill:hover .pill-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Sections */

main > section:not(.hero) {
  padding: 4rem 0 0;
}

main > section:last-child {
  padding-bottom: 5rem;
}

/* The name */

.name h2 {
  max-width: 22em;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.3;
}

.name-sub {
  max-width: 34rem;
  margin: 1.25rem 0 0;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

/* Needs the same specificity as the generic section padding rule below. */
main > section.name {
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--line);
}

/* Steps */

.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.step-rule {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.step-rule::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.step-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.step-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.step p:last-child {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
}

/* Cards */

.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2.25rem;
}

.card h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.card-lede {
  margin: 1rem 0 0;
  color: var(--ink-soft);
}

.card-dark {
  background: var(--panel);
  border-color: var(--panel);
  color: var(--panel-ink);
}

.card-dark .eyebrow {
  color: var(--panel-soft);
}

#install .card {
  margin-top: 2rem;
}

.rows {
  margin: 1.75rem 0 0;
}

.row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.row dt {
  font-weight: 600;
}

.row dd {
  margin: 0;
  color: var(--ink-soft);
}

.facts {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}

.facts li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--panel-line);
  color: var(--panel-soft);
}

.facts strong {
  display: block;
  color: var(--panel-ink);
  font-weight: 600;
}

kbd {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
}

.status {
  margin: 1.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.status-label {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.15rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
}

.status-label::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.08em;
}

/* Commands and the installation guide */

.command {
  max-width: 100%;
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  background: var(--panel);
  color: var(--panel-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.command code,
code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.doc h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.doc h2 {
  margin-bottom: 1.5rem;
}

.lede-left {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.doc .card .rows {
  margin-top: 0;
}

.doc .card .row:first-child {
  border-top: 0;
  padding-top: 0;
}

.guide {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide;
}

.guide > li {
  counter-increment: guide;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.guide > li h3::before {
  content: "0" counter(guide);
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-text);
}

.guide > li p {
  max-width: 40rem;
  color: var(--ink-soft);
}

.guide .rows {
  max-width: 40rem;
}

.back {
  margin-top: 2rem;
}

/* Footer */

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

.site-footer .container {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.site-footer p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The install card starts with its rows: no gap or rule above the first one. */
#install .rows {
  margin-top: 0;
}

#install .row:first-child {
  border-top: 0;
  padding-top: 0;
}

/* Narrow screens */

@media (max-width: 760px) {
  .steps,
  .two-up {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding: 2.5rem 0 3.5rem;
  }

  .card {
    padding: 1.5rem;
    border-radius: 18px;
  }

  .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }
}
