:root {
  color-scheme: light;
  --navy: #003158;
  --navy-2: #001f3a;
  --gold: #f5b335;
  --gold-soft: #fff3d2;
  --ink: #132334;
  --muted: #5d6b79;
  --line: #d8e0e7;
  --paper: #ffffff;
  --surface: #f4f7fa;
  --success: #137a55;
  --shadow: 0 12px 34px rgba(0, 49, 88, .11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); line-height: 1.5; }
button, select, input { font: inherit; }
a { color: inherit; }

.app-shell { min-height: 100vh; padding-bottom: 5.5rem; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; padding: .8rem max(1rem, calc((100vw - 1160px) / 2));
  background: rgba(0, 49, 88, .97); color: white; border-bottom: 3px solid var(--gold);
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-logo { width: 46px; height: 46px; border: 2px solid var(--gold); border-radius: 50%; display: block; object-fit: cover; object-position: center; background: var(--navy-2); }
.brand-copy strong { display: block; font-size: 1rem; letter-spacing: .02em; }
.brand-copy span { display: block; color: #d5e3ee; font-size: .78rem; }
.top-actions { display: flex; align-items: center; gap: .55rem; }
.store-nav-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: .55rem .85rem; border-radius: 999px; background: var(--gold); color: var(--navy-2); text-decoration: none; font-weight: 900; }
.store-nav-button:hover, .store-nav-button:focus-visible { background: white; color: var(--navy); }
.store-link-short { display: none; }
.install-button { border: 1px solid rgba(255,255,255,.38); background: rgba(255,255,255,.08); color: white; border-radius: 999px; padding: .62rem .9rem; font-weight: 800; cursor: pointer; }
.install-button:hover, .install-button:focus-visible { background: white; color: var(--navy); }

main { width: min(1160px, calc(100% - 2rem)); margin: 0 auto; }
.welcome { display: grid; grid-template-columns: 1.3fr .7fr; gap: 1rem; padding: 1.3rem 0 1rem; }
.welcome-card { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: white; border-radius: 22px; padding: clamp(1.35rem, 4vw, 2.4rem); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.welcome-card::after { content: "983"; position: absolute; right: -.15rem; bottom: -2.4rem; font-size: clamp(7rem, 18vw, 12rem); line-height: 1; font-weight: 900; color: rgba(255,255,255,.055); pointer-events: none; }
.eyebrow { margin: 0 0 .45rem; color: var(--gold); font-size: .78rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; max-width: 13ch; font-size: clamp(2rem, 6vw, 3.7rem); line-height: 1.02; letter-spacing: -.045em; }
.welcome-card > p:not(.eyebrow) { max-width: 50ch; margin: .9rem 0 0; color: #e6eef4; font-size: 1rem; }
.survey-card { background: var(--gold); color: var(--navy-2); border-radius: 22px; padding: 1.35rem; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); }
.survey-card small { font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.survey-card h2 { margin: .5rem 0; font-size: 1.55rem; line-height: 1.12; }
.survey-card p { margin: 0 0 1rem; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: .45rem; min-height: 46px; border-radius: 12px; padding: .72rem 1rem; text-decoration: none; font-weight: 850; border: 0; cursor: pointer; }
.button-dark { background: var(--navy); color: white; }
.button-light { background: white; color: var(--navy); }
.button-outline { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.button:hover, .button:focus-visible { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(0,49,88,.15); }

.section { padding: 1.15rem 0; scroll-margin-top: 5rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: clamp(1.35rem, 3vw, 1.9rem); letter-spacing: -.025em; }
.section-heading p { margin: .22rem 0 0; color: var(--muted); }
.text-link { color: var(--navy); font-weight: 800; text-underline-offset: 3px; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.quick-card { min-height: 142px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 1rem; text-decoration: none; display: flex; flex-direction: column; transition: .16s ease; }
.quick-card:hover, .quick-card:focus-visible { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }
.icon-box { width: 42px; height: 42px; border-radius: 12px; display: grid; place-content: center; background: var(--gold-soft); color: var(--navy); font-size: 1.2rem; font-weight: 900; }
.quick-card strong { margin-top: auto; color: var(--navy); font-size: 1rem; }
.quick-card span { margin-top: .18rem; color: var(--muted); font-size: .84rem; }

.questions-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; padding: clamp(1.25rem, 4vw, 1.8rem); border: 1px solid rgba(245,179,53,.55); border-radius: 20px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: white; box-shadow: var(--shadow); }
.questions-panel .eyebrow { margin-bottom: .35rem; }
.questions-panel h2 { margin: 0; color: white; font-size: clamp(1.35rem, 3vw, 1.85rem); letter-spacing: -.025em; }
.questions-panel p:not(.eyebrow) { max-width: 67ch; margin: .4rem 0 0; color: #e6eef4; }
.questions-panel .questions-note { font-size: .83rem; color: #cbdbe6; }
.questions-actions { min-width: min(100%, 275px); display: flex; flex-direction: column; gap: .65rem; align-items: stretch; }
.button-gold { background: var(--gold); color: var(--navy-2); }
.questions-rep-link { color: white; font-size: .86rem; font-weight: 800; text-align: center; text-underline-offset: 3px; }

.finder { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.finder-controls { background: var(--navy); color: white; padding: 1rem; display: grid; grid-template-columns: 1fr 1fr auto; gap: .8rem; align-items: end; }
.field label { display: block; margin-bottom: .35rem; font-size: .8rem; font-weight: 850; color: #dbe7ef; }
.field select { width: 100%; min-height: 46px; padding: .65rem 2.3rem .65rem .75rem; border: 1px solid #9eb2c1; border-radius: 10px; background: white; color: var(--ink); }
.reset-button { min-height: 46px; border: 1px solid rgba(255,255,255,.42); border-radius: 10px; background: transparent; color: white; padding: .65rem .9rem; font-weight: 850; cursor: pointer; }
.results-meta { padding: .8rem 1rem; color: var(--muted); font-size: .88rem; border-bottom: 1px solid var(--line); }
.rep-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; padding: 1rem; }
.rep-card { border: 1px solid var(--line); border-radius: 16px; padding: 1rem; background: white; }
.rep-card h3 { margin: 0; color: var(--navy); font-size: 1.08rem; }
.rep-role { margin: .25rem 0 .7rem; font-weight: 750; }
.rep-meta { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag { background: #edf3f7; color: #345067; border-radius: 999px; padding: .28rem .55rem; font-size: .78rem; font-weight: 750; }
.rep-email { display: inline-block; margin-top: .75rem; color: var(--navy); font-size: .86rem; font-weight: 750; overflow-wrap: anywhere; }
.empty { display: none; margin: 1rem; border: 1px dashed #9eb2c1; border-radius: 14px; padding: 1.2rem; text-align: center; color: var(--muted); }
.live-directory-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: clamp(1.15rem, 4vw, 1.7rem); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.live-directory-panel h3 { margin: .45rem 0 .3rem; color: var(--navy); font-size: clamp(1.2rem, 3vw, 1.55rem); }
.live-directory-panel p { max-width: 68ch; margin: 0; color: var(--muted); }
.live-badge { display: inline-flex; padding: .3rem .6rem; border-radius: 999px; background: var(--gold-soft); color: var(--navy); font-size: .75rem; font-weight: 900; letter-spacing: .07em; }

.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.resource-card { background: white; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 16px; padding: 1rem; }
.resource-card h3 { margin: 0 0 .35rem; color: var(--navy); }
.resource-card p { margin: 0 0 .9rem; color: var(--muted); font-size: .92rem; }
.resource-card .button { width: 100%; }

.meeting-panel { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; background: var(--navy); color: white; border-radius: 20px; padding: 1.25rem; }
.meeting-panel h3 { margin: 0; color: var(--gold); font-size: 1.25rem; }
.meeting-panel p { margin: .35rem 0 0; color: #dce8ef; }

.site-note { margin: 1rem 0 2rem; padding: .85rem 1rem; border-left: 4px solid var(--gold); background: white; color: var(--muted); font-size: .86rem; }
.site-note a { color: var(--navy); font-weight: 800; }
.bottom-nav { position: fixed; left: 50%; bottom: .7rem; transform: translateX(-50%); z-index: 30; width: min(620px, calc(100% - 1rem)); display: none; grid-template-columns: repeat(5, 1fr); background: rgba(0,31,58,.97); color: white; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.28); overflow: hidden; }
.bottom-nav a { text-decoration: none; text-align: center; padding: .72rem .2rem; font-size: .73rem; font-weight: 750; }
.bottom-nav a:hover, .bottom-nav a:focus-visible { background: rgba(245,179,53,.18); color: var(--gold); }

.dialog-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,31,58,.72); display: none; place-items: center; padding: 1rem; }
.dialog-backdrop.open { display: grid; }
.dialog { width: min(480px, 100%); background: white; border-radius: 20px; padding: 1.25rem; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.dialog h2 { margin: 0 0 .5rem; color: var(--navy); }
.dialog p, .dialog li { color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }

@media (max-width: 880px) {
  .welcome { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .rep-grid, .resource-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .app-shell { padding-bottom: 6rem; }
  .brand-copy span { display: none; }
  .store-link-long { display: none; }
  .store-link-short { display: inline; }
  .store-nav-button { min-height: 40px; padding: .5rem .72rem; font-size: .82rem; }
  .install-button { font-size: .82rem; padding: .55rem .7rem; }
  main { width: min(100% - 1rem, 1160px); }
  .welcome { padding-top: .6rem; }
  .welcome-card, .survey-card, .finder { border-radius: 16px; }
  .quick-grid { gap: .55rem; }
  .quick-card { min-height: 125px; padding: .8rem; border-radius: 14px; }
  .finder-controls { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .reset-button { grid-column: 1 / -1; }
  .rep-grid, .resource-grid { grid-template-columns: 1fr; padding: .75rem; }
  .live-directory-panel { grid-template-columns: 1fr; border-radius: 16px; }
  .live-directory-panel .button { width: 100%; }
  .questions-panel { grid-template-columns: 1fr; border-radius: 16px; }
  .questions-actions { min-width: 0; width: 100%; }
  .questions-actions .button { width: 100%; }
  .meeting-panel { grid-template-columns: 1fr; }
  .meeting-panel .button { width: 100%; }
  .bottom-nav { display: grid; }
  .section-heading { align-items: start; }
}

@media (max-width: 410px) {
  .brand-copy { display: none; }
  .topbar { gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
