/* Infiniti Hub — single stylesheet. No external resources, no tracking. */

:root {
  --sand: #FBF7F1;
  --surface: #FFFFFF;
  --tint: #F3E9DC;
  --tint-deep: #EADCC9;
  --ink: #241E1A;
  --body: #39302A;
  --muted: #5B524A;
  --line: #DFD3C3;
  --clay: #8E4324;
  --clay-deep: #6A2F16;
  --moss: #3C5744;
  --radius: 4px;
  --step: 8px;
  --measure: 68ch;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--sand);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 50;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */

.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--clay);
  color: #fff;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.04em;
  flex: none;
}

.brand-text {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.brand-sub {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.nav-toggle {
  display: none;
  font: inherit;
  font-size: 15px;
  background: var(--tint);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 14px;
  cursor: pointer;
}

.primary ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.primary a {
  display: block;
  padding: 8px 12px;
  color: var(--body);
  text-decoration: none;
  font-size: 15.5px;
  border-radius: var(--radius);
}

.primary a:hover { background: var(--tint); color: var(--clay-deep); }
.primary a[aria-current="page"] {
  background: var(--tint);
  color: var(--clay-deep);
  box-shadow: inset 0 -2px 0 var(--clay);
}

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 56px;
}

.layout-single {
  display: block;
  padding-top: 40px;
  padding-bottom: 56px;
}

.side {
  position: sticky;
  top: 20px;
  border-left: 3px solid var(--tint-deep);
  padding-left: 18px;
}

.side h2 {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.side ul { list-style: none; margin: 0 0 24px; padding: 0; }
.side li { margin-bottom: 2px; }

.side a {
  display: block;
  padding: 6px 8px;
  font-size: 15px;
  color: var(--body);
  text-decoration: none;
  border-radius: var(--radius);
  line-height: 1.4;
}

.side a:hover { background: var(--tint); color: var(--clay-deep); }
.side a[aria-current="page"] { background: var(--tint-deep); color: var(--ink); font-weight: 600; }

main { min-width: 0; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.22;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.52rem; margin-top: 42px; }
h3 { font-size: 1.18rem; margin-top: 30px; }
h4 { font-size: 1.03rem; margin-top: 22px; }

p, ul, ol, dl, table { max-width: var(--measure); }
p { margin: 0 0 18px; }

main ul, main ol { margin: 0 0 18px; padding-left: 22px; }
main li { margin-bottom: 8px; }

a { color: var(--clay-deep); }
a:hover { color: var(--clay); }

:focus-visible {
  outline: 3px solid var(--moss);
  outline-offset: 2px;
}

.lede {
  font-size: 1.12rem;
  color: var(--body);
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 26px;
}

.kicker {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0 0 10px;
  font-weight: 600;
}

.eff-date {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ---------- Hero summary card ---------- */

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--clay);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 36px;
}

.hero h1 { font-size: 2.3rem; max-width: 22ch; }
.hero p { max-width: 62ch; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
  max-width: none;
}

.hero-facts div { padding-right: 20px; }

.hero-facts dt {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.hero-facts dd { margin: 0 0 14px; font-size: 15.5px; }

/* ---------- Disclosure ---------- */

.disclosure {
  background: var(--tint);
  border: 1px solid var(--tint-deep);
  border-left: 5px solid var(--clay);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 36px;
}

.disclosure h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-family: var(--sans);
  font-weight: 700;
}

.disclosure p { margin-bottom: 12px; max-width: 72ch; }
.disclosure p:last-child { margin-bottom: 0; }

.aff {
  margin: 24px 0 26px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-width: var(--measure);
}

.aff-link {
  display: inline-block;
  background: var(--clay);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 16px;
}

.aff-link:hover { background: var(--clay-deep); color: #fff; text-decoration: underline; }

.aff-note {
  display: block;
  margin-top: 12px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- Boxes ---------- */

.callout, .watch, .method {
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 26px 0;
  max-width: var(--measure);
}

.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--moss); }
.watch { background: #FDF3EC; border: 1px solid var(--tint-deep); border-left: 4px solid var(--clay); }
.method { background: var(--tint); border: 1px solid var(--tint-deep); }

.callout h3, .watch h3, .method h3 {
  margin-top: 0;
  font-size: 1.05rem;
  font-family: var(--sans);
  font-weight: 700;
}

.callout p:last-child, .watch p:last-child, .method p:last-child,
.callout ul:last-child, .watch ul:last-child, .method ul:last-child { margin-bottom: 0; }

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

.table-scroll {
  overflow-x: auto;
  margin: 24px 0 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 540px;
  max-width: none;
  font-size: 15.5px;
}

caption {
  text-align: left;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  background: var(--tint);
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; color: var(--ink); }

/* ---------- Definition lists ---------- */

.defs { max-width: var(--measure); margin: 20px 0 26px; }
.defs dt {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--ink);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.defs dt:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.defs dd { margin: 6px 0 0; }

/* ---------- Checklist ---------- */

.checklist { list-style: none; padding: 0; max-width: var(--measure); }
.checklist li {
  position: relative;
  padding: 10px 0 10px 34px;
  border-bottom: 1px solid var(--line);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--clay);
  border-radius: 2px;
}

/* ---------- Accordion ---------- */

.acc { max-width: var(--measure); border-top: 1px solid var(--line); margin: 22px 0 28px; }
.acc-item { border-bottom: 1px solid var(--line); }

.acc-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  font-family: var(--serif);
  font-size: 1.06rem;
  color: var(--ink);
  padding: 16px 40px 16px 0;
  cursor: pointer;
  position: relative;
}

.acc-btn:hover { color: var(--clay-deep); }

.acc-btn::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-size: 22px;
  color: var(--clay);
  line-height: 1;
}

.acc-btn[aria-expanded="true"]::after { content: "\2212"; }
.acc-panel { padding: 0 0 18px; }
.acc-panel[hidden] { display: none; }

/* ---------- Card grid ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 24px 0 30px;
  max-width: none;
}

.cards li { margin: 0; }

.card {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--body);
}

.card:hover { border-color: var(--clay); background: #fff; }

.card strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 8px;
  font-weight: 400;
}

.card span { display: block; font-size: 15px; color: var(--muted); line-height: 1.5; }

/* ---------- Glossary strip ---------- */

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 18px 0 28px;
  max-width: none;
}

.strip li { margin: 0; }

.strip a {
  display: block;
  font-size: 14.5px;
  padding: 6px 12px;
  background: var(--tint);
  border: 1px solid var(--tint-deep);
  border-radius: 999px;
  text-decoration: none;
  color: var(--clay-deep);
}

.strip a:hover { background: var(--tint-deep); }

/* ---------- Figure / SVG ---------- */

figure { margin: 26px 0; max-width: var(--measure); }
figure svg { display: block; width: 100%; height: auto; }
figcaption { font-size: 14.5px; color: var(--muted); margin-top: 10px; }

/* ---------- Source list ---------- */

.sources { font-size: 15.5px; }
.sources li { margin-bottom: 10px; }

/* ---------- Footer ---------- */

.site-foot {
  background: var(--ink);
  color: #E8DFD5;
  padding: 44px 0 36px;
  font-size: 15px;
  line-height: 1.6;
}

.site-foot a { color: #F0D9C7; }
.site-foot a:hover { color: #fff; }
.site-foot p { max-width: 78ch; margin: 0 0 4px; }

.pub { margin-bottom: 20px; }
.pub-name { font-family: var(--serif); font-size: 1.25rem; color: #fff; margin-bottom: 6px; }

.foot-nav {
  margin: 0 0 20px;
  padding: 16px 0;
  border-top: 1px solid #40352E;
  border-bottom: 1px solid #40352E;
}

.tm { font-size: 14px; color: #CBBEB2; margin-bottom: 16px; }
.rev { font-size: 14px; color: #CBBEB2; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 32px; }
  .side { position: static; border-left: 0; border-top: 3px solid var(--tint-deep); padding-left: 0; padding-top: 18px; }
  .side ul { margin-bottom: 14px; }
}

@media (max-width: 680px) {
  body { font-size: 16.5px; }
  h1 { font-size: 1.72rem; }
  .hero h1 { font-size: 1.8rem; }
  h2 { font-size: 1.35rem; }
  .hero { padding: 24px 20px; }
  .nav-toggle { display: block; }
  .primary { display: none; width: 100%; }
  .primary.is-open { display: block; }
  .primary ul { flex-direction: column; gap: 0; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; }
  .primary a { padding: 11px 8px; }
  .aff-link { display: block; text-align: center; }
}

/* ---------- Inline code ---------- */

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--tint);
  border: 1px solid var(--tint-deep);
  border-radius: 3px;
  padding: 1px 5px;
}
