/* Momentum Space - single stylesheet for the whole site. */

:root {
  --paper: #f6f3ea;
  --panel: #fffdf7;
  --ink: #17211c;
  --ink-soft: #46514a;
  --line: #d7cfbd;
  --line-soft: #e6dfd0;
  --pine: #14493c;
  --pine-dark: #0d3328;
  --clay: #9c4119;
  --sand: #ece4d1;
  --radius: 3px;
  --measure: 68ch;
  --sans: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Spectral, Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.68;
  overflow-wrap: break-word;
}

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

/* ---------- links and focus ---------- */

a { color: var(--pine); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--clay); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--pine); color: #fff; padding: 12px 18px; z-index: 50;
  font-family: var(--sans); text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */

.site-head {
  background: var(--pine);
  color: #f2efe6;
  border-bottom: 4px solid var(--pine-dark);
}
.head-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 14px; padding-bottom: 14px; }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-right: auto; }
.brand-mark {
  font-family: var(--sans); font-weight: 700; font-size: 17px; letter-spacing: 0.06em;
  border: 2px solid rgba(255,255,255,0.7); border-radius: var(--radius);
  padding: 6px 8px; line-height: 1;
}
.brand-text { font-family: var(--sans); font-weight: 600; font-size: 19px; line-height: 1.2; display: block; }
.brand-sub { display: block; font-weight: 400; font-size: 12.5px; letter-spacing: 0.01em; color: #cfe0d6; margin-top: 3px; }
.brand:hover .brand-text { text-decoration: underline; }

/* ---------- navigation ---------- */

.nav-toggle {
  display: none;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.6); border-radius: var(--radius);
  padding: 9px 13px; cursor: pointer; align-items: center; gap: 9px;
}
.bars { display: inline-block; width: 16px; height: 2px; background: #fff; position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: #fff; }
.bars::before { top: -5px; }
.bars::after { top: 5px; }

.nav-list { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; }
.nav-group { position: relative; }

.nav-sub-toggle, .nav-flat {
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  color: #eef3ef; background: transparent; border: 0; border-radius: var(--radius);
  padding: 9px 11px; cursor: pointer; text-decoration: none; display: inline-block;
}
.nav-sub-toggle::after { content: ""; display: inline-block; margin-left: 7px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.nav-sub-toggle:hover, .nav-flat:hover, .nav-sub-toggle[aria-expanded="true"] { background: var(--pine-dark); color: #fff; }
.nav-sub-toggle.is-here, .nav-flat[aria-current="page"] { background: var(--pine-dark); color: #fff; box-shadow: inset 0 -3px 0 var(--clay); }

.nav-sub {
  list-style: none; margin: 0; padding: 6px;
  position: absolute; top: 100%; left: 0; min-width: 258px; z-index: 40;
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--clay);
  border-radius: var(--radius); display: none;
}
.nav-sub.is-open { display: block; }
.nav-sub a {
  display: block; padding: 8px 10px; font-family: var(--sans); font-size: 15px;
  color: var(--ink); text-decoration: none; border-radius: 2px;
}
.nav-sub a:hover { background: var(--sand); color: var(--pine-dark); text-decoration: underline; }
.nav-sub a[aria-current="page"] { background: var(--sand); font-weight: 600; }

/* ---------- layout ---------- */

main { display: block; }
.page { padding: 34px 0 10px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }

@media (min-width: 950px) {
  .layout { grid-template-columns: minmax(0, 1fr) 262px; align-items: start; }
  .layout > .toc { grid-column: 2; grid-row: 1; position: sticky; top: 18px; }
  .layout > article { grid-column: 1; grid-row: 1; }
}

article { max-width: var(--measure); }
.page-wide article { max-width: none; }

/* ---------- typography ---------- */

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 600; color: var(--pine-dark); line-height: 1.24; }
h1 { font-size: 2.05rem; margin: 0 0 14px; letter-spacing: -0.01em; }
h2 { font-size: 1.42rem; margin: 2.1em 0 0.5em; padding-top: 0.5em; border-top: 1px solid var(--line-soft); }
h3 { font-size: 1.12rem; margin: 1.7em 0 0.4em; }
h4 { font-size: 1rem; margin: 1.4em 0 0.3em; }
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.35em; }
li { margin-bottom: 0.45em; }
strong { font-weight: 600; }

.kicker {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--clay); margin: 0 0 9px;
}
.lede { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 1.4em; }
.meta { font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft); margin: 0 0 1.6em; }

/* ---------- table of contents ---------- */

.toc { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--pine); border-radius: var(--radius); padding: 15px 17px; }
.toc-h { font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 9px; color: var(--clay); }
.toc-list { list-style: decimal; margin: 0; padding-left: 1.2em; font-family: var(--sans); font-size: 14px; line-height: 1.4; }
.toc-list li { margin-bottom: 8px; }
.toc-list a { color: var(--ink); text-decoration: none; }
.toc-list a:hover { color: var(--clay); text-decoration: underline; }

/* ---------- panels ---------- */

.disclosure {
  background: #fdf3e3; border: 1px solid #dcbc8c; border-left: 5px solid var(--clay);
  border-radius: var(--radius); padding: 18px 20px; margin: 0 0 30px;
}
.disclosure h2 { font-size: 1.08rem; margin: 0 0 8px; border: 0; padding: 0; color: var(--clay); }
.disclosure p { margin-bottom: 0.7em; font-size: 1rem; }
.disclosure p:last-child { margin-bottom: 0; }

.callout { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--pine); border-radius: var(--radius); padding: 16px 20px; margin: 1.7em 0; }
.callout h3 { margin-top: 0; font-size: 1.02rem; }
.callout p:last-child, .callout ul:last-child, .callout ol:last-child { margin-bottom: 0; }

.watch { background: #fbf2ee; border: 1px solid #e2c3b4; border-left: 5px solid var(--clay); border-radius: var(--radius); padding: 16px 20px; margin: 1.7em 0; }
.watch h3 { margin-top: 0; font-size: 1.02rem; color: var(--clay); }
.watch p:last-child, .watch ul:last-child { margin-bottom: 0; }

.method { background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 1.7em 0; }
.method h3 { margin-top: 0; font-size: 1.02rem; }
.method p:last-child, .method ul:last-child { margin-bottom: 0; }

.quick { border: 1px dashed var(--line); background: var(--panel); border-radius: var(--radius); padding: 14px 20px; margin: 0 0 1.8em; }
.quick p { margin: 0; }
.quick .quick-h { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--clay); margin-bottom: 6px; }

/* ---------- affiliate blocks ---------- */

.aff { margin: 1.8em 0; padding: 16px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.aff-note { font-size: 0.97rem; color: var(--ink-soft); margin-bottom: 0.9em; }
.aff-btn {
  display: inline-block; font-family: var(--sans); font-size: 15.5px; font-weight: 600;
  background: var(--pine); color: #fff; text-decoration: none;
  padding: 12px 20px; border-radius: var(--radius); border: 1px solid var(--pine-dark);
}
.aff-btn:hover { background: var(--pine-dark); color: #fff; text-decoration: underline; }
.aff p:last-child { margin-bottom: 0; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 520px; background: var(--panel); font-size: 0.95rem; }
caption { font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft); text-align: left; padding: 10px 14px; background: var(--sand); border-bottom: 1px solid var(--line); }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
thead th { font-family: var(--sans); font-size: 13.5px; background: var(--sand); color: var(--pine-dark); border-bottom: 1px solid var(--line); }
tbody th { font-weight: 600; font-family: var(--sans); font-size: 14.5px; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* ---------- definition lists ---------- */

.defs { margin: 1.5em 0; }
.defs dt { font-family: var(--sans); font-weight: 600; font-size: 1rem; color: var(--pine-dark); margin-top: 1.05em; }
.defs dd { margin: 0.25em 0 0; padding-left: 0; }
.defs dd + dt { border-top: 1px solid var(--line-soft); padding-top: 1.05em; }

/* ---------- accordion ---------- */

.acc { border: 1px solid var(--line); border-radius: var(--radius); margin: 1.6em 0; background: var(--panel); }
.acc-item + .acc-item { border-top: 1px solid var(--line-soft); }
.acc-btn {
  width: 100%; text-align: left; background: transparent; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--pine-dark);
  padding: 15px 46px 15px 18px; position: relative; line-height: 1.4;
}
.acc-btn:hover { background: var(--sand); }
.acc-btn::after {
  content: ""; position: absolute; right: 18px; top: 21px;
  width: 9px; height: 9px; border-right: 2px solid var(--clay); border-bottom: 2px solid var(--clay);
  transform: rotate(45deg); transition: transform 0.15s ease;
}
.acc-btn[aria-expanded="true"]::after { transform: rotate(-135deg); top: 25px; }
.acc-panel { padding: 0 18px 4px; }
.acc-panel[hidden] { display: none; }

/* ---------- checklists and misc ---------- */

.check { list-style: none; padding-left: 0; }
.check li { position: relative; padding-left: 30px; margin-bottom: 0.7em; }
.check li::before {
  content: ""; position: absolute; left: 3px; top: 8px;
  width: 12px; height: 7px; border-left: 2px solid var(--pine); border-bottom: 2px solid var(--pine);
  transform: rotate(-45deg);
}

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps > li { position: relative; padding-left: 44px; margin-bottom: 1.1em; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--pine); color: #fff;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); margin: 1.6em 0; padding: 0; list-style: none; }
.card { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--pine); border-radius: var(--radius); padding: 16px 18px; margin: 0; }
.card h3 { margin-top: 0; font-size: 1.02rem; }
.card p { font-size: 0.95rem; margin-bottom: 0.6em; }
.card p:last-child { margin-bottom: 0; }
.card-num { font-family: var(--sans); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--clay); display: block; margin-bottom: 4px; }

.related { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 2.2em 0 0; }
.related h2 { margin: 0 0 8px; font-size: 1.05rem; border: 0; padding: 0; }
.related ul { margin: 0; padding-left: 1.2em; font-size: 0.97rem; }

.hero { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 26px; }
.hero h1 { font-size: 2.3rem; max-width: 22ch; }
.hero .lede { max-width: 62ch; }

.entry-map { list-style: none; padding: 0; margin: 1.4em 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.entry-map li { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--clay); border-radius: var(--radius); padding: 14px 17px; margin: 0; }
.entry-map a { font-family: var(--sans); font-weight: 600; font-size: 1rem; }
.entry-map p { font-size: 0.93rem; margin: 5px 0 0; color: var(--ink-soft); }

.legal article { max-width: 74ch; }
.legal .eff { font-family: var(--sans); font-size: 14px; background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: inline-block; margin-bottom: 1.6em; }

/* ---------- footer ---------- */

.site-foot {
  margin-top: 54px; background: var(--pine-dark); color: #e8efea;
  border-top: 5px solid var(--clay); padding: 30px 0 34px;
  font-size: 0.93rem;
}
.site-foot a { color: #fff; }
.site-foot a:hover { color: #f0c39f; }
.foot-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr; } }
.site-foot p { margin: 0 0 4px; }
.foot-site { font-family: var(--sans); font-weight: 600; font-size: 1.1rem; color: #fff; margin-bottom: 8px; }
.foot-links, .foot-links2 { font-family: var(--sans); font-size: 0.92rem; margin-bottom: 8px; }
.foot-tm { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.22); font-size: 0.86rem; color: #cfdcd4; }
.foot-rev { font-family: var(--sans); font-size: 0.85rem; color: #cfdcd4; margin-top: 10px; }

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  body { font-size: 17px; }
  .nav-toggle { display: inline-flex; }
  .nav-list { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-top: 8px; }
  .nav-list.is-open { display: flex; }
  .nav-group { position: static; }
  .nav-sub-toggle, .nav-flat { width: 100%; text-align: left; padding: 12px 10px; border-top: 1px solid rgba(255,255,255,0.18); }
  .nav-sub { position: static; min-width: 0; margin: 0 0 6px 10px; }
  h1 { font-size: 1.72rem; }
  .hero h1 { font-size: 1.85rem; }
  h2 { font-size: 1.26rem; }
}

@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* A box heading that must carry an h2 for document outline reasons,
   without taking the section-heading styling. */
.method .box-h, .callout .box-h, .watch .box-h {
  margin: 0 0 0.4em;
  padding-top: 0;
  border-top: 0;
  font-size: 1.02rem;
}
