/*
 * Styles for the pre-built content pages (scripts/prerender.mjs copies this file to a hashed name in assets/).
 * They load the app's stylesheet for the fonts and tokens, and no script, so the theme follows the system setting.
 */
@media (prefers-color-scheme: light) {
  /* The same values as [data-theme='light'] in styles/tokens.css, for a page that has no theme boot script. */
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #eef0f5;
    --s1: #ffffff;
    --s2: #f6f7fa;
    --s3: #eceef4;
    --line: #d9dde7;
    --tx: #141726;
    --tx2: #474d63;
    --tx3: #62687d;
    --brand: #4a41d4;
    --brand-ink: #ffffff;
    --brand-bg: rgba(74, 65, 212, 0.09);
  }
}

body.public {
  font-size: 16px;
  line-height: 1.65;
}

.skip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: var(--h-touch);
  left: var(--sp-8);
  top: -100px;
  padding: 0 var(--sp-12);
  background: var(--s1);
  border-radius: var(--r-control);
}

.skip:focus {
  top: var(--sp-8);
}

.top,
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-16);
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-16) var(--sp-16);
}

.mark {
  display: inline-flex;
  align-items: center;
  min-height: var(--h-touch);
  gap: var(--sp-4);
  font: 700 20px/1 var(--mono);
  color: var(--tx);
  text-decoration: none;
}

.cursor {
  width: 9px;
  height: 18px;
  background: var(--brand);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: var(--h-touch);
  padding: 0 var(--sp-16);
  border-radius: var(--r-control);
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  text-decoration: none;
}

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-24) var(--sp-16) var(--sp-40);
}

.article h1 {
  margin: 0 0 var(--sp-16);
  font-size: 32px;
  line-height: 1.2;
}

.article h2 {
  margin: var(--sp-40) 0 var(--sp-8);
  font-size: 22px;
  line-height: 1.3;
}

.article p,
.article ul,
.article ol {
  margin: 0 0 var(--sp-16);
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--sp-16);
}

/* Figures never break inside a number. */
.article td.num {
  white-space: nowrap;
}

.article caption {
  padding: 0 0 var(--sp-8);
  color: var(--tx2);
  font-size: 14px;
  text-align: left;
}

.article th[scope='row'] {
  font-weight: 400;
}

.article dl {
  margin: 0 0 var(--sp-16);
}

.article dt {
  font-weight: 600;
}

.article dd {
  margin: 0 0 var(--sp-12);
}

/* Links sit in lists, never inside sentences, so each is a full-height tap target on a phone (44 px). */
.links {
  padding: 0;
  list-style: none;
}

.links a,
.crumbs a,
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: var(--h-touch);
}

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

.crumbs {
  margin: 0 0 var(--sp-16);
  color: var(--tx2);
  font-size: 14px;
}

.closing {
  margin-top: var(--sp-40);
  padding: var(--sp-24);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--s1);
}

.closing h2 {
  margin-top: 0;
}

.foot {
  display: block;
  border-top: 1px solid var(--line);
  color: var(--tx2);
  font-size: 14px;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8) var(--sp-16);
  margin: 0 0 var(--sp-12);
  padding: 0;
  list-style: none;
}

.foot p {
  margin: 0 0 var(--sp-4);
}

@media (max-width: 480px) {
  .article h1 {
    font-size: 26px;
  }

  .article th,
  .article td {
    padding: var(--sp-8) var(--sp-6);
  }
}
