:root {
  color-scheme: light;
  --navy: #101f38;
  --navy-deep: #0b172b;
  --burgundy: #741b34;
  --gold: #dfbb74;
  --paper: #f7f4ed;
  --ink: #17263d;
  --muted: #4d5a6b;
  --border: #d8d2c5;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.62 var(--sans); }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #247b9d;
  outline-offset: 4px;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.06; font-family: var(--serif); }
.shell { width: min(100% - 3.5rem, 72rem); margin-inline: auto; }
.skip { position: absolute; z-index: 4; top: 1rem; left: 1rem; padding: .65rem 1rem; background: white; transform: translateY(-160%); }
.skip:focus { transform: translateY(0); }
.masthead { background: var(--navy-deep); color: #fcf6e8; border-bottom: 1px solid #6c5a43; }
.masthead-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5.2rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; font: bold 1.2rem/1.2 var(--serif); text-decoration: none; }
.brand img { object-fit: contain; }
.masthead nav, .footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(.85rem, 2.4vw, 1.9rem); font-size: .87rem; font-weight: 650; }
.masthead nav a, .footer nav a { text-decoration: none; }
.masthead nav a:hover, .footer nav a:hover { text-decoration: underline; }
.hero {
  background: radial-gradient(ellipse at 83% 110%, #3e3b47 0, transparent 58%), linear-gradient(116deg, var(--navy) 3%, #192943 72%, #26334a 100%);
  color: #fcf6e8;
  padding-block: clamp(3rem, 7vw, 5.45rem);
  border-bottom: 4px solid #b9914b;
}
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 7rem); align-items: center; }
.hero h1 { font-size: clamp(4rem, 9vw, 7.5rem); letter-spacing: -.067em; font-weight: 500; line-height: .84; }
.hero h1 + p { margin-block: 1.6rem 1.45rem; color: #e4e4e1; font-size: 1.07rem; max-width: 29rem; }
.primary, .outline { display: inline-flex; width: max-content; max-width: 100%; align-items: center; justify-content: space-between; gap: 1rem; padding: .68rem 1rem; font-size: .87rem; font-weight: 750; text-decoration: none; border-radius: .18rem; }
.primary { background: var(--gold); color: var(--navy-deep); }
.primary:hover { background: #f2d697; }
.guide { background: #f9f3e7; color: var(--ink); padding: clamp(1.4rem, 3.6vw, 2.4rem); border-top: 4px solid var(--gold); box-shadow: 0 14px 36px #0c152447; }
.guide-mark { display: block; width: 2.3rem; border-top: 3px solid var(--burgundy); margin-bottom: 1.15rem; }
.guide h2 { font-size: clamp(1.75rem, 3vw, 2.46rem); letter-spacing: -.035em; }
.guide p { margin-top: .6rem; margin-bottom: .8rem; color: var(--muted); }
.guide a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-top: 1px solid #d8cbb3; padding: .6rem 0; font-size: .92rem; font-weight: 650; }
.topics { padding-block: clamp(1.8rem, 4vw, 3.15rem); }
.topics h2, .library h2, .governance h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.047em; }
.topic-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; margin-top: 1rem; }
.topic { display: flex; align-items: center; text-align: left; min-height: 3.5rem; gap: .65rem; background: #fffcf7; border: 1px solid var(--border); border-radius: .2rem; color: var(--ink); padding: .65rem .7rem; font-size: .9rem; font-weight: 650; }
.topic:hover { background: #f3e9d8; border-color: #ad853f; }
.icon { width: 1.8rem; height: 1.8rem; display: block; padding: .27rem; flex: 0 0 auto; fill: #efcf90; stroke: var(--burgundy); stroke-width: 1.65; stroke-linejoin: round; stroke-linecap: round; background: #f7edda; border-radius: .2rem; }
.topic:nth-child(even) .icon { stroke: #224d73; fill: #b1cbbf; background: #e7eee6; }
.arrow { margin-left: auto; color: var(--burgundy); }
.library { border-top: 1px solid var(--border); padding-block: 2.35rem 4rem; }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-heading p { margin-top: .45rem; color: var(--muted); }
.filters { display: grid; grid-template-columns: 1.5fr 1fr 1fr auto; align-items: end; gap: .75rem; background: #eee9df; border: 1px solid var(--border); padding: .85rem; border-radius: .25rem; }
.input-wrap { display: grid; gap: .24rem; min-width: 0; }
label { font-weight: 720; font-size: .84rem; }
input, select, .reset { min-height: 2.8rem; color: var(--navy); border: 1px solid #a9a295; border-radius: .15rem; background: white; padding: .48rem .58rem; width: 100%; }
.reset { font-weight: 670; font-size: .87rem; background: transparent; }
.reset:hover { background: #fffdf9; }
.result-count { min-height: 1.6rem; margin-block: .68rem .38rem; color: var(--muted); font-size: .9rem; }
.entries { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; }
.entry { display: flex; flex-direction: column; padding: 1.1rem; border: 1px solid var(--border); background: #fffdf9; scroll-margin-top: 1rem; }
.entry:target { outline: 2px solid var(--burgundy); outline-offset: 3px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .52rem; color: var(--muted); font-size: .72rem; }
.meta span { background: #efe5df; color: #60162c; font-weight: 730; padding: .08rem .36rem; }
.entry h3 { margin-block: .68rem .52rem; font-size: 1.42rem; letter-spacing: -.022em; }
.entry p:not(.meta) { color: var(--muted); font-size: .91rem; margin-bottom: .85rem; }
.entry-link { color: #642038; font-size: .88rem; font-weight: 710; align-self: flex-start; margin-top: auto; }
.no-match { padding: .9rem; border-left: 3px solid var(--burgundy); background: white; }
.governance { background: #eae3d6; padding-block: 2.35rem; border-top: 1px solid var(--border); }
.governance-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; }
.governance p { max-width: 42rem; margin-top: .55rem; color: var(--muted); }
.outline { border: 1px solid var(--navy); flex: 0 0 auto; }
.outline:hover { background: #fffaf0; }
.footer { background: var(--navy-deep); color: #fcf6e8; }
.footer p { font: bold 1.2rem var(--serif); }
@media (max-width: 850px) {
  .shell { width: min(100% - 2rem, 72rem); }
  .entries { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .masthead-inner, .footer-inner { align-items: flex-start; flex-direction: column; padding-block: .65rem .85rem; }
  .masthead nav { gap: .5rem 1rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 br { display: none; }
  .topic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .governance-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 420px) {
  .entries, .filters { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.75rem, 11vw, 4rem); }
  .topic-grid { grid-template-columns: 1fr; }
}
