/* ============================================================
   eat.toys — one stylesheet, no build step, no external requests.
   Light is the base token set; dark redefines only the tokens.
   ============================================================ */

:root {
  --paper:        #fcfbfd;
  --surface:      #ffffff;
  --surface-sunk: #f4f1f7;
  --ink:          #1b1522;
  --ink-soft:     #4a4256;
  --ink-faint:    #736b80;
  --rule:         #e4dfea;
  --rule-strong:  #cdc5d6;

  --violet:       #6d3f8a;
  --violet-soft:  #f0e8f6;
  --intel:        #1f6bc4;
  --intel-soft:   #e6f0fb;
  --nvidia:       #4e8b06;
  --nvidia-soft:  #edf5e2;
  --amd:          #b03236;
  --amd-soft:     #fbeaea;
  --warn:         #a8570a;
  --warn-soft:    #fbf0e2;

  --code-bg:      #f6f3f9;
  --code-ink:     #2c2337;
  --code-str:     #2a6b4f;

  --shadow: 0 1px 2px rgba(27, 21, 34, .05), 0 8px 24px -12px rgba(27, 21, 34, .18);

  --step-size: clamp(1rem, .82rem + .9vw, 1.0625rem);
  --measure: 68ch;

  --serif: ui-serif, Iowan Old Style, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #141019;
    --surface:      #1c1724;
    --surface-sunk: #221c2b;
    --ink:          #ede9f2;
    --ink-soft:     #b7aec4;
    --ink-faint:    #8d8499;
    --rule:         #2e2739;
    --rule-strong:  #423851;

    --violet:       #c194de;
    --violet-soft:  #2a2033;
    --intel:        #74b3f5;
    --intel-soft:   #16243a;
    --nvidia:       #a5d962;
    --nvidia-soft:  #1d2914;
    --amd:          #ef8a8d;
    --amd-soft:     #331718;
    --warn:         #e0a55f;
    --warn-soft:    #2f2314;

    --code-bg:      #221b2b;
    --code-ink:     #ddd5e6;
    --code-str:     #8fd0ab;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -14px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-size);
  line-height: 1.6;
  margin: 0;
  padding: 0 1.25rem 4rem;
  -webkit-font-smoothing: antialiased;
}

.wrap { margin: 0 auto; max-width: var(--measure); }

code, pre, .mono { font-family: var(--mono); }

a { color: var(--violet); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

/* ---- Masthead ---------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
  padding: 3.5rem 0 2.5rem;
}
.masthead.home { padding-top: 4.5rem; }

.backlink { font-size: .82rem; margin: 0 0 1.75rem; }
.backlink a { color: var(--ink-faint); text-decoration: none; }
.backlink a:hover { color: var(--violet); text-decoration: underline; }

.eyebrow {
  color: var(--violet);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .13em;
  margin: 0 0 1.1rem;
  text-transform: uppercase;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.1rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.08;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.masthead.home h1 {
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2rem);
  margin-bottom: 0;
}

.standfirst {
  color: var(--ink-soft);
  font-size: 1.1em;
  margin: 0;
  text-wrap: pretty;
}

/* ---- Homepage ---------------------------------------------- */

.intro { margin-bottom: 3rem; }
main > section { margin-bottom: 3.25rem; }

.rubric {
  border-bottom: 1px solid var(--rule);
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  margin: 0 0 1.4rem;
  padding-bottom: .5rem;
  text-transform: uppercase;
}

.entries { list-style: none; margin: 0; padding: 0; }
.entries > li { margin-bottom: 2rem; }
.entries > li:last-child { margin-bottom: 0; }

.entry { display: block; text-decoration: none; }
.entry-title {
  color: var(--ink);
  display: block;
  font-family: var(--serif);
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.25;
  margin-bottom: .3rem;
  text-wrap: balance;
}
a.entry:hover .entry-title { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }

.entry-blurb {
  color: var(--ink-soft);
  display: block;
  font-size: .95rem;
  text-wrap: pretty;
}

.entries time {
  color: var(--ink-faint);
  display: block;
  font-size: .78rem;
  letter-spacing: .04em;
  margin-top: .45rem;
  text-transform: uppercase;
}

.linkrow { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: .7rem 0 0; }
.linkrow a { font-size: .92rem; }
.linkrow a::after { content: " →"; }

.chiprow { align-items: center; display: flex; flex-wrap: wrap; gap: .35rem; margin: .8rem 0 0; }
.chiprow-label {
  color: var(--ink-faint);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  margin-right: .3rem;
  text-transform: uppercase;
}
.chip {
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
  border-radius: 5px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  padding: .2em .45em;
  text-decoration: none;
}
.chip:hover { background: var(--violet-soft); border-color: var(--violet); color: var(--violet); }

/* ---- Article body ------------------------------------------ */

.article { counter-reset: step; }
.article > section { margin-bottom: 3.25rem; }

.article h2, .step > h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -.012em;
  line-height: 1.2;
  margin: 0 0 .35rem;
  text-wrap: balance;
}
.article > h2 { margin-top: 3.25rem; }
.article > h2:first-child { margin-top: 0; }

.article h3 {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -.005em;
  margin: 2rem 0 .5rem;
}

.article p { margin: 0 0 1rem; text-wrap: pretty; }
.article ul, .article ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.article li { margin-bottom: .4rem; }
.article li::marker { color: var(--ink-faint); }
.article hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

/* Steps number themselves off a counter, so reordering just works. */
.step > h2 { align-items: baseline; display: flex; gap: .7rem; }
.step > h2::before {
  background: var(--violet-soft);
  border-radius: 999px;
  color: var(--violet);
  content: counter(step);
  counter-increment: step;
  flex: none;
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.72rem;
  text-align: center;
  width: 1.72rem;
}
.kicker {
  color: var(--ink-faint);
  font-size: .82rem;
  letter-spacing: .04em;
  margin: 0 0 1.15rem 2.42rem;
  text-transform: uppercase;
}

/* ---- Code --------------------------------------------------- */

pre, .highlight pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--code-ink);
  font-size: .84rem;
  line-height: 1.62;
  margin: 0 0 1rem;
  overflow-x: auto;
  padding: .95rem 1.05rem;
  tab-size: 2;
}
.highlight { margin: 0 0 1rem; }
.highlight pre { margin: 0; }
pre code { background: none; border: 0; font-size: inherit; padding: 0; }
:not(pre) > code {
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: .87em;
  padding: .08em .34em;
  word-break: break-word;
}

/* Chroma classes, mapped onto the token palette. */
.highlight .c, .highlight .ch, .highlight .cm, .highlight .c1, .highlight .cs,
.highlight .cp, .highlight .cpf { color: var(--ink-faint); font-style: normal; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kt,
.highlight .nt { color: var(--violet); font-weight: 600; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sd,
.highlight .se, .highlight .sh, .highlight .si, .highlight .sx { color: var(--code-str); }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo { color: var(--intel); }
.highlight .nf, .highlight .nb { color: var(--ink); }
.highlight .err { color: inherit; background: none; }

/* ---- Callouts ----------------------------------------------- */

.note {
  background: var(--surface-sunk);
  border-left: 3px solid var(--rule-strong);
  border-radius: 0 7px 7px 0;
  margin: 0 0 1.15rem;
  padding: .9rem 1.05rem;
}
.note.warn   { background: var(--warn-soft);   border-left-color: var(--warn); }
.note.nvidia { background: var(--nvidia-soft); border-left-color: var(--nvidia); }
.note.amd    { background: var(--amd-soft);    border-left-color: var(--amd); }
.note.intel  { background: var(--intel-soft);  border-left-color: var(--intel); }
.note > :last-child { margin-bottom: 0; }
.note .label {
  color: var(--ink-faint);
  display: block;
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .09em;
  margin-bottom: .35rem;
  text-transform: uppercase;
}
.note.warn .label   { color: var(--warn); }
.note.nvidia .label { color: var(--nvidia); }
.note.amd .label    { color: var(--amd); }
.note.intel .label  { color: var(--intel); }

/* ---- Path cards --------------------------------------------- */

.paths {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  margin: 0 0 1.25rem;
}
.path {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem 1.3rem;
}
.path.intel  { border-top: 3px solid var(--intel); }
.path.nvidia { border-top: 3px solid var(--nvidia); }
.path.amd    { border-top: 3px solid var(--amd); }
.path h3 { margin-top: 0; }
.path.intel h3  { color: var(--intel); }
.path.nvidia h3 { color: var(--nvidia); }
.path.amd h3    { color: var(--amd); }
.path > :last-child { margin-bottom: 0; }
.path p { margin: 0 0 1rem; }
.val {
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: inline-block;
  font-family: var(--mono);
  font-size: .82rem;
  padding: .1em .4em;
}

/* ---- Vendor pills ------------------------------------------- */

.tag {
  border-radius: 999px;
  display: inline-block;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .07em;
  padding: .2em .6em;
  text-transform: uppercase;
  vertical-align: .12em;
}
.tag.intel  { background: var(--intel-soft);  color: var(--intel); }
.tag.nvidia { background: var(--nvidia-soft); color: var(--nvidia); }
.tag.amd    { background: var(--amd-soft);    color: var(--amd); }
.tag + .tag { margin-left: .3rem; }

/* ---- Tables -------------------------------------------------- */

.article table { border-collapse: collapse; display: block; font-size: .9rem; margin: 0 0 1.15rem; overflow-x: auto; width: 100%; }
.article th, .article td {
  border-bottom: 1px solid var(--rule);
  padding: .6rem .75rem;
  text-align: left;
  vertical-align: top;
}
.article th {
  color: var(--ink-faint);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.article td code { white-space: nowrap; }

/* ---- Footers -------------------------------------------------- */

.colophon {
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: .85rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
}
.colophon p { margin: 0; }

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: .82rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink-faint); }
.site-footer a:hover { color: var(--violet); }
