/* canirunmodel — circuit-board green, gold contacts, RAM-stick memory bar */
:root {
  --mask: #0f3d2e;        /* solder-mask green, page background */
  --mask-deep: #0b2f23;   /* recessed panels */
  --trace: #24614b;       /* copper-trace lines, borders */
  --silk: #ecf2ea;        /* silkscreen white, main text */
  --silk-dim: #a9c1b2;    /* secondary text */
  --gold: #e3bb4e;        /* gold contacts: fast memory, focus, links */
  --ram: #8ec7e2;         /* system RAM */
  --over: #ff735f;        /* missing memory */

  --font: 'Archivo', system-ui, sans-serif;
  --measure: 68ch;
  --wrap: 72rem;
  font-size: 112.5%;
}

* { box-sizing: border-box; }
html { background: var(--mask); color: var(--silk); }
body {
  margin: 0;
  font-family: var(--font);
  font-variation-settings: 'wdth' 100;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: var(--silk); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.5rem 0; }
.brand {
  color: var(--silk);
  text-decoration: none;
  font-weight: 800;
  font-variation-settings: 'wdth' 125;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand span { color: var(--gold); }
.site-head nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.site-head nav a { color: var(--silk-dim); text-decoration: none; }
.site-head nav a:hover { color: var(--silk); }

/* The question */
.ask { padding: 2.5rem 0 3rem; }
.ask-line {
  margin: 0;
  max-width: 30ch;
  font-size: clamp(1.7rem, 3.6vw, 2.75rem);
  line-height: 1.45;
  font-weight: 600;
  font-variation-settings: 'wdth' 108;
  letter-spacing: -0.015em;
}
.ask-line select {
  appearance: none;
  font: inherit;
  font-variation-settings: inherit;
  color: var(--gold);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23e3bb4e' stroke-width='2.2'/%3E%3C/svg%3E") no-repeat right 0.1em center / 0.45em auto;
  border: 0;
  border-bottom: 3px solid var(--gold);
  padding: 0 0.7em 0 0.05em;
  margin: 0 0.1em;
  max-width: 100%;
  cursor: pointer;
}
.ask-line select:hover { color: var(--silk); }
.ask-line select:disabled { color: var(--silk-dim); border-bottom-style: dotted; cursor: not-allowed; }
.ask-line option, .ask-line optgroup { background: var(--mask-deep); color: var(--silk); font-size: 1rem; }

.ctx { display: flex; align-items: center; gap: 1rem; margin-top: 1.75rem; color: var(--silk-dim); font-size: 0.95rem; }
.ctx input { width: min(20rem, 55vw); accent-color: var(--gold); }
.ctx output { color: var(--silk); font-variant-numeric: tabular-nums; min-width: 3.5ch; }

/* The answer */
.verdict { margin-top: 2.75rem; display: grid; grid-template-columns: auto 1fr; gap: 0 2rem; align-items: center; }
.v-word {
  margin: 0;
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  line-height: 0.9;
  font-weight: 800;
  font-variation-settings: 'wdth' 125;
  letter-spacing: -0.03em;
  color: var(--gold);
}
[data-verdict='offload'] .v-word, [data-verdict='cpu'] .v-word { color: var(--ram); }
[data-verdict='no'] .v-word { color: var(--over); }
.v-text { margin: 0; max-width: 46ch; font-size: 1.15rem; }

/* Memory bar, drawn like a RAM stick */
.bar {
  display: flex;
  margin-top: 2.25rem;
  height: 3.75rem;
  gap: 4px;
}
.slot { position: relative; height: 100%; border: 2px solid; border-radius: 3px 3px 0 0; overflow: hidden; min-width: 6px; }
.slot .fill { position: absolute; inset: 0 auto 0 0; }
.slot-fast { border-color: var(--gold); }
.slot-fast .fill { background: var(--gold); }
.slot-slow { border-color: var(--ram); }
.slot-slow .fill { background: var(--ram); }
.slot-over {
  border: 2px dashed var(--over);
  background: repeating-linear-gradient(-45deg, transparent 0 7px, rgba(255, 115, 95, 0.55) 7px 10px);
}
/* gold edge-connector pins under the fast slot */
.slot-fast::after {
  content: '';
  position: absolute; left: 6px; right: 6px; bottom: -2px; height: 9px;
  background: repeating-linear-gradient(90deg, var(--mask) 0 3px, transparent 3px 11px);
  mix-blend-mode: normal;
}
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin-top: 0.75rem; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.legend .key { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.legend .key::before { content: ''; width: 0.8rem; height: 0.8rem; border-radius: 2px; background: currentColor; }
.legend .key-over::before { background: repeating-linear-gradient(-45deg, transparent 0 2px, currentColor 2px 4px); outline: 1px dashed currentColor; }
.note code { color: var(--silk); font-size: 0.85em; background: var(--mask-deep); padding: 0.1em 0.35em; border-radius: 3px; }
.key-fast { color: var(--gold); }
.key-slow { color: var(--ram); }
.key-over { color: var(--over); }

@media (prefers-reduced-motion: no-preference) {
  .slot, .slot .fill { transition: width 280ms ease-out; }
}

.note { margin-top: 1.25rem; color: var(--silk-dim); font-size: 0.95rem; max-width: var(--measure); }
.note p { margin: 0.35rem 0; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 1.25rem 2rem;
  margin: 2.25rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--trace);
}
.facts div { margin: 0; }
.facts dt { color: var(--silk-dim); font-size: 0.85rem; }
.facts dd { margin: 0.2rem 0 0; font-size: 1.35rem; font-weight: 700; font-variation-settings: 'wdth' 112; font-variant-numeric: tabular-nums; }

.next { margin-top: 1.75rem; max-width: var(--measure); }
.next p { margin: 0.5rem 0; }

/* Content sections */
.section { padding: 3.5rem 0; border-top: 1px solid var(--trace); }
.section h2 {
  margin: 0 0 1.25rem;
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  font-variation-settings: 'wdth' 115;
  letter-spacing: -0.01em;
}
.section > p, .prose p, .prose li { max-width: var(--measure); }
.prose h3 { font-size: 1.1rem; margin: 1.75rem 0 0.35rem; font-variation-settings: 'wdth' 108; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--trace); vertical-align: top; }
th { color: var(--silk-dim); font-weight: 500; font-size: 0.85rem; }
td.num, th.num { text-align: right; }
tbody tr:hover td { background: var(--mask-deep); }
.table-scroll { overflow-x: auto; }
.muted { color: var(--silk-dim); }

/* Model page */
.crumbs { font-size: 0.9rem; color: var(--silk-dim); padding-top: 1rem; }
.crumbs a { color: var(--silk-dim); }
.page-title {
  margin: 1rem 0 0.75rem;
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  line-height: 1.02;
  font-weight: 800;
  font-variation-settings: 'wdth' 122;
  letter-spacing: -0.025em;
}
.lede { font-size: 1.2rem; max-width: 56ch; margin: 0 0 1rem; }
.model-ask { padding-top: 1.5rem; }
.model-ask .ask-line { font-size: clamp(1.35rem, 2.6vw, 1.9rem); max-width: 40ch; }

.specs { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 2rem; margin: 0; }
.specs dt { color: var(--silk-dim); }
.specs dd { margin: 0; }

.help {
  margin: 1rem 0 3rem;
  padding: 2rem;
  background: var(--mask-deep);
  border-left: 4px solid var(--gold);
}
.help h2 { margin-top: 0; }
.help p { max-width: var(--measure); }

.site-foot { padding: 2.5rem 0 3rem; border-top: 1px solid var(--trace); color: var(--silk-dim); font-size: 0.9rem; }
.site-foot p { max-width: var(--measure); margin: 0.4rem 0; }

@media (max-width: 640px) {
  .wrap { padding: 0 1.1rem; }
  .site-head { flex-wrap: wrap; row-gap: 0.4rem; padding: 1.1rem 0; }
  .site-head nav { gap: 1rem; font-size: 0.9rem; }
  .ask { padding-top: 1.5rem; }
  .ask-line { max-width: none; font-size: 1.45rem; }
  .verdict { grid-template-columns: 1fr; gap: 0.75rem; margin-top: 2rem; }
  .bar { height: 3rem; }
  .facts { grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
  .facts dd { font-size: 1.15rem; }
  th, td { padding-right: 0.6rem; font-size: 0.9rem; }
  .help { padding: 1.4rem; }
}
