/* Article: what hardware does a site need to self-host LLMs? Shared tokens, header, footer, chips, buttons and section type come from /site.css. */

/* cover: the article's core in its tray */
.tray { margin-top: clamp(8px, 2vw, 20px); }
.tray .ticks {
  height: 12px;
  background:
    repeating-linear-gradient(to right, rgb(var(--ink) / .55) 0 1px, transparent 1px 60px) left bottom / 100% 12px no-repeat,
    repeating-linear-gradient(to right, rgb(var(--ink) / .28) 0 1px, transparent 1px 12px) left bottom / 100% 6px no-repeat;
}
.tray .cover { display: block; width: 100%; height: clamp(84px, 15vw, 150px); object-fit: cover; background: rgb(var(--sand-light)); }
.traymeta { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 10px 0 0; }
.traymeta b { color: rgb(var(--brand)); font-weight: 600; }
.tagrow { margin-top: 12px; }

.opening { padding: clamp(28px, 6vw, 60px) 0 clamp(8px, 2vw, 20px); }
.opening h1 { margin: 0; max-width: 21ch; font-size: clamp(30px, 5.6vw, 60px); line-height: 1.03; letter-spacing: -.036em; font-weight: 700; text-wrap: balance; }
.basis { margin: clamp(18px, 3vw, 28px) 0 0; }
.intro { margin: 10px 0 0; max-width: 40ch; font-size: clamp(18px, 2.4vw, 23px); line-height: 1.34; letter-spacing: -.012em; font-weight: 500; }
.intro mark { background: none; color: rgb(var(--brand)); white-space: nowrap; }

/* the opening facts and the big numbers of the limits */
.facts { list-style: none; margin: clamp(26px, 4vw, 44px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 28px; border-top: 1px solid rgb(var(--ink)); }
.facts li { padding: 14px 0 16px; border-bottom: 1px solid rgb(var(--ink) / .14); font-size: 15px; line-height: 1.45; }
.facts li span { display: block; margin-bottom: 4px; }
.stats { list-style: none; margin: clamp(26px, 4vw, 44px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 28px; border-top: 1px solid rgb(var(--ink)); }
.stats li { padding: 14px 0 16px; border-bottom: 1px solid rgb(var(--ink) / .14); }
.stats b { display: block; font-size: clamp(32px, 5vw, 48px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; color: rgb(var(--brand)); }
.stats span { display: block; margin-top: 6px; max-width: 26ch; font-size: 14.5px; line-height: 1.4; color: rgb(var(--ink) / .78); }
.stats.limits b { font-size: clamp(22px, 3.2vw, 30px); color: rgb(var(--ink)); }
.cap { margin: 14px 0 0; max-width: 66ch; font-size: 14.5px; line-height: 1.5; color: rgb(var(--ink) / .74); }
.cap a { color: rgb(var(--brand)); }

/* the calculator */
.planner { margin-top: clamp(22px, 4vw, 36px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); border-top: 1px solid rgb(var(--ink)); }
body:not(.live) .planner { grid-template-columns: 1fr; }
body:not(.live) .result { border-left: 0; padding-left: 0; }
body:not(.live) .result .fig { max-width: 560px; }
body:not(.live) .budget, body:not(.live) .measured { display: none; }
.settings { padding: 20px clamp(0px, 3vw, 32px) 24px 0; min-width: 0; }
.settings label, .label-like { display: block; margin: 18px 0 7px; font-size: 13px; font-weight: 600; }
.settings > label:first-child { margin-top: 0; }
select, .stepper { width: 100%; min-width: 0; height: 44px; border: 1px solid rgb(var(--ink) / .22); border-radius: 4px; background: #fff; }
select { padding: 0 30px 0 11px; font-size: 14.5px; text-overflow: ellipsis; }
select:focus-visible, input:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid rgb(var(--brand)); outline-offset: 2px; }
.hint { margin: 7px 0 0; font-size: 12.5px; line-height: 1.5; color: rgb(var(--ink) / .62); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.stepper { display: flex; overflow: hidden; }
.stepper input { flex: 1; width: 0; border: 0; text-align: center; font-size: 15px; background: transparent; appearance: textfield; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.stepper button { flex: none; width: 40px; border: 0; background: transparent; font-size: 20px; color: rgb(var(--ink) / .7); cursor: pointer; }
.stepper button:hover { background: rgb(var(--sand-light)); }
.stepper button:disabled { opacity: .3; cursor: default; }
.machines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.machines button { min-height: 58px; padding: 8px 10px; border: 1px solid rgb(var(--ink) / .22); border-radius: 4px; background: #fff; text-align: left; cursor: pointer; font-size: 13px; line-height: 1.25; }
.machines button b { display: block; font-size: 14px; margin-bottom: 2px; }
.machines button span { color: rgb(var(--ink) / .62); font-size: 12px; }
.machines button[aria-checked="true"] { border-color: rgb(var(--ink)); background: rgb(var(--ink)); color: rgb(var(--paper)); }
.machines button[aria-checked="true"] span { color: rgb(var(--paper) / .72); }
details { margin-top: 20px; border-top: 1px solid rgb(var(--ink) / .14); }
summary { padding: 14px 0 0; cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary span::after { content: "+"; font-weight: 400; color: rgb(var(--ink) / .6); }
details[open] summary span::after { content: "−"; }

.result { padding: 20px 0 24px clamp(16px, 3vw, 32px); border-left: 1px solid rgb(var(--ink) / .14); min-width: 0; }
.price-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 18px; }
.price-row .label { margin: 0; }
.price { margin: 2px 0 0; font-size: clamp(36px, 5vw, 48px); line-height: 1.05; letter-spacing: -.04em; font-weight: 700; }
.parts { margin: 0 0 4px; font-size: 12.5px; line-height: 1.5; color: rgb(var(--ink) / .66); max-width: 34ch; }
.budget { position: relative; height: 6px; margin: 12px 0 22px; background: rgb(var(--ink) / .1); }
.budget i { position: absolute; inset: 0 auto 0 0; background: rgb(var(--olive)); transition: width .25s ease; }
.budget.over i { background: rgb(var(--brand)); }
.budget span { position: absolute; right: 0; top: 9px; font: 500 12px/1 var(--mono); color: rgb(var(--ink) / .6); }

.metrics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 22px; border-top: 1px solid rgb(var(--ink) / .14); }
.metrics li { padding: 14px 0 12px; border-bottom: 1px solid rgb(var(--ink) / .14); min-width: 0; }
.metrics span { display: block; font-size: 13px; font-weight: 600; }
.metrics em { font-style: normal; font-weight: 400; color: rgb(var(--ink) / .6); }
.metrics b { display: block; margin: 4px 0 2px; font-size: clamp(25px, 3.4vw, 32px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
.metrics small { display: block; font-size: 12px; line-height: 1.45; color: rgb(var(--ink) / .62); }

.fig { margin: 20px 0 0; }
.fig figcaption.label { margin-bottom: 8px; }
/* figures: a static SVG in a picture until the script swaps in the live one */
.fig picture, .fig img, .fig svg { display: block; width: 100%; height: auto; }
.wide-fig { margin-top: clamp(20px, 4vw, 32px); max-width: 720px; }
.static-note { margin: 0 0 12px; font-size: 13px; color: rgb(var(--ink) / .66); }
body.live .static-note { display: none; }
.loads { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.loads:empty { display: none; }
.loads .btn { padding: 9px 16px; font-size: 13px; background: rgb(var(--ink)); color: rgb(var(--paper)); }
.loads .btn:hover { background: rgb(var(--brand)); }


.verdict { margin: 18px 0 0; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; background: rgb(var(--olive) / .1); border-left: 3px solid rgb(var(--olive)); }
.verdict[data-kind="warn"] { background: rgb(var(--coral) / .16); border-color: rgb(var(--coral)); }
.verdict[data-kind="error"] { background: rgb(var(--brand) / .1); border-color: rgb(var(--brand)); }
.verdict ul { margin: 0; padding-left: 18px; }
.verdict:empty { display: none; }

.measured { margin-top: 20px; }
.measured ul { list-style: none; margin: 8px 0 0; padding: 0; }
.measured li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 12px; padding: 10px 0; border-top: 1px solid rgb(var(--ink) / .12); font-size: 13px; line-height: 1.45; }
.measured li > b { font-size: 21px; line-height: 1.1; letter-spacing: -.02em; color: rgb(var(--olive)); }
.measured li > b small { display: block; font: 500 9.5px/1.3 var(--mono); letter-spacing: .04em; color: rgb(var(--ink) / .6); }
.measured a { color: rgb(var(--brand)); text-underline-offset: 3px; }
.measured .none { display: block; color: rgb(var(--ink) / .62); }



/* method cards and the closing offer */
.cards { list-style: none; margin: clamp(20px, 4vw, 34px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 28px; }
.cards li { padding: 14px 0 18px; border-top: 1px solid rgb(var(--ink)); font-size: 14.5px; line-height: 1.45; color: rgb(var(--ink) / .78); }
.cards b { display: block; margin: 4px 0 6px; font-size: 17px; letter-spacing: -.01em; color: rgb(var(--ink)); }
.cards a { color: rgb(var(--brand)); }
.repo a { color: rgb(var(--brand)); }
.repo { margin: 18px 0 0; max-width: 62ch; font-size: 14.5px; color: rgb(var(--ink) / .7); }
.cta { margin-top: clamp(44px, 9vw, 96px); padding: clamp(24px, 5vw, 52px); background: rgb(var(--ink)); color: rgb(var(--paper)); }
.cta .label { color: rgb(var(--paper) / .72); }
.cta h2 { margin: 8px 0 0; max-width: 20ch; font-size: clamp(26px, 4.4vw, 42px); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; text-wrap: balance; }
.cta p { margin: 14px 0 22px; max-width: 46ch; color: rgb(var(--paper) / .72); }
.cta .btn { background: rgb(var(--brand)); color: #fff; }
.cta .btn:hover { background: rgb(var(--coral)); color: rgb(var(--ink)); }

@media (max-width: 860px) {
  .planner { grid-template-columns: 1fr; }
  .settings { padding-right: 0; }
  .result { padding-left: 0; border-left: 0; border-top: 1px solid rgb(var(--ink)); }
  select, .stepper input { font-size: 16px; }
}
@media (max-width: 420px) {
  .machines button { padding: 8px 7px; }
  .machines button span { font-size: 12px; }
  .metrics { gap: 0 14px; }
  .measured li { grid-template-columns: 54px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .budget i { transition: none; } }
