/* MixieWala
   Palette: brushed steel, deep ink, turmeric. Status colors carry meaning:
   leaf = works here, turmeric = check first, chili = don't.
   Type: Archivo variable; condensed widths for headings and rating plates, normal width for reading. */

@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --steel: #edf0f2;
  --plate: #d8dee2;
  --white: #ffffff;
  --ink: #16222c;
  --ink-2: #4a5965;
  --rule: #c3cbd1;
  --rivet: #7d8a93;
  --turmeric: #e9a800;
  --turmeric-bg: #fbecc2;
  --turmeric-ink: #5a4000;
  --leaf: #23652f;
  --leaf-bg: #dcefdf;
  --chili: #a3221b;
  --chili-bg: #f8e0dd;
  --measure: 66ch;
  --wide: 1140px;
  --cond: 74%;
}

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

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

body {
  margin: 0;
  background: var(--steel);
  color: var(--ink);
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-stretch: var(--cond); line-height: 1.05; margin: 0; letter-spacing: -0.005em; }
h1 { font-weight: 800; font-size: clamp(2.3rem, 5.4vw, 3.6rem); }
h2 { font-weight: 750; font-size: clamp(1.55rem, 3vw, 2rem); }
h3 { font-weight: 700; font-size: 1.25rem; }

/* ---------- header ---------- */
header.site {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 18px 24px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  border-bottom: 2px solid var(--ink);
}
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark .word { font-stretch: 68%; font-weight: 850; font-size: 1.75rem; line-height: 1; letter-spacing: -0.01em; }
.mark .volt { display: inline-flex; border: 2px solid var(--ink); border-radius: 4px; background: var(--turmeric); font-stretch: 70%; font-weight: 700; font-size: 0.8rem; line-height: 1; }
.mark .volt span { padding: 4px 6px; }
.mark .volt span + span { border-left: 2px solid var(--ink); }
nav.main { display: flex; flex-wrap: wrap; gap: 4px 20px; font-stretch: 85%; font-weight: 600; font-size: 0.98rem; }
nav.main a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
nav.main a:hover { border-bottom-color: var(--ink); }
nav.main a[aria-current='page'] { border-bottom-color: var(--turmeric); }

main { max-width: var(--wide); margin: 0 auto; padding: 0 24px 72px; }

.crumbs { font-size: 0.875rem; color: var(--ink-2); padding: 16px 0 0; }
.crumbs a { color: var(--ink-2); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: start;
  padding: 56px 0 64px;
}
.hero h1 { font-size: clamp(2.8rem, 6.6vw, 5rem); font-stretch: 66%; font-weight: 850; line-height: 0.95; max-width: 11ch; }
.hero .lede { margin-top: 22px; }
.hero-links { margin: 22px 0 0; font-weight: 600; }

.lede { font-size: 1.2rem; line-height: 1.5; max-width: 58ch; margin: 16px 0 0; }
.checked, .small { font-size: 0.875rem; color: var(--ink-2); }
.checked { margin: 12px 0 0; }

/* ---------- the rating plate ---------- */
.plate {
  position: relative;
  background-color: var(--plate);
  background-image:
    radial-gradient(circle, var(--rivet) 0 3.2px, var(--ink) 3.6px 4.4px, transparent 4.9px),
    radial-gradient(circle, var(--rivet) 0 3.2px, var(--ink) 3.6px 4.4px, transparent 4.9px),
    radial-gradient(circle, var(--rivet) 0 3.2px, var(--ink) 3.6px 4.4px, transparent 4.9px),
    radial-gradient(circle, var(--rivet) 0 3.2px, var(--ink) 3.6px 4.4px, transparent 4.9px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 3px);
  background-size: 12px 12px, 12px 12px, 12px 12px, 12px 12px, auto;
  background-position: top 9px left 9px, top 9px right 9px, bottom 9px left 9px, bottom 9px right 9px, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 30px 30px 28px;
}
.plate-head { margin: 0; font-stretch: 72%; font-weight: 800; font-size: 1.6rem; line-height: 1.1; }
.plate-help { margin: 8px 0 18px; font-size: 0.95rem; color: var(--ink-2); }
.plate-form .small { margin: 10px 2px 0; }

.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 5px; }
.field input, .field select {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 10px 12px;
}
.field input[name='plate'] { font-stretch: 78%; font-weight: 650; font-size: 1.35rem; letter-spacing: 0.01em; }
.field input::placeholder { color: #8a969f; font-weight: 500; }

.fills { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.fills button {
  font: inherit;
  font-stretch: 78%;
  font-weight: 650;
  font-size: 0.9rem;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 4px 9px;
  cursor: pointer;
}
.fills button:hover { background: var(--white); }

.pair { border: 0; padding: 0; margin: 4px 0 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pair legend { font-weight: 600; font-size: 0.9rem; padding: 0; margin-bottom: 6px; }

.go {
  font: inherit;
  font-stretch: 80%;
  font-weight: 750;
  font-size: 1.1rem;
  background: var(--turmeric);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 10px 22px;
  cursor: pointer;
}
.go:hover { background: #f2b823; }
.go:active { transform: translateY(1px); }

.verdict { margin-top: 18px; border: 2px solid var(--ink); border-radius: 6px; padding: 14px 16px; background: var(--white); }
.verdict:focus { outline: none; }
.verdict:focus-visible { outline: 3px solid var(--turmeric); }
.verdict.ok { background: var(--leaf-bg); border-color: var(--leaf); }
.verdict.check { background: var(--turmeric-bg); border-color: var(--turmeric-ink); }
.verdict.no { background: var(--chili-bg); border-color: var(--chili); }
.v-title { margin: 0; font-stretch: 76%; font-weight: 800; font-size: 1.3rem; line-height: 1.15; }
.v-text { margin: 6px 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .verdict:not([hidden]) { animation: stamp 180ms ease-out; }
  @keyframes stamp { from { transform: scale(0.98); opacity: 0.4; } to { transform: none; opacity: 1; } }
}

/* mini rating plate used in tables */
.chip {
  display: inline-flex;
  flex-wrap: nowrap;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--plate);
  font-stretch: 78%;
  font-weight: 650;
  font-size: 0.92rem;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}
.chip span { padding: 5px 7px; }
.chip span + span { border-left: 1.5px solid var(--ink); }
.chip.sm { font-size: 0.8rem; }
.chip.sm span { padding: 3px 5px; }
.chip.lg { font-size: 1.3rem; border-width: 2px; border-radius: 6px; }
.chip.lg span { padding: 9px 13px; }
.chip.lg span + span { border-left-width: 2px; }

.status {
  display: inline-block;
  font-stretch: 82%;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.2;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1.5px solid currentColor;
  white-space: nowrap;
}
.status.ok { color: var(--leaf); background: var(--leaf-bg); }
.status.check { color: var(--turmeric-ink); background: var(--turmeric-bg); }
.status.no { color: var(--chili); background: var(--chili-bg); }
.status.na { color: var(--ink-2); background: var(--white); }
.why { display: block; font-size: 0.85rem; color: var(--ink-2); margin-top: 6px; max-width: 32ch; }

/* ---------- home: shelf rows ---------- */
.shelf { padding: 8px 0 8px; }
.shelf h2 { margin-bottom: 14px; }
.rows { list-style: none; margin: 0; padding: 0; border-bottom: 2px solid var(--ink); }
.rows li a {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4px 28px;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}
.rows li:first-child a { border-top: 2px solid var(--ink); }
.r-name { font-stretch: 70%; font-weight: 800; font-size: 1.9rem; line-height: 1; }
.r-desc { color: var(--ink-2); }
.rows li a:hover .r-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }

.traps { padding: 32px 0 8px; }
.traps.prose { max-width: 980px; }
.traps dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 18px 0 0; }
.traps dl > dt { grid-row: 1; padding-top: 12px; border-top: 2px solid var(--ink); font-stretch: 76%; font-weight: 750; font-size: 1.25rem; line-height: 1.15; }
.traps dl > dd { grid-row: 2; margin: 0; color: var(--ink-2); }

.recent { padding: 40px 0 0; }
.recent h2 { margin-bottom: 16px; }

/* ---------- pages ---------- */
.page-head { padding: 28px 0 28px; max-width: 760px; }
.page-head h1 { max-width: 20ch; }

.tablewrap { background: var(--white); border: 1.5px solid var(--ink); border-radius: 6px; overflow-x: auto; margin: 8px 0 8px; }
table.specs { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
table.specs th { text-align: left; font-stretch: 80%; font-weight: 700; font-size: 0.9rem; color: var(--ink-2); padding: 12px 14px; border-bottom: 2px solid var(--ink); vertical-align: bottom; }
table.specs td { padding: 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.specs tbody tr:last-child td { border-bottom: 0; }
table.specs td.nw { white-space: nowrap; }
table.specs td.act { text-align: right; white-space: nowrap; vertical-align: middle; }
table.compare th[scope='row'] { color: var(--ink); border-bottom: 1px solid var(--rule); }
.pname { font-weight: 650; text-decoration: none; }
.pname:hover { text-decoration: underline; }
.pbrand { display: block; font-size: 0.85rem; color: var(--ink-2); margin-top: 2px; }

.buy {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font-stretch: 82%;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 9px 14px;
  border-radius: 4px;
  border: 2px solid var(--ink);
}
.buy:hover { background: #2b3c49; }
.buy.big { display: block; text-align: center; font-size: 1.1rem; padding: 13px 16px; margin: 20px 0 10px; background: var(--turmeric); color: var(--ink); }
.buy.big:hover { background: #f2b823; }

.prose { max-width: var(--measure); }
.prose h2 { margin: 48px 0 12px; }
.prose h3 { margin: 26px 0 6px; }
.prose p { margin: 0 0 14px; }
.prose .tablewrap { max-width: none; }
.checks { padding-left: 1.2em; margin: 8px 0 18px; }
.checks li { margin: 0 0 10px; padding-left: 4px; }
.checks li::marker { color: var(--ink); }

table.mini { border-collapse: collapse; margin: 6px 0 16px; background: var(--white); border: 1.5px solid var(--ink); }
table.mini th, table.mini td { padding: 8px 14px; border-bottom: 1px solid var(--rule); text-align: left; }
table.mini th { font-stretch: 80%; font-weight: 700; border-bottom: 2px solid var(--ink); }

dl.readplate { display: grid; grid-template-columns: 3.2rem 1fr; gap: 12px 16px; margin: 12px 0 8px; }
dl.readplate dt { font-stretch: 74%; font-weight: 800; font-size: 1.15rem; text-align: center; background: var(--plate); border: 1.5px solid var(--ink); border-radius: 4px; padding: 4px 0; align-self: start; }
dl.readplate dd { margin: 0; padding-top: 3px; }

.tool-page .plate-form { max-width: 620px; margin: 0 0 8px; }

.dish { padding: 18px 0 18px; }
.dish h2 { margin: 24px 0 8px; }
.dish > p { max-width: var(--measure); margin: 0 0 12px; }
.ml { font-stretch: 100%; font-weight: 500; font-size: 0.7em; color: var(--ink-2); margin-left: 8px; }

/* product page */
.product .page-head { padding-bottom: 20px; }
.hero-plate { margin: 18px 0 4px; }
.pgrid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.pgrid h2 { margin: 0 0 14px; font-size: 1.5rem; }
table.kv { width: 100%; border-collapse: collapse; background: var(--white); border: 1.5px solid var(--ink); border-radius: 6px; }
table.kv th { text-align: left; width: 34%; font-stretch: 82%; font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.kv td { padding: 11px 14px; border-bottom: 1px solid var(--rule); }
table.kv tr:last-child th, table.kv tr:last-child td { border-bottom: 0; }
.buybox { background: var(--white); border: 2px solid var(--ink); border-radius: 8px; padding: 24px; }
.buybox h3 { margin: 18px 0 6px; font-size: 1.1rem; }
.buybox p { margin: 0; }
.buybox .small { margin-top: 8px; }
.similar { margin-top: 48px; }
.similar ul { list-style: none; padding: 0; margin: 12px 0; }
.similar li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }

/* ---------- footer ---------- */
footer.site { background: var(--ink); color: #d3dbe0; margin-top: 40px; }
footer.site a { color: #ffffff; }
.foot-grid { max-width: var(--wide); margin: 0 auto; padding: 40px 24px 12px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.foot-grid nav { display: flex; flex-direction: column; gap: 8px; }
.foot-grid p { margin: 0 0 8px; max-width: 40ch; }
.foot-name { font-stretch: 68%; font-weight: 850; font-size: 1.5rem; color: var(--white); }
.disclose { max-width: var(--wide); margin: 0 auto; padding: 16px 24px 36px; font-size: 0.875rem; border-top: 1px solid #33424e; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 32px 0 44px; }
  .traps dl { grid-template-columns: 1fr; gap: 0; }
  .traps dl > dt, .traps dl > dd { grid-row: auto; }
  .traps dl > dd { margin-bottom: 20px; }
  .pgrid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .rows li a { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  header.site { padding: 14px 18px 10px; }
  nav.main { gap: 2px 14px; font-size: 0.92rem; }
  main { padding: 0 18px 56px; }
  .plate { padding: 26px 18px 20px; }
  .tablewrap { background: transparent; border: 0; overflow: visible; }
  table.specs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.specs, table.specs tbody, table.specs tr, table.specs td { display: block; width: 100%; }
  table.specs tr { background: var(--white); border: 1.5px solid var(--ink); border-radius: 6px; padding: 12px 14px; margin: 0 0 12px; }
  table.specs td { border: 0; padding: 4px 0; }
  table.specs td[data-label]:not([data-label='Model'])::before { content: attr(data-label); display: block; font-stretch: 80%; font-weight: 700; font-size: 0.8rem; color: var(--ink-2); }
  table.specs td.nw { white-space: nowrap; }
table.specs td.act { text-align: left; padding-top: 10px; }
  table.specs.compare tr { padding: 8px 14px; }
  table.specs.compare th { display: block; border: 0; padding: 4px 0 0; }
  .pair { grid-template-columns: 1fr; }
}
