/* Institutional document cards and native viewer. */
.statutes-section .document-collection { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.document-entry { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #d5e4ee; border-radius: 12px; background: #fff; }
.document-cover { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-height: 210px; padding: 28px 30px; color: var(--navy); background: linear-gradient(120deg, #deeffa, #a8d6ef); }
.document-cover::after { content: ""; position: absolute; z-index: -1; width: 170px; height: 270px; right: -72px; top: -50px; border: 1px solid #ffffff70; transform: rotate(25deg); pointer-events: none; }
.document-amendment .document-cover { color: #fff; background: linear-gradient(125deg, #093d65, #23688f); }
.document-amendment .document-cover::after { border-color: #a4d4ed40; }
.document-entry-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.document-entry-top .small-label { font-size: .75rem; line-height: 1.6; letter-spacing: .1em; color: inherit; }
.document-format { flex-shrink: 0; color: inherit; font-size: .75rem; letter-spacing: .04em; border: 1px solid currentColor; border-radius: 4px; padding: 2px 6px; opacity: .8; }
.document-cover-title { display: grid; grid-template-columns: minmax(0, 1fr) 72px; align-items: center; gap: 24px; flex: 1; margin-top: 26px; }
.document-cover h3 { margin: 0; font-size: clamp(1.7rem, 2.45vw, 2rem); font-weight: 600; line-height: 1.2; letter-spacing: -.03em; text-wrap: balance; }
.document-emblem { width: 72px; height: 72px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; color: #367eab; }
.document-emblem .emblem-fill { fill: #fff; fill-opacity: .25; stroke: none; }
.document-amendment .document-emblem { color: #bfe4f8; }
.document-entry-body { flex: 1; padding: 26px 30px; }
.document-entry-body > p { font-size: 1rem; line-height: 1.75; margin: 0; color: var(--muted); }
.document-entry-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin: 0 30px; padding: 14px 0; }
.document-view { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; color: var(--navy); font-size: .875rem; font-weight: 600; text-decoration: none; }
.document-view span { line-height: 1.5; overflow-wrap: anywhere; }
.document-view svg, .document-download svg, .document-tool svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.document-view:hover { color: var(--blue); }
.document-download, .document-tool { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid #cfdfeb; border-radius: 50%; background: transparent; color: var(--navy); cursor: pointer; text-decoration: none; flex-shrink: 0; }
.document-download:hover, .document-tool:hover { background: #e5f2fa; border-color: #91b9d4; }
.statutes-section .statutes-footnote { max-width: 1050px; margin-top: 24px; padding-left: 16px; border-left: 2px solid #c8e3f4; font-size: .75rem; line-height: 1.8; }
.document-dialog { position: fixed; inset: 0; width: min(1080px, calc(100vw - 48px)); height: min(960px, calc(100dvh - 48px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid #d1e0ec; border-radius: 18px; background: #fff; color: var(--ink); overflow: hidden; box-shadow: 0 24px 100px #062b4b55; }
.document-dialog[open] { display: flex; flex-direction: column; }
.document-dialog:not([open]) { display: none; }
.document-dialog::backdrop { background: #082b4b77; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.document-viewer-open { overflow: hidden; }
.document-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 26px 18px; flex-shrink: 0; }
.document-viewer-header .small-label { font-size: 9px; letter-spacing: .16em; color: #547991; margin: 0 0 6px; }
.document-viewer-header h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.03em; margin: 0; }
.document-close { align-self: flex-start; }
.document-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 26px; border-top: 1px solid #e1ecf4; border-bottom: 1px solid #dbe7ef; flex-shrink: 0; }
.document-pagination, .document-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.document-toolbar .document-tool { border-color: transparent; border-radius: 8px; }
.document-tool:disabled { opacity: .35; cursor: default; background: transparent; }
.document-tool[aria-pressed="true"] { background: #e4f2fb; color: #146597; }
.document-page-counter { color: #4a6b84; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 108px; text-align: center; }
.document-page-counter strong { color: var(--navy); font-weight: 600; }
.document-page-stage { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; background: #eaf0f4; padding: 28px; position: relative; }
.document-page-stage img { display: block; width: min(100%, 760px); height: auto; margin: 0 auto; box-shadow: 0 5px 20px #082b4b1a; }
.document-page-stage.is-zoomed img { width: 1260px; max-width: none; margin-inline: auto; }
.document-page-stage img[hidden] { display: none; }
.document-page-status { margin: 60px auto; padding: 16px; max-width: 400px; color: #54738b; text-align: center; font-size: 13px; line-height: 1.8; }
.document-page-status[hidden] { display: none; }
.document-viewer-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 26px; border-top: 1px solid #dbe7ef; flex-shrink: 0; }
.document-viewer-footer p { color: #597b93; font-size: 11px; line-height: 1.6; margin: 0; }
.document-viewer-footer a { color: var(--navy); font-size: 12px; font-weight: 550; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; padding-block: 8px; }
@media (max-width: 980px) {
  .document-cover { padding: 24px; }
  .document-cover-title { grid-template-columns: minmax(0, 1fr) 52px; gap: 16px; }
  .document-emblem { width: 52px; height: 52px; }
  .document-cover h3 { font-size: 1.75rem; }
  .document-entry-body { padding: 24px; }
  .document-entry-actions { margin-inline: 24px; }
}
@media (max-width: 760px) {
  .statutes-section .document-collection { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .document-cover { min-height: 200px; padding: 24px; }
  .document-cover-title { grid-template-columns: minmax(0, 1fr) 54px; gap: 18px; }
  .document-emblem { width: 54px; height: 54px; }
  .document-cover h3 { font-size: clamp(1.625rem, 5.7vw, 1.875rem); }
  .document-entry-top .small-label { font-size: .75rem; letter-spacing: .07em; }
  .document-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 13px; }
  .document-viewer-header { padding: 18px 16px 14px; gap: 12px; }
  .document-viewer-header h2 { font-size: 18px; }
  .document-toolbar { padding: 7px 10px; gap: 4px; }
  .document-pagination, .document-toolbar-actions { gap: 2px; }
  .document-page-counter { min-width: 84px; font-size: 11px; }
  .document-page-stage { padding: 16px 10px; }
  .document-viewer-footer { padding: 8px 16px; gap: 12px; }
  .document-viewer-footer p { font-size: 10px; }
  .document-viewer-footer a { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .document-dialog, .document-entry { scroll-behavior: auto; }
}
