:root {
  --ink: #17211f;
  --muted: #5d6b68;
  --paper: #f5f2ea;
  --surface: #fffdf8;
  --line: #d8d4c9;
  --green: #164f45;
  --green-bright: #1f725f;
  --mint: #dcebe4;
  --gold: #d6a84d;
  --shadow: 0 14px 34px rgba(31, 45, 41, 0.08);
  --field: #ffffff;
  --soft: #f2f6f3;
  --soft-strong: #eef4f1;
  color-scheme: light;
}

html[data-theme="dark"] {
  --ink: #edf4f1;
  --muted: #b5c5c0;
  --paper: #101715;
  --surface: #18231f;
  --line: #35443f;
  --green: #79cdb7;
  --green-bright: #8de0c8;
  --mint: #253a34;
  --gold: #e2b85f;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  --field: #111a17;
  --soft: #21302b;
  --soft-strong: #283a34;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Calibri, Arial, sans-serif;
  line-height: 1.55;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: white;
  background: var(--green);
  border-radius: 0.35rem;
}

.skip-link:focus { top: 1rem; }

.masthead {
  min-height: 92px;
  display: grid;
  grid-template-columns: auto minmax(390px, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  padding: 1rem clamp(1rem, 4vw, 4rem);
  color: white;
  background: var(--green);
  border-bottom: 4px solid var(--gold);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #fff3a8;
  border-radius: 50%;
  overflow: hidden;
}

.brand-mark img {
  width: 47px;
  height: 47px;
  display: block;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.masthead .eyebrow {
  margin-bottom: 0.08rem;
  color: #b9dacf;
}

.brand-name {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
}

.version-chip {
  flex: 0 0 auto;
  padding: 0.45rem 0.75rem;
  color: #f7edcf;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.version-chip.demo-version {
  padding: .62rem 1rem;
  color: #ffffff;
  border-width: 2px;
  font-family: Calibri, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.app-shell {
  width: 100%;
  min-height: calc(100vh - 160px);
  display: block;
  margin: 0 auto;
}

.shell-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .38rem;
  transform: translateX(-50px);
}

.shell-nav-group {
  min-width: 0;
  display: inline-flex;
  align-items: stretch;
}

.shell-nav a,
.shell-nav summary {
  color: #fff;
  text-decoration: none;
}

.shell-nav-direct {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .42rem .68rem;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  font-size: .86rem;
  font-weight: 700;
}

.shell-nav-group > .shell-nav-direct {
  border-radius: 8px 0 0 8px;
}

.shell-nav-direct strong {
  color: #ffe38e;
  font-size: 1.05rem;
  line-height: 1;
}

.shell-nav details {
  position: relative;
}

.shell-nav summary {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: .42rem .48rem;
  border: 1px solid rgba(255, 255, 255, .24);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, .08);
  font-size: .72rem;
  cursor: pointer;
  list-style: none;
}

.shell-nav summary::-webkit-details-marker { display: none; }

.shell-nav-direct:hover,
.shell-nav summary:hover,
.shell-nav-direct.is-active,
.shell-nav-group:has(a.is-active) > .shell-nav-direct,
.shell-nav details.has-active > summary {
  background: rgba(255, 255, 255, .18);
}

.shell-nav-direct.is-active,
.shell-nav-group:has(a.is-active) > .shell-nav-direct {
  box-shadow: inset 0 -3px 0 var(--gold);
}

.shell-nav a:focus-visible,
.shell-nav summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.shell-nav-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + .45rem);
  left: 0;
  width: max-content;
  min-width: 235px;
  max-width: min(360px, calc(100vw - 2rem));
  display: grid;
  gap: .18rem;
  padding: .45rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .24);
}

.shell-nav-menu-right {
  right: 0;
  left: auto;
}

.shell-nav-menu a {
  padding: .55rem .68rem;
  color: var(--ink);
  border-radius: 6px;
  font-size: .84rem;
  font-weight: 700;
}

.shell-nav-menu a:hover,
.shell-nav-menu a.is-active {
  color: var(--ink);
  background: var(--mint);
}

.sidebar {
  width: auto;
  box-sizing: border-box;
  padding: 2rem 1.25rem;
  border-right: 1px solid var(--line);
}

.app-shell::after {
  display: block;
  clear: both;
  content: "";
}

.primary-nav {
  display: grid;
  gap: 0.32rem;
}

.primary-nav a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  min-height: 46px;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: #3d4a47;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.primary-nav a:hover { background: rgba(22, 79, 69, 0.07); }

.primary-nav a:focus-visible,
.home-card:focus-visible,
.menu-button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.primary-nav a.is-active {
  color: white;
  background: var(--green);
}

.nav-number {
  font-family: Georgia, serif;
  font-size: 0.7rem;
  opacity: 0.65;
}

.menu-button { display: none; }

main { min-width: 0; }

.rio-template,
.meet-greet-template,
.document-results,
.form-list,
.contact-directory,
.ooa-directory {
  clear: left;
}

.page {
  width: min(1320px, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6.4rem) 0 5rem;
}

.page.ae-page { width: min(980px, calc(100% - 3rem)); }

.page.document-support-page { width: calc(100% - 3rem); }

.module-library-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .68rem;
  margin-top: 1.65rem;
}

.module-library-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 1rem;
  row-gap: .24rem;
  min-height: 0;
  padding: .9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-bright);
  border-radius: 10px;
  box-shadow: 0 7px 18px rgba(31, 45, 41, .06);
}

.module-library-card h2 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  color: var(--green);
  font-family: Calibri, Arial, sans-serif;
  font-size: 1.12rem;
  line-height: 1.2;
}

.module-library-card p {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.module-library-card a {
  grid-column: 2;
  grid-row: 1 / 3;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: .42rem .72rem;
  color: #fff;
  background: var(--green);
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.module-library-card a:hover { background: var(--green-bright); }

.licence-pending { overflow: hidden; }
.licence-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(5, 20, 17, .82);
  backdrop-filter: blur(5px);
}
.licence-gate[hidden] { display: none; }
.licence-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--green-bright);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .35);
}
.licence-panel h1 { margin: .2rem 0 1rem; font-size: clamp(1.8rem, 5vw, 3rem); }
.licence-copy { display: grid; gap: .75rem; }
.licence-copy p { margin: 0; }
.licence-confirm {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-top: 1.25rem;
  padding: .9rem;
  background: var(--soft);
  border-radius: 8px;
  font-weight: 700;
}
.licence-confirm input { margin-top: .25rem; }
.licence-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.licence-actions button,
.licence-declined button {
  min-height: 44px;
  padding: .7rem 1rem;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.licence-actions button:disabled { opacity: .45; cursor: not-allowed; }
.licence-actions #licence-decline { color: var(--ink); background: var(--soft-strong); border: 1px solid var(--line); }
.licence-declined {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.licence-declined > div {
  width: min(620px, 100%);
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.page-heading { max-width: 780px; }

.page-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.header-action-panel {
  flex: 0 0 auto;
  width: min(290px, 34%);
  display: grid;
  gap: 0.45rem;
  margin-top: 1.35rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 6px 9px 9px 6px;
  box-shadow: var(--shadow);
}

.header-action-panel strong { color: var(--green); font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.25; }
.header-action-panel span { color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.header-action-panel a { justify-self: start; padding: 0.5rem 0.68rem; color: white; background: var(--green); border-radius: 5px; font-size: 0.76rem; font-weight: 800; text-decoration: none; }
.header-action-panel a:hover { background: var(--green-bright); }

.header-action-panel a:focus-visible,
.about-contact a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.about-contact {
  margin: 1.5rem 0 0;
  color: var(--muted);
}

.about-contact a { color: var(--green-bright); font-weight: 800; }

.about-notes {
  max-width: 760px;
  margin: 1rem 0 2.2rem;
  padding: 1rem 1.1rem;
  color: #43514e;
  background: var(--mint);
  border-left: 4px solid var(--green-bright);
  border-radius: 4px 8px 8px 4px;
}

.about-notes p { margin: 0; }
.about-notes p + p { margin-top: 0.7rem; }

.appearance-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 760px;
  margin: 0 0 2.2rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.appearance-panel h2 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.appearance-panel p { margin: 0; color: var(--muted); }
.appearance-options { display: flex; gap: 0.45rem; }
.appearance-options button {
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--green);
  border-radius: 6px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}
.appearance-options button[aria-pressed="true"] { color: #102f2a; background: var(--green-bright); }
.appearance-options button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1, h2 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  max-width: 840px;
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.home-page h1 { max-width: 680px; }

.dashboard-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 300px);
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  margin: 0 0 2rem;
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid #e6c348;
  border-radius: 24px;
  background: linear-gradient(135deg, #fffdf3 0%, #fff5bd 100%);
  box-shadow: 0 16px 40px rgba(78, 58, 0, 0.1);
  overflow: hidden;
}

.dashboard-preview h2 {
  margin: 0.25rem 0 0.65rem;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.dashboard-preview p:last-child {
  margin: 0;
  max-width: 650px;
  color: var(--muted);
}

.dashboard-preview img {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: contain;
}

.shell-flow-boundary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: .9rem 1.05rem;
  border: 1px dashed var(--green-bright);
  border-radius: 12px;
  background: var(--soft);
}

.shell-flow-boundary h2,
.shell-flow-boundary p { margin: 0; }
.shell-flow-boundary .eyebrow { margin-bottom: .12rem; }
.shell-flow-boundary button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: .38rem .65rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
}

.duck-flow-frame {
  display: block;
  width: 100%;
  min-height: 900px;
  border: 0;
  background: transparent;
}

.ae-launch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.ae-launch h2 { margin: 0; font-size: 1.15rem; }
.ae-launch-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.ae-launch-button,
.ae-current-button,
.ae-close-button {
  min-height: 40px;
  padding: .58rem .9rem;
  border: 1px solid var(--green-bright);
  border-radius: 7px;
  background: var(--green-bright);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}
.ae-close-button { border-color: var(--line); background: var(--background); color: var(--ink); }
.ae-current-button { margin: 0 0 1rem; }
.ae-intake {
  margin-bottom: 1.25rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.ae-intake-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.ae-intake-heading h2,
.ae-import h3 { margin: 0 0 .35rem; }
.ae-intake-heading p:last-child,
.ae-import p { margin: 0; color: var(--muted); }
.ae-draft-status {
  flex: 0 0 auto;
  padding: .42rem .65rem;
  border-radius: 999px;
  background: var(--background);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
}
.ae-intake fieldset { min-width: 0; margin: 0 0 1rem; padding: .9rem; border: 1px solid var(--line); border-radius: 9px; }
.ae-intake legend { padding: 0 .35rem; font-weight: 850; }
.ae-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; }
.ae-grid > label { display: grid; align-content: start; gap: .32rem; color: var(--ink); font-size: .82rem; font-weight: 800; }
.ae-grid input,
.ae-grid textarea,
.ae-grid select {
  width: 100%;
  min-width: 0;
  padding: .62rem .7rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--background);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}
.ae-grid textarea { resize: vertical; }
.ae-wide { grid-column: 1 / -1; }
.date-shortcuts { display: flex; gap: .35rem; }
.date-shortcuts button,
.small-action {
  min-height: 30px;
  padding: .3rem .6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background);
  color: var(--green-bright);
  font-weight: 800;
}
.small-action { margin-top: .7rem; }
.ae-inline-choice {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem 1.2rem;
  margin: 0 !important;
  padding: .7rem !important;
}
.ae-inline-choice label { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 700; }
.ae-inline-choice input { width: auto; }
.ae-arrival-method { grid-column: 1 / -1; }
.ae-validation { min-height: 1.2rem; color: #a52b2b; font-size: .8rem; font-weight: 800; }
.ae-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.ae-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: .55rem .8rem;
  border: 1px solid var(--green-bright);
  border-radius: 7px;
  background: var(--green-bright);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}
.ae-actions .secondary-action { border-color: var(--line); background: var(--background); color: var(--ink); }
.initial-greet-reference {
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.initial-greet-reference summary { cursor: pointer; font-weight: 800; }
.initial-greet-reference label { display: grid; gap: .35rem; margin: .7rem 0; }

.quick-links-panel {
  margin-top: 2.5rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.quick-links-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.quick-links-heading h2 { margin: 0; font-size: 1.45rem; }
.quick-link-add,
.quick-link-editor-actions button {
  min-height: 32px;
  padding: 0.35rem 0.58rem;
  color: white;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 6px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.quick-links-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.55rem;
}

.quick-link-tile {
  display: inline-grid;
  grid-template-rows: auto auto;
  width: max-content;
  max-width: 100%;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.quick-link-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.62rem;
  text-decoration: none;
}

.quick-link-main:hover { background: var(--soft-strong); }
.quick-link-main.is-unset { color: var(--muted); }
.quick-link-main strong { color: var(--ink); }
.quick-link-main small { color: var(--muted); font-size: 0.72rem; }
.quick-link-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: white;
  background: #4285f4;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 900;
}
.quick-link-mark.loop-mark { width: 42px; color: white; background: #6b46c1; font-size: 0.62rem; }

.quick-link-actions {
  display: flex;
  gap: 0.4rem;
  padding: 0.28rem 0.48rem;
  border-top: 1px solid var(--line);
}
.quick-link-actions button {
  padding: 0.25rem 0.4rem;
  color: var(--green);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.quick-link-editor {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(250px, 1.5fr);
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--mint);
  border-radius: 8px;
}
.quick-link-editor[hidden] { display: none; }
.quick-link-editor label { display: grid; gap: 0.3rem; color: var(--green); font-size: 0.78rem; font-weight: 800; }
.quick-link-editor input {
  min-height: 42px;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-weight: 400;
}
.quick-link-editor-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; }
.quick-link-editor-actions #cancel-quick-link { color: var(--green); background: transparent; }
.quick-link-editor-actions span { color: var(--muted); font-size: 0.76rem; font-weight: 700; }
.quick-link-add:focus-visible,
.quick-link-main:focus-visible,
.quick-link-actions button:focus-visible,
.quick-link-editor button:focus-visible,
.quick-link-editor input:focus { outline: 3px solid var(--gold); outline-offset: 2px; }

.intro {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.notice {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.25rem;
  margin: 2.5rem 0;
  padding: 1.2rem 1.35rem;
  background: var(--mint);
  border-left: 4px solid var(--green-bright);
  border-radius: 4px 9px 9px 4px;
}

.notice-label {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notice p { margin: 0; }

.home-grid,
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.submission-card {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 5px 10px 10px 5px;
  box-shadow: var(--shadow);
}

.submission-card .eyebrow { margin-bottom: 0.45rem; }
.submission-card h2 { margin: 0 0 0.35rem; font-size: 1.4rem; }
.submission-card p { max-width: 640px; margin: 0; color: var(--muted); }

.email-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  flex: 0 0 auto;
  color: white;
  background: var(--green);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}

.email-button:hover { background: var(--green-bright); }

.form-library { margin-top: 2.5rem; }

.contact-directory { margin-top: 2.5rem; }

.document-support { margin-top: 2.5rem; }

.document-branches {
  display: block;
}

.document-quick-links { margin-bottom: 1rem; }
.document-quick-links > div,
.document-domain-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.document-branches button {
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 0.8rem;
  padding: 1.35rem;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.document-branches button:hover { border-color: #9db7ae; }
.document-branches button > span { color: var(--green-bright); font-family: Georgia, serif; font-size: 0.78rem; font-weight: 700; }
.document-branches button > strong { margin-top: 1.1rem; color: var(--green); font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; }
.document-branches button > small { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.document-quick-links button {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 0.2rem 1rem;
  padding: 1rem 1.1rem;
  background: var(--mint);
}
.document-quick-links button > strong { margin: 0; grid-column: 1; font-size: 1.12rem; }
.document-quick-links button > small { grid-column: 1; }
.document-quick-links button > span { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--green); font-size: 1.3rem; }

.document-panel > h2 { margin: 0.9rem 0 0.35rem; font-size: 1.8rem; }
.document-panel-intro { max-width: 720px; margin: 0 0 1.5rem; color: var(--muted); }
.document-panel > label { display: block; margin-bottom: 0.5rem; color: var(--green); font-size: 0.82rem; font-weight: 800; }
.document-back { padding: 0; color: var(--green-bright); background: transparent; border: 0; font: inherit; font-size: 0.8rem; font-weight: 800; cursor: pointer; }
.document-back:hover { text-decoration: underline; }

.document-support > label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
}

.document-search-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.document-search-wrap input {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid #aeb9b5;
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
}

.document-search-wrap button,
.document-type-filters button {
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--green);
  border-radius: 6px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.document-search-wrap button { color: white; background: var(--green); border: 0; }

.document-type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.document-type-filters button.is-active { color: white; background: var(--green); }

.document-search-wrap input:focus,
.document-search-wrap button:focus-visible,
.document-back:focus-visible,
.document-branches button:focus-visible,
.document-entry summary:focus-visible,
.library-entry a:focus-visible,
.copy-block button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.document-count { margin: 1.5rem 0 0.75rem; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.document-results { display: grid; gap: 0.75rem; }

.document-entry,
.library-entry {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.document-entry summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding: 0.9rem 1rem;
  color: var(--green);
  cursor: pointer;
}

.document-entry summary > span:first-child { display: grid; gap: 0.2rem; }
.document-entry summary strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; }
.document-entry summary small { color: var(--muted); font-size: 0.72rem; }
.document-entry summary > span:last-child { font-size: 0.72rem; font-weight: 800; }
.document-body { padding: 0 1rem 1rem; border-top: 1px solid var(--line); }
.document-body > p { margin: 0.9rem 0; color: var(--muted); }
.document-section { padding: 0.85rem 0; border-top: 1px solid var(--line); }
.document-section:first-of-type { border-top: 0; }
.document-section h4 { margin: 0 0 0.55rem; color: var(--green); font-family: Georgia, "Times New Roman", serif; font-size: 1rem; }
.document-section p { margin: 0; }
.document-section ul { margin: 0; padding-left: 1.2rem; }
.document-section li + li { margin-top: 0.3rem; }
.document-section blockquote { margin: 0.55rem 0 0; padding: 0.7rem 0.85rem; color: #364642; background: var(--mint); border-left: 3px solid var(--green-bright); }
.document-section dl { display: grid; gap: 0.55rem; margin: 0; }
.document-section dl div { display: grid; grid-template-columns: minmax(135px, 0.35fr) 1fr; gap: 1rem; }
.document-section dt { color: var(--green); font-weight: 800; }
.document-section dd { margin: 0; }

.library-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem;
}

.library-entry h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; }
.library-entry p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.84rem; }
.library-entry a { flex: 0 0 auto; color: var(--green-bright); font-size: 0.8rem; font-weight: 800; }
.document-empty { margin-top: 1.5rem; padding: 1rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.document-empty.compact { margin-top: 0; }
.document-resource-group { margin-top: 1.4rem; }
.document-resource-group > h3 { margin: 0 0 0.2rem; color: var(--green); font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; }
.document-group-access { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.78rem; }

.copy-block { margin: 1rem 0; }
.copy-block pre { margin: 0; padding: 1rem; white-space: pre-wrap; color: #263632; background: #f2f6f3; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 0.86rem; line-height: 1.55; }
.copy-block button { margin-top: 0.6rem; padding: 0.55rem 0.75rem; color: white; background: var(--green); border: 0; border-radius: 6px; font: inherit; font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.copy-status { margin-left: 0.65rem; color: var(--green-bright); font-size: 0.78rem; font-weight: 800; }

.resource-directory { margin-top: 2.5rem; }

.resource-filters {
  margin: 0 0 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.resource-filters legend {
  padding: 0 0.3rem;
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.resource-filters legend span {
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-option { cursor: pointer; }
.filter-option input { position: absolute; opacity: 0; pointer-events: none; }

.filter-option span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.5rem 0.72rem;
  color: var(--green);
  background: var(--mint);
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
}

.filter-option input:checked + span {
  color: white;
  background: var(--green);
}

.filter-option input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.resource-clear {
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--green);
  border-radius: 6px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.resource-clear:focus-visible,
.resource-methods a:focus-visible,
.report-contact:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.resource-count {
  margin: 1.5rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.resource-list { display: grid; gap: 0.85rem; }

.resource-card {
  padding: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
}

.resource-select { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0 0 0.75rem; color: var(--green); font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.resource-handout-tools { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 1rem; padding: 0.85rem 1rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; }
.resource-handout-tools > div { display: grid; gap: 0.15rem; }
.resource-handout-tools span { color: var(--muted); font-size: 0.78rem; }
.resource-handout-tools button { min-height: 34px; padding: 0.4rem 0.7rem; color: white; background: var(--green); border: 0; border-radius: 6px; font: inherit; font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.resource-handout-tools button:disabled { opacity: 0.45; cursor: default; }
.resource-handout { max-width: 760px; margin: 1rem auto; padding: 1rem; color: #111; background: #fff; }
.resource-handout > header { margin-bottom: 1.2rem; padding-bottom: 0.7rem; border-bottom: 2px solid #164f45; }
.resource-handout > header h1 { margin: 0; color: #164f45; font-size: 1.7rem; }
.resource-handout > header p { margin: 0.25rem 0 0; }
.resource-handout-entry { margin-bottom: 1rem; break-inside: avoid; }
.resource-handout-entry h3 { margin: 0 0 0.35rem; color: #164f45; font-size: 1.05rem; }
.resource-handout-entry p { margin: 0.18rem 0; font-size: 0.9rem; line-height: 1.4; overflow-wrap: anywhere; }

.resource-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.resource-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.3;
}

.resource-heading p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.8rem; }

.resource-heading > span {
  flex: 0 0 auto;
  max-width: 220px;
  padding: 0.3rem 0.5rem;
  color: var(--green);
  background: var(--mint);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}

.resource-description { margin: 0.8rem 0 0; }
.resource-coverage { margin: 0.7rem 0 0; color: var(--green); font-size: 0.8rem; font-weight: 650; }
.resource-coverage strong { margin-right: 0.4rem; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.resource-detail { display: grid; gap: 0.15rem; margin: 0.65rem 0 0; color: #43514e; font-size: 0.82rem; }
.resource-detail strong { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }

.resource-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 0.85rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.resource-methods a { color: var(--green-bright); font-size: 0.82rem; font-weight: 800; overflow-wrap: anywhere; }

.report-resource {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--green-bright);
  font-size: 0.76rem;
  font-weight: 800;
}

.report-resource:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.resource-empty {
  margin-top: 1.5rem;
  padding: 1rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-directory > label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
}

.contact-search-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.contact-search-wrap input {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid #aeb9b5;
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
}

.contact-search-wrap input:focus,
.contact-search-wrap button:focus-visible,
.contact-category summary:focus-visible,
.contact-methods a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.contact-search-wrap button {
  min-width: 72px;
  padding: 0.65rem 0.85rem;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.contact-help,
.contact-count {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-count { margin-top: 1.5rem; font-weight: 700; }

.contact-categories {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.contact-category {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.contact-category summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  padding: 0.8rem 1rem;
  color: var(--green);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 700;
}

.contact-category summary::marker { color: var(--green-bright); }

.contact-category summary span:last-child {
  min-width: 2rem;
  padding: 0.18rem 0.45rem;
  color: var(--green);
  background: var(--mint);
  border-radius: 999px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.72rem;
  text-align: center;
}

.contact-list { border-top: 1px solid var(--line); }

.contact-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(180px, 0.9fr) minmax(220px, 1.2fr);
  gap: 1.25rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.contact-row:last-child { border-bottom: 0; }
.contact-row-simple { grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr); }
.contact-heading h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.02rem; line-height: 1.3; }
.contact-heading p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.8rem; }

.contact-methods { display: grid; gap: 0.55rem; align-content: start; }
.contact-methods div { display: grid; gap: 0.08rem; }
.contact-methods span { color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.contact-methods strong,
.contact-methods a { color: var(--green); font-size: 0.94rem; font-weight: 800; overflow-wrap: anywhere; }

.contact-meta { align-content: start; }
.contact-meta p { margin: 0.5rem 0 0; color: #43514e; font-size: 0.78rem; }
.contact-meta .contact-source { color: var(--muted); font-size: 0.71rem; }

.report-contact {
  grid-column: 2;
  justify-self: start;
  color: var(--green-bright);
  font-size: 0.74rem;
  font-weight: 800;
}

.contact-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  color: var(--green);
  background: var(--mint);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.status-verify { color: #6b4a0b; background: #f4e5bd; }
.status-obsolete,
.status-nonworking { color: #782d2d; background: #f2dada; }

.contact-empty {
  margin-top: 1.5rem;
  padding: 1rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ooa-status {
  display: grid;
  gap: 0.2rem;
  margin-top: 1rem;
  padding: 0.8rem 0.9rem;
  color: #43514e;
  background: #eef4f1;
  border-left: 4px solid var(--green-bright);
  border-radius: 6px;
  font-size: 0.8rem;
}

.national-directory-block + .national-directory-block { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.directory-switch { display: inline-grid; grid-template-columns: repeat(2, minmax(145px, 1fr)); gap: 0.35rem; margin: 0 0 1.25rem; padding: 0.35rem; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.directory-switch button { min-height: 42px; padding: 0.55rem 0.9rem; color: var(--green); background: transparent; border: 0; border-radius: 7px; font: inherit; font-weight: 800; cursor: pointer; }
.directory-switch button[aria-pressed="true"] { color: #fff; background: var(--green); }
.national-directory-block[hidden] { display: none; }
.national-directory-heading { margin-bottom: 1rem; }
.national-directory-heading h2 { margin: 0; color: var(--green); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 2.4vw, 2rem); }
.national-directory-heading p { margin: 0.35rem 0 0; color: var(--muted); }
.national-search-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.55fr) auto; align-items: end; gap: 0.75rem; padding: 1rem; background: var(--soft); border-radius: 10px; }
.national-search-field { display: grid; gap: 0.35rem; color: var(--ink); font-weight: 800; }
.national-search-field input { min-width: 0; width: 100%; padding: 0.85rem 0.9rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 500; }
.national-search-field input:focus { outline: 3px solid color-mix(in srgb, var(--green-bright) 35%, transparent); border-color: var(--green-bright); }
.national-search-grid button { min-height: 3.15rem; padding: 0.7rem 1rem; color: #fff; background: var(--green); border: 0; border-radius: 8px; font: inherit; font-weight: 800; cursor: pointer; }
.national-summary { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.82rem; font-weight: 800; }

.ooa-status span { color: var(--muted); }
.ooa-groups { display: grid; gap: 1.5rem; margin-top: 0.85rem; }
.ooa-group > h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.65rem;
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}
.ooa-group > h2 span {
  min-width: 2rem;
  padding: 0.16rem 0.45rem;
  color: var(--green);
  background: var(--mint);
  border-radius: 999px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.72rem;
  text-align: center;
}
.ooa-records { display: grid; gap: 0.8rem; }
.ooa-record {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.ooa-record-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.ooa-record-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  line-height: 1.3;
}
.ooa-record-heading p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.82rem; }
.ooa-record-heading .ooa-nation {
  margin: 0 0 0.2rem;
  color: var(--green-bright);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ooa-record-heading .report-contact { grid-column: auto; flex: 0 0 auto; }
.ooa-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0.9rem 0;
}
.ooa-meta div { padding: 0.55rem; background: #f4f4ef; border-radius: 6px; }
.ooa-meta dt { color: var(--muted); font-size: 0.67rem; font-weight: 800; text-transform: uppercase; }
.ooa-meta dd { margin: 0.12rem 0 0; font-size: 0.78rem; }
.ooa-contacts { display: grid; gap: 0.55rem; }
.ooa-contact { padding: 0.75rem; border: 1px solid var(--line); border-left: 4px solid #8a9692; border-radius: 7px; }
.ooa-contact.ooa-MHLT { border-left-color: var(--green-bright); }
.ooa-contact.ooa-clinical-duty,
.ooa-contact.ooa-crisis-SPA { border-left-color: #417ca0; }
.ooa-contact-title { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.ooa-type { color: var(--green); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.ooa-hours-badge { padding: 0.18rem 0.45rem; color: #0b5141; background: #d6eee6; border-radius: 999px; font-size: 0.66rem; font-weight: 800; }
.ooa-contact p { margin: 0.28rem 0 0; color: #43514e; font-size: 0.78rem; }
.ooa-contact .ooa-contact-label { color: var(--muted); }
.ooa-contact .ooa-number { margin-top: 0.15rem; }
.ooa-contact .ooa-number a,
.ooa-contact .ooa-number strong { color: var(--green); font-size: 1.05rem; font-weight: 800; }
.ooa-source { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-top: 0.7rem; color: var(--muted); font-size: 0.7rem; }
.ooa-source a { color: var(--green-bright); font-weight: 800; }

.form-count {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.form-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.form-row:last-child { border-bottom: 0; }
.form-number { color: var(--green-bright); font-family: Georgia, serif; font-size: 0.8rem; font-weight: 700; }
.form-row h2 { margin: 0; font-size: 1rem; line-height: 1.25; }
.form-row a { color: var(--green-bright); font-size: 0.82rem; font-weight: 800; white-space: nowrap; }
.form-row-autofill { background: color-mix(in srgb, var(--green-bright) 5%, var(--surface)); }
.form-title { min-width: 0; }
.autofill-badge {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  margin-top: .35rem;
  color: var(--green-bright);
  font-size: .72rem;
  font-weight: 800;
}
.autofill-badge span {
  width: .58rem;
  height: .58rem;
  border-radius: 2px;
  background: #29a35a;
  box-shadow: 0 0 0 2px color-mix(in srgb, #29a35a 18%, transparent);
}
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; }
.autofill-preview {
  min-height: 30px;
  padding: .3rem .65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--background);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  cursor: not-allowed;
  opacity: .72;
}

.home-card,
.content-card {
  min-height: 210px;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.home-card:hover {
  transform: translateY(-3px);
  border-color: #9db7ae;
}

.card-index {
  margin-bottom: 2.5rem;
  color: var(--green-bright);
  font-family: Georgia, serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.home-card h2,
.content-card h2 {
  margin-bottom: 0.55rem;
  font-size: 1.35rem;
}

.home-card p,
.content-card p {
  margin: 0;
  color: var(--muted);
}

.card-link {
  margin-top: auto;
  padding-top: 1.25rem;
  color: var(--green-bright);
  font-size: 0.82rem;
  font-weight: 800;
}

.content-card ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: #43514e;
}

.content-card li + li { margin-top: 0.35rem; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.15rem;
}

.tag-list span {
  padding: 0.35rem 0.62rem;
  color: var(--green);
  background: var(--mint);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.placeholder-action {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.6rem 0.8rem;
  border: 1px dashed #a8a398;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.version-list { margin-top: 2.5rem; }

.version-entry {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.version-entry:last-child { border-bottom: 1px solid var(--line); }

.version-meta {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  color: var(--green);
  font-weight: 800;
}

.version-meta time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.version-entry p { margin: 0; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 4rem);
  color: #cfe0da;
  background: #102f2a;
  font-size: 0.76rem;
}

html[data-theme="dark"] .masthead,
html[data-theme="dark"] footer {
  color: #f5fbf8;
  background: #0b2923;
}

html[data-theme="dark"] .primary-nav a { color: #cfddd8; }
html[data-theme="dark"] .primary-nav a:hover { background: rgba(141, 224, 200, 0.1); }
html[data-theme="dark"] .primary-nav a.is-active { color: #102f2a; background: var(--green-bright); }
html[data-theme="dark"] .about-notes,
html[data-theme="dark"] .document-section blockquote,
html[data-theme="dark"] .document-quick-links button,
html[data-theme="dark"] .resource-category-title,
html[data-theme="dark"] .contact-category-title,
html[data-theme="dark"] .ooa-group > h2,
html[data-theme="dark"] .tag-list span { color: var(--ink); }
html[data-theme="dark"] .dashboard-preview {
  border-color: #8e742c;
  background: linear-gradient(135deg, #2d2817 0%, #44391c 100%);
}
html[data-theme="dark"] .document-section blockquote,
html[data-theme="dark"] .copy-block pre,
html[data-theme="dark"] .ooa-meta div,
html[data-theme="dark"] .ooa-status,
html[data-theme="dark"] .contact-meta p,
html[data-theme="dark"] .resource-detail { color: var(--ink); }
html[data-theme="dark"] .copy-block pre,
html[data-theme="dark"] .ooa-meta div,
html[data-theme="dark"] .ooa-status { background: var(--soft); }
html[data-theme="dark"] .status-verify { color: #ffe0a0; background: #5b451b; }
html[data-theme="dark"] .status-nonworking { color: #ffc3c3; background: #552727; }
html[data-theme="dark"] .ooa-hours-badge { color: #bdf7e8; background: #244e43; }

.time-control { position: relative; min-width: 0; }
.time-entry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.45rem; align-items: stretch; }
.time-picker-button { min-width: 92px; white-space: nowrap; }
.custom-time-picker {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.4rem);
  right: 0;
  width: min(340px, 92vw);
  display: grid;
  grid-template-columns: minmax(78px, 1fr) auto minmax(78px, 1fr);
  align-items: end;
  gap: 0.55rem;
  padding: 0.8rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
}
.custom-time-picker[hidden] { display: none; }
.custom-time-picker label { display: grid; gap: 0.25rem; color: var(--green); font-size: 0.75rem; font-weight: 800; }
.custom-time-picker select { width: 100%; min-height: 42px; padding: 0.45rem; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.time-picker-separator { align-self: center; padding-top: 1.25rem; font-weight: 900; }
.custom-time-picker button { min-height: 30px; padding: 0.28rem 0.48rem; border-radius: 5px; font: inherit; font-size: 0.7rem; font-weight: 800; cursor: pointer; }
.time-picker-apply { justify-self: start; min-width: 58px; color: #fff; background: #164f45; border: 1px solid #164f45; }
.time-picker-close { color: var(--green); background: transparent; border: 1px solid var(--green); }
.custom-time-picker button:focus-visible,
.custom-time-picker select:focus-visible,
.time-picker-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.noscript-message {
  position: fixed;
  inset: auto 1rem 1rem;
  padding: 1rem;
  color: white;
  background: #8b2e2e;
}

@media (max-width: 1120px) {
  .masthead {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .shell-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    width: 100%;
    transform: none;
  }
}

@media (max-width: 820px) {
  .masthead {
    min-height: 78px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .shell-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    width: 100%;
  }

  .app-shell { display: block; }

  .sidebar {
    float: none;
    width: auto;
    position: relative;
    padding: 0.75rem 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .menu-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.8rem;
    color: var(--green);
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
  }

  .primary-nav { display: none; padding-top: 0.5rem; }
  .primary-nav.is-open { display: grid; }
  .page,
  .page.ae-page { width: min(100% - 2rem, 700px); padding-top: 3rem; }
  .page-heading-row { display: grid; gap: 1rem; }
  .header-action-panel { width: min(100%, 420px); margin-top: 0; }
  .dashboard-preview { grid-template-columns: 1fr; }
  .dashboard-preview img { max-height: 165px; }
  .shell-flow-boundary { align-items: flex-start; flex-direction: column; }
  .ae-intake-heading { display: grid; }
  .ae-draft-status { justify-self: start; }
  .ae-launch { grid-template-columns: 1fr; display: grid; align-items: start; }
  .ae-grid { grid-template-columns: 1fr; }
  .ae-wide,
  .ae-inline-choice { grid-column: 1; }
  .home-grid, .content-grid, .module-library-grid { grid-template-columns: 1fr; }
  .module-library-card { grid-template-columns: 1fr; }
  .module-library-card h2,
  .module-library-card p,
  .module-library-card a { grid-column: 1; grid-row: auto; }
  .module-library-card a { justify-self: start; margin-top: .35rem; }
  .submission-card { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .appearance-panel { align-items: flex-start; flex-direction: column; }
  .quick-link-editor { grid-template-columns: 1fr; }
  .quick-link-editor-actions { grid-column: auto; }
  .form-row { grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0.75rem; }
  .form-actions { grid-column: 2; justify-content: flex-start; }
  .notice { grid-template-columns: 1fr; gap: 0.4rem; }
  .national-search-grid { grid-template-columns: 1fr; }
  .national-search-grid button { justify-self: start; }
  .contact-row { grid-template-columns: 1fr 1fr; }
  .contact-meta { grid-column: 1 / -1; }
  .report-contact { grid-column: 2; }
}

@media (max-width: 520px) {
  .time-entry-row { grid-template-columns: 1fr; }
  .time-picker-button { width: 100%; }
  .custom-time-picker { left: 0; right: auto; grid-template-columns: 1fr auto 1fr; }
  .brand-mark { display: none; }
  .masthead { align-items: flex-start; gap: 0.75rem; }
  .shell-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell-nav-direct { justify-content: center; width: 100%; }
  .shell-nav-group { width: 100%; }
  .shell-nav-group > .shell-nav-direct { flex: 1 1 auto; }
  .shell-nav-menu,
  .shell-nav-menu-right { right: auto; left: 0; }
  .shell-nav-group:nth-child(4) .shell-nav-menu { right: 0; left: auto; }
  .version-chip { font-size: 0.68rem; }
  h1 { font-size: 2.5rem; }
  .version-entry { grid-template-columns: 1fr; gap: 0.7rem; }
  footer { flex-direction: column; }
  .contact-search-wrap { grid-template-columns: 1fr; }
  .contact-search-wrap button { justify-self: start; }
  .contact-row { grid-template-columns: 1fr; gap: 0.8rem; }
  .contact-meta { grid-column: auto; }
  .report-contact { grid-column: auto; }
  .ooa-record-heading { display: grid; }
  .ooa-meta { grid-template-columns: 1fr; }
  .resource-heading { display: grid; }
  .resource-heading > span { justify-self: start; }
  .document-search-wrap { grid-template-columns: 1fr; }
  .document-search-wrap button { justify-self: start; }
  .library-entry { align-items: flex-start; flex-direction: column; }
  .document-section dl div { grid-template-columns: 1fr; gap: 0.1rem; }
  .document-quick-links > div,
  .document-domain-cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home-card { transition: none; }
}

@media print {
  .masthead, .sidebar, footer { display: none; }
  .app-shell { display: block; }
  .page { width: 100%; padding: 0; }
  .home-card, .content-card { box-shadow: none; break-inside: avoid; }
  .contact-search-wrap, .contact-help { display: none; }
  .contact-category { box-shadow: none; break-inside: avoid; }
  .contact-category[open] .contact-row { break-inside: avoid; }
  body:has(.resource-handout:not([hidden])) * { visibility: hidden !important; }
  body:has(.resource-handout:not([hidden])) .resource-handout,
  body:has(.resource-handout:not([hidden])) .resource-handout * { visibility: visible !important; }
  body:has(.resource-handout:not([hidden])) .resource-handout {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }
}
.masthead-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .55rem;
}

.user-chip {
  font-size: .88rem;
  font-weight: 700;
}
.user-chip-batduck {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.user-chip-batduck-avatar {
  width: 38px;
  height: 38px;
  display: block;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  background-color: #171717;
  background-image: url("bat-duck.png");
  background-repeat: no-repeat;
  background-size: 326px 155px;
  background-position: -173px -26px;
}
.user-chip-batduck small {
  display: block;
  color: #b9dacf;
  font-size: .68rem;
  line-height: 1.1;
}
