:root {
  --navy: #061827;
  --navy-2: #082237;
  --navy-3: #0c3150;
  --green: #078346;
  --green-bright: #0aa35c;
  --green-soft: #eaf7ef;
  --blue: #102b84;
  --blue-2: #173aa7;
  --blue-soft: #eef2ff;
  --ink: #111827;
  --muted: #657080;
  --line: #dfe5ea;
  --paper: #ffffff;
  --paper-soft: #f8fafb;
  --gold: #dca313;
  --danger: #a53f3f;
  --shadow: 0 8px 30px rgba(8, 24, 39, .08);
  --radius: 12px;
  --content: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
}
a { color: inherit; }
img { max-width: 100%; }
button, input, select { font: inherit; }

/* Global frame */
.site-header {
  height: 86px;
  background: linear-gradient(90deg, #051826 0%, #061727 65%, #061b2b 100%);
  color: #fff;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
.site-header-inner {
  width: min(var(--content), calc(100% - 56px));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  position: relative;
  min-width: 312px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  border-right: 1px solid rgba(255,255,255,.18);
  padding-right: 28px;
}
.brand-ribbon {
  position: relative;
  width: 68px;
  height: 76px;
  margin-top: 0;
  background: linear-gradient(180deg, #0a9654, #06733f);
  display: grid;
  place-items: start center;
  padding-top: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  flex: 0 0 68px;
}
.brand-ribbon::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 0;
  height: 0;
  border-left: 34px solid transparent;
  border-right: 34px solid transparent;
  border-top: 10px solid #06733f;
}
.brand-ribbon img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  object-position: left center;
  border-radius: 2px;
  position: relative;
  z-index: 2;
}
.brand-text strong {
  display: block;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 30px;
  line-height: .95;
  letter-spacing: .03em;
  font-weight: 700;
}
.brand-text span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: .24em;
  font-weight: 600;
  color: rgba(255,255,255,.8);
}
.main-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 12px;
  flex: 1;
}
.nav-link, .nav-drop-button {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 17px;
  color: rgba(255,255,255,.92);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .015em;
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
.nav-link:hover, .nav-drop-button:hover { color: #fff; }
.nav-link.active::after, .nav-drop-button.active::after {
  content: "";
  position: absolute;
  height: 2px;
  left: 17px;
  right: 17px;
  bottom: 13px;
  background: var(--green-bright);
}
.nav-drop { position: relative; }
.nav-drop-button::after { content: "⌄"; margin-left: 8px; font-size: 15px; }
.nav-drop-menu {
  display: none;
  position: absolute;
  top: 70px;
  left: 8px;
  min-width: 260px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 10px;
  overflow: hidden;
  padding: 7px;
}
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: block; }
.nav-drop-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
  text-decoration: none;
  font-size: 13px;
}
.nav-drop-menu a:hover { background: var(--green-soft); color: #055d33; }
.header-search {
  position: relative;
  width: 360px;
  flex: 0 0 360px;
}
.search-shell {
  display: flex;
  height: 46px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0,0,0,.14);
}
.search-shell input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 0 15px;
  min-width: 0;
}
.search-shell input::placeholder { color: rgba(255,255,255,.65); }
.search-shell button {
  width: 56px;
  border: 0;
  background: linear-gradient(180deg, #0a8a4b, #06743f);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
}
.search-results {
  display: none;
  position: absolute;
  top: 54px;
  right: 0;
  width: min(520px, 90vw);
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
  border-radius: 10px;
  overflow: hidden;
  z-index: 1200;
}
.search-results.open { display: block; }
.search-result {
  display: block;
  padding: 13px 15px;
  text-decoration: none;
  border-bottom: 1px solid #edf0f2;
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: #f5faf7; }
.search-result b { color: var(--blue); font-size: 13px; }
.search-result span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.4; }
.search-empty { padding: 18px; color: var(--muted); font-size: 13px; }
.mobile-toggle { display: none; }

.site-main { min-height: calc(100vh - 150px); }
.container { width: min(var(--content), calc(100% - 72px)); margin: 0 auto; }

.site-footer {
  min-height: 72px;
  background: linear-gradient(90deg, #061826 0%, #071d2c 70%, #052b2c 100%);
  color: rgba(255,255,255,.8);
  display: flex;
  align-items: center;
  margin-top: 0;
}
.site-footer-inner {
  width: min(var(--content), calc(100% - 72px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .04em;
}
.footer-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: grayscale(1) brightness(1.6);
  opacity: .82;
}
.footer-sep { opacity: .45; }

/* Breadcrumb */
.breadcrumb { padding: 24px 0 8px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: #075e36; text-decoration: none; }
.breadcrumb span { margin: 0 9px; color: #9ba3ad; }

/* Justice archive home */
.archive-hero {
  position: relative;
  min-height: 270px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.archive-hero::after {
  content: "";
  position: absolute;
  right: 10px;
  top: -40px;
  width: 430px;
  height: 430px;
  background: var(--crest-url) center / contain no-repeat;
  opacity: .07;
  pointer-events: none;
}
.archive-hero-inner { display: flex; align-items: center; gap: 42px; padding: 34px 0; position: relative; z-index: 2; }
.justice-emblem {
  width: 230px;
  height: 230px;
  object-fit: contain;
  flex: 0 0 230px;
}
.hero-rule { width: 1px; height: 190px; background: #20334a; opacity: .8; }
.archive-title h1 {
  margin: 0;
  max-width: 760px;
  color: #0b2369;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(54px, 5vw, 76px);
  line-height: .97;
  font-weight: 600;
  letter-spacing: -.02em;
}
.archive-title p { margin: 16px 0 0; color: #707785; font-size: 17px; }
.title-flourish { display: flex; align-items: center; margin-top: 28px; width: 190px; }
.title-flourish::before, .title-flourish::after { content:""; height:1px; background:#0b9a58; flex:1; }
.title-flourish i { width: 8px; height: 8px; border:1px solid #0b9a58; transform: rotate(45deg); margin:0 5px; }

.category-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin: 12px 0 20px; }
.category-card {
  min-height: 134px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px 18px 16px;
  text-decoration: none;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 12px rgba(8,24,39,.025);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.category-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(8,24,39,.08); border-color: #cbd7df; }
.category-top { display:flex; align-items:center; gap:13px; }
.icon-round {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(145deg, #15399d, #061e6e);
  color: #fff;
  display: grid; place-items: center;
  flex: 0 0 48px;
}
.icon-round svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.category-card h3 { margin:0; font-size:15px; line-height:1.15; }
.category-meta { margin-top:auto; display:flex; align-items:center; justify-content:space-between; color:#30343b; font-size:13px; }
.arrow-circle { width:30px; height:30px; border:1px solid #bcd7c8; border-radius:50%; display:grid; place-items:center; color:#0b7041; font-size:18px; }

.archive-dashboard { display:grid; grid-template-columns: minmax(0, 1.65fr) minmax(330px, .95fr); gap:20px; margin-bottom:30px; }
.feature-card, .updates-panel { border:1px solid var(--line); border-radius:9px; background:#fff; min-height:292px; }
.feature-card { display:grid; grid-template-columns: 230px 1fr; overflow:hidden; }
.doc-cover {
  background: linear-gradient(145deg, #123891 0%, #071f67 60%, #06184d 100%);
  color:#fff;
  min-height: 292px;
  position:relative;
  padding:20px 18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  overflow:hidden;
}
.doc-cover::before { content:""; position:absolute; inset:15px; border:1px solid rgba(255,255,255,.25); }
.doc-cover::after { content:""; position:absolute; inset:23px; border:1px solid rgba(74,120,214,.45); }
.doc-cover img { width:110px; height:110px; object-fit:contain; filter:saturate(1.06) brightness(1.08) drop-shadow(0 0 8px rgba(105,140,240,.2)); opacity:.97; z-index:2; }
.doc-cover .cover-id { z-index:2; font-family:"EB Garamond",serif; font-size:27px; margin-top:20px; }
.doc-cover .cover-title { z-index:2; font-size:14px; margin-top:6px; opacity:.94; }
.feature-body { padding:28px 28px 20px; display:flex; flex-direction:column; min-width:0; }
.feature-kicker { color:var(--blue); text-transform:uppercase; font-size:12px; font-weight:700; letter-spacing:.035em; }
.feature-main-row { display:flex; justify-content:space-between; gap:22px; align-items:flex-start; }
.feature-title { margin:10px 0 3px; color:#0b246c; font-family:"EB Garamond",serif; font-size:35px; line-height:1; }
.feature-subtitle { font-size:20px; margin:0; }
.feature-meta { margin-top:10px; color:#32363c; font-size:13px; }
.status-box { border:1px solid #cde7d7; background:#f0fbf4; border-radius:8px; padding:12px 16px; min-width:185px; }
.status-box strong { color:#07733f; font-size:13px; display:block; }
.status-box span { color:#687168; font-size:11px; display:block; margin-top:5px; }
.feature-divider { border:0; border-top:1px solid #d6dce3; margin:20px 0 14px; }
.action-row { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px; margin-top:auto; }
.action-btn { min-height:58px; border-radius:7px; border:1px solid #b7c3d7; text-decoration:none; display:flex; align-items:center; justify-content:center; gap:10px; padding:9px 10px; font-weight:600; font-size:13px; text-align:left; background:#fff; color:#10256d; transition:.15s ease; }
.action-btn:hover { transform: translateY(-1px); box-shadow:0 6px 16px rgba(8,24,39,.08); }
.action-btn.primary { color:#fff; border-color:#077b44; background:linear-gradient(180deg, #0a914f, #06743f); }
.action-btn.blue { color:#fff; border-color:#102b84; background:linear-gradient(180deg, #173ca7, #0c2778); }
.action-btn.green-outline { color:#08743f; border-color:#49a574; background:#fff; }
.action-btn svg { width:24px; height:24px; flex:0 0 24px; fill:none; stroke:currentColor; stroke-width:1.8; }
.updates-panel { padding:24px 28px; }
.panel-heading { color:#0b8449; font-size:13px; text-transform:uppercase; font-weight:700; letter-spacing:.03em; margin-bottom:8px; }
.update-item { display:grid; grid-template-columns: 36px 80px 1fr auto; gap:10px; align-items:center; min-height:52px; border-bottom:1px solid #e6eaee; font-size:13px; }
.update-item:last-of-type { border-bottom:0; }
.update-icon { width:32px; height:32px; border-radius:50%; background:#edf8f1; color:#087d45; display:grid; place-items:center; }
.update-icon svg { width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.8; }
.update-id { color:#203052; font-weight:500; }
.update-age { color:#59616b; font-size:12px; white-space:nowrap; }
.panel-more { text-align:center; margin-top:17px; }
.panel-more a { color:#151922; text-decoration:none; font-weight:600; font-size:13px; }

/* Root home */
.state-home-hero { position:relative; min-height:430px; overflow:hidden; display:flex; align-items:center; }
.state-home-hero::after { content:""; position:absolute; right:7%; top:20px; width:500px; height:500px; background:var(--crest-url) center/contain no-repeat; opacity:.12; }
.state-home-copy { position:relative; z-index:2; max-width:770px; padding:60px 0; }
.state-home-copy .eyebrow { color:#0b8349; font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.14em; }
.state-home-copy h1 { font-family:"EB Garamond",serif; font-size:78px; line-height:.95; margin:12px 0 16px; color:#09215f; font-weight:600; }
.state-home-copy p { color:#626d79; font-size:18px; max-width:620px; }
.home-entry { margin:0 0 80px; max-width:720px; border:1px solid var(--line); border-radius:12px; padding:26px; display:flex; align-items:center; gap:22px; text-decoration:none; box-shadow:var(--shadow); }
.home-entry img { width:92px; height:92px; object-fit:contain; }
.home-entry h2 { font-family:"EB Garamond",serif; margin:0; color:#10236b; font-size:34px; }
.home-entry p { margin:6px 0 0; color:var(--muted); }

/* Category index */
.category-hero { position:relative; min-height:188px; display:flex; align-items:center; border-bottom:1px solid #e1e6ea; overflow:hidden; }
.category-hero::after { content:""; position:absolute; right:5%; top:-80px; width:360px; height:360px; background:var(--crest-url) center/contain no-repeat; opacity:.055; }
.category-hero-inner { display:flex; align-items:center; gap:28px; position:relative; z-index:2; }
.category-hero-icon { width:96px; height:96px; border-radius:50%; background:#fff; box-shadow:0 8px 25px rgba(0,0,0,.08); display:grid; place-items:center; color:#08733f; }
.category-hero-icon svg { width:54px; height:54px; stroke:currentColor; fill:none; stroke-width:1.65; }
.category-hero h1 { font-family:"EB Garamond",serif; font-size:56px; margin:0; color:#071d18; line-height:1; font-weight:600; }
.category-hero p { color:#5d6570; font-size:15px; margin:10px 0 0; }
.catalogue-wrap { display:grid; grid-template-columns:300px minmax(0,1fr); gap:36px; padding:22px 0 30px; }
.filter-panel { border:1px solid var(--line); border-radius:8px; padding:20px; align-self:start; }
.filter-panel h3 { margin:0 0 16px; color:#07663a; text-transform:uppercase; font-size:13px; }
.local-search { display:flex; border:1px solid #d9e0e5; border-radius:6px; height:40px; overflow:hidden; }
.local-search input { border:0; outline:0; flex:1; padding:0 12px; min-width:0; }
.local-search button { border:0; background:#fff; width:42px; cursor:pointer; }
.filter-group { border-bottom:1px solid #e3e8eb; padding:18px 0; }
.filter-group:last-child { border-bottom:0; padding-bottom:0; }
.filter-label { color:#08733f; text-transform:uppercase; font-weight:700; font-size:12px; margin-bottom:10px; }
.filter-option { display:flex; align-items:center; gap:9px; padding:6px 0; font-size:13px; color:#313740; cursor:pointer; }
.filter-option input { accent-color:var(--green); }
.filter-count { margin-left:auto; color:#67717b; }
.sort-select { width:100%; border:1px solid #d9e0e5; border-radius:6px; height:40px; padding:0 10px; background:#fff; color:#38404a; }
.catalogue-main { min-width:0; }
.catalogue-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.status-tabs { display:flex; gap:10px; flex-wrap:wrap; }
.status-tab { border:1px solid #dfe4e8; background:#fff; border-radius:6px; padding:9px 16px; cursor:pointer; font-size:12px; display:flex; align-items:center; gap:8px; }
.status-tab.active { background:linear-gradient(180deg,#0a8349,#07663a); color:#fff; border-color:#07663a; }
.dot { width:10px; height:10px; border-radius:50%; background:#0b8e4f; display:inline-block; }
.dot.grey { background:#a4a9ae; } .dot.gold { background:#dca313; }
.view-switch { display:flex; border:1px solid #dfe4e8; border-radius:6px; overflow:hidden; }
.view-switch button { width:48px; height:36px; border:0; background:#fff; cursor:pointer; }
.view-switch button.active { background:#08733f; color:#fff; }
.catalogue-table { border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.catalogue-head, .doc-row { display:grid; grid-template-columns: 135px minmax(250px,1fr) 170px 170px 170px 42px; align-items:center; gap:10px; padding:0 18px; }
.catalogue-head { height:44px; background:#fbfcfd; border-bottom:1px solid var(--line); font-size:11px; text-transform:uppercase; font-weight:600; color:#3d4651; }
.doc-row { min-height:54px; border-bottom:1px solid #e5e9ec; font-size:13px; text-decoration:none; }
.doc-row:last-child { border-bottom:0; }
.doc-row:hover { background:#f7fbf8; }
.doc-row .id { color:#08733f; font-weight:600; }
.type-pill, .status-pill { justify-self:start; display:inline-flex; align-items:center; gap:6px; border:1px solid #dfe4e8; padding:5px 9px; border-radius:999px; font-size:11px; background:#fff; }
.status-pill.current { background:#eef8f2; color:#066d3a; border-color:#d5ebde; font-weight:600; }
.status-pill.superseded { background:#f3f4f5; color:#5f646a; }
.status-pill.draft { background:#fff8e8; color:#a86d00; border-color:#f3e4b8; }
.row-arrow { width:30px; height:30px; border:1px solid #d4dae0; border-radius:50%; display:grid; place-items:center; justify-self:end; font-size:18px; }
.empty-state { padding:64px 20px; text-align:center; color:#6f7882; }
.empty-state strong { display:block; color:#27313b; margin-bottom:7px; }
.catalogue-foot { display:flex; justify-content:space-between; align-items:center; padding:11px 18px; border-top:1px solid #e6eaed; font-size:11px; color:#505861; }

/* Document viewer */
.document-page { padding-bottom:28px; }
.document-head { display:grid; grid-template-columns:160px minmax(0,1fr); gap:28px; align-items:start; padding:14px 0 18px; }
.document-cover-mini { height:190px; border-radius:7px; }
.document-cover-mini .doc-cover { min-height:190px; height:190px; padding:12px; }
.document-cover-mini .doc-cover::before { inset:10px; } .document-cover-mini .doc-cover::after { inset:16px; }
.document-cover-mini .doc-cover img { width:72px; height:72px; }
.document-cover-mini .doc-cover .cover-id { font-size:20px; margin-top:10px; }
.document-cover-mini .doc-cover .cover-title { display:none; }
.document-info h1 { margin:4px 0 4px; font-family:"EB Garamond",serif; color:#0d2c78; font-size:48px; line-height:1; }
.document-info .full-title { font-size:20px; margin:0 0 12px; }
.current-badge { display:inline-flex; background:#11317e; color:#fff; border-radius:5px; padding:5px 11px; font-size:11px; font-weight:700; text-transform:uppercase; }
.meta-strip { display:flex; gap:0; margin-top:22px; flex-wrap:wrap; }
.meta-cell { min-width:145px; padding:0 18px; border-right:1px solid #d9dfe4; }
.meta-cell:first-child { padding-left:0; }
.meta-cell:last-child { border-right:0; }
.meta-label { color:#65707b; font-size:11px; display:block; margin-bottom:4px; }
.meta-value { color:#20262d; font-size:12px; }
.viewer-actions { display:flex; flex-wrap:wrap; gap:14px; margin:0 0 18px 188px; }
.viewer-actions .action-btn { min-height:48px; min-width:180px; flex:0 0 auto; padding:8px 18px; }
.viewer-grid { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:16px; }
.pdf-frame { border:1px solid #cfd6dc; border-radius:7px; overflow:hidden; min-height:700px; background:#dfe2e5; box-shadow:0 5px 18px rgba(0,0,0,.06); }
.pdf-frame iframe, .pdf-frame object { width:100%; height:700px; border:0; display:block; }
.viewer-side { display:flex; flex-direction:column; gap:14px; }
.side-card { border:1px solid var(--line); border-radius:7px; padding:16px; background:#fff; }
.side-card h3 { color:#143485; font-size:12px; text-transform:uppercase; margin:0 0 12px; }
.version-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:9px 0; border-bottom:1px solid #e7eaed; font-size:11px; }
.version-row:last-child { border-bottom:0; }
.version-row strong { font-size:11px; }
.side-card p { font-size:12px; line-height:1.55; color:#454c54; margin:0; }
.side-link { display:flex; justify-content:space-between; gap:10px; padding:9px 0; border-bottom:1px solid #e7eaed; font-size:11px; text-decoration:none; }
.side-link:last-child { border-bottom:0; }

/* Simple future pages */
.simple-page { max-width:840px; padding:64px 0 100px; }
.simple-page h1 { font-family:"EB Garamond",serif; color:#0d2c78; font-size:56px; margin:0 0 16px; }
.simple-page p { color:#59636f; line-height:1.7; }

/* Accessibility */
.sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }

@media (max-width: 1240px) {
  .site-header-inner { width:calc(100% - 30px); gap:12px; }
  .brand { min-width:245px; }
  .brand-text strong { font-size:25px; }
  .main-nav .nav-link, .nav-drop-button { padding-inline:10px; font-size:12px; }
  .header-search { width:280px; flex-basis:280px; }
  .container { width:calc(100% - 40px); }
  .category-grid { grid-template-columns:repeat(3,1fr); }
  .archive-dashboard { grid-template-columns:1fr; }
  .catalogue-head, .doc-row { grid-template-columns:110px minmax(220px,1fr) 140px 140px 130px 38px; }
}

@media (max-width: 900px) {
  .site-header { height:auto; min-height:72px; }
  .site-header-inner { min-height:72px; flex-wrap:wrap; padding-bottom:10px; }
  .brand { min-width:auto; border-right:0; flex:1; height:72px; }
  .brand-ribbon { width:58px; flex-basis:58px; height:78px; margin-top:6px; }
  .brand-ribbon::after { border-left-width:29px; border-right-width:29px; border-top-width:14px; bottom:-14px; }
  .brand-ribbon img { width:44px; height:44px; }
  .brand-text strong { font-size:22px; }
  .brand-text span { font-size:9px; }
  .mobile-toggle { display:block; background:transparent; border:0; color:#fff; font-size:26px; cursor:pointer; }
  .main-nav { order:3; width:100%; height:auto; display:none; flex-direction:column; padding:8px 0 4px; }
  .main-nav.open { display:flex; }
  .nav-link, .nav-drop-button { height:42px; padding:0 8px; }
  .nav-link.active::after, .nav-drop-button.active::after { display:none; }
  .nav-drop { width:100%; }
  .nav-drop-menu { position:static; display:block; background:rgba(255,255,255,.05); color:#fff; border:0; box-shadow:none; margin-left:12px; }
  .nav-drop-menu a:hover { background:rgba(255,255,255,.08); color:#fff; }
  .header-search { order:2; width:260px; flex-basis:260px; }
  .archive-hero { min-height:auto; }
  .archive-hero-inner { gap:20px; }
  .justice-emblem { width:130px; height:130px; flex-basis:130px; }
  .hero-rule { height:120px; }
  .archive-title h1 { font-size:52px; }
  .archive-hero::after { width:300px; height:300px; }
  .category-grid { grid-template-columns:repeat(2,1fr); }
  .feature-card { grid-template-columns:170px 1fr; }
  .feature-main-row { flex-direction:column; }
  .status-box { min-width:0; width:100%; }
  .catalogue-wrap { grid-template-columns:1fr; gap:18px; }
  .filter-panel { display:none; }
  .catalogue-head { display:none; }
  .doc-row { grid-template-columns:110px minmax(0,1fr) 110px 36px; padding:12px 14px; }
  .doc-row .doc-type { display:none; }
  .doc-row .doc-date { display:none; }
  .viewer-grid { grid-template-columns:1fr; }
  .viewer-actions { margin-left:0; }
  .document-head { grid-template-columns:130px minmax(0,1fr); }
  .document-cover-mini { height:160px; }
  .document-cover-mini .doc-cover { min-height:160px; height:160px; }
}

@media (max-width: 620px) {
  .site-header-inner, .container, .site-footer-inner { width:calc(100% - 24px); }
  .header-search { display:none; }
  .brand-text strong { font-size:20px; }
  .archive-hero-inner { align-items:flex-start; padding-top:30px; }
  .justice-emblem { width:88px; height:88px; flex-basis:88px; }
  .hero-rule { display:none; }
  .archive-title h1 { font-size:40px; }
  .archive-title p { font-size:14px; }
  .archive-hero::after { opacity:.035; }
  .category-grid { grid-template-columns:1fr 1fr; gap:9px; }
  .category-card { min-height:118px; padding:14px 12px; }
  .category-top { flex-direction:column; align-items:flex-start; gap:8px; }
  .icon-round { width:38px; height:38px; flex-basis:38px; }
  .category-card h3 { font-size:13px; }
  .feature-card { grid-template-columns:115px 1fr; }
  .doc-cover { min-height:300px; padding:9px; }
  .doc-cover::before { inset:8px; } .doc-cover::after { inset:13px; }
  .doc-cover img { width:72px; height:72px; }
  .doc-cover .cover-id { font-size:20px; }
  .doc-cover .cover-title { font-size:11px; }
  .feature-body { padding:18px 14px; }
  .feature-title { font-size:28px; }
  .feature-subtitle { font-size:15px; }
  .status-box { display:none; }
  .action-row { grid-template-columns:1fr; }
  .updates-panel { padding:18px 14px; }
  .update-item { grid-template-columns:32px 70px 1fr; }
  .update-age { display:none; }
  .category-hero-inner { gap:16px; }
  .category-hero-icon { width:65px; height:65px; }
  .category-hero-icon svg { width:38px; height:38px; }
  .category-hero h1 { font-size:38px; }
  .category-hero p { font-size:13px; }
  .status-tabs { gap:6px; }
  .status-tab { padding:8px 10px; }
  .view-switch { display:none; }
  .doc-row { grid-template-columns:85px minmax(0,1fr) 36px; }
  .doc-row .doc-status { display:none; }
  .document-head { grid-template-columns:90px minmax(0,1fr); gap:14px; }
  .document-cover-mini { height:120px; }
  .document-cover-mini .doc-cover { min-height:120px; height:120px; }
  .document-cover-mini .doc-cover img { width:48px; height:48px; }
  .document-cover-mini .doc-cover .cover-id { font-size:14px; }
  .document-info h1 { font-size:34px; }
  .document-info .full-title { font-size:15px; }
  .meta-strip { margin-top:15px; }
  .meta-cell { min-width:110px; padding:0 10px 9px 0; border-right:0; }
  .viewer-actions .action-btn { min-width:0; flex:1 1 140px; }
  .pdf-frame, .pdf-frame iframe, .pdf-frame object { min-height:590px; height:590px; }
  .state-home-copy h1 { font-size:52px; }
  .state-home-hero::after { width:300px; height:300px; opacity:.06; }
}


/* V1.2.1 — search and navigation refinements */
.search-view-all,
.search-all-link {
  width:100%;
  border:0;
  background:#f7faf8;
  color:#076f3d;
  font-weight:700;
  font-size:12px;
  padding:12px 15px;
  cursor:pointer;
  text-align:left;
}
.search-view-all { border-top:1px solid #e4ebe7; text-align:center; }
.search-view-all:hover,
.search-all-link:hover { background:#edf7f1; }
.search-empty .search-all-link { margin-top:9px; padding:7px 0 0; background:transparent; }
.search-result mark,
.full-search-result mark {
  background:#dff2e8;
  color:#075e36;
  border-radius:2px;
  padding:0 .08em;
}

.search-page { padding-bottom:70px; }
.search-page-hero {
  padding:42px 0 28px;
  max-width:930px;
}
.search-page-hero .eyebrow {
  color:var(--green);
  text-transform:uppercase;
  font-size:12px;
  font-weight:700;
  letter-spacing:.14em;
}
.search-page-hero h1 {
  margin:7px 0 22px;
  font-family:"EB Garamond", Georgia, serif;
  color:#0b2a70;
  font-size:56px;
  line-height:1;
}
.search-page-form {
  display:flex;
  min-height:54px;
  border:1px solid #cfd9df;
  border-radius:9px;
  overflow:hidden;
  box-shadow:0 6px 22px rgba(8,24,39,.055);
  background:#fff;
}
.search-page-form input {
  flex:1;
  border:0;
  outline:0;
  min-width:0;
  padding:0 18px;
  font-size:15px;
  color:#18212b;
}
.search-page-form button {
  border:0;
  min-width:135px;
  padding:0 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:linear-gradient(180deg,#09884b,#06723e);
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
.search-page-form button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; }
.search-page-results { max-width:1050px; }
.search-page-summary {
  padding:0 0 15px;
  border-bottom:1px solid var(--line);
  color:#657080;
  font-size:13px;
}
.search-page-summary strong { color:#13273a; }
.full-search-result {
  padding:22px 4px 20px;
  border-bottom:1px solid #e4e9ed;
}
.full-search-result h2 {
  margin:0 0 4px;
  font-family:"EB Garamond", Georgia, serif;
  font-size:25px;
  line-height:1.15;
  color:#12327b;
}
.full-search-result > a:first-child { text-decoration:none; }
.full-search-result > a:first-child:hover h2 { color:#087240; }
.full-search-meta {
  color:#087240;
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.045em;
  margin-bottom:8px;
}
.full-search-result p {
  max-width:900px;
  margin:0 0 9px;
  color:#485462;
  line-height:1.55;
  font-size:13px;
}
.full-search-open {
  color:#087240;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
}
.search-page-empty {
  margin-top:22px;
  padding:24px;
  border:1px solid var(--line);
  border-radius:8px;
  color:#657080;
  background:#fbfcfd;
}

@media (min-width: 901px) {
  /* Keep the national banner entirely clear of page content on desktop. */
  .brand-ribbon { transform:translateY(0); }
}

@media (max-width: 620px) {
  .search-page-hero { padding-top:30px; }
  .search-page-hero h1 { font-size:40px; }
  .search-page-form button { min-width:58px; padding:0 16px; }
  .search-page-form button span { display:none; }
}

/* V1.2.2 — unified archive, historical records and robust national banner */

/* The flag is a fixed-size hanging flag, not a viewport-scaled image. */
.brand-ribbon {
  width: 72px;
  flex-basis: 72px;
  height: 96px;
  margin-top: 0;
  padding: 0;
  align-self: flex-start;
  overflow: hidden;
  background: linear-gradient(90deg, #0abf6a 0 50%, #ffffff 50% 100%);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  box-shadow: 0 5px 16px rgba(0,0,0,.22);
}
.brand-ribbon::after { display:none; }
.brand-ribbon img {
  display:block;
  width:72px;
  height:72px;
  max-width:none;
  object-fit:cover;
  object-position:center;
  border-radius:0;
}
.site-header-inner { overflow:visible; }

/* Master archive preset chips */
.active-filter-bar {
  min-height:52px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  padding:12px 0 4px;
  border-bottom:1px solid #e7ecef;
}
.filter-context { color:#68737e; font-size:12px; margin-right:2px; }
.filter-chip,
.clear-filters {
  border:1px solid #c9ddd2;
  background:#f2faf5;
  color:#087041;
  border-radius:999px;
  min-height:30px;
  padding:5px 10px;
  font-size:11px;
  font-weight:600;
  cursor:pointer;
}
.filter-chip:hover { background:#e5f5eb; }
.filter-chip b { margin-left:5px; font-size:14px; line-height:0; }
.clear-filters { border-color:#d8dee3; background:#fff; color:#56606a; }
.clear-filters:hover { background:#f5f7f8; }
.archive-index-hero { min-height:170px; }
.master-toolbar { min-height:48px; }
.catalogue-subline { display:block; color:#7a838d; font-size:11px; margin-top:3px; }
.sort-select.compact { width:auto; min-width:210px; }
.filter-option { cursor:pointer; }
.filter-option input { accent-color:#087c46; }
.filter-option > span:not(.filter-count):not(.status-dot) { flex:1; }
.status-dot { width:9px; height:9px; border-radius:50%; display:inline-block; flex:0 0 9px; background:#7d8790; }
.status-dot.current { background:#078346; }
.status-dot.legacy { background:#d99b10; }
.status-dot.superseded { background:#8b9299; }
.status-dot.repealed { background:#a84444; }
.status-dot.draft { background:#d69d1a; }
.status-dot.historical { background:#536a9a; }

.status-pill.legacy { background:#fff7df; color:#91620a; border-color:#efdca6; font-weight:600; }
.status-pill.repealed { background:#fff0f0; color:#973d3d; border-color:#eccaca; font-weight:600; }
.status-pill.historical { background:#eef3fb; color:#405c8e; border-color:#d7e0ef; font-weight:600; }
.status-pill.record { background:#f4f5f6; color:#555f69; }
.current-badge.legacy { background:#fff4d7; color:#8b5e06; border-color:#efd797; }
.current-badge.superseded { background:#f1f2f3; color:#61676d; border-color:#dfe2e5; }
.current-badge.repealed { background:#fff0f0; color:#963f3f; border-color:#eccaca; }
.current-badge.historical { background:#eef3fb; color:#3e5987; border-color:#d7e0ef; }
.current-badge.draft { background:#fff6df; color:#97640a; border-color:#f0dba4; }

/* Automatic cover accents by document type. */
.doc-cover.cover-constitution { background:linear-gradient(145deg,#123891 0%,#071f67 60%,#06184d 100%); }
.doc-cover.cover-law { background:linear-gradient(145deg,#153a91 0%,#0a286d 58%,#071c4e 100%); }
.doc-cover.cover-policy,
.doc-cover.cover-procedure,
.doc-cover.cover-guideline { background:linear-gradient(145deg,#0d6970 0%,#07555c 58%,#063b44 100%); }
.doc-cover.cover-treaty,
.doc-cover.cover-agreement { background:linear-gradient(145deg,#0b7250 0%,#07563d 58%,#063b2c 100%); }
.doc-cover.cover-historical-record { background:linear-gradient(145deg,#4a5871 0%,#354158 58%,#263144 100%); }
.doc-cover.cover-justice-ruling { background:linear-gradient(145deg,#513f82 0%,#362a69 58%,#241c4e 100%); }

/* Historical and review notices */
.document-warning {
  margin:18px 0 4px;
  display:flex;
  gap:10px 18px;
  align-items:center;
  padding:12px 15px;
  border-radius:7px;
  border:1px solid #e0e4e8;
  font-size:12px;
  line-height:1.45;
}
.document-warning strong { white-space:nowrap; }
.document-warning.legacy { background:#fff8e6; border-color:#ead8a6; color:#75500b; }
.document-warning.superseded { background:#f4f5f6; border-color:#dce0e3; color:#555f67; }
.document-warning.repealed { background:#fff1f1; border-color:#e9caca; color:#863737; }
.document-warning.historical { background:#f1f5fb; border-color:#d6e0ef; color:#405a84; }
.document-warning.draft { background:#fff9e9; border-color:#ead9ac; color:#77520d; }

/* Version switching stays inside the document viewer. */
.version-row.version-select {
  width:100%;
  border:0;
  border-bottom:1px solid #e7eaed;
  background:transparent;
  text-align:left;
  cursor:pointer;
  color:inherit;
}
.version-row.version-select:hover { background:#f7faf8; }
.version-row.version-select.active { background:#edf7f1; color:#076c3d; }
.version-row.version-select:last-child { border-bottom:0; }
.version-viewing-note {
  min-height:38px;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  background:#fff7df;
  color:#7f5809;
  border-bottom:1px solid #e5d29b;
  font-size:11px;
}

/* PDF-only workflow */
.viewer-actions { gap:10px; }
.viewer-actions .action-btn { min-width:165px; }
.pdf-frame iframe { background:#dfe2e5; }

/* Master archive table gets room for long status labels. */
@media (min-width: 1241px) {
  .catalogue-head, .doc-row { grid-template-columns: 145px minmax(270px,1fr) 160px 210px 150px 42px; }
}

@media (max-width: 1240px) and (min-width: 901px) {
  .brand-ribbon { width:64px; flex-basis:64px; height:88px; }
  .brand-ribbon img { width:64px; height:64px; }
  .catalogue-head, .doc-row { grid-template-columns:110px minmax(210px,1fr) 125px 185px 120px 38px; }
}

@media (max-width: 900px) {
  /* Preserve the smaller-resolution treatment that already worked. */
  .brand-ribbon { width:58px; flex-basis:58px; height:78px; margin-top:0; clip-path:polygon(0 0,100% 0,100% 79%,50% 100%,0 79%); }
  .brand-ribbon img { width:58px; height:58px; }
  .document-warning { align-items:flex-start; flex-direction:column; gap:3px; }
  .document-warning strong { white-space:normal; }
  .active-filter-bar { padding-top:8px; }
  .filter-panel { display:block; }
  .catalogue-wrap { grid-template-columns:1fr; }
}

@media (max-width: 620px) {
  .filter-panel { padding:14px; }
  .filter-group { margin-top:16px; }
  .sort-select.compact { min-width:0; width:100%; }
  .master-toolbar { align-items:flex-start; flex-direction:column; }
  .active-filter-bar { gap:6px; }
  .filter-chip, .clear-filters { font-size:10px; }
}
.current-badge.legacy,
.current-badge.superseded,
.current-badge.repealed,
.current-badge.historical,
.current-badge.draft { border-style:solid; border-width:1px; }

/* --------------------------------------------------------------------------
   V1.2.3 — broader Arx site, responsive navigation, guides and media
   -------------------------------------------------------------------------- */

body { background:#fff; }
.site-main { min-height:calc(100vh - 160px); }

/* Header: information left, search + Join Us on the right. */
.site-header { height:82px; }
.site-header-inner { gap:16px; }
.brand { min-width:228px; padding-right:20px; gap:12px; }
.brand-text strong { font-size:28px; }
.brand-text span { font-size:9px; letter-spacing:.22em; margin-top:5px; }
.brand-ribbon { width:64px; flex-basis:64px; height:88px; }
.brand-ribbon img { width:64px; height:64px; }
.main-nav { gap:2px; min-width:0; }
.nav-link, .nav-drop-button { padding-inline:13px; font-size:12px; letter-spacing:.035em; }
.nav-link.active::after, .nav-drop-button.active::after { left:13px; right:13px; bottom:11px; }
.header-actions { display:flex; align-items:center; gap:10px; margin-left:auto; }
.header-search { width:clamp(190px, 18vw, 310px); flex:0 1 310px; }
.search-shell { height:42px; border-radius:8px; overflow:hidden; background:rgba(255,255,255,.035); }
.search-shell input { min-width:0; }
.search-shell button svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; }
.join-cta {
  display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 17px;
  border-radius:7px; background:#08a45b; color:#fff; text-decoration:none; font-size:12px; font-weight:800;
  letter-spacing:.055em; box-shadow:0 5px 18px rgba(2,128,69,.24); transition:transform .18s ease, background .18s ease, box-shadow .18s ease;
  white-space:nowrap;
}
.join-cta:hover { transform:translateY(-1px); background:#0bb765; box-shadow:0 8px 23px rgba(2,128,69,.3); }
.join-cta.active { box-shadow:inset 0 0 0 2px rgba(255,255,255,.55); }

/* Dropdowns */
.nav-drop { height:100%; display:flex; align-items:stretch; }
.nav-drop-menu {
  top:72px; left:0; z-index:1100; border-radius:12px; padding:8px;
  box-shadow:0 18px 48px rgba(4,20,31,.18); border-color:#dbe3e8;
  animation:navDropIn .15s ease both;
}
.nav-drop.is-open .nav-drop-menu { display:block; }
.about-menu { min-width:310px; }
.about-menu a { display:grid; gap:2px; padding:12px 13px; }
.about-menu a strong { font-size:13px; display:flex; align-items:center; gap:5px; }
.about-menu a span { color:#727c86; font-size:11px; line-height:1.35; }
.about-menu .external-link svg { width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:1.8; }
.mega-menu { width:min(760px, calc(100vw - 40px)); padding:10px; }
.mega-top { border-bottom:1px solid #e6ecef; padding-bottom:8px; margin-bottom:8px; }
.mega-top a { display:grid; grid-template-columns:auto 1fr; column-gap:10px; align-items:center; }
.mega-top a strong { color:#086c3e; font-size:13px; }
.mega-top a span { color:#75808a; font-size:11px; }
.mega-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.mega-column { padding:7px; }
.mega-heading { color:#66727d; text-transform:uppercase; letter-spacing:.11em; font-size:9px; font-weight:800; margin:0 4px 6px; }
.mega-column a { padding:7px 8px; line-height:1.2; font-size:12px; }
@keyframes navDropIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }

/* Shared headings, buttons and motion. */
.eyebrow { color:#078346; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.16em; }
.eyebrow.light { color:#9ee5bd; }
.hero-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:25px; }
.hero-btn {
  min-height:46px; padding:0 18px; border-radius:7px; display:inline-flex; align-items:center; justify-content:center; gap:9px;
  text-decoration:none; font-size:12px; font-weight:800; letter-spacing:.025em; transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.hero-btn svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; }
.hero-btn:hover { transform:translateY(-2px); }
.hero-btn.primary { color:#fff; background:#09864b; box-shadow:0 8px 25px rgba(2,121,65,.22); }
.hero-btn.primary.bright { background:#0bb566; }
.hero-btn.ghost { color:#fff; border:1px solid rgba(255,255,255,.36); background:rgba(255,255,255,.07); backdrop-filter:blur(6px); }
.hero-btn.dark { color:#0b2437; background:#edf2f5; }
.section-heading { display:flex; justify-content:space-between; gap:40px; align-items:flex-end; margin-bottom:22px; }
.section-heading.compact { margin-bottom:17px; }
.section-heading h2 { font:600 38px/1.05 "EB Garamond",serif; margin:7px 0 0; color:#0a2630; }
.section-heading p { max-width:490px; margin:0; color:#6d7780; font-size:13px; line-height:1.6; }

/* New homepage with optional aerial photograph. */
.home-hero {
  position:relative; min-height:570px; display:flex; align-items:center; color:#fff; overflow:hidden;
  background:radial-gradient(circle at 72% 32%, #164a43 0, #0a342f 34%, #061e22 72%, #04161d 100%);
}
.home-hero.has-photo { background-image:var(--home-photo); background-size:cover; background-position:center; }
.home-hero-overlay { position:absolute; inset:0; background:linear-gradient(90deg, rgba(2,19,26,.93) 0%, rgba(3,29,30,.77) 46%, rgba(4,19,27,.38) 76%, rgba(4,19,27,.58) 100%); }
.home-hero:not(.has-photo)::after { content:""; position:absolute; inset:-18% -5% -18% 48%; background:var(--crest-url) center/contain no-repeat; opacity:.11; filter:grayscale(1) brightness(2); }
.home-hero-inner { position:relative; z-index:2; display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,520px); align-items:center; gap:60px; width:100%; }
.home-hero-copy { max-width:730px; padding:78px 0 82px; }
.home-hero-copy h1 { font:600 clamp(62px,7vw,104px)/.88 "EB Garamond",serif; letter-spacing:-.025em; margin:12px 0 20px; }
.home-hero-copy p { max-width:650px; margin:0; color:#d6e2e2; font-size:18px; line-height:1.55; }
.home-hero-mark { display:flex; justify-content:flex-end; align-items:center; opacity:.78; }
.home-hero-mark img { width:min(440px,100%); max-height:450px; object-fit:contain; filter:drop-shadow(0 18px 55px rgba(0,0,0,.24)); }
.home-hero.has-photo .home-hero-mark { opacity:.24; }
.home-paths { padding:66px 0 58px; background:#fbfcfc; }
.home-path-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.home-path-card {
  position:relative; overflow:hidden; min-height:220px; border:1px solid #dfe6e9; border-radius:13px; background:#fff; padding:25px;
  display:grid; grid-template-columns:48px 1fr; gap:16px; text-decoration:none; box-shadow:0 5px 18px rgba(6,26,35,.035);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.home-path-card:hover { transform:translateY(-4px); box-shadow:0 16px 40px rgba(6,26,35,.09); border-color:#bfd3c8; }
.home-path-card::after { content:""; position:absolute; width:160px; height:160px; border-radius:50%; right:-85px; bottom:-90px; opacity:.07; background:currentColor; }
.home-path-card .path-icon { width:48px; height:48px; border-radius:10px; display:grid; place-items:center; color:#087846; background:#edf8f2; }
.home-path-card.justice .path-icon { color:#173a9a; background:#eff2fc; }
.home-path-card.guide .path-icon { color:#0b6571; background:#ebf7f8; }
.path-icon svg, .path-arrow svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.65; }
.path-kicker { color:#76818a; font-size:10px; text-transform:uppercase; letter-spacing:.12em; font-weight:700; }
.home-path-card h3 { font:600 29px/1 "EB Garamond",serif; margin:7px 0 9px; color:#10252e; }
.home-path-card p { color:#66727b; font-size:13px; line-height:1.55; margin:0; }
.path-arrow { position:absolute; bottom:20px; right:21px; color:#87929a; }
.home-explore { padding:18px 0 75px; }
.explore-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.explore-grid a { min-height:0; border:1px solid var(--line); border-radius:10px; padding:12px 16px; text-decoration:none; display:grid; grid-template-columns:30px 1fr; column-gap:10px; align-content:center; transition:.18s ease; }
.explore-grid a:hover { transform:translateY(-2px); border-color:#b9d2c4; background:#fbfdfc; }
.explore-grid > a > span { grid-row:1/3; width:30px; height:30px; display:grid; place-items:center; color:#078346; }
.explore-grid svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; }
.explore-grid strong { display:flex; gap:5px; align-items:center; font-size:14px; }
.explore-grid strong svg { width:12px; height:12px; }
.explore-grid small { color:#78828b; line-height:1.45; margin-top:4px; }

/* About */
.general-hero { background:linear-gradient(180deg,#f5f8f7,#fff); border-bottom:1px solid #e8ecee; }
.general-hero-inner { min-height:400px; display:grid; grid-template-columns:minmax(0,780px) minmax(220px,380px); gap:70px; align-items:center; }
.general-hero h1 { font:600 clamp(50px,5vw,76px)/.96 "EB Garamond",serif; color:#0b2729; margin:12px 0 20px; letter-spacing:-.02em; }
.general-hero p { color:#65727a; font-size:17px; line-height:1.65; max-width:700px; }
.general-hero img { max-height:315px; opacity:.8; justify-self:end; }
.about-content { padding:55px 0 80px; }
.about-lead { max-width:850px; margin-bottom:33px; }
.about-lead h2 { font:600 37px/1.05 "EB Garamond",serif; margin:0 0 10px; }
.about-lead p { color:#6b7680; line-height:1.7; }
.about-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.about-card { min-height:175px; border:1px solid #e0e6e9; border-radius:11px; padding:20px; text-decoration:none; transition:.18s ease; }
.about-card:hover { transform:translateY(-3px); border-color:#b9d5c5; box-shadow:0 10px 28px rgba(6,26,35,.06); }
.about-card > span { width:40px; height:40px; border-radius:9px; background:#eef8f2; color:#087c47; display:grid; place-items:center; }
.about-card svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.7; }
.about-card h3 { font:600 24px/1 "EB Garamond",serif; margin:16px 0 8px; display:flex; align-items:center; gap:5px; }
.about-card h3 svg { width:12px; height:12px; }
.about-card p { color:#6d7881; font-size:12px; line-height:1.55; margin:0; }

/* Generic page title */
.page-title-block { padding:45px 0 28px; max-width:820px; }
.page-title-block h1 { font:600 62px/1 "EB Garamond",serif; margin:9px 0 12px; color:#0b2729; }
.page-title-block p { color:#6e7881; font-size:15px; }

/* Media: auto-discovered assets + graceful empty state. */
.media-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; padding-bottom:80px; }
.media-card { border:1px solid #e1e6e9; border-radius:10px; overflow:hidden; background:#fff; }
.media-frame { aspect-ratio:16/10; background:#0b1e29; overflow:hidden; display:grid; place-items:center; }
.media-frame img, .media-frame video { width:100%; height:100%; object-fit:cover; }
.media-caption { padding:14px 15px 17px; }
.media-caption > span { font-size:9px; font-weight:800; letter-spacing:.13em; color:#08804a; }
.media-caption h3 { font:600 22px/1.05 "EB Garamond",serif; margin:5px 0 0; }
.media-caption p { color:#727c85; font-size:12px; line-height:1.5; }
.media-empty { padding:0 0 90px; max-width:980px; }
.media-placeholder-grid { display:grid; grid-template-columns:1fr 1.6fr 1fr; grid-auto-rows:150px; gap:10px; margin:15px 0 30px; }
.media-placeholder { border-radius:9px; background:linear-gradient(145deg,#102c3b,#0d463d); color:rgba(255,255,255,.32); display:grid; place-items:center; font-size:10px; letter-spacing:.18em; font-weight:800; }
.media-placeholder.wide { grid-row:span 2; background:linear-gradient(145deg,#0a6443,#0a2a38); }
.media-empty h2 { font:600 32px/1 "EB Garamond",serif; margin:0 0 8px; }
.media-empty p { color:#6d7880; }

/* Join Us */
.join-hero { background:radial-gradient(circle at 80% 35%,#17684c,#083628 42%,#061f23 78%); color:#fff; overflow:hidden; }
.join-hero-inner { min-height:500px; display:grid; grid-template-columns:minmax(0,800px) minmax(250px,400px); gap:60px; align-items:center; }
.join-hero h1 { font:600 clamp(56px,6vw,88px)/.92 "EB Garamond",serif; margin:12px 0 18px; letter-spacing:-.02em; }
.join-hero p { max-width:690px; color:#d7e5df; font-size:17px; line-height:1.6; }
.join-hero img { max-height:350px; opacity:.45; filter:brightness(1.5) grayscale(.25); }
.join-content { padding:60px 0 80px; }
.join-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.join-steps article { position:relative; min-height:235px; border:1px solid #dfe6e9; border-radius:11px; padding:22px; }
.join-steps article > span { color:#0a8e50; font:600 32px/1 "EB Garamond",serif; }
.join-steps h2 { font:600 25px/1 "EB Garamond",serif; margin:28px 0 9px; }
.join-steps p { color:#6c7780; font-size:12px; line-height:1.6; }
.join-bottom { margin-top:45px; background:#f6f9f8; border-radius:12px; padding:30px; display:flex; justify-content:space-between; gap:30px; align-items:center; }
.join-bottom h2 { font:600 33px/1 "EB Garamond",serif; margin:8px 0; }
.join-bottom p { color:#6d7881; margin:0; }
.join-bottom-links { display:flex; gap:9px; flex-wrap:wrap; }
.join-bottom-links a { text-decoration:none; border:1px solid #d2ddd7; background:#fff; padding:11px 13px; border-radius:7px; color:#087444; font-size:12px; font-weight:700; }

/* Guides */
.guides-hero { background:linear-gradient(115deg,#071f2a,#083d38 66%,#0b6041); color:#fff; }
.guides-hero-inner { min-height:480px; display:grid; grid-template-columns:minmax(0,780px) minmax(330px,470px); gap:60px; align-items:center; }
.guides-hero h1 { font:600 clamp(53px,5.5vw,82px)/.93 "EB Garamond",serif; margin:12px 0 18px; letter-spacing:-.02em; }
.guides-hero p { color:#d2e2df; max-width:660px; font-size:16px; line-height:1.6; }
.guide-route { border:1px solid rgba(255,255,255,.17); border-radius:14px; background:rgba(255,255,255,.055); padding:25px; display:grid; grid-template-columns:38px 1fr; gap:0 13px; align-items:center; backdrop-filter:blur(5px); }
.guide-route span { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; border:1px solid rgba(255,255,255,.3); color:#b5efce; font-weight:700; }
.guide-route b { font-size:13px; }
.guide-route i { grid-column:1; justify-self:center; width:1px; height:24px; background:rgba(255,255,255,.2); }
.guide-library { padding:58px 0 80px; }
.guide-library-intro { display:flex; justify-content:space-between; gap:50px; align-items:flex-end; margin-bottom:38px; }
.guide-library-intro h2 { font:600 42px/1 "EB Garamond",serif; margin:8px 0 0; }
.guide-library-intro p { max-width:550px; color:#6c7780; font-size:13px; line-height:1.6; margin:0; }
.guide-category { margin-top:36px; }
.guide-category-head { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #e4e9eb; padding-bottom:10px; margin-bottom:12px; }
.guide-category-head h2 { font:600 28px/1 "EB Garamond",serif; margin:0; }
.guide-category-head span { color:#879098; font-size:10px; text-transform:uppercase; letter-spacing:.1em; }
.guide-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.guide-card { min-height:150px; display:grid; grid-template-columns:44px 1fr 28px; gap:13px; align-items:start; border:1px solid #e1e6e9; border-radius:10px; padding:17px; text-decoration:none; transition:.18s ease; }
.guide-card:hover { transform:translateY(-2px); border-color:#bdd4c6; box-shadow:0 8px 25px rgba(5,29,33,.055); }
.guide-card-index { width:38px; height:38px; border-radius:8px; background:#eff7f2; color:#0a7f49; display:grid; place-items:center; font-size:10px; font-weight:800; }
.guide-card-category { font-size:9px; color:#839099; text-transform:uppercase; letter-spacing:.1em; font-weight:700; }
.guide-card h3 { font:600 23px/1 "EB Garamond",serif; margin:5px 0 7px; }
.guide-card p { color:#6f7a83; font-size:11.5px; line-height:1.45; margin:0; }
.guide-card-arrow { color:#869199; align-self:center; }
.guide-card-arrow svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; }

/* Guide article + progression */
.guide-layout { display:grid; grid-template-columns:240px minmax(0,850px); gap:55px; align-items:start; padding:25px 0 85px; }
.guide-sidebar { position:sticky; top:105px; padding:16px 0; max-height:calc(100vh - 125px); overflow:auto; }
.guide-home-link { display:block; color:#087544; text-decoration:none; font-size:11px; font-weight:800; margin-bottom:18px; }
.guide-side-group { margin:0 0 18px; }
.guide-side-group strong { display:block; color:#899198; font-size:9px; text-transform:uppercase; letter-spacing:.11em; margin:0 0 5px; }
.guide-side-group a { display:block; color:#4e5c66; text-decoration:none; font-size:11.5px; line-height:1.3; padding:6px 8px; border-radius:5px; margin-left:-8px; }
.guide-side-group a:hover { color:#087746; background:#f3f8f5; }
.guide-side-group a.current { color:#087746; background:#eaf6ef; font-weight:700; }
.guide-article { min-width:0; }
.guide-article > header { padding:28px 0 26px; border-bottom:1px solid #e4e9eb; }
.guide-badge { color:#087a46; background:#eaf6ef; padding:5px 8px; border-radius:999px; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.09em; }
.guide-article h1 { font:600 clamp(48px,5vw,68px)/.98 "EB Garamond",serif; color:#10262c; margin:13px 0 13px; }
.guide-article > header > p { color:#68747d; font-size:15px; line-height:1.6; max-width:720px; }
.guide-source { display:flex; flex-wrap:wrap; gap:8px 13px; align-items:center; margin-top:18px; font-size:10px; color:#7b858e; }
.guide-source > span { text-transform:uppercase; letter-spacing:.1em; font-weight:800; }
.guide-source a { display:inline-flex; align-items:center; gap:5px; color:#087544; text-decoration:none; font-weight:700; }
.guide-source svg { width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.8; }
.guide-prose { padding:27px 0; color:#26353e; font-size:15px; line-height:1.72; }
.guide-prose h2 { font:600 32px/1.05 "EB Garamond",serif; margin:36px 0 12px; color:#102b31; }
.guide-prose h3 { font:600 24px/1.1 "EB Garamond",serif; margin:28px 0 9px; }
.guide-prose p { margin:0 0 17px; }
.guide-prose ul, .guide-prose ol { padding-left:22px; margin:0 0 20px; }
.guide-prose li { margin:6px 0; }
.guide-prose code { background:#f1f4f5; border:1px solid #e2e7e9; padding:2px 5px; border-radius:4px; color:#0b6940; font-size:.91em; }
.guide-prose strong { color:#172a32; }
.guide-prose table { border-collapse:collapse; width:100%; margin:20px 0; font-size:12px; }
.guide-prose th, .guide-prose td { border:1px solid #dfe5e8; padding:8px; text-align:left; }
.guide-progress { border-top:1px solid #e3e8ea; padding-top:20px; margin-top:20px; display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.guide-progress a { min-height:78px; border:1px solid #e0e6e9; border-radius:8px; padding:13px; text-decoration:none; display:flex; flex-direction:column; gap:5px; }
.guide-progress a:hover { border-color:#bdd4c6; background:#fbfdfc; }
.guide-progress a.next { text-align:right; align-items:flex-end; }
.guide-progress a span { color:#8a939a; text-transform:uppercase; letter-spacing:.1em; font-size:8px; font-weight:800; }
.guide-progress a strong { color:#0b7243; font-size:12px; }

/* Search is now site-wide. */
.search-page-hero .eyebrow { color:#078346; }
.full-search-meta { text-transform:none; }
.search-result b mark, .full-search-result mark { background:#dff4e8; color:inherit; }

/* General footer */
.general-footer { gap:13px; }
.arx-footer-mark { object-fit:cover; }

/* 404 */
.not-found { min-height:660px; display:flex; align-items:center; background:radial-gradient(circle at 75% 30%,#eef7f2,#fff 55%); }
.not-found .container { max-width:820px; }
.not-found-mark { font:600 120px/.8 "EB Garamond",serif; color:#d6e8dd; margin-bottom:25px; }
.not-found h1 { font:600 55px/1 "EB Garamond",serif; color:#10262c; margin:9px 0 14px; }
.not-found p { color:#69757e; font-size:15px; }
.not-found .hero-btn.ghost { color:#0b2b2f; border-color:#ccd9d2; background:#fff; }

/* Subtle motion across the site, with reduced-motion support below. */
@media (prefers-reduced-motion:no-preference) {
  .home-hero-copy, .general-hero-inner > div, .guides-hero-inner > div:first-child, .join-hero-inner > div:first-child { animation:riseIn .45s ease both; }
  .home-hero-mark, .general-hero img, .join-hero img { animation:fadeIn .65s .08s ease both; }
  @keyframes riseIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
  @keyframes fadeIn { from { opacity:0; } }
}

/* Medium desktop / laptops. */
@media (max-width: 1320px) {
  .site-header-inner { width:calc(100% - 32px); }
  .brand { min-width:185px; }
  .brand-text strong { font-size:24px; }
  .brand-text span { letter-spacing:.14em; }
  .nav-link, .nav-drop-button { padding-inline:10px; font-size:11px; }
  .header-search { width:clamp(170px,16vw,250px); flex-basis:250px; }
  .mega-menu { width:min(700px,calc(100vw - 30px)); }
}

@media (max-width: 1120px) and (min-width: 901px) {
  .brand { min-width:74px; width:74px; padding-right:10px; border-right:0; }
  .brand-text { display:none; }
  .brand-ribbon { width:58px; flex-basis:58px; height:78px; }
  .brand-ribbon img { width:58px; height:58px; }
  .header-search { width:180px; flex-basis:180px; }
  .join-cta { padding-inline:13px; }
  .mega-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* Tablet + mobile: one expandable navigation region, tap dropdowns. */
@media (max-width: 900px) {
  .site-header { min-height:70px; height:auto; }
  .site-header-inner { min-height:70px; padding:0 0 8px; display:grid; grid-template-columns:auto 1fr auto; gap:7px 12px; align-items:center; }
  .brand { grid-column:1; min-width:0; width:auto; height:70px; border:0; padding:0; }
  .brand-text { display:block; }
  .brand-text strong { font-size:23px; }
  .brand-text span { font-size:8px; }
  .brand-ribbon { width:54px; flex-basis:54px; height:72px; }
  .brand-ribbon img { width:54px; height:54px; }
  .mobile-toggle { grid-column:3; display:block; justify-self:end; font-size:22px; padding:8px; }
  .main-nav { grid-column:1 / -1; order:initial; width:100%; display:none; padding:7px; border:1px solid rgba(255,255,255,.12); border-radius:9px; background:rgba(255,255,255,.035); height:auto; }
  .main-nav.open { display:flex; }
  .nav-link, .nav-drop-button { height:auto; min-height:42px; padding:10px 11px; width:100%; justify-content:space-between; font-size:12px; border-radius:6px; }
  .nav-link.active::after, .nav-drop-button.active::after { display:none; }
  .nav-link.active, .nav-drop-button.active { background:rgba(255,255,255,.08); }
  .nav-drop { height:auto; width:100%; display:block; }
  .nav-drop-menu, .nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { position:static; display:none; width:100%; min-width:0; margin:0 0 5px; background:#0b2737; color:#fff; border-color:rgba(255,255,255,.12); box-shadow:none; animation:none; }
  .nav-drop.is-open .nav-drop-menu { display:block; }
  .about-menu a, .mega-column a { color:#e7eef2; }
  .about-menu a:hover, .mega-column a:hover { background:rgba(255,255,255,.07); color:#fff; }
  .about-menu a span, .mega-top a span { color:#9eb0ba; }
  .mega-top { border-color:rgba(255,255,255,.12); }
  .mega-top a strong { color:#8de2b5; }
  .mega-grid { grid-template-columns:1fr 1fr; }
  .mega-heading { color:#819aa6; }
  .header-actions { grid-column:1 / -1; display:none; width:100%; margin:0; gap:8px; }
  .main-nav.open + .header-actions, .header-actions.open { display:grid; grid-template-columns:1fr auto; }
  .header-search { width:100%; flex:auto; }
  .join-cta { min-height:42px; }
  .search-results { left:0; right:0; width:auto; }
  .home-hero { min-height:520px; }
  .home-hero-inner { grid-template-columns:1fr; }
  .home-hero-copy { padding:70px 0; }
  .home-hero-mark { display:none; }
  .home-path-grid, .about-card-grid { grid-template-columns:1fr 1fr; }
  .explore-grid { grid-template-columns:1fr; }
  .general-hero-inner, .join-hero-inner, .guides-hero-inner { grid-template-columns:1fr; gap:20px; padding:50px 0; }
  .general-hero img, .join-hero img, .guide-route { display:none; }
  .join-steps { grid-template-columns:1fr 1fr; }
  .media-grid { grid-template-columns:1fr 1fr; }
  .guide-layout { grid-template-columns:1fr; gap:0; }
  .guide-sidebar { position:static; max-height:none; display:flex; gap:6px; overflow:auto; padding:8px 0 14px; border-bottom:1px solid #e5e9eb; }
  .guide-home-link, .guide-side-group strong { display:none; }
  .guide-side-group { display:flex; gap:5px; margin:0; flex:0 0 auto; }
  .guide-side-group a { white-space:nowrap; background:#f5f7f8; margin:0; border:1px solid #e5e9eb; }
  .guide-library-intro { align-items:flex-start; flex-direction:column; gap:12px; }
  .category-grid { grid-template-columns:repeat(3,1fr); }
}

@media (max-width: 620px) {
  .site-header-inner, .container, .site-footer-inner { width:calc(100% - 22px); }
  .brand-text { display:none; }
  .brand { width:54px; }
  .main-nav.open + .header-actions, .header-actions.open { grid-template-columns:1fr; }
  .join-cta { width:100%; }
  .mega-grid { grid-template-columns:1fr; }
  .home-hero { min-height:500px; }
  .home-hero-copy { padding:58px 0 62px; }
  .home-hero-copy h1 { font-size:58px; }
  .home-hero-copy p { font-size:15px; }
  .hero-actions { align-items:stretch; }
  .hero-btn { width:100%; }
  .home-paths { padding:43px 0; }
  .home-path-grid, .about-card-grid, .join-steps, .media-grid, .guide-card-grid { grid-template-columns:1fr; }
  .home-path-card { min-height:185px; }
  .section-heading { align-items:flex-start; flex-direction:column; gap:10px; }
  .section-heading h2 { font-size:33px; }
  .explore-grid { gap:8px; }
  .general-hero-inner { min-height:340px; padding:40px 0; }
  .general-hero h1 { font-size:48px; }
  .page-title-block h1 { font-size:48px; }
  .media-placeholder-grid { grid-template-columns:1fr 1fr; grid-auto-rows:110px; }
  .media-placeholder.wide { grid-column:span 2; grid-row:span 1; }
  .join-hero h1, .guides-hero h1 { font-size:52px; }
  .join-content, .guide-library { padding-top:42px; }
  .join-bottom { flex-direction:column; align-items:flex-start; }
  .guide-library-intro h2 { font-size:36px; }
  .guide-article h1 { font-size:48px; }
  .guide-prose { font-size:14px; }
  .guide-progress { grid-template-columns:1fr; }
  .guide-progress a.next { text-align:left; align-items:flex-start; }
  .category-grid { grid-template-columns:1fr 1fr; }
  .catalogue-wrap { gap:12px; }
  .filter-panel { border-radius:8px; }
  .viewer-actions .action-btn { min-width:0; width:100%; }
  .viewer-actions { display:grid; grid-template-columns:1fr; }
  .document-head { align-items:flex-start; }
  .general-footer { flex-wrap:wrap; }
  .not-found-mark { font-size:90px; }
  .not-found h1 { font-size:44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}

/* --------------------------------------------------------------------------
   V1.2.4 — polish pass from live-site feedback
   -------------------------------------------------------------------------- */

/* Keep submenu buttons visually clean. The dropdown itself provides the context. */
.nav-drop-button::after { content:none !important; margin:0 !important; }

/* Replace the detached active-page underline with a text-level state. */
.nav-link.active::after,
.nav-drop-button.active::after { display:none !important; }
.nav-link.active,
.nav-drop-button.active { color:#9fe4bf; }
.nav-link,
.nav-drop-button { transition:color .16s ease, background .16s ease; }
.nav-link:hover,
.nav-drop-button:hover { color:#fff; background:rgba(255,255,255,.035); }

/* The general footer should use the national mark in its real colours. */
.arx-footer-mark {
  filter:none !important;
  object-fit:contain !important;
  opacity:1;
}

/* The guide home no longer uses the decorative numbered route panel. */
.guides-hero { position:relative; overflow:hidden; }
.guides-hero::after {
  content:"";
  position:absolute;
  right:max(4vw,36px);
  top:50%;
  width:min(390px,30vw);
  aspect-ratio:1;
  transform:translateY(-50%);
  background:var(--crest-url) center/contain no-repeat;
  opacity:.075;
  filter:brightness(1.8);
  pointer-events:none;
}
.guides-hero-inner {
  position:relative;
  z-index:1;
  grid-template-columns:minmax(0,850px);
  justify-content:start;
}

/* Give the homepage hero a calmer inner measure on large screens rather than
   pinning its copy against the widest global container edge. */
@media (min-width:901px) {
  .home-hero-inner {
    width:min(1280px, calc(100% - 72px));
    margin-inline:auto;
  }
}

/* Small quality-of-life motion on responsive navigation. */
@keyframes mobileNavIn {
  from { opacity:0; transform:translateY(-5px); }
  to { opacity:1; transform:none; }
}

/* Use a dedicated full hanging-banner asset on tablet/mobile. This avoids the
   split-colour square ending before the pointed lower section and is also PNG
   based for broad mobile compatibility. Desktop keeps the approved treatment. */
@media (max-width:900px) {
  .brand-ribbon {
    width:58px !important;
    flex-basis:58px !important;
    height:78px !important;
    padding:0 !important;
    background:transparent !important;
    clip-path:none !important;
    box-shadow:none !important;
    overflow:visible !important;
  }
  .brand-ribbon img {
    content:url("../images/arx-flag-mobile.png");
    width:58px !important;
    height:78px !important;
    object-fit:fill !important;
    display:block;
    filter:none !important;
  }
  .main-nav.open,
  .header-actions.open { animation:mobileNavIn .16s ease both; }
  .nav-link:hover,
  .nav-drop-button:hover { background:rgba(255,255,255,.055); }
  .guides-hero::after { width:300px; right:-80px; opacity:.05; }
}

@media (max-width:620px) {
  .brand-ribbon {
    width:54px !important;
    flex-basis:54px !important;
    height:72px !important;
  }
  .brand-ribbon img {
    width:54px !important;
    height:72px !important;
  }
  .home-hero-inner { width:calc(100% - 30px); }
}


/* --------------------------------------------------------------------------
   V1.2.7 — persistent mobile search access
   -------------------------------------------------------------------------- */
.mobile-search-link { display:none; }

@media (max-width: 900px) {
  .site-header-inner { grid-template-columns:auto 1fr auto auto; }
  .mobile-search-link {
    grid-column:3;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    justify-self:end;
    width:40px;
    height:40px;
    border-radius:7px;
    color:#e7eef2;
    text-decoration:none;
    background:rgba(255,255,255,.045);
    border:1px solid rgba(255,255,255,.10);
    transition:background .16s ease, color .16s ease;
  }
  .mobile-search-link:hover,
  .mobile-search-link:focus-visible {
    color:#fff;
    background:rgba(255,255,255,.09);
  }
  .mobile-search-link svg {
    width:19px;
    height:19px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
  }
  .mobile-toggle { grid-column:4; }
}


/* --------------------------------------------------------------------------
   V1.2.8 — compact Justice Archive feature card on phones
   Keeps the V1.2.7 mobile search shortcut while correcting the oversized
   Constitution cover treatment on narrow screens.
   -------------------------------------------------------------------------- */
.document-cover-feature { min-width:0; }

@media (max-width: 620px) {
  .feature-card {
    grid-template-columns:1fr;
    min-height:0;
  }
  .document-cover-feature {
    display:flex;
    justify-content:center;
    padding:16px 14px 0;
    background:#fff;
  }
  .document-cover-feature .doc-cover {
    width:132px;
    height:166px;
    min-height:166px;
    flex:0 0 132px;
    padding:10px;
    border-radius:7px;
    box-shadow:0 8px 20px rgba(8,25,70,.13);
  }
  .document-cover-feature .doc-cover::before { inset:8px; }
  .document-cover-feature .doc-cover::after { inset:13px; }
  .document-cover-feature .doc-cover img {
    width:52px;
    height:52px;
  }
  .document-cover-feature .doc-cover .cover-id {
    font-size:18px;
    margin-top:10px;
  }
  .document-cover-feature .doc-cover .cover-title { display:none; }
  .feature-body {
    padding:16px 16px 18px;
  }
  .feature-main-row > div:first-child {
    width:100%;
    text-align:center;
  }
  .feature-kicker { font-size:11px; }
  .feature-title {
    margin-top:8px;
    font-size:31px;
  }
  .feature-subtitle { font-size:16px; }
  .feature-meta {
    margin-top:8px;
    font-size:12px;
  }
  .feature-divider { margin:15px 0 12px; }
  .action-row { gap:9px; }
  .action-btn { min-height:52px; }
}
