/* Rack & Token — brushed-aluminum rack, steel-blue and amber status colors */
:root {
  --bg: #eef1f3;
  --panel: #ffffff;
  --ink: #1b2430;
  --ink-2: #4a5866;
  --line: #cfd7de;
  --steel: #2f5d8a;
  --amber: #b9791a;
  --slate: #8fa3b3;
  --good: #2e7d4f;
  --bad: #b23b3b;
  --radius-panel: 10px;
  --radius-ctrl: 6px;
  --measure: 68ch;
  --head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, serif;
  --ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141a20; --panel: #1c242c; --ink: #e6ebef; --ink-2: #a8b4bf; --line: #2f3a45;
    --steel: #6f9fcf; --amber: #e0a446; --slate: #5c6f80; --good: #5fbf88; --bad: #e07070;
  }
  :root:not([data-theme="light"]) .btn:not(.secondary) { color: #10161c; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
}
a { color: var(--steel); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* header: a rack faceplate */
.site-head { border-bottom: 1px solid var(--line); background: var(--panel); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { font: 800 1.25rem/1 var(--head); font-stretch: 112%; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.brand-mark { display: inline-grid; grid-template-rows: repeat(3, 4px); gap: 3px; }
.brand-mark span { width: 22px; height: 4px; border-radius: 1px; background: var(--steel); }
.brand-mark span:nth-child(2) { background: var(--amber); width: 15px; }
.nav { display: flex; gap: 22px; font: 500 0.95rem/1 var(--ui); flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--amber); }

/* type */
h1, h2, h3 { font-family: var(--head); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; font-stretch: 112%; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 700; margin-top: 1.8em; }
h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 46ch; }
.prose { max-width: var(--measure); }
.prose li { margin-bottom: 0.35em; }
.small { font: 400 0.9rem/1.5 var(--ui); color: var(--ink-2); }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.9em; background: color-mix(in srgb, var(--line) 45%, transparent); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-ctrl); padding: 14px 16px; overflow-x: auto; font-size: 0.88rem; line-height: 1.5; }
pre code { background: none; padding: 0; }
pre.wrap-code { white-space: pre-wrap; overflow-wrap: anywhere; }
table { border-collapse: collapse; width: 100%; font: 400 0.95rem/1.45 var(--ui); margin: 0 0 1.2em; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--ink-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

/* layout */
main { padding: 48px 0 72px; }
.hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 32px; } }
.section { margin-top: 72px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 800px) { .cols-3 { grid-template-columns: 1fr; gap: 20px; } }
.cols-3 h3 { margin-top: 0; }

/* buttons and forms */
.btn { display: inline-block; font: 600 1rem/1 var(--ui); padding: 13px 18px; border-radius: var(--radius-ctrl); border: 1px solid var(--steel); background: var(--steel); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--steel); }
.signup { display: flex; gap: 8px; flex-wrap: wrap; max-width: 460px; margin: 8px 0 6px; }
.signup input[type="email"] { flex: 1 1 220px; font: 400 1rem/1.2 var(--ui); padding: 12px 12px; border: 1px solid var(--line); border-radius: var(--radius-ctrl); background: var(--panel); color: var(--ink); }
.form-note { font: 400 0.88rem/1.4 var(--ui); color: var(--ink-2); min-height: 1.4em; }

/* the fit calculator */
.calc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 22px; font-family: var(--ui); }
.calc h2 { margin-top: 0; font-size: 1.35rem; }
.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
@media (max-width: 520px) { .calc-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.field select, .field input { font: 400 0.98rem/1.2 var(--ui); padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-ctrl); background: var(--bg); color: var(--ink); width: 100%; }
.field .hint { font-size: 0.78rem; color: var(--ink-2); }
.custom-fields { display: none; grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.custom-fields.on { display: grid; }
@media (max-width: 520px) { .custom-fields.on { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.verdict { margin: 20px 0 10px; font: 700 1.25rem/1.3 var(--head); }
.verdict.fits { color: var(--good); }
.verdict.over { color: var(--bad); }
.membar { position: relative; height: 44px; border-radius: 6px; background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--slate) 22%, transparent) 6px 12px); border: 1px solid var(--line); overflow: hidden; display: flex; }
.membar .seg { height: 100%; transition: width 0.35s ease; }
.membar .w { background: var(--steel); }
.membar .k { background: var(--amber); }
.membar .o { background: var(--slate); }
.membar .cap { position: absolute; top: -1px; bottom: -1px; width: 0; border-left: 3px solid var(--ink); }
@media (prefers-reduced-motion: reduce) { .membar .seg { transition: none; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 4px; font-size: 0.88rem; color: var(--ink-2); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: currentColor; }
.legend .lw::before { background: var(--steel); }
.legend .lk::before { background: var(--amber); }
.legend .lo::before { background: var(--slate); }
.legend .lc::before { background: var(--ink); width: 3px; }
.speed { margin-top: 12px; font-size: 0.92rem; color: var(--ink); }
.calc-foot { margin-top: 14px; font-size: 0.8rem; color: var(--ink-2); }

/* lists of posts */
.posts { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.posts li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.posts a { font: 700 1.2rem/1.3 var(--head); text-decoration: none; color: var(--ink); }
.posts a:hover { color: var(--steel); }
.posts p { margin: 6px 0 0; color: var(--ink-2); }
.post-meta { font: 400 0.9rem/1.4 var(--ui); color: var(--ink-2); margin-bottom: 28px; }
.disclosure { font: 400 0.9rem/1.5 var(--ui); color: var(--ink-2); border-left: 3px solid var(--amber); padding: 6px 12px; margin-bottom: 24px; }

.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font: 400 0.9rem/1.6 var(--ui); color: var(--ink-2); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-foot a { color: var(--ink-2); }
