:root {
  --bg: #f3efe6;
  --paper: #fbf8f2;
  --ink: #1c1916;
  --muted: #5c564c;
  --faint: #8a8376;
  --rule: #d8d0c2;
  --rule-strong: #1c1916;
  --avoid: #9c1c1c;
  --avoid-bg: #f7e6e3;
  --caution: #8a5510;
  --caution-bg: #f5edd9;
  --typical: #21543a;
  --typical-bg: #e3eee8;
  --link: #163f73;
  --link-hover: #9c1c1c;
  --placeholder: #ece6da;
  --placeholder-ink: #4d473e;
  --max: 72rem;
  --prose: 42rem;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", Times, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }

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

header.site {
  border-bottom: 1px solid var(--rule-strong);
  padding: 1.1rem 0 1rem;
  background: var(--bg);
}
header.site .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.masthead {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
}
.masthead:hover { color: var(--ink); }
.tagline { color: var(--muted); font-size: 0.85rem; margin: 0.2rem 0 0; }
nav.site { display: flex; flex-wrap: wrap; gap: 0.65rem 1.1rem; font-size: 0.92rem; }
nav.site a { color: var(--ink); text-decoration: none; }
nav.site a:hover { text-decoration: underline; }
nav.site a[aria-current="page"] { font-weight: 650; text-decoration: underline; }

footer.site {
  margin-top: 3.5rem;
  border-top: 1px solid var(--rule-strong);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}
footer.site p { margin: 0.4rem 0; }
footer .sources a { margin-right: 0.9rem; }

h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); margin: 1.6rem 0 0.6rem; }
h2 { font-size: 1.55rem; margin: 2.2rem 0 0.7rem; padding-top: 0.4rem; border-top: 1px solid var(--rule); }
h3 { font-size: 1.2rem; margin: 1.4rem 0 0.5rem; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.4rem; max-width: var(--prose); }
.meta { color: var(--faint); font-size: 0.88rem; margin-bottom: 1.4rem; }

/* Verdict */
.verdict {
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  padding: 1.1rem 1.2rem 1.15rem;
  margin: 1.2rem 0 1.6rem;
}
.verdict .kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.verdict .years {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  margin: 0 0 0.45rem;
}
.verdict .years .avoid-yr { color: var(--avoid); font-weight: 700; }
.verdict p { margin: 0; color: var(--muted); max-width: 50rem; }

/* Model cards on home */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 0.9rem;
  margin: 1.2rem 0 2rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1rem 1.05rem 1.1rem;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card:hover { border-color: var(--ink); color: inherit; }
.card h2 { border: 0; margin: 0 0 0.3rem; padding: 0; font-size: 1.35rem; }
.card .avoid-line { color: var(--avoid); font-weight: 650; margin: 0.35rem 0; }
.card p { margin: 0.25rem 0; color: var(--muted); font-size: 0.95rem; }
.card .cta { margin-top: 0.7rem; font-size: 0.9rem; color: var(--link); }

/* Bars */
.chart { margin: 1rem 0 1.6rem; }
.bar-row {
  display: grid;
  grid-template-columns: 3.2rem 1fr 3.6rem;
  gap: 0.55rem;
  align-items: center;
  margin: 0.22rem 0;
  font-size: 0.88rem;
}
.bar-row .yr { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
.bar-track { background: #e8e1d4; height: 1.15rem; position: relative; }
.bar-fill { height: 100%; display: block; min-width: 0; }
.bar-fill.Avoid { background: var(--avoid); }
.bar-fill.Caution { background: #c4892a; }
.bar-fill.Typical { background: #4a6d5c; }
.bar-row .n { font-variant-numeric: tabular-nums; color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; font-size: 0.85rem; color: var(--muted); margin: 0 0 0.8rem; }
.legend i { display: inline-block; width: 0.75rem; height: 0.75rem; margin-right: 0.3rem; vertical-align: -0.05rem; }
.legend i.Avoid { background: var(--avoid); }
.legend i.Caution { background: #c4892a; }
.legend i.Typical { background: #4a6d5c; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0.6rem 0 1.4rem; border: 1px solid var(--rule); background: var(--paper); }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
th, td { padding: 0.45rem 0.6rem; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th:first-child, td:first-child, th.left, td.left { text-align: left; }
thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 650;
  color: var(--muted);
  background: #f0ebe1;
  position: sticky;
  top: 0;
}
tr.Avoid td { background: var(--avoid-bg); }
tr.Caution td { background: var(--caution-bg); }
caption { text-align: left; font-size: 0.88rem; color: var(--muted); padding: 0.6rem 0.6rem 0.2rem; caption-side: top; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 0.15rem;
}
.badge.Avoid { background: var(--avoid); color: #fff; }
.badge.Caution { background: var(--caution-bg); color: var(--caution); border: 1px solid #dfc48a; }
.badge.Typical { background: var(--typical-bg); color: var(--typical); }

.components { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.4rem 1.2rem; margin: 0.6rem 0 1.2rem; }
.comp { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dotted var(--rule); padding: 0.35rem 0; }
.comp .name { font-size: 0.95rem; }
.comp .n { font-variant-numeric: tabular-nums; color: var(--muted); }

/* Recalls */
.recall {
  border-top: 1px solid var(--rule);
  padding: 0.85rem 0 0.7rem;
}
.recall h3 { margin: 0 0 0.25rem; font-family: var(--sans); font-size: 1rem; letter-spacing: 0; }
.recall .meta-line { font-size: 0.88rem; color: var(--muted); margin: 0 0 0.35rem; }
.recall p { margin: 0.25rem 0; font-size: 0.95rem; }
.flag {
  display: inline-block;
  background: var(--avoid);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  margin-left: 0.35rem;
}
.year-block h3 { font-family: var(--serif); margin-top: 1.6rem; }

/* Placeholders */
.placeholders { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.8rem; margin: 1rem 0 2rem; }
.ph {
  border: 2px dashed #b7ae9e;
  background: repeating-linear-gradient(-45deg, var(--placeholder), var(--placeholder) 10px, #e6dfd2 10px, #e6dfd2 20px);
  color: var(--placeholder-ink);
  padding: 1.1rem 1rem;
  min-height: 7.5rem;
}
.ph strong { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.35rem; }
.ph p { margin: 0; font-size: 0.92rem; }

.note, .gap {
  background: var(--paper);
  border-left: 3px solid var(--rule-strong);
  padding: 0.7rem 1rem;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.related { margin: 1rem 0 1.5rem; }
.related li { margin: 0.3rem 0; }

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .bar-row { grid-template-columns: 2.6rem 1fr 3rem; font-size: 0.8rem; }
  th, td { padding: 0.4rem 0.45rem; }
}
