/* ==========================================================================
   TeaTimeServers — phosphor on terminal black.
   Palette from the brand: phosphor #3AFF6A · phosphor dim #26C258 · ground #060A07
   Plain CSS, no build step: this site is served as static files.
   ========================================================================== */

:root {
  --phosphor: #3aff6a;
  --phosphor-dim: #26c258;
  --ground: #060a07;

  --surface-1: #0a1009;
  --surface-2: #0e170f;
  --surface-3: #132015;
  --line: #1d3021;
  --line-strong: #2c4a33;

  --text: #d7e6da;
  --text-dim: #8ba491;
  --text-faint: #5d7565;

  --led-live: #3aff6a;
  --led-beta: #ffd23a;
  --led-wip: #3ac8ff;
  --led-planned: #7d8f83;

  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --measure: 68ch;
  --page: 74rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 6px;

  --glow-soft: 0 0 24px -6px rgb(58 255 106 / 0.35);
  --glow-text: 0 0 18px rgb(58 255 106 / 0.35);

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--ground);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* The faint phosphor haze behind everything. Fixed so it does not scroll. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 50% -12rem, rgb(58 255 106 / 0.10), transparent 70%),
    linear-gradient(180deg, #081009 0%, var(--ground) 42%);
}

/* Hairline grid, the rack-slot motif from the mark. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(rgb(58 255 106 / 0.030) 1px, transparent 1px),
    linear-gradient(90deg, rgb(58 255 106 / 0.030) 1px, transparent 1px);
  background-size: 100% 3rem, 3rem 100%;
  mask-image: radial-gradient(70rem 50rem at 50% 0, #000 20%, transparent 78%);
}

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

a { color: var(--phosphor); text-decoration-color: rgb(58 255 106 / .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 50;
  background: var(--surface-3); color: var(--text);
  padding: .6rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.skip-link:focus { left: var(--gutter); top: .6rem; }

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p, li { text-wrap: pretty; }

code, kbd, pre, .mono { font-family: var(--font-mono); }
code {
  font-size: .875em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .12em .38em;
  color: #bfe9c8;
}
pre {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; overflow-x: auto; font-size: .875rem; line-height: 1.6;
}
pre code { background: none; border: 0; padding: 0; }

kbd {
  font-size: .8em; background: var(--surface-3); border: 1px solid var(--line-strong);
  border-bottom-width: 2px; border-radius: 4px; padding: .1em .4em; color: var(--text);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--phosphor-dim);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header::after {
  content: ''; position: absolute; inset-inline: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgb(58 255 106 / .55), transparent);
}
.site-header .bar { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; flex-wrap: wrap; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
.brand__mark { color: var(--phosphor); filter: drop-shadow(0 0 10px rgb(58 255 106 / .35)); flex: none; }
.brand__word { font-family: var(--font-mono); font-weight: 600; letter-spacing: -.01em; font-size: 1.02rem; }
.brand__word--dim { color: var(--text-dim); }

.site-header nav { margin-left: auto; }
.site-header nav ul { display: flex; gap: .35rem; list-style: none; padding: 0; flex-wrap: wrap; }
.site-header nav a {
  display: block; padding: .4rem .7rem; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: .85rem; color: var(--text-dim); text-decoration: none;
}
.site-header nav a:hover { color: var(--text); background: var(--surface-2); }
.site-header nav a[aria-current='page'] { color: var(--phosphor); background: var(--surface-2); }

main { flex: 1; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 56rem) { .hero__grid { grid-template-columns: 1.15fr .85fr; } }
.hero h1 { margin-block: .6rem 1rem; }
.hero h1 em { font-style: normal; color: var(--phosphor); text-shadow: var(--glow-text); }
.hero p.lede { font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem); color: var(--text-dim); max-width: var(--measure); }
.hero__mark { color: var(--phosphor); filter: drop-shadow(0 0 40px rgb(58 255 106 / .28)); margin-inline: auto; width: min(18rem, 60vw); }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .875rem; font-weight: 500;
  padding: .6rem 1.1rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface-2);
  color: var(--text); text-decoration: none;
}
.btn:hover { border-color: var(--phosphor-dim); background: var(--surface-3); }
.btn--primary {
  background: var(--phosphor); border-color: var(--phosphor); color: #041006; font-weight: 600;
  box-shadow: var(--glow-soft);
}
.btn--primary:hover { background: #55ff7f; border-color: #55ff7f; color: #041006; }

/* --------------------------------------------------------------------------
   Sections and cards
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section__head { max-width: var(--measure); margin-bottom: 2rem; }
.section__head p { color: var(--text-dim); margin-top: .5rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

.card {
  display: flex; flex-direction: column; gap: .6rem;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; text-decoration: none; color: inherit;
}
a.card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.card h3 { font-family: var(--font-mono); font-size: 1rem; }
.card p { color: var(--text-dim); font-size: .925rem; }
.card__meta { margin-top: auto; padding-top: .4rem; font-family: var(--font-mono); font-size: .75rem; color: var(--text-faint); }

.led { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.led::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: var(--led-planned); }
.led--live::before { background: var(--led-live); box-shadow: 0 0 8px var(--led-live); }
.led--beta::before { background: var(--led-beta); box-shadow: 0 0 8px var(--led-beta); }
.led--wip::before { background: var(--led-wip); box-shadow: 0 0 8px var(--led-wip); }

/* --------------------------------------------------------------------------
   Article / guide
   -------------------------------------------------------------------------- */
.page-header { padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; border-bottom: 1px solid var(--line); }
.page-header .eyebrow { display: block; margin-bottom: .75rem; }
.page-header p.lede { color: var(--text-dim); max-width: var(--measure); margin-top: .85rem; font-size: 1.075rem; }

.article { padding-block: clamp(2rem, 5vw, 3.5rem); }
.article__body { max-width: var(--measure); }
.article__body > * + * { margin-top: 1.1rem; }
.article__body h2 {
  margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  scroll-margin-top: 5rem;
}
.article__body h3 { margin-top: 2rem; font-family: var(--font-mono); color: var(--text); scroll-margin-top: 5rem; }
.article__body ul, .article__body ol { padding-left: 1.35rem; }
.article__body li + li { margin-top: .35rem; }
.article__body figure { margin-top: 1.75rem; }
.article__body figure img { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-1); }
.article__body figcaption { margin-top: .6rem; font-size: .85rem; color: var(--text-faint); font-family: var(--font-mono); }

/* Wide figures may exceed the measure; they stay centred on the page. */
.figure-wide { max-width: min(100%, 60rem); }

blockquote {
  border-left: 2px solid var(--phosphor-dim);
  background: var(--surface-1);
  padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-dim);
}
blockquote strong { color: var(--text); }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--phosphor-dim); background: var(--surface-1); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: rgb(255 255 255 / .012); }
td code { white-space: nowrap; }

.toc {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.toc h2 { border: 0; margin: 0 0 .6rem; padding: 0; font-size: .8rem; font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--phosphor-dim); }
.toc ol { margin: 0; padding-left: 1.2rem; font-size: .925rem; }
.toc li + li { margin-top: .25rem; }

.callout {
  background: var(--surface-1); border: 1px solid var(--line-strong); border-left: 3px solid var(--phosphor);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.15rem;
}
.callout strong { color: var(--phosphor); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: auto; padding-block: 2.5rem 2rem; background: var(--surface-1); }
.site-footer .inner { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.site-footer .brand { margin-bottom: .5rem; }
.site-footer .note { color: var(--text-faint); font-size: .875rem; }
.site-footer ul { list-style: none; padding: 0; margin-top: .5rem; }
.site-footer li + li { margin-top: .3rem; }
.site-footer a { font-size: .9rem; color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--phosphor); }
.site-footer .colophon { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--text-faint); display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; }

/* --------------------------------------------------------------------------
   About: hobby chips
   -------------------------------------------------------------------------- */
/* align-items keeps the chips from stretching to the tallest in their row, which made the first one taller. */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; list-style: none; padding: 0; margin-top: 1.25rem; }
.chips li {
  font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim);
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .8rem;
  line-height: 1.5;
}
.chips li::before { content: '· '; color: var(--phosphor-dim); }
