/* NBFC document system - shared typography and layouts */
.rules-page, .downloads-page { background: #f1eee8; color: #151817; }
.rules-page .site-header, .downloads-page .site-header,
.rules-page .site-footer, .downloads-page .site-footer { color: #f1eee8; }
.rules-hero, .downloads-hero { padding: 76px 8vw 66px; background: #181b1a; color: #f1eee8; display: grid; grid-template-columns: 1.5fr .58fr; gap: 7vw; align-items: center; }
.rules-kicker { color: #f47c69; font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.rules-hero h1, .downloads-hero h1 { font: 900 clamp(65px,8vw,110px)/.84 var(--display); margin: 28px 0 24px; }
.rules-hero p, .downloads-hero p { max-width: 650px; font-size: 14px; line-height: 1.8; color: #c1c4bd; }
.rules-actions { display: flex; align-items: center; gap: 25px; flex-wrap: wrap; margin-top: 30px; }
.rules-secondary { font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; border-bottom: 1px solid #d6d8d3; padding-bottom: 5px; }
.rules-hero aside { background: #272b29; padding: 29px; border: 1px solid #48504b; border-top: 3px solid var(--red); display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.rules-hero aside img { width: 84px; height: 84px; object-fit: contain; margin-bottom: 24px; }
.rules-hero aside strong { font: 900 36px var(--display); }
.rules-hero aside span { font-size: 9px; color: #f98071; font-weight: 800; letter-spacing: .15em; }
.rules-hero aside small { font-size: 10px; color: #c2c5be; line-height: 1.7; margin-top: 9px; }
.rules-notice { display: grid; grid-template-columns: .25fr 1fr; gap: 30px; padding: 18px 8vw; background: #f8e3d4; border-bottom: 1px solid #e3c9b7; color: #552820; }
.rules-notice strong { font: 800 20px var(--display); text-transform: uppercase; }
.rules-notice p { margin: 0; font-size: 11px; line-height: 1.8; }
.rules-layout { display: grid; grid-template-columns: minmax(240px,.31fr) minmax(0,1fr); gap: 5vw; padding: 64px 8vw 110px; align-items: start; }
.rules-toc { position: sticky; top: 100px; max-height: calc(100vh - 130px); display: flex; flex-direction: column; border: 1px solid #d0ccc5; background: #e9e5dd; }
.rules-toc h2 { margin: 0; padding: 17px 19px; font: 900 32px var(--display); border-bottom: 1px solid #c5c4bb; }
.rules-toc-links { overflow-y: auto; flex: 1; }
.rules-toc-links a { display: block; padding: 10px 19px; border-bottom: 1px solid rgba(20,22,21,.09); color: #4f524c; font-size: 10px; line-height: 1.5; }
.rules-toc-links a:hover, .rules-toc-links a:focus-visible { color: #b53326; background: #e3dbd0; }
.rules-toc-footer { display: block; background: #c83b2c; color: white; padding: 14px 19px; font-size: 10px; text-transform: uppercase; font-weight: 800; }
.rules-content { min-width: 0; }
.rules-content>p { font-size: 12px; line-height: 1.85; margin-bottom: 17px; }
.rules-chapter { border-bottom: 1px solid #cecec7; padding: 26px 0 28px; scroll-margin-top: 90px; }
.rules-chapter:first-child { padding-top: 0; }
.rules-chapter h2 { font: 800 clamp(28px,3.2vw,42px)/1.04 var(--display); margin: 0 0 23px; color: #af3325; }
.rules-chapter p { margin: 0 0 17px; font-size: 12px; line-height: 1.88; color: #343a35; }
.rules-chapter p strong, .rules-content>p strong { color: #121715; }
.rules-chapter ul { padding-left: 19px; margin: 6px 0 20px; }
.rules-chapter li { padding-left: 2px; margin: 8px 0; line-height: 1.8; font-size: 12px; color: #343a35; }
.rules-chapter li::marker { color: #c23b2c; }
.rules-chapter a { color: #b03425; text-decoration: underline; overflow-wrap: anywhere; }
.rules-appendix { background: #e7e2d9; border: 1px solid #d2ccc3; padding: 30px; margin: 25px 0; }

.downloads-hero { grid-template-columns: 1.4fr .6fr; }
.downloads-hero aside { border-left: 2px solid var(--red); padding-left: 28px; }
.downloads-hero aside strong { display: block; font: 900 56px/.9 var(--display); margin-bottom: 15px; }
.downloads-hero aside span { display: block; color: #c5cac2; font-size: 10px; line-height: 1.8; }
.docs-alert { background: #f4dfd2; border-bottom: 1px solid #e4c5b4; padding: 16px 8vw; font-size: 11px; color: #743a2d; line-height: 1.75; }
.docs-main { padding: 62px 8vw 105px; display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 5vw; align-items: start; }
.docs-sidebar { position: sticky; top: 100px; }
.docs-sidebar h2 { font: 900 33px var(--display); margin: 0 0 20px; }
.docs-filters { display: flex; flex-direction: column; gap: 5px; }
.docs-filters button { display: flex; align-items: center; justify-content: space-between; background: transparent; border: 1px solid #c8c6bf; padding: 12px 14px; color: #262a27; font: 800 10px var(--body); letter-spacing: .07em; cursor: pointer; text-align: left; }
.docs-filters button[aria-pressed="true"], .docs-filters button:hover { background: #181b1a; color: #f1eee8; border-color: #181b1a; }
.docs-sidebar p { color: #70746e; font-size: 11px; line-height: 1.75; margin-top: 22px; }
.docs-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.docs-toolbar h2 { font: 800 36px var(--display); margin: 0; }
.docs-toolbar input { width: min(100%,300px); border: 1px solid #c3c2bb; background: #fffdfa; padding: 13px 14px; font: 500 12px var(--body); color: #161918; }
.docs-toolbar input:focus { outline: 2px solid #c83729; }
.docs-count { font-size: 9px; font-weight: 800; letter-spacing: .14em; margin: 0 0 18px; color: #797c75; }
.docs-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.doc-card { display: flex; flex-direction: column; border: 1px solid #c7c7be; background: #fffdfa; padding: 23px; min-height: 269px; }
.doc-card.is-hidden { display: none; }
.doc-card-top { display: flex; justify-content: space-between; gap: 9px; align-items: flex-start; }
.doc-kind { font-size: 9px; color: #b43b2a; font-weight: 800; letter-spacing: .15em; }
.doc-status { font-size: 8px; font-weight: 800; padding: 4px 7px; border-radius: 2px; color: #5b5e55; border: 1px solid #cbc9bf; }
.doc-status.current { color: #286544; border-color: #a4c4aa; background: #eaf2e9; }
.doc-status.review { color: #a25d14; border-color: #e3c399; background: #fff5e4; }
.doc-status.archive { color: #777; background: #eeece8; }
.doc-card h3 { font: 800 30px/1.02 var(--display); margin: 21px 0 11px; }
.doc-card p { color: #5c625b; font-size: 11px; line-height: 1.75; margin: 0 0 16px; }
.doc-meta { margin-top: auto; border-top: 1px solid #deddd6; padding-top: 11px; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 8px; font-weight: 800; color: #7d8179; letter-spacing: .05em; }
.doc-card>a { display: inline-flex; margin-top: 17px; align-self: flex-start; color: #a72c20; text-transform: uppercase; font-size: 10px; font-weight: 800; border-bottom: 1px solid #b73b2e; padding-bottom: 3px; }
.docs-empty { display: none; padding: 30px; background: #fffdfa; color: #61645e; }
.docs-next { margin-top: 35px; padding: 24px; display: grid; grid-template-columns: .5fr 1fr; gap: 30px; border: 1px solid #c9c5bd; background: #e8e4db; }
.docs-next h3 { font: 800 28px var(--display); margin: 0; }
.docs-next p { font-size: 11px; line-height: 1.8; margin: 0; color: #575a54; }

@media (max-width: 960px) {
  .rules-hero, .downloads-hero { padding: 68px 6vw 55px; }
  .rules-layout, .docs-main { padding-left: 6vw; padding-right: 6vw; gap: 30px; grid-template-columns: 210px minmax(0,1fr); }
  .rules-notice, .docs-alert { padding-left: 6vw; padding-right: 6vw; }
}
@media (max-width: 720px) {
  .rules-hero, .downloads-hero { grid-template-columns: 1fr; gap: 25px; padding: 55px 6vw 50px; }
  .rules-hero h1, .downloads-hero h1 { font-size: clamp(61px,13vw,90px); }
  .rules-hero aside { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: center; }
  .rules-hero aside img { grid-row: 1 / 4; width: 65px; height: 65px; margin: 0; }
  .rules-hero aside strong { font-size: 30px; }
  .rules-notice, .docs-main, .rules-layout { grid-template-columns: 1fr; }
  .rules-layout, .docs-main { padding-top: 30px; }
  .rules-toc { position: static; max-height: 250px; }
  .docs-sidebar { position: static; }
  .docs-filters { flex-direction: row; flex-wrap: wrap; }
  .docs-filters button { padding: 10px; }
  .docs-sidebar p { margin-top: 13px; }
  .docs-toolbar { align-items: stretch; flex-direction: column; }
  .docs-toolbar input { width: 100%; max-width: none; }
  .docs-grid { grid-template-columns: 1fr; }
  .doc-card { min-height: 235px; }
  .docs-next { grid-template-columns: 1fr; gap: 13px; }
  .rules-appendix { padding: 18px; }
}
