/* Quiet public reading tools. No reader content depends on these controls. */
.site-sr-only, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.site-header .header-inner { gap: 18px; }
.site-header .brand-small { order: 0; }
.site-header .main-nav { order: 1; flex: 1 1 auto; gap: 10px 18px; }
.site-header .site-search-open { order: 2; }
.site-header .nav-toggle { order: 3; }
.site-header .header-support { order: 4; }
.site-search-open {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}
.site-search-open svg { flex: none; width: 18px; height: 18px; }
.site-search-open:hover { border-color: var(--rule); }

.reader-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  margin-top: 20px;
  padding-block: 6px;
  border-block: 1px solid var(--rule);
}
.reader-tool {
  display: inline-flex;
  position: relative;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}
.reader-tool svg { flex: none; width: 18px; height: 18px; }
.reader-tool-icon { width: 44px; padding-inline: 10px; }
.reader-tool[aria-pressed='true'] { border-color: var(--rule); background: var(--soft); }
.reader-tool[aria-pressed='true'] svg { color: var(--red); }
.reader-tools-status { max-width: 70ch; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.reader-tools-status:empty { margin-top: 0; }
.mt-guide + .reader-tools, .gs-cover + .reader-tools, .gs-heading + .reader-tools { margin-top: 18px; }
.gs-page > .reader-tools + .gs-case-context { margin-top: 0; }
.site-copy-fallback { flex: 1 0 100%; width: 100%; min-width: 0; margin: 8px 0 0; font-size: 13px; }
.site-copy-field { display: block; width: 100%; min-width: 0; min-height: 46px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--ink); background: var(--panel); color: var(--ink); font-size: 16px; line-height: 1.6; }
.letter-page .reader-tools { border-color: var(--letter-rule); }
.letter-page .reader-tool { color: var(--letter-ink); }
.letter-page .reader-tool[aria-pressed='true'] { border-color: var(--letter-rule); background: var(--yellow); color: var(--navy); }
.letter-page .reader-tool[aria-pressed='true'] svg { color: inherit; }
.letter-page .reader-tools-status { color: var(--letter-muted); }
.letter-page .site-copy-field { border-color: var(--letter-rule); background: var(--navy); color: var(--letter-ink); }

.reading-progress {
  display: none;
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
}
.reading-progress[data-reader-progress='active'],
[data-reader-progress='active'] .reading-progress { display: block; }
.reading-progress > span { display: block; width: 100%; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: left center; }

/* Increase the prose, not headlines, labels, or the amount preview. */
body.reader-text-large .feature-body .feature-section > p:not(.eyebrow),
body.reader-text-large .feature-body .feature-section li { font-size: 20px; }
body.reader-text-large .feature-body .article-brief p { font-size: 19px; }
body.reader-text-large .feature-body .article-note p { font-size: 18px; }
body.reader-text-large .feature-body .article-source-notes p,
body.reader-text-large .feature-body .article-source-notes li { font-size: 16px; }
body.reader-text-large .mt-detail { font-size: 18px; }
body.reader-text-large .mt-note > p + p,
body.reader-text-large .mt-why > p + p { font-size: 16px; }
body.reader-text-large .question-entry > p:not(.eyebrow) { font-size: 20px; }
body.reader-text-large .gs-explanation p,
body.reader-text-large .gs-limit p { font-size: 18px; }
body.reader-text-large .gs-question > p:not(.eyebrow) { font-size: 19px; }
body.reader-text-large .letter-copy > p:not(.letter-deck):not(.letter-pullquote) { font-size: 21px; }
body.reader-text-large[data-page='timeline'] .update-entry > p:not(.eyebrow),
body.reader-text-large[data-page='timeline'] .timeline-copy p,
body.reader-text-large[data-page='timeline'] .current-step p:not(.eyebrow),
body.reader-text-large[data-page='timeline'] #latest-updates + p { font-size: 19px; }
body.reader-text-large[data-page='timeline'] .update-entry > .update-next { font-size: 18px; }
body.reader-text-large[data-page='details'] .faq-list :is(p, li) { font-size: 19px; }
body.reader-text-large[data-page='details'] .story-chapter > p:not(.eyebrow) { font-size: 20px; }
body.reader-text-large .community-page :is(.community-intro, .community-section, .community-feature, .community-status, .community-host, .community-start) p:not(.eyebrow):not(.form-note):not(.community-byline):not(.community-checked) { font-size: 20px; }
body.reader-text-large .community-page .community-resource > p:not(.eyebrow):not(.form-note):not(.community-checked),
body.reader-text-large .community-page .community-affiliations li { font-size: 18px; }

.site-dialog {
  width: min(760px, calc(100% - 32px));
  max-width: none;
  max-height: 85vh;
  max-height: 85dvh;
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ink);
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 12px 40px rgb(32 37 31 / .14);
}
.site-dialog[open] { display: flex; flex-direction: column; }
.site-dialog::backdrop { background: rgb(32 37 31 / .52); }
.site-dialog-head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 23px 14px; }
.site-dialog-head h2 { min-width: 0; font-family: var(--font-display); font-size: 29px; line-height: 1.2; letter-spacing: -.015em; text-transform: uppercase; }
.site-dialog-close { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 9px; border: 1px solid transparent; background: transparent; color: var(--ink); font-size: 24px; line-height: 1; }
.site-dialog-close svg { width: 19px; height: 19px; }
.site-dialog-tabs { display: flex; flex: none; align-items: center; gap: 4px; padding: 0 23px; border-bottom: 1px solid var(--rule); }
.site-dialog-tabs button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 15px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 14px; line-height: 1.5; }
.site-dialog-tabs button[aria-pressed='true'] { border-bottom-color: var(--red); color: var(--ink); font-weight: 600; }
.site-dialog-body { flex: 1 1 auto; min-width: 0; min-height: 0; padding: 20px 23px; overflow: auto; overscroll-behavior: contain; }
.site-search-field { position: sticky; top: -1px; z-index: 1; padding-block: 1px 13px; background: var(--panel); }
.site-search-field > label { margin-bottom: 7px; color: var(--muted); font-size: 13px; }
.site-search-input { display: block; width: 100%; min-height: 52px; padding: 12px 13px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 17px; line-height: 1.5; }
.site-search-status, .site-search-empty { margin-block: 4px 14px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.site-dialog-results, .site-dialog-results ul { margin: 0; padding: 0; list-style: none; }
.site-result { min-width: 0; margin: 0; border-top: 1px solid var(--rule); }
.site-result > a { display: block; min-height: 44px; padding: 16px 9px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.site-result small, .site-result .type { display: block; margin-bottom: 5px; color: var(--red); font-size: 11px; font-weight: 500; line-height: 1.6; letter-spacing: .025em; }
.site-result strong, .site-result .title { display: block; font-size: 18px; font-weight: 600; line-height: 1.4; }
.site-result p, .site-result .teaser { margin-top: 7px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.site-result > a:focus-visible { outline-offset: -3px; }
.site-saved-row { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 11px 0; border-top: 1px solid var(--rule); }
.site-saved-row > a { display: block; flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 7px 0; font-size: 16px; line-height: 1.6; text-decoration: none; overflow-wrap: anywhere; }
.site-saved-row > a strong { display: block; font-size: 16px; font-weight: 500; }
.site-saved-row > a small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.site-saved-row > button { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 13px; line-height: 1.5; }
.site-dialog-note { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 13px 23px; border-top: 1px solid var(--rule); background: var(--paper); color: var(--muted); font-size: 12px; line-height: 1.7; }
.site-dialog-note > span { min-width: 0; }
.site-dialog-note > button { flex: none; }
.site-dialog-note p { margin: 0; }
.site-dialog-note button, .site-dialog-body > button { min-height: 44px; padding: 9px 12px; border: 1px solid var(--rule); background: transparent; color: var(--ink); font-size: 13px; line-height: 1.5; }

@media (hover: hover) and (pointer: fine) {
  .reader-tool:hover, .site-dialog-close:hover, .site-saved-row > button:hover { border-color: var(--rule); background: var(--paper); }
  .reader-tool[aria-pressed='true']:hover { background: var(--soft); }
  .site-result > a:hover { background: var(--paper); }
  .site-result > a:hover strong, .site-saved-row > a:hover { text-decoration: underline; text-underline-offset: .2em; }
  .site-saved-row > button:hover { color: var(--red); }
  .letter-page .reader-tool:hover { border-color: var(--letter-rule); background: var(--navy); color: var(--letter-ink); }
  .letter-page .reader-tool[aria-pressed='true']:hover { background: var(--yellow); color: var(--navy); }
}

@media (max-width: 1120px) {
  html { scroll-padding-top: 145px; }
  .site-header .header-inner { flex-wrap: wrap; gap: 12px; padding-block: 15px; }
  .site-header .brand-small { order: 0; margin-right: auto; }
  .site-header .site-search-open { order: 1; margin-left: 0; }
  .site-header .nav-toggle { display: inline-flex; order: 2; align-items: center; justify-content: center; margin-left: 0; }
  .site-header .header-support { order: 3; flex-basis: 100%; justify-content: space-between; }
  .site-header .main-nav { display: none; order: 4; flex-basis: 100%; align-items: stretch; flex-direction: column; justify-content: start; gap: 0; padding-top: 10px; border-top: 1px solid var(--rule); }
  .site-header .main-nav.is-open { display: flex; }
  .site-header .main-nav a { padding: 12px 0; border-bottom-width: 1px; font-size: 16px; }
  .site-header .main-nav a[aria-current='page'] { color: var(--red); }
}

@media (min-width: 801px) and (max-width: 1120px) {
  .article-rail, .mt-phase-nav { top: 145px; }
}

@media (max-width: 580px) {
  .site-header .header-inner { gap: 10px; }
  .site-search-open { position: relative; width: 44px; padding-inline: 10px; }
  .site-search-open > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .reader-tools { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; margin-top: 17px; }
  .reader-tools > .reader-tool { width: 100%; min-width: 0; grid-column: span 2; }
  .reader-tools > .reader-tool:is([data-reader-action='copy'], [data-reader-action='save']) { grid-column: span 3; }
  .reader-tools > :is(.reader-tools-status, .site-copy-fallback) { grid-column: 1 / -1; }
  .community-page .reader-tools { grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(44px, 1fr)) 44px 44px; }
  .community-page .reader-tools > .reader-tool,
  .community-page .reader-tools > .reader-tool:is([data-reader-action='copy'], [data-reader-action='save']) { grid-column: auto; min-height: 44px; gap: 4px; padding-inline: 4px; }
  .community-page .reader-tool:is([data-reader-action='copy'], [data-reader-action='save']) svg { display: none; }
  .community-page .reader-tools-status:empty { display: none; }
  .reader-tool { padding-inline: 10px; }
  .reader-tool-icon { padding-inline: 10px; }
  .site-dialog { width: calc(100% - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .site-dialog-head { gap: 12px; padding: 14px 16px 10px; }
  .site-dialog-head h2 { font-size: 27px; }
  .site-dialog-tabs { padding-inline: 16px; }
  .site-dialog-body { padding: 16px; }
  .site-dialog-note { padding: 12px 16px; }
  .site-search-input { font-size: 16px; }
  .site-result > a { padding-inline: 4px; }
  .site-result strong, .site-result .title { font-size: 17px; }
  .site-saved-row { gap: 7px; }
  body.reader-text-large .feature-body .feature-section > p:not(.eyebrow),
  body.reader-text-large .feature-body .feature-section li { font-size: 19px; }
  body.reader-text-large .mt-detail { font-size: 17px; }
  body.reader-text-large .letter-copy > p:not(.letter-deck):not(.letter-pullquote) { font-size: 20px; }
  body.reader-text-large[data-page='details'] .faq-list :is(p, li) { font-size: 18px; }
  body.reader-text-large .community-page :is(.community-intro, .community-section, .community-feature, .community-status, .community-host, .community-start) p:not(.eyebrow):not(.form-note):not(.community-byline):not(.community-checked) { font-size: 19px; }
}

@media (max-width: 370px) {
  .site-header .brand-text > span { display: block; margin-top: 3px; font-size: 10px; letter-spacing: .04em; }
  .site-header .brand-small { gap: 8px; }
  .site-header .header-inner { gap: 8px; }
  .site-header .nav-toggle { padding-inline: 10px; }
}

@media (forced-colors: active) {
  .reader-tool[aria-pressed='true'], .site-dialog-tabs button[aria-pressed='true'] { border-color: Highlight; outline: 1px solid Highlight; }
  .site-dialog { border: 2px solid CanvasText; box-shadow: none; }
}

@media print {
  .site-dialog::backdrop { display: none !important; }
  .site-header, .reader-tools, .reader-tools-status, .site-dialog,
  .reading-progress, .site-copy-fallback, .site-copy-field, .site-search-open { display: none !important; }
  .feature-section, .story-chapter, .timeline-list > li,
  .mt-item, .mt-card, .mt-detail, .mt-pressure,
  .article-source-notes, .article-note { break-inside: auto; }
  h1, h2, h3, h4 { break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  .article-note, .mt-note, .mt-why { color: black; background: transparent; }
  .mt-guide { display: block !important; font-size: 10pt; }
  .mt-guide > * + * { margin-top: 12px; }
  .article-source-notes a, .mt-record-ref { overflow-wrap: anywhere; }
  .site-footer { display: block !important; margin-top: 24px; padding: 16px 0 0; border-top: 1px solid #777; background: transparent; color: black; }
  .site-footer .footer-inner { display: block; }
  .site-footer .footer-inner > * { display: none !important; }
  .site-footer .footer-inner > .record-disclaimer,
  .site-footer .footer-inner > .last-updated { display: block !important; }
  .site-footer .record-disclaimer { max-width: none; padding-top: 0; border: 0; color: black; font-size: 9pt; line-height: 1.5; }
  .site-footer .record-disclaimer h2 { font-size: 10pt; }
  .site-footer .record-disclaimer > a { display: none; }
  .site-footer .last-updated { margin-top: 10px; color: black; font-size: 9pt; }
}
