:root {
  --mask: #0d4a2c;        /* solder-mask green: page */
  --mask-deep: #08331e;   /* inner layers: panels */
  --silk: #eef3e6;        /* silkscreen white: text */
  --silk-dim: #a9c2ae;    /* faded silkscreen: secondary text */
  --gold: #e2b544;        /* contact fingers: highlights */
  --chip: #171a17;        /* memory chips */
  --alarm: #ff5a4f;       /* price-up sticker */
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--silk); font: 18px/1.55 var(--body);
  background-color: var(--mask);
  /* faint copper traces */
  background-image:
    linear-gradient(90deg, transparent 0 calc(50% - 1px), rgba(226,181,68,.07) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(transparent 0 calc(50% - 1px), rgba(226,181,68,.05) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
  background-size: 180px 180px, 180px 120px;
  font-variant-numeric: tabular-nums;
}
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--silk); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.top, main, footer { max-width: 1000px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; padding-top: 20px; }
.logo { font: 900 26px var(--display); color: var(--silk); text-decoration: none; letter-spacing: .01em; }
.logo span { color: var(--silk-dim); font-weight: 700; }
nav { display: flex; gap: 20px; }
nav a { color: var(--silk); text-decoration: none; }
nav a:hover { color: var(--gold); }

h1, h2 { font-family: var(--display); font-weight: 900; line-height: 1; letter-spacing: .005em; }
h1 { font-size: clamp(44px, 8vw, 84px); margin: 48px 0 28px; }
h2 { font-size: clamp(32px, 4.5vw, 44px); margin: 0 0 10px; }

/* ---- Hero: the RAM stick ---- */
.stick-wrap { position: relative; }
.slot {
  position: relative; padding-bottom: 14px;
  border-bottom: 10px solid var(--chip); border-radius: 0 0 6px 6px;
}
.dimm {
  position: relative; display: grid; grid-template-columns: 1fr minmax(0, 2.3fr) 1fr; align-items: center; gap: 2.5%;
  background: #0a5a33; border: 2px solid #1d7a4c; border-radius: 10px 10px 2px 2px;
  padding: 5% 4% 9%; box-shadow: inset 0 0 0 6px #0b5230;
  animation: insert .9s cubic-bezier(.2,.9,.25,1.15) .15s both;
}
@keyframes insert { from { transform: translateY(-120px); opacity: 0; } to { transform: none; opacity: 1; } }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10%; }
.chips i { aspect-ratio: 1 / 1.15; background: var(--chip); border-radius: 3px; box-shadow: inset 0 0 0 2px #2a2f2a; }
.label {
  background: var(--silk); color: var(--chip); border-radius: 4px; padding: 5% 7% 6%;
  display: flex; flex-direction: column; align-items: flex-start; container-type: inline-size;
}
.answer { font: 900 clamp(56px, 46cqi, 200px) / .85 var(--display); color: var(--alarm); display: inline-block; transform-origin: 30% 80%; }
.answer.yes { color: #10804a; }
.label:hover .answer { animation: jolt .4s; }
@keyframes jolt { 30% { transform: rotate(-4deg); } 70% { transform: rotate(3deg); } }
.part { font-size: clamp(13px, 4.6cqi, 18px); color: #4b544b; margin-top: 6px; }
.fingers {
  position: absolute; left: 3%; right: 3%; bottom: 0; height: 7%; z-index: 1;
  background: repeating-linear-gradient(90deg, var(--gold) 0 9px, transparent 9px 13px);
  border-top: 2px solid #b8902d;
}
.fingers::after { content: ""; position: absolute; left: 41%; width: 2.2%; top: -2px; bottom: 0; background: #0a5a33; }
.void {
  position: absolute; right: -10px; top: -26px; transform: rotate(7deg); z-index: 2;
  background: var(--alarm); color: #fff; font: 900 clamp(20px, 2.6vw, 30px) / 1.05 var(--display);
  padding: 12px 18px 10px; border-radius: 6px; text-align: center;
  box-shadow: 0 6px 0 rgba(0,0,0,.25); border: 2px dashed rgba(255,255,255,.6);
}
.void small { display: block; font: 700 13px var(--body); letter-spacing: 0; }
.lede { font-size: 22px; max-width: 34em; margin: 34px 0 0; }
.lede b { color: var(--gold); }

/* ---- Price board ---- */
section { margin: 72px 0; }
.board { background: var(--mask-deep); border-radius: 12px; padding: 28px clamp(16px, 3vw, 32px); }
.board-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.updated, .sub, .fine { color: var(--silk-dim); }
.fine { font-size: 15px; max-width: 46em; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 8px; }
.tab {
  font: 700 16px var(--body); color: var(--silk); background: transparent; cursor: pointer;
  border: 2px solid #2c6b48; border-radius: 6px; padding: 7px 14px;
}
.tab[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: var(--chip); }
.ptable { width: 100%; border-collapse: collapse; margin-top: 8px; }
.ptable th { text-align: left; font-size: 15px; font-weight: 700; color: var(--silk-dim); padding: 10px 8px; border-bottom: 2px solid #2c6b48; }
.ptable td { padding: 14px 8px; border-bottom: 1px solid #1d5638; vertical-align: top; }
.num { text-align: right; white-space: nowrap; }
.row { cursor: pointer; }
.row:hover td { background: rgba(226,181,68,.06); }
.row.open td { border-bottom-color: transparent; }
.pname { font-weight: 700; overflow-wrap: anywhere; }
.pname::before { content: "+"; display: inline-block; width: 1.1em; color: var(--gold); }
.row.open .pname::before { content: "–"; }
.pspec { color: var(--silk-dim); font-size: 15px; }
.cheapest { color: var(--gold); font-size: 14px; font-weight: 700; margin-left: 6px; white-space: nowrap; }
.detail td { padding: 0 8px 16px 26px; }
.sources { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--gold); }
.sources li { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 5px 0 5px 14px; font-size: 16px; }
.sources .price { font-weight: 700; }
.flag { font-size: 13px; font-weight: 700; padding: 1px 7px; border-radius: 4px; margin-left: 8px; }
.flag.out { background: var(--alarm); color: #fff; }
.flag.unk { border: 1px solid var(--silk-dim); color: var(--silk-dim); }
.more {
  margin: 18px 0 6px; font: 700 16px var(--body); color: var(--chip); background: var(--gold);
  border: 0; border-radius: 6px; padding: 10px 18px; cursor: pointer;
}
.more[hidden] { display: none; }

/* ---- Then vs now ---- */
.bars { display: grid; gap: 26px; margin-top: 24px; }
.bar-title { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.bar-title .x { font: 900 30px/1 var(--display); color: var(--alarm); }
.track { margin-top: 8px; display: grid; gap: 4px; }
.fill { height: 30px; border-radius: 3px; display: flex; align-items: center; padding: 0 10px; font-size: 15px; font-weight: 700; white-space: nowrap; min-width: max-content; }
.fill.then { background: #2c6b48; color: var(--silk); }
.fill.now { background: var(--alarm); color: #fff; }
.bar-src { font-size: 14px; color: var(--silk-dim); margin-top: 6px; }

/* ---- Forms ---- */
.forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 40px; }
.form h2 { font-size: 34px; scroll-margin-top: 24px; }
.form label { display: block; font-weight: 700; margin: 14px 0; }
.form input, .form select {
  display: block; width: 100%; margin-top: 6px; font: 17px var(--body); padding: 11px 12px;
  color: var(--silk); background: var(--mask-deep); border: 2px solid #2c6b48; border-radius: 6px;
}
.form input:focus { border-color: var(--gold); outline: none; }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.form .check input { width: 20px; height: 20px; margin: 0; accent-color: var(--gold); }
.form button[type=submit] {
  font: 700 17px var(--body); color: var(--chip); background: var(--gold); border: 0;
  border-radius: 6px; padding: 12px 20px; cursor: pointer;
}
.form-msg { min-height: 1.5em; font-weight: 700; color: var(--gold); }

footer { padding-top: 24px; padding-bottom: 48px; color: var(--silk-dim); font-size: 15px; border-top: 1px solid #2c6b48; }

.pgb-sm { display: none; }
@media (max-width: 640px) {
  body { font-size: 17px; }
  .wide, .ptable th:nth-child(3), .ptable td:nth-child(3) { display: none; }
  .pgb-sm { display: block; }
  .detail td { display: table-cell; }
  .dimm { grid-template-columns: .5fr 3fr .5fr; padding: 6% 3% 13%; }
  .slot { padding-bottom: 10px; }
  .chips { grid-template-columns: 1fr; gap: 12%; }
  .chips i:nth-child(n+3) { display: none; }
  .void { position: static; display: inline-block; margin: 18px 0 0; transform: rotate(-2deg); font-size: 22px; }
  .lede { font-size: 19px; }
  nav { gap: 14px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .dimm, .label:hover .answer { animation: none; }
}
.void[hidden] { display: none !important; }
