:root { --max-width: 1180px; }
html { scroll-padding-block: 16px; }
body { min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { flex: 1; }
h1, h2, p, dl, dt, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
textarea, select { color: inherit; }
.skip { position: absolute; z-index: 1; inset: -100px auto auto 16px; padding: 10px 16px; background: white; }
.skip:focus { top: 12px; }
.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; }
.masthead { border-top: 4px solid var(--blue); background: var(--pale); }
.mast-inner { min-height: 83px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); font-size: 28px; font-weight: 720; letter-spacing: -.045em; line-height: 1.2; }
.brand-mark { width: 30px; height: 34px; fill: none; color: var(--blue); stroke: currentColor; stroke-width: 3; }
.directory-link { color: var(--link); font-size: 14px; font-weight: 650; text-decoration: underline; text-underline-offset: .16em; }
.directory-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.mast-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; }
.mast-locale { color: var(--muted); }
.nav { background: var(--navy); color: white; }
.nav-inner { display: flex; flex-wrap: wrap; }
.nav a { min-height: 44px; padding: 10px 19px; font-size: 14px; font-weight: 600; line-height: 24px; }
.nav a[aria-current=location] { background: #244867; box-shadow: inset 0 -3px #b7d3e7; }
.nav a:focus-visible { outline: 2px solid white; outline-offset: -4px; }
.intro { padding-block: 27px 22px; }
h1 { color: var(--navy); font-size: clamp(30px, 3.3vw, 44px); letter-spacing: -.035em; line-height: 1.23; }
html:not([lang^=en]) h1 { letter-spacing: .015em; }
.intro p { margin-top: 6px; color: var(--muted); font-size: 15px; }
h2 { font-size: 21px; line-height: 1.4; font-weight: 650; color: var(--navy); }
.panel { min-width: 0; border: 1px solid var(--line); background: white; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.editor, .counts { border-top: 3px solid var(--blue); padding: 18px 22px 22px; }
.editor { display: flex; flex-direction: column; }
textarea { display: block; width: 100%; height: 224px; min-height: 130px; flex-grow: 1; margin-top: 12px; border: 1px solid #9dafbe; padding: 12px 15px; background: white; font-size: 16px; line-height: 1.65; resize: vertical; }
textarea::placeholder { color: #637786; opacity: 1; }
.counts { display: flex; flex-direction: column; }
.main-counts { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.main-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line); }
.main-count:first-child { border-top: 0; }
.main-count dt { color: var(--heading); font-size: 15px; font-weight: 600; line-height: 1.45; }
.main-count dd { color: var(--navy); font-size: clamp(28px, 3.2vw, 39px); font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.04em; text-align: end; }
#status:not(:empty) { margin-top: 9px; color: var(--heading); font-size: 14px; font-weight: 550; }
.details-panel { margin-top: 20px; }
.details-panel h2 { padding: 13px 22px; }
.details-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.details-grid > div { display: flex; flex-direction: column; grid-column: span 3; min-width: 0; border-top: 1px solid var(--line); padding: 14px 22px; }
.details-grid > div:nth-child(n+5) { grid-column: span 4; }
.details-grid > div:not(:first-child):not(:nth-child(5)) { border-inline-start: 1px solid var(--line); }
.details-grid dt { color: var(--muted); font-size: 14px; font-weight: 550; line-height: 1.45; }
.details-grid dd { margin-top: auto; padding-top: 5px; font-variant-numeric: tabular-nums; color: var(--navy); font-weight: 650; font-size: 23px; line-height: 1.2; }
.guide { margin-block: 20px 32px; }
.guide summary { min-height: 54px; padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--heading); cursor: pointer; font-size: 16px; font-weight: 650; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.guide[open] summary svg { transform: rotate(180deg); }
.guide-body { border-top: 1px solid var(--line); padding: 18px 22px; }
.definitions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 28px; }
.definitions dt { font-size: 15px; font-weight: 650; color: var(--navy); }
.definitions dd { margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.references { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 18px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 13px; font-size: 13px; }
.references span { color: var(--heading); font-weight: 650; }
.references a { color: var(--link); text-decoration: underline; text-underline-offset: .16em; }
footer { border-top: 1px solid var(--line); background: #f7f9fb; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 78px; padding-block: 12px; }
.footer-brand { font-weight: 650; letter-spacing: -.025em; color: var(--heading); }
.locale-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.globe { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
select { min-height: 44px; max-width: 100%; padding: 8px 32px 8px 12px; font-size: 14px; line-height: 1.4; background: white; border: 1px solid #a5baca; cursor: pointer; }
@media (max-width: 799px) {
  .mast-inner { min-height: 72px; }
  .directory-link { font-size: 13px; }
  .mast-actions { gap: 6px 12px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  textarea { height: 165px; }
  .counts { padding: 13px 18px 16px; }
  .main-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main-count { display: flex; flex-direction: column-reverse; align-items: flex-start; justify-content: flex-end; gap: 7px; padding: 3px 12px; border-top: 0; border-inline-start: 1px solid var(--line); }
  .main-count:first-child { border-inline-start: 0; padding-inline-start: 0; }
  .main-count:last-child { padding-inline-end: 0; }
  .main-count dt { font-size: 14px; }
  .details-grid > div { padding: 12px 16px; }
}
@media (max-width: 559px) {
  .mast-inner { min-height: 69px; }
  .brand { font-size: 25px; gap: 8px; }
  .brand-mark { width: 25px; height: 28px; }
  .mast-inner { align-items: flex-start; flex-direction: column; padding-block: 13px; }
  .mast-actions { width: 100%; justify-content: space-between; }
  .nav a { padding-inline: 13px; }
  .intro { padding-block: 20px 16px; }
  .editor, .counts { padding: 14px 16px 16px; }
  .main-counts { display: flex; }
  .main-count { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; border-inline-start: 0; border-top: 1px solid var(--line); padding: 10px 0; }
  .main-count:last-child { padding-bottom: 0; }
  .details-panel h2, .guide summary { padding-inline: 16px; }
  .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .details-grid > div:nth-child(n) { grid-column: span 1; }
  .details-grid > div:last-child { grid-column: 1 / -1; }
  .details-grid > div:nth-child(n):nth-child(odd) { border-inline-start: 0; }
  .details-grid > div:nth-child(even) { border-inline-start: 1px solid var(--line); }
  .guide { margin-block: 16px 22px; }
  .guide-body { padding: 14px 16px; }
  .definitions { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .foot-inner { gap: 8px 12px; }
}
