:root {
  --paper: #fbf8f1;
  --ink: #161412;
  --muted: #5d5850;
  --rule: #161412;
  --soft: #e7e1d4;
  --card: #fffdf8;
  --accent: #8a1c1c;
  --up: #157a3c;
  --down: #b3261e;
  --flat: #6b6b6b;
  --bar: #161412;
  --bar-ink: #fbf8f1;
  --serif: "Frank Ruhl Libre", David, "Times New Roman", serif;
  --display: "Suez One", "Frank Ruhl Libre", serif;
}
:root[data-theme="dark"] {
  --paper: #15171a;
  --ink: #ece8df;
  --muted: #a8a296;
  --rule: #ece8df;
  --soft: #2c3036;
  --card: #1c1f23;
  --accent: #e08a7a;
  --up: #4cc27a;
  --down: #ff7a6e;
  --bar: #000;
  --bar-ink: #ece8df;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15171a; --ink: #ece8df; --muted: #a8a296; --rule: #ece8df; --soft: #2c3036;
    --card: #1c1f23; --accent: #e08a7a; --up: #4cc27a; --down: #ff7a6e; --bar: #000; --bar-ink: #ece8df;
  }
}

* { 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.7;
}
a { color: inherit; }
.skip { position: absolute; right: -9999px; }
.skip:focus { right: 16px; top: 8px; background: var(--ink); color: var(--paper); padding: 4px 10px; z-index: 9; }

/* masthead */
.masthead { max-width: 1100px; margin: 0 auto; padding: 18px 16px 6px; text-align: center; }
.ears { display: flex; justify-content: space-between; gap: 12px; }
.ear { border: 2px solid var(--rule); padding: 4px 10px; font-weight: 700; font-size: 14px; }
.brand { display: block; font-family: var(--display); font-size: clamp(64px, 14vw, 132px); line-height: 1.05; text-decoration: none; margin: 4px 0 0; }
.tagline { font-weight: 700; font-size: clamp(14px, 2.4vw, 20px); border-top: 3px double var(--rule); border-bottom: 3px double var(--rule); padding: 4px 0; }

.topnav { background: var(--bar); color: var(--bar-ink); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; padding: 10px 16px; margin-top: 10px; }
.topnav a { color: var(--bar-ink); text-decoration: none; font-weight: 700; font-size: 20px; }
.topnav a:hover, .topnav a:focus-visible { text-decoration: underline; }
.theme-toggle { background: none; border: 1px solid var(--bar-ink); color: var(--bar-ink); font: inherit; font-weight: 700; padding: 0 12px; border-radius: 3px; cursor: pointer; }
.notice { text-align: center; color: var(--accent); font-weight: 700; font-size: 14px; margin: 10px 16px; }

/* paper layout */
.paper { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
.dateline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--rule); padding: 6px 0; }

.ticker { list-style: none; padding: 8px 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px 22px; border-bottom: 3px double var(--rule); font-size: 15px; }
.ticker li { white-space: nowrap; }
.tk-name { font-weight: 700; }

.up { color: var(--up); font-weight: 700; }
.down { color: var(--down); font-weight: 700; }
.flat { color: var(--flat); font-weight: 700; }

.front { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.toc { background: var(--soft); padding: 14px 18px; border-top: 4px solid var(--rule); position: sticky; top: 10px; }
.toc h2 { margin: 0 0 6px; font-size: 22px; }
.toc ol { margin: 0; padding-inline-start: 22px; font-weight: 700; font-size: 16px; line-height: 1.5; }
.toc li { margin-bottom: 8px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

article { scroll-margin-top: 12px; }
.kicker { color: var(--accent); font-weight: 700; font-size: 15px; margin: 0; }
.lead h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.15; margin: 4px 0 10px; font-weight: 900; }
.item h3 { font-size: 26px; line-height: 1.25; margin: 2px 0 6px; font-weight: 900; }
.dek { font-size: 20px; font-weight: 500; color: var(--muted); margin: 0 0 12px; }
.lead .dek { font-size: 22px; }
article p { margin: 0 0 12px; }
.src { font-size: 14px; color: var(--muted); }
.simple { background: var(--card); border-inline-start: 4px solid var(--accent); padding: 10px 14px; margin: 8px 0 12px; font-size: 17px; }

.fig { margin: 6px 0 14px; background: var(--card); border: 1px solid var(--soft); padding: 8px; }
.fig figcaption { font-size: 14px; color: var(--muted); padding: 4px 4px 0; }
.chart { width: 100%; height: auto; display: block; font-family: var(--serif); direction: ltr; }
.spark { direction: ltr; }
.chart .grid { stroke: var(--soft); stroke-width: 1; }
.chart .axis { stroke: var(--muted); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 12px; }
.chart .blab { fill: var(--ink); font-size: 14px; font-weight: 700; }
.chart .bval { fill: var(--ink); font-size: 13px; }

/* sections */
.section { margin-top: 34px; }
.sec-title { font-size: 30px; margin: 0 0 14px; padding-bottom: 4px; border-bottom: 4px solid var(--rule); font-weight: 900; }
.sec-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px 32px; }
.sec-body .item + .item { }
.sec-body .item { border-top: 1px solid var(--soft); padding-top: 10px; }

.board-group h3 { font-size: 20px; margin: 10px 0 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.card { background: var(--card); border: 1px solid var(--soft); border-top: 3px solid var(--rule); padding: 8px 10px; }
.card-top { display: flex; justify-content: space-between; gap: 6px; font-size: 14px; }
.card-name { font-weight: 700; }
.card-val { font-size: 22px; font-weight: 700; text-align: end; }
.spark { width: 100%; height: 34px; display: block; }
.card-month { font-size: 13px; color: var(--muted); }

.movers { margin-top: 22px; }
.movers h3 { font-size: 22px; margin: 0 0 8px; }
.movers table { width: 100%; border-collapse: collapse; font-size: 16px; margin-top: 10px; }
.movers th, .movers td { text-align: start; padding: 6px 8px; border-bottom: 1px solid var(--soft); }
.movers th { border-bottom: 2px solid var(--rule); }

.glossary dl, .glossary-full { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.glossary dt, .glossary-full dt { font-weight: 900; }
.glossary dd, .glossary-full dd { margin: 0; }

.page h1 { font-size: 40px; margin: 18px 0 10px; }
.archive { padding-inline-start: 20px; }

.foot { max-width: 1100px; margin: 0 auto; padding: 18px 16px 40px; border-top: 3px double var(--rule); font-size: 14px; color: var(--muted); text-align: center; }

@media (max-width: 820px) {
  body { font-size: 17px; }
  .front { grid-template-columns: 1fr; }
  .toc { position: static; }
  .ear { font-size: 12px; padding: 3px 6px; }
  .topnav { gap: 4px 16px; }
  .topnav a { font-size: 18px; }
  .glossary dl, .glossary-full { grid-template-columns: 1fr; }
  .glossary dd, .glossary-full dd { margin-bottom: 8px; }
  .movers table { font-size: 14px; }
  .movers th, .movers td { padding: 5px 4px; }
}
