.leg-page { background: var(--paper); }
.leg-page [hidden] { display: none !important; }
.leg-page :focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.leg-page a { text-underline-offset: .2em; }
.leg-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 24px; }
.leg-brand { display: flex; align-items: center; gap: 15px; text-decoration: none; }
.leg-brand strong { font: 700 38px var(--serif); letter-spacing: -.06em; border-right: 1px solid var(--line); padding-right: 16px; color: var(--navy-900); }
.leg-brand span { max-width: 165px; font-size: 13px; font-weight: 700; line-height: 1.3; }
.leg-header nav { display: flex; gap: 26px; font-size: 14px; font-weight: 700; }
.leg-header nav a { display: inline-flex; align-items: center; min-height: 44px; }
.leg-hero { background: var(--navy-900); color: var(--white); padding-block: 64px 70px; border-bottom: 5px solid var(--gold); }
.leg-hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 80px); align-items: center; }
.leg-kicker { font-size: 12px; text-transform: uppercase; font-weight: 800; letter-spacing: .13em; color: var(--navy-700); margin-bottom: 18px; }
.leg-hero .leg-kicker { color: var(--gold-light); }
.leg-hero h1 { font-size: clamp(3.2rem, 6.6vw, 6rem); line-height: 1.02; }
.leg-deck { max-width: 670px; color: #e0e5ec; font-size: 18px; line-height: 1.7; margin-bottom: 0; }
.leg-standard-box { padding: 30px; border: 1px solid #43607f; background: #0c294a; }
.leg-standard-box h2 { font-size: 34px; margin-top: 24px; }
.leg-standard-box dl { margin: 26px 0; }
.leg-standard-box dl div { display: flex; justify-content: space-between; gap: 16px; padding-block: 9px; border-top: 1px solid #43607f; font-size: 13px; }
.leg-standard-box dd { margin: 0; font-weight: 700; text-align: right; }
.leg-standard-box p { font-size: 12px; color: #d4deeb; margin-bottom: 0; }
.leg-approved { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #205940; background: #e5efe8; padding: 5px 9px; }
.leg-standard-box .leg-approved { background: #193f42; color: #bfe4cf; }
.leg-workspace { padding-block: 55px 65px; }
.leg-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; }
.leg-section-heading h2 { font-size: clamp(2.3rem, 4vw, 3.2rem); margin-bottom: 0; }
.leg-text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 800; color: var(--navy-800); }
.leg-filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; padding: 25px; background: var(--white); border: 1px solid var(--line); }
.leg-filters label { min-width: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 800; color: var(--navy-900); }
.leg-filters select, .leg-filters input { width: 100%; min-width: 0; min-height: 46px; background: #fff; border: 1px solid #aaadad; border-radius: 2px; padding: 9px; font-size: 14px; color: var(--ink); }
.leg-button { min-height: 44px; padding: 9px 19px; cursor: pointer; background: var(--navy-900); color: #fff; border: 1px solid var(--navy-900); border-radius: 2px; font-size: 13px; font-weight: 800; }
.leg-button--secondary { background: transparent; color: var(--navy-900); justify-self: start; }
.leg-result-status { color: var(--muted); font-size: 14px; padding-block: 24px 2px; max-width: 820px; }
.leg-results { display: grid; gap: 24px; }
.leg-empty { text-align: center; padding: 48px 24px 58px; border: 1px dashed #b9b09e; background: #f1eadd; }
.leg-empty-mark { display: block; margin-bottom: 16px; font: 48px var(--serif); color: #80632a; }
.leg-empty h2 { font-size: 32px; }
.leg-empty p { margin: 0; color: var(--muted); font-size: 14px; }
.leg-card { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--navy-700); padding: 28px; min-width: 0; }
.leg-card-top, .leg-card-title, .leg-detail-title { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.leg-card-top { align-items: center; margin-bottom: 20px; }
.leg-card-top .leg-kicker { margin: 0; }
.leg-card-title h3 { font: 40px var(--serif); margin-bottom: 10px; }
.leg-card-title h3 a { text-decoration: none; }
.leg-card-title p { font-size: 18px; max-width: 750px; }
.leg-score { flex-shrink: 0; display: flex; flex-direction: column; text-align: right; }
.leg-score strong { font: 52px var(--serif); line-height: 1.1; color: var(--navy-900); }
.leg-score span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.leg-score:has(strong:only-child) { max-width: 100%; }
.leg-flag { padding: 12px 16px; background: #fff0d3; color: #714800; border-left: 4px solid #986819; font-size: 14px; font-weight: 800; }
.leg-flag--fatal { background: #f8e5e4; color: #821e28; border-color: #a22936; }
.leg-muted { color: var(--muted); font-size: 14px; }
.leg-facts { display: flex; flex-wrap: wrap; gap: 18px 38px; margin: 24px 0; }
.leg-facts div { min-width: 100px; max-width: 100%; }
.leg-facts dt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; color: var(--muted); }
.leg-facts dd { margin: 4px 0 0; font-size: 16px; font-weight: 700; }
.leg-priority-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.leg-priority-tags span { background: #eeeae0; color: #253b50; font-size: 12px; padding: 5px 10px; }
.leg-pending-note { font-size: 13px; font-weight: 700; color: #714800; }
.leg-method { background: #eee4d2; border-top: 1px solid var(--line); padding-block: 56px; }
.leg-method-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 55px; }
.leg-method h2 { font-size: 42px; }
.leg-method h3 { font-size: 17px; line-height: 1.4; }
.leg-method p { font-size: 15px; }
.leg-footer { padding-block: 34px; font-size: 13px; }
.leg-footer p { color: var(--muted); margin: 8px 0; }
.leg-footer a { display: inline-block; padding-block: 12px; }
.leg-back { display: inline-block; color: #e0e5ec; font-size: 13px; margin-bottom: 28px; }
.leg-caption { max-width: 830px; font-size: 24px; line-height: 1.4; }
.leg-score--hero strong { color: var(--white); font-size: 78px; }
.leg-score--hero span { color: #d4deeb; }
.leg-score--unscored strong { font: 700 19px var(--sans); line-height: 1.5; white-space: nowrap; }
.leg-priority-heading > .leg-unscored-label { font-size: 13px; white-space: nowrap; flex-shrink: 0; }
.leg-detail { max-width: 980px; padding-block: 42px; }
.leg-section { padding-block: 34px; border-bottom: 1px solid var(--line); }
.leg-section > h2 { font-size: 36px; }
.leg-summary { font-size: 22px; line-height: 1.6; }
.leg-warning { padding: 24px; background: #fff0d3; border: 1px solid #b69250; }
.leg-warning h2 { font-family: var(--sans); font-size: 20px; font-weight: 800; letter-spacing: normal; line-height: 1.35; }
.leg-priority { padding: 24px; border: 1px solid var(--line); background: var(--white); margin-top: 16px; }
.leg-priority-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.leg-priority-heading h3 { font-size: 18px; line-height: 1.4; }
.leg-priority-heading > strong { font-size: 18px; }
.leg-priority .leg-facts { gap: 14px 25px; }
.leg-evidence { margin-top: 22px; padding: 28px; border: 1px solid var(--line); background: var(--white); }
.leg-evidence--fatal { border-top: 4px solid #a22936; }
.leg-severity { font-size: 17px; line-height: 1.4; color: #821e28; }
.leg-label { font-size: 12px; font-weight: 800; text-transform: uppercase; margin: 26px 0 10px; }
.leg-page blockquote { margin: 0 0 12px; border-left: 3px solid var(--gold); padding: 12px 20px; background: #f7f2e8; white-space: pre-wrap; font-family: var(--serif); font-size: 18px; }
.leg-correction { padding: 16px 20px; margin-block: 22px; background: #edf2ec; border-left: 3px solid #34634c; }
.leg-page h4 { margin: 20px 0 8px; }
.leg-correction h4 { margin-top: 0; }
.leg-correction p:last-child { margin-bottom: 0; }
.leg-history { padding-left: 24px; }
.leg-history li { padding: 12px 0 24px 8px; }
.leg-history h3 { font-size: 20px; }
.leg-change { padding: 24px; background: var(--white); border: 1px solid var(--line); margin-top: 20px; }
.leg-page details { margin-top: 16px; }
.leg-page summary { cursor: pointer; min-height: 44px; padding-block: 9px; font-size: 14px; font-weight: 700; }
.leg-page code { font-size: 12px; }
.leg-card, .leg-detail, .leg-hero, .leg-page code, .leg-page blockquote { overflow-wrap: anywhere; }
@media(max-width:760px) {
  .leg-hero-grid, .leg-method-grid { grid-template-columns: 1fr; gap: 32px; }
  .leg-hero { padding-block: 40px; }
  .leg-standard-box { padding: 24px; }
  .leg-filters { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 18px; gap: 15px; }
  .leg-section-heading { display: block; }
  .leg-section-heading > a { margin-top: 12px; }
  .leg-card-title, .leg-detail-title { flex-direction: column; }
  .leg-score { text-align: left; }
  .leg-score--hero strong { font-size: 60px; }
  .leg-score--unscored { width: 100%; }
  .leg-score--unscored strong { font-size: 18px; }
  .leg-header { flex-wrap: wrap; gap: 10px; padding-block: 18px; }
  .leg-header nav { gap: 22px; }
  .leg-card, .leg-evidence, .leg-priority, .leg-change { padding: 20px; }
  .leg-priority-heading { flex-wrap: wrap; gap: 8px; }
  .leg-card-top { flex-wrap: wrap; gap: 10px; }
  .leg-workspace { padding-block: 36px 45px; }
  .leg-facts { gap: 16px 24px; }
}
@media(prefers-reduced-motion:reduce) { .leg-page { scroll-behavior: auto; } }
