:root {
  color-scheme: light;
  --ink: #172b40;
  --muted: #496174;
  --navy: #102943;
  --blue: #164eae;
  --line: #d5e0e9;
  --white: #fff;
  --surface: #f5f8fb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--blue); text-underline-offset: .22em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #0069cf; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.45rem, 6vw, 4.1rem); line-height: 1.08; letter-spacing: -.035em; }
h2 { font-size: 1.3rem; line-height: 1.3; }
h3 { font-size: 1.15rem; line-height: 1.35; }
.shell { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: .75rem; z-index: 2; padding: .65rem 1rem; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.masthead { background: var(--navy); color: var(--white); }
.masthead-inner { display: flex; align-items: center; gap: 2rem; min-height: 72px; }
.brand { text-decoration: none; color: white; display: inline-flex; gap: .65rem; align-items: center; font-weight: 750; font-size: 1.12rem; white-space: nowrap; }
.brand-icon { width: 28px; height: 27px; position: relative; display: inline-block; }
.brand-icon::before, .brand-icon::after { content: ""; position: absolute; width: 15px; height: 19px; border: 2px solid #b4d5ff; border-radius: 3px; }
.brand-icon::before { left: 3px; top: 3px; }
.brand-icon::after { right: 3px; bottom: 3px; background: var(--navy); }
nav { display: flex; align-self: stretch; gap: 1.35rem; }
nav a { text-decoration: none; color: #dce9f5; padding: .9rem .15rem; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 3px solid transparent; font-size: .91rem; }
nav a:hover, nav a[aria-current] { color: white; border-color: #92c6ff; }
.edition { margin-left: auto; white-space: nowrap; font-size: .86rem; border: 1px solid #6685a3; border-radius: 99px; padding: .18rem .68rem; color: #e4effa; }
.hero { padding: 3.25rem 0 2.15rem; background: linear-gradient(105deg,#eaf2fa,#e2edf8); border-bottom: 1px solid var(--line); }
.eyebrow { color: #255987; letter-spacing: .11em; font-size: .82rem; font-weight: 800; margin-bottom: .75rem; }
.intro { color: var(--muted); margin: .85rem 0 1.65rem; max-width: 65ch; font-size: 1.07rem; }
.search-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(10.5rem,13rem) auto; gap: .9rem; align-items: end; max-width: 960px; background: white; padding: 1.05rem; border: 1px solid #cfdeec; border-radius: 14px; box-shadow: 0 8px 24px #10294310; }
.field { display: grid; gap: .34rem; min-width: 0; }
.field label { font-weight: 700; font-size: .91rem; }
.field label span { font-weight: 400; color: var(--muted); }
.field input, .field select { min-width: 0; width: 100%; min-height: 46px; border: 1px solid #aebfd0; border-radius: 7px; color: var(--ink); background: white; padding: .58rem .75rem; }
.field input::placeholder { color: #54697c; }
.field select { appearance: none; padding-right: 2rem; background: linear-gradient(45deg,transparent 50%,var(--muted) 50%) right 16px center / 5px 5px no-repeat, linear-gradient(135deg,var(--muted) 50%,transparent 50%) right 11px center / 5px 5px no-repeat, white; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem .95rem; border: 1px solid transparent; text-decoration: none; border-radius: 8px; font-size: .92rem; font-weight: 750; text-align: center; }
.primary { color: white; background: var(--blue); }
.primary:hover { background: #123d87; }
.search-form .primary { min-height: 46px; padding-inline: 1.35rem; }
.outline { color: #174676; border-color: #b7c9db; background: white; }
.outline:hover { background: #edf5fe; }
.suggestions { display: flex; flex-wrap: wrap; gap: .45rem .6rem; margin-top: .9rem; align-items: center; color: var(--muted); font-size: .92rem; }
.suggestions button { color: #24476b; background: #f3f8fd; border: 1px solid #bfd2e6; border-radius: 99px; padding: .28rem .72rem; }
.suggestions button:hover { background: white; }
.results-area { display: grid; grid-template-columns: minmax(0,2.2fr) minmax(15rem,1fr); gap: 1.4rem; padding-block: 2rem 3rem; align-items: start; }
.section-heading, .result-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.section-heading { margin-bottom: .75rem; }
#result-count, .meta { color: var(--muted); font-size: .88rem; }
.meta { font-weight: 650; }
.filter-note { padding: .25rem 0 .8rem; color: var(--muted); font-size: .93rem; }
#results, .comparison-rows { display: grid; gap: .85rem; }
.result, .panel, .guide { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 1.15rem 1.25rem; min-width: 0; }
.result { border-left: 3px solid #4877b5; }
.result h3 { margin-top: .38rem; font-size: 1.25rem; }
.result h3 a { color: var(--ink); text-decoration: none; }
.result h3 a:hover, .document-link:hover strong { text-decoration: underline; }
.result-date { color: var(--muted); margin-top: .24rem; font-size: .91rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .95rem; margin-top: .85rem; }
.text-link { font-weight: 670; font-size: .9rem; }
.pill { display: inline-block; padding: .16rem .55rem; border-radius: 99px; font-size: .87rem; font-weight: 700; }
.amber { color: #694209; background: #fff0ce; }
.neutral { color: #415467; background: #edf1f5; }
.teal { color: #145448; background: #dff4ed; }
.guide { background: #f0f6fc; }
.guide p:not(.eyebrow) { margin-top: .52rem; color: var(--muted); }
.guide-links { display: grid; margin-top: .8rem; }
.guide-links a { padding: .7rem 0; border-top: 1px solid #cddceb; text-decoration: none; }
.guide-links a:hover strong { text-decoration: underline; }
.guide-links span { display: block; color: var(--muted); font-size: .91rem; margin-top: .1rem; }
.subpage { padding-block: 1.85rem 3rem; }
.subpage h1 { font-size: clamp(2.2rem,5vw,3.4rem); }
.back { display: inline-block; margin-bottom: 1rem; }
.detail-grid, .comparison-docs, .comparison-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.detail-grid { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); }
.panel h2 { margin-bottom: .6rem; }
.passage { padding: .8rem 0; border-top: 1px solid var(--line); }
.passage h3 { font-size: .93rem; color: var(--muted); }
blockquote { margin: .32rem 0; padding: .5rem .75rem; border-left: 3px solid #9ab8d8; background: #f3f7fb; white-space: pre-line; overflow-wrap: anywhere; }
dl { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: .4rem .6rem; margin-block: .75rem; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.notice { background: #fdf3dc; border-left: 3px solid #b98124; color: #524018; padding: .65rem .8rem; margin-top: .8rem; border-radius: 0 5px 5px 0; }
.notice + p { margin-top: .65rem; }
.source-list { margin-bottom: 0; padding-left: 1.2rem; }
.document-link { text-decoration: none; display: grid; gap: .2rem; }
.compare-toolbar, .sources-toolbar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-block: 1rem; color: var(--muted); }
.compare-toolbar label { display: flex; align-items: center; gap: .35rem; color: var(--ink); min-height: 44px; }
.comparison h2 { font-size: 1.06rem; margin-bottom: 0; }
.comparison-cell blockquote { margin-bottom: .5rem; }
.before { background: #fff0ed; border-color: #b55045; }
.after { background: #e9f6ef; border-color: #33836b; }
.sources-toolbar .field { width: min(100%,26rem); }
.sources-toolbar .meta { margin-top: .25rem; }
.empty p { color: var(--muted); margin-block: .35rem .75rem; }
footer { display: flex; flex-wrap: wrap; gap: .45rem 1.25rem; border-top: 1px solid var(--line); padding-block: 1rem 1.4rem; font-weight: 700; }
footer span { color: var(--muted); font-weight: 400; font-size: .9rem; }

@media (max-width: 760px) {
  .shell { width: calc(100% - 2rem); }
  .masthead-inner { flex-wrap: wrap; gap: 0 .75rem; padding-top: .75rem; }
  nav { order: 3; flex-basis: 100%; gap: .85rem; flex-wrap: wrap; }
  nav a { font-size: .875rem; padding: .45rem 0; }
  .hero { padding-top: 2rem; }
  .search-form { grid-template-columns: minmax(0,1fr) auto; gap: .7rem; }
  .query-field { grid-column: 1 / -1; }
  .results-area, .detail-grid, .comparison-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 480px) {
  .comparison-docs { grid-template-columns: minmax(0,1fr); }
  .result, .panel, .guide { padding: 1rem; }
  .result-top { align-items: flex-start; justify-content: flex-start; }
}
