:root {
  color-scheme: light;
}

body {
  margin: 0;
  color: rgb(var(--c-ink, 23 43 77));
  background: rgb(var(--c-page, 255 255 255));
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
}

.ph-wrap { width: min(100% - 2rem, 54rem); margin-inline: auto; }
.ph-header { border-bottom: 1px solid var(--c-border, #d6dce5); }
.ph-header-inner { min-height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ph-brand { color: inherit; font-size: 1.125rem; font-weight: 700; text-decoration: none; }
.ph-header nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.ph-skip { position: absolute; left: -9999px; }
.ph-skip:focus { left: 1rem; top: 1rem; z-index: 5; padding: .75rem; background: white; }
.ph-intro { padding: 2.5rem 0 1.5rem; border-bottom: 1px solid var(--c-border, #d6dce5); }
.ph-intro h1, .ph-article h1 { max-width: 48rem; margin: .25rem 0 .75rem; font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.12; }
.ph-intro > p:last-child { max-width: 42rem; font-size: 1.125rem; }
.ph-eyebrow { margin: 0; color: rgb(var(--c-ink-muted, 88 103 125)); font-family: "Fragment Mono", monospace; font-size: .8rem; letter-spacing: .06em; }
.ph-list { margin: 0 0 3rem; }
.ph-item { padding: 1.25rem 0; border-bottom: 1px solid var(--c-border, #d6dce5); }
.ph-item h2 { margin: .25rem 0 .5rem; font-size: 1.35rem; line-height: 1.3; }
.ph-item h2 a { color: var(--c-link, #005ea8); }
.ph-meta, .ph-source, .ph-provenance { color: rgb(var(--c-ink-muted, 88 103 125)); font-size: .9rem; }
.ph-meta { margin: 0; }
.ph-source { margin: .25rem 0; }
.ph-summary { margin: .6rem 0 0; line-height: 1.55; }
.ph-search { max-width: 42rem; padding: 1.5rem 0 2rem; }
.ph-search label { display: block; margin-bottom: .5rem; font-weight: 700; }
.ph-search-row { display: flex; align-items: stretch; gap: .5rem; }
.ph-search input { flex: 1; min-width: 0; padding: .65rem .75rem; border: 2px solid var(--c-border, #748094); border-radius: 2px; font: inherit; }
.ph-search button { flex: 0 0 auto; }
.ph-results-title { font-size: 1.25rem; }
.ph-article { padding: 2rem 0 3rem; }
.ph-article h1 { margin-top: .75rem; }
.ph-facts { display: grid; gap: .75rem; margin: 1.5rem 0 2rem; }
.ph-facts div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; }
.ph-facts dt { color: var(--c-ink-muted, #58677d); }
.ph-facts dd { margin: 0; font-weight: 600; }
.ph-body { max-width: 48rem; font-size: 1.0625rem; line-height: 1.75; white-space: normal; overflow-wrap: anywhere; }
.ph-original { margin: 2rem 0 1rem; }
.ph-provenance { margin-top: 1.5rem; }
.ph-footer { padding: 1.25rem 0; border-top: 1px solid rgb(var(--c-line, 214 220 229)); color: rgb(var(--c-ink-muted, 88 103 125)); font-size: .85rem; }

/* PHP UI extensions: home filters and article metadata use the static site's type and colors. */
.ph-home-grid { display: grid; grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.ph-filter-sidebar { position: sticky; top: 1rem; align-self: start; padding: 1.25rem; border: 1px solid rgb(var(--c-line, 214 220 229)); background: rgb(var(--c-surface, 246 247 248)); }
.ph-filter-sidebar h2 { margin-top: 0; font-size: 1.2rem; }
.ph-filter-sidebar .st-search { max-width: none; padding: 0; }
.ph-filter-sidebar .st-search-row { display: block; }
.ph-filter-sidebar .st-search-input { display: grid; grid-template-columns: 1fr; gap: .5rem; }
.ph-filter-sidebar .st-filters { grid-template-columns: 1fr; }
.ph-home-results { min-width: 0; }
.ph-home-results > h2 { margin-top: 0; }
.ph-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 30%); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.ph-article-main { min-width: 0; }
.ph-article-sidebar { min-width: 0; border-left: 1px solid rgb(var(--c-line, 214 220 229)); padding-left: 1.5rem; overflow-wrap: anywhere; }
.ph-article-sidebar h2 { margin: 1.5rem 0 .5rem; font-size: 1.35rem; }
.ph-article-sidebar h2:first-of-type { margin-top: .5rem; }
.ph-original { margin: 0 0 1.5rem; }
.ph-url { display: inline-block; margin-top: .25rem; font-size: .875rem; }
.ph-meta-list { margin: 0; }
.ph-meta-list > div { display: grid; grid-template-columns: minmax(7.5rem, 34%) minmax(0, 1fr); gap: 1rem; padding: .65rem 0; border-top: 1px solid rgb(var(--c-line, 214 220 229)); }
.ph-meta-list dt { color: rgb(var(--c-ink-muted, 88 103 125)); font-weight: 700; }
.ph-meta-list dd { margin: 0; line-height: 1.55; }
.ph-sidebar-list { padding-left: 1.2rem; }
.ph-stats-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }
.ph-stats-nav a { padding: .55rem .8rem; border: 1px solid rgb(var(--c-line, 214 220 229)); color: inherit; }
.ph-stats-chart { margin: 1rem 0 1.5rem; overflow-x: auto; }
.ph-stats-chart svg { display: block; width: 100%; min-width: 32rem; height: auto; color: rgb(var(--c-ink-muted, 88 103 125)); font: 10px var(--font-mono, monospace); }

@media (max-width: 52rem) {
  .ph-home-grid { grid-template-columns: 1fr; }
  .ph-filter-sidebar { position: static; }
  .ph-filter-sidebar .st-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-article-layout { grid-template-columns: minmax(0, 1fr); }
  .ph-article-sidebar { border-left: 0; border-top: 2px solid rgb(var(--c-line, 214 220 229)); padding: 1.25rem 0 0; }
}

@media (max-width: 36rem) {
  .ph-header-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: .75rem; }
  .ph-search-row { flex-direction: column; }
  .ph-search button { align-self: flex-start; }
  .ph-facts div { grid-template-columns: 1fr; gap: .15rem; }
  .ph-filter-sidebar .st-filters { grid-template-columns: 1fr; }
  .ph-meta-list > div { grid-template-columns: 1fr; gap: .2rem; }
}

/* Publication layouts fill the shell; prose remains at a comfortable reading measure. */
.st-article { max-width: none; }
.ph-article-layout { grid-template-columns: minmax(0, 2.2fr) minmax(16rem, 1fr); gap: 2.5rem; }
.ph-article-main .st-prose { max-width: 70ch; }
.ph-meta-list > div { grid-template-columns: 1fr; gap: .25rem; }
.ph-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 3rem; margin-bottom: 1.5rem; }
.ph-intro-grid .st-hero h1 { max-width: 30ch; }
.ph-intro-grid .st-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0; }
.ph-intro-grid .g2-tile { padding: .6rem; }
.ph-intro-grid .st-figure { font-size: 1.4rem; }
.ph-feed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 2.5rem; align-items: start; }
.ph-feed-main, .ph-feed-sidebar { min-width: 0; }
.ph-feed-sidebar { border-left: 1px solid rgb(var(--c-line)); padding-left: 1.25rem; overflow-wrap: anywhere; }
.ph-feed-sidebar h2:first-child { margin-top: 0; }
.ph-facets { padding: 0; list-style: none; }
.ph-facets li { display: flex; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.ph-filter-details { margin-block: 1rem; }
.ph-filter-details summary { cursor: pointer; min-height: 44px; display: list-item; padding-top: .5rem; }
.ph-filter-details > button { margin-top: 1rem; }
@media (max-width: 52rem) {
  .ph-intro-grid, .ph-feed-grid, .ph-article-layout { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .ph-intro-grid .st-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ph-intro-grid .st-tile-link { font-size: .8rem; overflow-wrap: anywhere; }
  .ph-intro-grid .st-figure { font-size: 1.1rem; }
  .ph-feed-sidebar { border-left: 0; border-top: 1px solid rgb(var(--c-line)); padding: 1rem 0; }
}
@media (max-width: 52rem) {
  .ph-intro-grid .st-hero h1 { font-size: 24px; margin-top: 8px; }
  .ph-intro-grid .st-lede { font-size: 15px; margin-bottom: 0; }
  .ph-filter-sidebar { padding: .75rem; }
  .ph-filter-sidebar h2 { margin-bottom: .5rem; }
  .ph-filter-sidebar .ph-filter-details { margin-block: .25rem; }
}

/* Open filters and an unboxed, aligned collection summary. */
.ph-intro-stats { list-style: none; padding: 0; margin: 0; align-self: center; }
.ph-intro-stats .st-tile-link { display: grid; grid-template-columns: 8rem minmax(0, 1fr); align-items: baseline; gap: 1rem; padding-block: .35rem; }
.ph-intro-stats .st-figure { font-size: 1.5rem; }
.ph-filter-sidebar .st-search-input, .st-search-input { display: flex; flex-wrap: nowrap; align-items: stretch; gap: .5rem; }
.ph-search-submit { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; min-height: 44px; padding: .5rem; }
.ph-visible-filters > button { margin-top: 1rem; }
@media (max-width: 52rem) {
  .ph-intro-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; }
  .ph-intro-stats .st-tile-link { display: block; padding: 0; }
  .ph-intro-stats .st-figure { display: inline; font-size: 1.125rem; margin-right: .25rem; }
}

/* Compact summaries and data-heavy views. */
.ph-intro-stats { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; align-content: center; }
.ph-intro-stats li { display: inline-block; }
.ph-intro-stats .st-tile-link { display: inline; padding: 0; text-decoration: none; white-space: nowrap; }
.ph-intro-stats .st-figure { display: inline; margin-right: .25rem; font-size: 1.2rem; }

.ph-intro-stats a:hover, .ph-intro-stats a:focus-visible { text-decoration: underline; }
.st-main h1 { margin-bottom: 10px; }
.st-main h2 { margin-top: 20px; margin-bottom: 8px; }
.st-table th, .st-table td { padding: 5px 10px; line-height: 1.35; }
.ph-stats-nav { gap: 1rem; margin: .75rem 0; }
.ph-stats-nav a { border: 0; padding: .25rem 0; }
.ph-feed-main .st-filters { gap: 8px 12px; }
.ph-feed-main .g2-input { padding-block: .35rem; min-height: 38px; }
.ph-visible-filters > button { margin-top: .65rem; }
.st-item { padding-block: 10px; }
.ph-archive-scroll { overflow-x: auto; margin-block: 1rem; }
.ph-archive { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: .875rem; font-variant-numeric: tabular-nums; }
.ph-archive th, .ph-archive td { border: 0; text-align: center; padding: 0; }
.ph-archive th { padding: .35rem; }
.ph-archive td a { display: block; padding: .5rem .35rem; color: inherit; text-decoration: none; min-width: 2.5rem; }
.ph-archive td a:hover, .ph-archive td a:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; text-decoration: underline; }
.ph-archive-empty { color: rgb(var(--c-ink-muted)); }
@media (max-width:52rem) {
  .ph-intro-stats { display:flex; }
  .ph-intro-stats .st-tile-link { display:inline; }
  .ph-intro-stats .st-figure { font-size:1.125rem; }
}

.st-item > .st-meta { margin: 0 0 .25rem; }

/* Metadata uses a shared line when it fits; longer values wrap as a unit. */
.ph-meta-list > div { display: block; padding-block: .4rem; }
.ph-meta-list dt:not(.st-sr), .ph-meta-list dd { display: inline-block; vertical-align: top; max-width: 100%; }
.ph-meta-list dt:not(.st-sr) { margin-right: .5rem; }
.ph-meta-list dt:not(.st-sr)::after { content: ":"; }
.ph-meta-list dd { overflow-wrap: anywhere; }

/* Full-width filter toolbar above feed and sidebar. */
.ph-search-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ph-wide-search { max-width: none; margin-bottom: 1rem; }
.ph-filter-actions { margin-top: .5rem; }
.ph-clear-filters { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 1.5rem; color: inherit; text-decoration: none; }
.ph-clear-filters:hover { background: rgb(var(--c-surface, 246 247 248)); }
@media (min-width: 64rem) {
  .ph-wide-search { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
  .ph-wide-search .ph-visible-filters, .ph-wide-search .st-filters { display: contents; }
  .ph-wide-search .ph-search-label { position: static; width: auto; height: auto; margin: 0 0 4px; overflow: visible; clip-path: none; white-space: normal; }
  .ph-wide-search .st-search-row { flex: 1.3 1 14rem; min-width: 0; }
  .ph-wide-search .st-filters > div { flex: 1 1 10rem; min-width: 0; }
  .ph-wide-search .ph-filter-actions { flex: 0 0 44px; margin: 0; }
  .ph-wide-search .g2-input { min-height: 44px; }
}

.ph-last-update { font-size: .8125rem; font-weight: 400; white-space: nowrap; }
.st-header-in > .ph-last-update { margin-left: auto; padding-block: .5rem; color: inherit; opacity: .8; }
@media (max-width: 52rem) {
  .st-header-in > .ph-last-update { margin-left: 0; }
}

.ph-wordmark { gap: 0; }
.ph-wordmark:not([aria-current="page"]):hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
