/* My SS Check — encyclopedia-style reference layout, atlas palette. Self-hosted fonts via /fonts.css. */
:root, [data-palette="atlas"] {
  color-scheme: light;
  --chrome: #f6f7f8;
  --page: #ffffff;
  --box: #f8f9fa;
  --tint: #edf3f1;
  --ink: #1c2024;
  --muted: #545b62;
  --line: #c8ccd1;
  --line-strong: #a2a9b1;
  --link: #2457a6;
  --visited: #6a4a9c;
  --accent: #0e5a52;
  --accent-dark: #0a453f;
  --night: #14262b;
  --night-ink: #e7eeec;
  --focus: #2457a6;
  --on-accent: #ffffff;
  --hair: #eaecf0;
  --hair-2: #dadde3;
  --thead: #eaecf0;
  --target: #eaf3ff;
  --font-serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--chrome); color: var(--ink); font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.6; -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--chrome); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--link); text-decoration: none; text-underline-offset: 0.16em; }
@media (hover: hover) { a:hover { text-decoration: underline; } }
a:visited { color: var(--visited); }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: 0.85em; background: var(--box); border: 1px solid var(--hair); padding: 0.05em 0.3em; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: 1rem; top: 0; transform: translateY(-150%); background: var(--ink); color: var(--page); padding: 0.6rem 0.9rem; z-index: 10; }
.skip:focus { transform: none; }
.skip:visited { color: var(--page); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { :focus-visible { outline: 2px solid Highlight; } }

/* Persistent notice */
.notice { background: var(--night); color: var(--night-ink); font-size: 0.92rem; line-height: 1.45; }
.notice p { max-width: 90rem; margin-inline: auto; padding: 0.55rem 1.5rem; }
.notice a, .notice a:visited { color: #ffffff; text-decoration: underline; }
.notice strong { color: #ffffff; }

/* Header */
.top { background: var(--page); border-bottom: 1px solid var(--line); }
.top-in { max-width: 90rem; margin-inline: auto; padding: 0.6rem 1.5rem; display: grid; grid-template-columns: 14rem 1fr auto; align-items: center; gap: 1.5rem; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); min-height: 2.75rem; }
.logo:visited { color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo img { width: 28px; height: 28px; flex: none; }
.logo-t { display: grid; line-height: 1.1; }
.logo-t b { font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; font-variation-settings: "opsz" 40; }
.logo-t small { white-space: nowrap; font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; }
.top-note { font-size: 0.92rem; color: var(--muted); }
.top-note a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.menu-btn { display: none; align-items: center; min-height: 2.75rem; min-width: 2.75rem; padding: 0 0.9rem; border: 1px solid var(--line-strong); background: var(--page); border-radius: 2px; font-weight: 600; cursor: pointer; }
.menu-btn[aria-expanded="true"] { background: var(--box); }

/* Shell */
.shell { max-width: 90rem; margin-inline: auto; padding: 1.5rem 1.5rem 4rem; display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.side { position: sticky; top: 1rem; font-size: 0.92rem; }
.side-g + .side-g { margin-top: 1.4rem; }
.side h2 { font-size: 0.78rem; font-weight: 600; color: var(--muted); padding-bottom: 0.3rem; border-bottom: 1px solid var(--line); margin-bottom: 0.3rem; }
.side a, .side a:visited { display: flex; align-items: center; min-height: 2.25rem; padding-left: 0.5rem; border-left: 2px solid transparent; color: var(--link); }
.side a[aria-current="page"] { color: var(--ink); font-weight: 700; border-left-color: var(--accent); }
.content { background: var(--page); border: 1px solid var(--hair-2); padding: 1.75rem 2.25rem 2.5rem; min-width: 0; overflow-wrap: break-word; }

@media (max-width: 1100px) { .top-in { grid-template-columns: auto 1fr auto; } }
@media (max-width: 960px) {
  .top-in { grid-template-columns: 1fr auto; padding-inline: 1rem; gap: 0.5rem 1rem; }
  .top-note { display: none; }
  .menu-btn { display: inline-flex; }
  .shell { grid-template-columns: 1fr; padding: 0 0 3rem; gap: 0; }
  .side { position: static; background: var(--page); border-bottom: 1px solid var(--line); padding: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .side-g + .side-g { margin-top: 0; }
  .side a { min-height: 2.75rem; }
  .js .side:not(.open) { display: none; }
  .content { border: 0; border-bottom: 1px solid var(--line); padding: 1.25rem 1rem 2rem; }
}
@media (max-width: 640px) { .side { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .logo-t small { display: none; } }

/* Entry */
.title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.5rem); line-height: 1.15; letter-spacing: -0.012em; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line-strong); text-wrap: balance; font-variation-settings: "opsz" 48; }
.from { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.body { margin-top: 1.1rem; }
.body > p, .body > ul.plain, .body > ol.plain, .body > .guides { max-width: 46rem; }
.body > p { margin-top: 0.8em; text-wrap: pretty; }
.body > .lead { margin-top: 0; font-size: 1.0625rem; }
.body h2 { font-family: var(--font-serif); font-weight: 500; font-size: 1.55rem; line-height: 1.25; margin-top: 1.9rem; padding-bottom: 0.2rem; border-bottom: 1px solid var(--line-strong); font-variation-settings: "opsz" 32; clear: both; }
.body h2 .sn { color: var(--muted); font-size: 0.85em; margin-right: 0.3rem; }
.body h3 { font-size: 1.1rem; font-weight: 700; margin-top: 1.3rem; }
.hatnote { font-style: italic; color: var(--muted); padding-left: 1.6rem; font-size: 0.95rem; margin-bottom: 0.8rem; }
ul.plain, ol.plain, .guides { margin-top: 0.7rem; padding-left: 1.4rem; }
ul.plain, .guides { list-style: disc; }
ol.plain { list-style: decimal; }
ul.plain li, ol.plain li, .guides li { margin-top: 0.4rem; padding-left: 0.2rem; }
li::marker { color: var(--muted); }
.ref { font-size: 0.72em; line-height: 0; white-space: nowrap; }
.ref a, .ref a:visited { color: var(--link); padding: 0 0.05em; }
.faq h3 { margin-top: 1.1rem; }
.faq p { margin-top: 0.3rem; max-width: 46rem; }
.noticebox { border: 1px solid var(--accent); border-left-width: 4px; background: var(--tint); padding: 0.7rem 1rem; margin-top: 1rem; max-width: 46rem; font-size: 0.97rem; line-height: 1.5; }

/* Infobox */
.infobox { float: right; clear: right; width: 21rem; margin: 0 0 1.2rem 1.6rem; border: 1px solid var(--line-strong); background: var(--box); padding: 0.4rem; font-size: 0.875rem; line-height: 1.45; }
.ib-title { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; text-align: center; padding: 0.35rem 0.4rem 0.5rem; background: var(--tint); margin: -0.4rem -0.4rem 0.4rem; font-variation-settings: "opsz" 28; }
.infobox table { width: 100%; border-collapse: collapse; }
.infobox th, .infobox td { text-align: left; vertical-align: top; padding: 0.3rem 0.35rem; }
.infobox tbody th[scope="row"] { width: 42%; font-weight: 700; }
.ib-group { text-align: center !important; background: var(--tint); font-weight: 700; border-top: 0.4rem solid var(--box); }

/* Contents */
.tocbox { display: table; margin-top: 1.4rem; border: 1px solid var(--line-strong); background: var(--box); padding: 0.7rem 1.2rem 0.8rem 0.9rem; font-size: 0.92rem; }
.body .tocbox h2 { font-family: var(--font-sans); font-size: 0.95rem; font-weight: 700; border: 0; margin: 0 0 0.3rem; padding: 0; text-align: center; }
.tocbox a { display: flex; gap: 0.5rem; min-height: 2rem; align-items: center; }
.tocbox .n { color: var(--muted); min-width: 1.4rem; font-variant-numeric: tabular-nums; }

/* Tables */
.tablewrap { max-width: 100%; overflow-x: auto; margin-top: 0.8rem; overscroll-behavior-x: contain; }
.wikitable { border-collapse: collapse; background: var(--box); border: 1px solid var(--line-strong); font-size: 0.92rem; line-height: 1.45; }
.wikitable.wide { min-width: 52rem; }
.wikitable caption { text-align: left; font-weight: 700; padding-bottom: 0.4rem; }
.wikitable th, .wikitable td { border: 1px solid var(--line-strong); padding: 0.4rem 0.7rem; text-align: left; vertical-align: top; }
.wikitable thead th { background: var(--thead); font-weight: 700; }
.wikitable tbody th { font-weight: 600; background: var(--page); }
.wikitable td { background: var(--page); font-variant-numeric: lining-nums; }
.wikitable td.early { background: var(--tint); }
.why { display: block; font-size: 0.82rem; color: var(--muted); font-style: italic; margin-top: 0.1rem; }
.small-note { font-size: 0.85rem; color: var(--muted); }

/* End matter */
.seealso { margin-top: 0.6rem; padding-left: 1.4rem; list-style: disc; max-width: 46rem; }
.seealso li { margin-top: 0.3rem; }
.refs, .reflist { margin-top: 0.7rem; font-size: 0.9rem; line-height: 1.5; }
.refs { padding-left: 2rem; list-style: decimal; }
.reflist { padding-left: 1.4rem; list-style: disc; }
.refs li, .reflist li { margin-bottom: 0.35rem; padding-left: 0.2rem; }
.refs li:target { background: var(--target); }
.refs .back { font-weight: 700; margin-right: 0.3rem; }
.refs .back a { display: inline-block; min-width: 1.5rem; min-height: 1.5rem; text-align: center; }
.catlinks { clear: both; margin-top: 2rem; border: 1px solid var(--line-strong); background: var(--box); padding: 0.55rem 0.8rem; font-size: 0.9rem; }
.body > .edited { font-size: 0.85rem; color: var(--muted); margin-top: 1rem; }

/* Placeholders (empty, labelled, send nothing) */
.slot { clear: both; margin-top: 1.5rem; max-width: 46rem; }
.slot-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 0.25rem; }
.slot-box { border: 1px dashed var(--line-strong); background: var(--box); color: var(--muted); font-size: 0.88rem; padding: 1.1rem 1rem; text-align: center; min-height: 5rem; display: grid; place-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.875rem; padding: 0 1.2rem; background: var(--accent); color: var(--on-accent); font-weight: 700; border: 1px solid var(--accent-dark); border-radius: 2px; margin-top: 0.4rem; }
.btn:visited { color: var(--on-accent); }
.btn:hover { text-decoration: none; background: var(--accent-dark); }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--chrome); }
.foot-in { max-width: 90rem; margin-inline: auto; padding: 1.75rem 1.5rem 2.5rem calc(1.5rem + 15.5rem); display: grid; gap: 0.9rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 1.4rem; font-size: 0.92rem; }
.foot-links a { min-height: 2.75rem; display: inline-flex; align-items: center; }
.foot-notice, .foot-small { font-size: 0.88rem; max-width: 46rem; }
.foot-small { color: var(--muted); font-size: 0.85rem; }

@media (max-width: 960px) { .foot-in { padding-inline: 1rem; } }
@media (max-width: 860px) {
  .infobox { float: none; width: auto; max-width: 26rem; margin: 1.2rem auto 0.4rem; }
  .body.has-ib { display: flex; flex-direction: column; }
  .body.has-ib > * { order: 3; }
  .body.has-ib > .hatnote { order: 1; }
  .body.has-ib > .lead { order: 2; margin-top: 0; }
}
@media (max-width: 600px) {
  .tocbox { display: block; }
  .tocbox a { min-height: 2.75rem; }
  .refs { padding-left: 1.6rem; }
  .ref a { display: inline-block; min-width: 1.5rem; min-height: 1.5rem; padding: 0.3rem 0.1rem; margin-block: -0.45rem; text-align: center; line-height: 1; }
  .body a { overflow-wrap: anywhere; }
  .guides li, .seealso li { min-height: 2.75rem; }
}
