/* sean-pc.pancake3d.com — build guide for Sean.
   Self-contained: no CDN, no remote fonts, no remote images.
   The CSP in nginx.conf is default-src 'none', so anything external is a
   silent blank. Keep it that way. */

:root {
  --bg:        #0d1117;
  --bg-raise:  #161b22;
  --bg-sunk:   #0a0d12;
  --line:      #262d38;
  --line-soft: #1c222c;

  --ink:       #e6edf3;
  --ink-dim:   #9aa7b4;
  --ink-faint: #6b7684;

  --pick:      #3fb950;  /* the recommendation */
  --warn:      #d29922;  /* caveat, watch out */
  --stop:      #f85149;  /* don't buy this */
  --cool:      #58a6ff;  /* links, neutral accent */
  --stretch:   #bc8cff;  /* stretch tier */

  --r:   10px;
  --r-s: 6px;

  --pad: clamp(1rem, 4vw, 2rem);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 ui-sans-serif, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  /* Long-form reading doc — a hair more letter-spacing helps on dark. */
  letter-spacing: 0.005em;
}

.wrap {
  max-width: 78ch;
  margin: 0 auto;
  padding: var(--pad);
}

/* ---- type ---- */

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; }

h1 { font-size: clamp(1.7rem, 5.5vw, 2.5rem); margin: 0 0 .3rem; }

h2 {
  font-size: clamp(1.25rem, 3.6vw, 1.6rem);
  margin: 3rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
}

h3 { font-size: 1.08rem; margin: 1.8rem 0 .5rem; }

p { margin: 0 0 1rem; }

a { color: var(--cool); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #8ec5ff; }

small, .fine { font-size: .85rem; color: var(--ink-dim); }

code, .mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: .9em;
}

code {
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-s);
  padding: .1em .4em;
}

/* ---- masthead ---- */

.mast {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #131a24, var(--bg));
}
.mast .wrap { padding-top: clamp(1.6rem, 6vw, 3rem); padding-bottom: 1.5rem; }
.kicker {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .7rem;
  color: var(--ink-faint);
  margin: 0 0 .6rem;
}
.sub { color: var(--ink-dim); font-size: 1.02rem; margin: 0; }

.stamp {
  margin-top: 1.2rem;
  font-size: .8rem;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.1rem;
}

/* ---- the budget bar ---- */

.budget {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1.4rem 0 0;
}
.chip {
  border: 1px solid var(--line);
  background: var(--bg-raise);
  border-radius: 999px;
  padding: .3rem .85rem;
  font-size: .82rem;
  color: var(--ink-dim);
  white-space: nowrap;
}
.chip b { color: var(--ink); font-weight: 600; }

/* ---- callouts ---- */

.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--cool);
  background: var(--bg-raise);
  border-radius: var(--r-s);
  padding: .9rem 1.1rem;
  margin: 1.4rem 0;
}
.note.pick { border-left-color: var(--pick); }
.note.warn { border-left-color: var(--warn); }
.note.stop { border-left-color: var(--stop); }
.note > :last-child { margin-bottom: 0; }
.note .lbl {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-faint);
  margin-bottom: .35rem;
}
.note.pick .lbl { color: var(--pick); }
.note.warn .lbl { color: var(--warn); }
.note.stop .lbl { color: var(--stop); }

/* ---- rank cards ---- */

.rank { display: grid; gap: 1rem; margin: 1.2rem 0; }

.card {
  border: 1px solid var(--line);
  background: var(--bg-raise);
  border-radius: var(--r);
  padding: 1.1rem 1.2rem;
  position: relative;
}
.card.is-pick { border-color: #2d5f38; box-shadow: 0 0 0 1px #2d5f3855; }
.card.is-avoid { opacity: .82; }

.card-head {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}
.num {
  font: 700 .8rem/1 ui-monospace, monospace;
  color: var(--ink-faint);
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: .3rem .45rem;
  flex: none;
}
.card.is-pick .num { color: var(--pick); border-color: #2d5f38; }
.card-title { font-size: 1.05rem; font-weight: 650; margin: 0; flex: 1 1 12ch; }
.price { font: 650 1.05rem/1 ui-monospace, monospace; color: var(--ink); white-space: nowrap; }
.price s { color: var(--ink-faint); font-weight: 400; font-size: .85em; margin-right: .35rem; }

/* spec grid — label/value pairs that collapse to one column on phones */
.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .25rem .8rem;
  margin: .8rem 0;
  font-size: .89rem;
}
.specs dt { color: var(--ink-faint); }
.specs dd { margin: 0; color: var(--ink); }

.verdict { font-size: .92rem; color: var(--ink-dim); margin: .7rem 0 0; }
.verdict b { color: var(--ink); font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .8rem; }
.tag {
  font-size: .72rem;
  border-radius: var(--r-s);
  padding: .2rem .5rem;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  background: var(--bg-sunk);
}
.tag.good { color: var(--pick); border-color: #2d5f38; }
.tag.bad  { color: var(--stop); border-color: #6e2a26; }
.tag.mid  { color: var(--warn); border-color: #6b5220; }

.buy {
  display: inline-block;
  margin-top: .9rem;
  font-size: .88rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--bg-sunk);
  border-radius: var(--r-s);
  padding: .5rem .9rem;
  text-decoration: none;
  /* 44px touch target — this gets read on a phone. */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.buy:hover { border-color: var(--cool); background: #10161f; }

/* ---- tables ---- */

.scroll { overflow-x: auto; margin: 1.2rem 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; min-width: 30rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--ink-faint); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
tbody tr:hover { background: var(--bg-raise); }
td.num-col { font-family: ui-monospace, monospace; white-space: nowrap; }

/* ---- wiring diagrams ---- */

.wiring {
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 1rem;
  overflow-x: auto;
  font-family: ui-monospace, monospace;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--ink-dim);
  white-space: pre;
  margin: 1rem 0;
}

/* ---- checklist ---- */

.check { list-style: none; padding: 0; margin: 1rem 0; }
.check li {
  border: 1px solid var(--line);
  background: var(--bg-raise);
  border-radius: var(--r-s);
  padding: .7rem .9rem .7rem 2.4rem;
  margin-bottom: .5rem;
  position: relative;
  font-size: .92rem;
}
.check li::before {
  content: "";
  position: absolute;
  left: .9rem; top: 1.05rem;
  width: .8rem; height: .8rem;
  border: 1.5px solid var(--ink-faint);
  border-radius: 3px;
}

/* ---- nav ---- */

.toc {
  border: 1px solid var(--line);
  background: var(--bg-raise);
  border-radius: var(--r);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc li { margin-bottom: .3rem; font-size: .9rem; break-inside: avoid; }
@media (max-width: 30rem) { .toc ol { columns: 1; } }

footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding: 1.5rem 0 3rem;
  color: var(--ink-faint);
  font-size: .82rem;
}

/* Respect the reduced-motion preference — nothing here animates, but the
   hover transitions are the one thing that would. */
@media (prefers-reduced-motion: no-preference) {
  a, .buy, tbody tr { transition: color .12s ease, background .12s ease, border-color .12s ease; }
}
