/* Shared structure for all six sites. Colour placeholders are resolved by scripts/build-css.js.
*/

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1f1e1a;
  background: #faf2f3;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.card pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ebay-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ebay-list a {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.ebay-list img {
  border-radius: 6px;
  object-fit: cover;
}

.ebay-list span strong {
  display: block;
}

.ebay-list span em {
  font-style: normal;
  font-weight: 700;
}

.ebay-fit {
  font-size: 12px;
}

.ebay-results {
  min-height: 120px;
}

.site-head {
  border-bottom: 2px solid #eb0a1e;
  background: #fbe9eb;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.site-head .nav { padding-top: 14px; padding-bottom: 10px; }
.site-head form.search { width: 100%; margin: 8px 0 0; }
.site-head .tagline { display: none; }
@media (min-width: 640px) {
  .site-head .nav { flex-wrap: nowrap; padding-bottom: 0; }
  .site-head .tagline { display: inline; }
  .site-head form.search { width: auto; margin: 0; }
}

.brand {
  display: inline-flex;
  line-height: 0;
}

.brand img {
  height: 42px;
  width: auto;
  display: block;
}

.brand:hover {
  opacity: .85;
}

.tagline {
  font-size: .88rem;
  color: #8a4a52;
}

main {
  padding-top: 28px;
  padding-bottom: 40px;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.hero {
  margin-bottom: 2px;
}

.lede {
  margin: 0 0 20px;
  color: #6f6d63;
  font-size: 1.02rem;
}

p {
  margin: .5em 0;
}

a {
  color: #23251d;
  text-decoration: underline;
  text-decoration-color: #eec3c7;
  text-underline-offset: 2px;
}

a:hover {
  color: #b00010;
  text-decoration-color: #b00010;
}

.nav a, .crumbs a, .chips a, .result, .btn, .brand {
  text-decoration: none;
}

.search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.searchbar {
  padding-bottom: 10px;
}

.site-head select {
  padding: 8px;
  font: inherit;
  color: inherit;
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #d9d6c8;
  border-radius: 6px;
  background: #fff;
  border-color: #eec3c7;
}

.search button {
  padding: 0 22px;
  font-size: 1rem;
  font-weight: 600;
  border: 0;
  border-radius: 6px;
  background: #23251d;
  color: #faf8f1;
  cursor: pointer;
}

.search button:hover {
  background: #3c3d35;
}

.search input:focus, .search button:focus-visible {
  outline: 2px solid #1f1e1a;
  outline-offset: 2px;
}

.results {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.result {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 2px 14px;
  background: #fff;
  border: 1px solid #e2dfd3;
  border-radius: 8px;
  padding: 13px 16px;
  text-decoration: none;
  color: inherit;
  border-color: #eec3c7;
}

.result:hover {
  border-color: #f0a6ad;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

.result code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #1f1e1a;
}

.result:hover code {
  color: #b00010;
}

.r-desc {
  font-weight: 600;
  color: #1f1e1a;
}

.r-cat {
  grid-column: 2;
  font-size: .82rem;
  color: #6f6d63;
}

.empty {
  color: #6f6d63;
  padding: 18px 0;
}

.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 12px;
  padding: 0;
  font-size: .9rem;
  color: #6f6d63;
}

.crumbs li {
  display: inline-flex;
  align-items: center;
}

.crumbs li + li::before {
  content: "\203A";
  margin: 0 8px;
  color: #a09d90;
  font-weight: 700;
}

.crumbs a {
  color: #23251d;
  text-decoration: underline;
  text-decoration-color: #eec3c7;
  text-underline-offset: 2px;
  padding: 4px 2px;
}

.crumbs a:hover {
  color: #b00010;
  text-decoration-color: #ff6b47;
}

.crumbs [aria-current="page"] {
  color: #1f1e1a;
  font-weight: 600;
}

.code-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.code-badge {
  background: #b00010;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 1.05rem;
  letter-spacing: .5px;
}

.code-meta dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 16px 0;
}
@media (min-width: 640px) {
  .code-meta dl { grid-template-columns: repeat(3, 1fr); }
}

.code-meta div {
  background: #fff;
  border: 1px solid #e2dfd3;
  border-radius: 8px;
  padding: 11px 13px;
  border-color: #eec3c7;
}

.code-meta dt {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #6f6d63;
}

.code-meta dd {
  margin: 4px 0 0;
  font-weight: 600;
  font-size: .9rem;
}

.card {
  background: #fff;
  border: 1px solid #e2dfd3;
  border-radius: 8px;
  padding: clamp(16px, 2.5vw, 24px);
  margin: 14px 0;
  border-color: #eec3c7;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.note {
  font-size: .88rem;
  color: #6f6d63;
  background: #fdf3f4;
  border: 1px solid #ecd9a8;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0 0 12px;
  border-color: #eec3c7;
}

.checks, .card ol {
  margin: 0;
  padding-left: 22px;
}

.checks li, .card ol li {
  margin: 6px 0;
}

.card ol li::marker {
  color: #b00010;
  font-weight: 700;
}

.ad {
  margin: 14px 0;
  border-color: #eec3c7;
}

.adsbygoogle {
  display: block;
}

.disclosure {
  font-size: .78rem;
  margin: .8em 0 0;
  opacity: .85;
}

.affiliate {
  background: #fdf3f4;
  border: 1px solid #ecd9a8;
  border-radius: 8px;
  padding: 16px 18px;
  margin: 14px 0;
  border-color: #eec3c7;
}

.affiliate p {
  margin: 0 0 12px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  background: #b00010;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover {
  background: #eb0a1e;
  color: #fff;
}

.related {
  margin: 18px 0 6px;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.chips a {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  background: #fff;
  border: 1px solid #e2dfd3;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: #1f1e1a;
  font-size: .9rem;
  border-color: #eec3c7;
}

.chips a:hover {
  border-color: #b00010;
  color: #b00010;
}

.map-sys {
  margin: 26px 0 8px;
}

.map-sys-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  --accent: #b09a7a;
}

.sys-P {
  --accent: #ffb020;
}

.sys-N {
  --accent: #65a5a5;
}

.sys-C {
  --accent: #c2a06b;
}

.sys-B {
  --accent: #9aa3c9;
}

.sys-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.sys-count {
  margin-left: auto;
  font-size: .78rem;
  font-weight: 500;
  color: #6f6d63;
}

.map-nodes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .map-nodes { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .map-nodes { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

.map-node {
  background: #fff;
  border: 1px solid #e2dfd3;
  border-radius: 10px;
  border-left: 4px solid var(--accent, #b09a7a);
  padding: 12px 16px;
}

.map-node summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  font-weight: 600;
}

.map-node summary::-webkit-details-marker {
  display: none;
}

.map-node summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 16px;
  text-align: center;
  border-radius: 4px;
  background: #f1eee2;
  font-weight: 700;
  color: #6f6d63;
  font-size: .95rem;
}

.map-node[open] summary::before {
  content: "-";
}

.node-count {
  margin-left: auto;
  font-size: .78rem;
  font-weight: 500;
  color: #6f6d63;
}

.map-node .chips {
  margin-top: 12px;
}

.site-foot {
  background: #20090b;
  color: #d8b8bc;
  font-size: .85rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding-top: 30px;
  padding-bottom: 24px;
}
@media (min-width: 640px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .foot-grid { grid-template-columns: 1fr 1.5fr 1.4fr; gap: 28px; }
}

.foot-logo {
  height: 40px;
  width: auto;
  opacity: .9;
}

.foot-brand p {
  max-width: 36ch;
  margin: 10px 0 0;
}

.site-foot nav h2 {
  color: #f0a6ad;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 0 0 12px;
}

.site-foot nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-foot nav a {
  color: #ecd0d3;
  text-decoration: none;
}

.site-foot nav a:hover {
  color: #f0a6ad;
}

.site-foot nav li span {
  color: #c9a4a8;
  font-size: .8rem;
}

.foot-pop li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.foot-legal {
  border-top: 1px solid #3a3c33;
  padding: 14px 0 18px;
  border-top-color: #4a1d22;
}

.foot-legal .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.foot-legal p {
  margin: 0;
}

.site-head .search input,
.site-head .search button,
.site-head select,
.btn,
.chips a { min-height: 44px; }
.site-foot nav a { display: inline-flex; align-items: center; min-height: 32px; }
.site-head .search input, .site-head .search button, .site-head select { display: inline-flex; align-items: center; }
.site-head .search input { min-width: 9em; }
.card table { display: block; overflow-x: auto; white-space: nowrap; }

::placeholder {
  color: #6f6d63;
}

@media print {
.site-head, .site-foot, .crumbs, .search, .searchbar, .affiliate, .related, .results, .chips { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .wrap { max-width: none; padding: 0; }
  main { padding: 0; }
  .card { border: 0; border-radius: 0; padding: 0 0 10px; margin: 0 0 12px; break-inside: avoid; }
  .card h2 { font-size: 1.05rem; }
  h1 { font-size: 1.4rem; }
  a { color: #000; text-decoration: none; }
  .checks li, .card ol li { margin: 3px 0; }
}
