/* Social Security Issues — reference-style layout. Palette: cool gray chrome, white document panel, valley-green accent. */
:root {
  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;
  --focus: #2457a6;
  --on-accent: #ffffff;
  --hair: #eaecf0;
  --thead: #eaecf0;
  --target: #eaf3ff;
  --font-serif: "Source Serif 4 Variable", "Iowan Old Style", Georgia, serif;
  --font-sans: "Source Sans 3 Variable", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--chrome); scroll-padding-top: 1rem; }
body { margin: 0; background: var(--chrome); color: var(--ink); font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
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; }
a:visited { color: var(--visited); }
@media (hover: hover) { a:hover { text-decoration: underline; } }
button, input { 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); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@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; } }

/* Header */
.site-header { background: var(--page); border-bottom: 1px solid var(--line-strong); }
.header-in { max-width: 90rem; margin: 0 auto; padding: 0.55rem 1rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.brand:visited { color: var(--ink); }
.brand img { width: 28px; height: 28px; display: block; }
.header-tag { color: var(--muted); font-size: 0.9rem; margin-left: auto; }
.menu-btn { display: none; min-height: 44px; min-width: 44px; padding: 0 0.9rem; background: var(--page); border: 1px solid var(--line-strong); border-radius: 2px; font-weight: 600; cursor: pointer; }
.menu-btn[aria-expanded="true"] { background: var(--tint); }

/* Persistent notice */
.notice { background: var(--tint); border-bottom: 1px solid var(--line-strong); font-size: 0.95rem; line-height: 1.45; }
.notice-in { max-width: 90rem; margin: 0 auto; padding: 0.55rem 1rem; }
.notice strong { color: var(--accent-dark); }

/* Shell */
.shell { max-width: 90rem; margin: 0 auto; padding: 1rem; display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.sidebar { font-size: 0.95rem; }
.sidebar h2 { font-family: var(--font-sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 1rem 0 0.3rem; padding-bottom: 0.25rem; border-bottom: 1px solid var(--line); }
.sidebar h2:first-child { margin-top: 0; }
.sidebar a { display: block; padding: 0.3rem 0.6rem; border-left: 2px solid transparent; color: var(--link); }
.sidebar a[aria-current="page"] { border-left-color: var(--accent); color: var(--ink); font-weight: 700; background: var(--page); }
.doc { background: var(--page); border: 1px solid var(--line); padding: 1.25rem 1.75rem 1.75rem; min-width: 0; }
.doc > * { max-width: 100%; }

/* Entry text */
.doc h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line-strong); margin-bottom: 0.9rem; text-wrap: balance; }
.doc h2 { font-family: var(--font-serif); font-weight: 500; font-size: 1.55rem; line-height: 1.25; margin: 2rem 0 0.7rem; padding-bottom: 0.2rem; border-bottom: 1px solid var(--line-strong); }
.doc h3 { font-family: var(--font-sans); font-weight: 700; font-size: 1.05rem; margin: 1.3rem 0 0.4rem; }
.doc p, .doc .prose > ul, .doc .prose > ol { max-width: 46rem; margin-bottom: 0.85rem; text-wrap: pretty; }
.doc ul.bul, .doc ol.num { padding-left: 1.4rem; max-width: 46rem; margin-bottom: 0.85rem; }
.doc ul.bul { list-style: disc; }
.doc ol.num { list-style: decimal; }
.doc ul.bul li, .doc ol.num li { margin-bottom: 0.3rem; padding-left: 0.2rem; }
.hatnote { font-style: italic; color: var(--muted); margin-bottom: 0.8rem; font-size: 0.97rem; }
.lead { font-size: 1.1rem; }
sup.fn { font-size: 0.72em; line-height: 0; }
sup.fn a { padding: 0 0.1em; }
:target { background: var(--target); }
.n { color: var(--muted); font-variant-numeric: tabular-nums; }

/* 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.9rem; line-height: 1.45; }
.infobox h2 { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; margin: 0; padding: 0.35rem 0.4rem; border: 0; background: var(--tint); text-align: center; }
.infobox table { width: 100%; border-collapse: collapse; margin-top: 0.3rem; }
.infobox th, .infobox td { text-align: left; vertical-align: top; padding: 0.3rem 0.35rem; border-top: 1px solid var(--hair); }
.infobox th { width: 38%; font-weight: 700; }
.infobox td { overflow-wrap: anywhere; }

/* Contents */
.tocbox { display: table; margin: 1.2rem 0 0.5rem; border: 1px solid var(--line-strong); background: var(--box); padding: 0.7rem 1.4rem 0.8rem 0.9rem; font-size: 0.95rem; }
.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 ol { counter-reset: toc; }
.tocbox li { counter-increment: toc; }
.tocbox li a { display: inline-flex; gap: 0.5rem; min-height: 1.8rem; align-items: center; }
.tocbox li a::before { content: counter(toc); color: var(--muted); min-width: 1.2rem; font-variant-numeric: tabular-nums; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0.6rem 0 1.1rem; border: 1px solid var(--line-strong); max-width: 100%; }
.table-wrap:focus-visible { outline-offset: 0; }
table.data { border-collapse: collapse; width: 100%; font-size: 0.97rem; min-width: 32rem; }
table.data caption { text-align: left; font-weight: 700; padding: 0.5rem 0.7rem; background: var(--box); border-bottom: 1px solid var(--line-strong); }
table.data th, table.data td { text-align: left; vertical-align: top; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--hair); }
table.data thead th { background: var(--thead); border-bottom: 1px solid var(--line-strong); }
table.data tbody th { font-weight: 700; }

/* Boxes */
.factbox { border: 1px solid var(--line-strong); background: var(--box); padding: 0.7rem 1rem; margin: 0.9rem 0 1.1rem; max-width: 46rem; }
.factbox h3 { margin-top: 0; }
.factbox p:last-child, .factbox ul:last-child { margin-bottom: 0; }
.official { border: 1px solid var(--line-strong); border-left: 4px solid var(--accent); background: var(--page); padding: 0.7rem 1rem; margin: 0.9rem 0 1.1rem; max-width: 46rem; }
.official p:last-child { margin-bottom: 0; }
.slot { border: 1px dashed var(--muted); background: var(--box); padding: 0.8rem 1rem; margin: 1.2rem 0; max-width: 46rem; color: var(--muted); font-size: 0.95rem; }
.slot strong { display: block; color: var(--ink); margin-bottom: 0.2rem; }
.slot p { margin-bottom: 0.3rem; }
.slot p:last-child { margin-bottom: 0; }

/* Footnotes, references */
ol.notes, ol.refs { list-style: decimal; padding-left: 1.6rem; font-size: 0.95rem; max-width: 52rem; }
ol.notes li, ol.refs li { margin-bottom: 0.4rem; padding-left: 0.2rem; overflow-wrap: anywhere; }
ul.plain li { margin-bottom: 0.35rem; }
ul.plain { max-width: 46rem; }
.backs { color: var(--muted); }
.catbar { margin-top: 1.8rem; border: 1px solid var(--line-strong); background: var(--box); padding: 0.55rem 0.9rem; font-size: 0.95rem; }
.catbar a { margin-right: 0.15rem; }
.lastedit { margin-top: 0.8rem; color: var(--muted); font-size: 0.9rem; }

/* Home index */
.filter { margin: 1rem 0 0.5rem; max-width: 46rem; }
.filter label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.filter input { width: 100%; max-width: 28rem; min-height: 44px; padding: 0.4rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--page); }
.js-only { display: none; }
.js .js-only { display: block; }
.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
.topics section { break-inside: avoid; }
.topics h3 { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; margin: 1.1rem 0 0.4rem; padding: 0.3rem 0.6rem; background: var(--tint); border-bottom: 1px solid var(--line); }
.topics li { margin-bottom: 0.55rem; }
.topics li span { display: block; color: var(--muted); font-size: 0.93rem; line-height: 1.4; }
.topics li[hidden] { display: none; }
.featured { border: 1px solid var(--line-strong); margin: 1.2rem 0; max-width: 46rem; }
.featured h2 { margin: 0; padding: 0.4rem 0.8rem; background: var(--accent); color: var(--on-accent); font-size: 1.15rem; border: 0; }
.featured .fb { padding: 0.7rem 0.9rem; }
.featured .fb p:last-child { margin-bottom: 0; }
.featured a:visited { color: var(--visited); }
.start-list { max-width: 46rem; }
.empty-msg { color: var(--muted); }

/* Footer */
.site-footer { background: var(--chrome); border-top: 1px solid var(--line-strong); margin-top: 1rem; }
.footer-in { max-width: 90rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; font-size: 0.93rem; }
.footer-in .brand { font-size: 1.1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; margin: 0.6rem 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.disclaimer { max-width: 60rem; color: var(--ink); margin-bottom: 0.6rem; }
.copy { color: var(--muted); }

@media (max-width: 959px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 0.6rem; }
  .doc { padding: 1rem 1rem 1.4rem; }
  .js .menu-btn { display: inline-block; }
  .header-tag { display: none; }
  .js .sidebar { display: none; background: var(--page); border: 1px solid var(--line-strong); padding: 0.7rem; }
  .js .sidebar.open { display: block; }
  .sidebar a { min-height: 44px; display: flex; align-items: center; }
  .infobox { float: none; width: auto; max-width: 28rem; margin: 1rem 0; }
  .tocbox { display: block; }
  .tocbox li a { min-height: 44px; }
  .topics { grid-template-columns: minmax(0, 1fr); }
  .menu-wrap { margin-left: auto; }
}
@media (min-width: 960px) { .menu-wrap { display: none; } }
@media print { .sidebar, .menu-wrap, .slot { display: none; } .shell { display: block; } }
