:root {
  --paper: #edf0ec;
  --paper-deep: #dce2dd;
  --white: #fbfcfa;
  --ink: #111716;
  --ink-soft: #2d3734;
  --muted: #68736f;
  --line: #c1c9c4;
  --line-dark: #34403c;
  --blue: #2457e6;
  --blue-soft: #dce5ff;
  --red: #d84535;
  --red-soft: #f8dfda;
  --gold: #dda62a;
  --gold-soft: #f7eccb;
  --mint: #8ad9b3;
  --mint-dark: #1b7d58;
  --mint-soft: #d9f3e6;
  --violet: #7767a8;
  --violet-soft: #e9e4f5;
  --danger: #b9231a;
  --focus: #0a66ff;
  --font-display: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --topbar: 68px;
  --sidebar: 248px;
  --radius: 6px;
  --shadow: 0 22px 60px rgba(17, 23, 22, .22);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--font-body); line-height: 1.5; letter-spacing: 0; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 500; transform: translateY(-160%); padding: 10px 14px; background: var(--white); border: 2px solid var(--ink); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }

.app-topbar { position: fixed; inset: 0 0 auto 0; z-index: 200; height: var(--topbar); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 18px; background: var(--ink); color: var(--white); border-bottom: 1px solid rgba(255,255,255,.16); }
.topbar-left, .topbar-actions { min-width: 0; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.02rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand > span:last-child > span { color: var(--gold); }
.brand-mark { width: 17px; height: 17px; background: conic-gradient(from 45deg, var(--blue) 0 25%, var(--gold) 0 50%, var(--red) 0 75%, var(--mint) 0); border: 2px solid currentColor; transform: rotate(45deg); }
.topbar-divider { width: 1px; height: 34px; background: rgba(255,255,255,.22); }
.organization-switcher { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 8px; border: 0; border-radius: var(--radius); color: var(--white); background: transparent; cursor: pointer; text-align: left; }
.organization-switcher:hover { background: rgba(255,255,255,.08); }
.organization-switcher > span:nth-child(2) { min-width: 0; display: grid; }
.organization-switcher strong, .organization-switcher small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.organization-switcher strong { font-size: .82rem; }
.organization-switcher small { font-family: var(--font-mono); font-size: .58rem; color: rgba(255,255,255,.56); }
.organization-switcher svg { width: 16px; }
.org-seal { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-family: var(--font-mono); font-size: .66rem; font-weight: 700; }
.prototype-link { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 9px; font-size: .78rem; text-decoration: none; color: rgba(255,255,255,.74); }
.prototype-link:hover { color: var(--white); }
.prototype-link svg { width: 16px; }
.icon-button { width: 42px; height: 42px; flex: 0 0 auto; display: inline-grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; background: transparent; cursor: pointer; }
.icon-button:hover { background: currentColor; color: var(--paper); }
.app-topbar .icon-button:hover { background: var(--white); color: var(--ink); }
.icon-button svg { width: 18px; height: 18px; }
.icon-button.small { width: 34px; height: 34px; }
.notification-button { position: relative; }
.notification-button > span { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border-radius: 10px; background: var(--red); color: white; font-family: var(--font-mono); font-size: .54rem; }
.account-button { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 4px; border: 1px solid rgba(255,255,255,.36); border-radius: 24px; background: transparent; color: white; cursor: pointer; }
.account-button > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--violet); font-size: .7rem; font-weight: 700; }
.account-button svg { width: 14px; }
.mobile-menu { display: none; }

.app-sidebar { position: fixed; top: var(--topbar); bottom: 0; left: 0; z-index: 150; width: var(--sidebar); display: flex; flex-direction: column; overflow-y: auto; background: var(--white); border-right: 1px solid var(--line); }
.setup-progress { padding: 20px 18px 18px; border-bottom: 1px solid var(--line); }
.setup-progress > div:first-child { display: flex; justify-content: space-between; gap: 10px; font-family: var(--font-mono); font-size: .63rem; text-transform: uppercase; }
.setup-progress > div:first-child span { color: var(--muted); }
.progress-track { height: 7px; margin: 12px 0 11px; overflow: hidden; background: var(--paper-deep); }
.progress-track i { display: block; width: var(--progress); height: 100%; background: var(--blue); transition: width .35s ease; }
.setup-progress button { display: flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; color: var(--blue); font-size: .75rem; font-weight: 700; cursor: pointer; }
.setup-progress button svg { width: 14px; }
.sidebar-nav { display: grid; padding: 12px 10px; }
.sidebar-nav p { margin: 15px 10px 6px; font-family: var(--font-mono); font-size: .58rem; text-transform: uppercase; color: var(--muted); }
.sidebar-nav button { min-height: 44px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; text-align: left; font-size: .82rem; cursor: pointer; }
.sidebar-nav button:hover { background: var(--paper); }
.sidebar-nav button.is-active { background: var(--ink); color: var(--white); }
.sidebar-nav button svg { width: 17px; }
.sidebar-nav button b { min-width: 24px; padding: 2px 6px; border-radius: 10px; background: var(--paper-deep); color: var(--ink); text-align: center; font-family: var(--font-mono); font-size: .57rem; }
.privacy-note { margin: auto 14px 16px; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 14px 0 0; border-top: 1px solid var(--line); }
.privacy-note svg { width: 17px; color: var(--mint-dark); }
.privacy-note div { display: grid; gap: 3px; }
.privacy-note strong { font-size: .73rem; }
.privacy-note span { font-size: .65rem; line-height: 1.4; color: var(--muted); }
.sidebar-scrim { position: fixed; inset: var(--topbar) 0 0; z-index: 140; background: rgba(17,23,22,.56); }

.group-main { min-height: 100svh; margin-left: var(--sidebar); padding: calc(var(--topbar) + 34px) clamp(22px, 3vw, 52px) 64px; }
.view-panel { max-width: 1450px; margin: 0 auto; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.page-heading > div:first-child { max-width: 820px; }
.page-heading h1 { margin: 0; font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 4.7rem); line-height: .94; }
.page-heading p:last-child { max-width: 760px; margin: 14px 0 0; color: var(--ink-soft); font-size: 1.05rem; }
.compact-heading { align-items: center; margin-bottom: 34px; }
.compact-heading h1 { font-size: clamp(2.2rem, 3.2vw, 4rem); }
.eyebrow { margin: 0 0 8px; font-family: var(--font-mono); font-size: .63rem; font-weight: 600; text-transform: uppercase; color: var(--blue); }
.page-actions { display: flex; align-items: center; gap: 10px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: .79rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .14s, background .14s, color .14s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.button-primary:hover { background: #efbc42; }
.button-ghost { border-color: var(--line-dark); background: transparent; }
.button-ghost:hover { background: var(--white); }
.button-dark { border-color: var(--ink); background: var(--ink); color: var(--white); }
.button-small { min-height: 34px; padding: 0 11px; font-size: .7rem; }
.button.full { width: 100%; }
.button svg { width: 16px; height: 16px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--blue); font-size: .73rem; font-weight: 700; cursor: pointer; }
.text-button svg { width: 14px; }

.setup-callout { min-height: 124px; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 20px; margin-bottom: 22px; padding: 22px 24px; border: 1px solid var(--ink); background: var(--gold-soft); box-shadow: 7px 7px 0 var(--ink); }
.setup-callout .callout-icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--gold); border: 1px solid var(--ink); }
.setup-callout .callout-icon svg { width: 22px; }
.setup-callout span { font-family: var(--font-mono); font-size: .61rem; text-transform: uppercase; color: #775300; }
.setup-callout h2 { margin: 2px 0 3px; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; }
.setup-callout p { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 22px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); background: var(--white); }
.metric-strip > div { min-height: 128px; display: flex; flex-direction: column; padding: 18px 20px; border-right: 1px solid var(--line); }
.metric-strip > div:last-child { border-right: 0; }
.metric-strip span { font-family: var(--font-mono); font-size: .61rem; text-transform: uppercase; color: var(--muted); }
.metric-strip strong { margin: 5px 0 8px; font-family: var(--font-display); font-size: 2.3rem; line-height: 1; }
.metric-strip small { margin-top: auto; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .7rem; }
.metric-strip small svg { width: 13px; color: var(--mint-dark); }
.overview-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 22px; align-items: start; }
.workspace-section { min-width: 0; padding: 24px; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
.section-heading.compact { align-items: start; }
.section-heading h2 { margin: 0; font-family: var(--font-display); font-size: 1.55rem; line-height: 1.05; }
.activation-funnel { display: grid; gap: 9px; margin: 5px 0 24px; }
.activation-funnel > div { display: grid; grid-template-columns: 140px 42px 1fr; align-items: center; gap: 10px; }
.activation-funnel span { color: var(--ink-soft); font-size: .75rem; }
.activation-funnel strong { text-align: right; font-family: var(--font-mono); font-size: .68rem; }
.activation-funnel i { height: 9px; width: var(--width); background: var(--tone); }
.member-list { border-top: 1px solid var(--line); }
.member-row { min-height: 68px; display: grid; grid-template-columns: 38px minmax(160px, 1fr) auto 34px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.member-row > div { min-width: 0; display: grid; }
.member-row > div strong, .member-row > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row > div strong { font-size: .78rem; }
.member-row > div span { color: var(--muted); font-size: .67rem; }
.avatar { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--white); font-family: var(--font-mono); font-size: .62rem; font-weight: 700; }
.avatar-blue { background: var(--blue); }.avatar-red { background: var(--red); }.avatar-gold { background: #9a6900; }.avatar-mint { background: var(--mint-dark); }
.status { width: fit-content; display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 12px; white-space: nowrap; font-family: var(--font-mono); font-size: .56rem; }
.status-good { background: var(--mint-soft); color: #0e5e3e; }.status-warn { background: var(--gold-soft); color: #735000; }.status-muted { background: var(--paper-deep); color: var(--ink-soft); }
.invitation-panel > p { color: var(--ink-soft); font-size: .78rem; }
.live-indicator { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .6rem; color: var(--mint-dark); }
.live-indicator::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint-dark); }
.invite-link-field { display: grid; grid-template-columns: 1fr 34px; gap: 8px; align-items: center; margin: 20px 0; padding: 9px 9px 9px 12px; border: 1px solid var(--line-dark); background: var(--paper); }
.invite-link-field code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: .63rem; }
.invite-link-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.invite-link-stats span { min-height: 70px; display: flex; flex-direction: column; justify-content: center; padding: 10px; border-right: 1px solid var(--line); font-size: .62rem; color: var(--muted); }
.invite-link-stats span:last-child { border-right: 0; }
.invite-link-stats strong { color: var(--ink); font-family: var(--font-display); font-size: 1.2rem; }
.precinct-panel { padding: 0; overflow: hidden; }
.precinct-panel > .section-heading { padding: 24px 24px 0; }
.coverage-map { position: relative; height: 410px; overflow: hidden; background: var(--ink); }
.coverage-map img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .82; filter: saturate(.84) contrast(1.05); }
.coverage-map::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17,23,22,.64), transparent 60%); pointer-events: none; }
.coverage-legend { position: absolute; z-index: 2; top: 16px; right: 16px; display: flex; gap: 12px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.36); background: rgba(17,23,22,.78); color: white; font-family: var(--font-mono); font-size: .54rem; }
.coverage-legend span { display: flex; align-items: center; gap: 5px; }
.coverage-legend i { width: 9px; height: 9px; display: inline-block; }.coverage-legend .covered { background: var(--blue); }.coverage-legend .open { background: var(--gold); }
.coverage-callout { position: absolute; z-index: 2; left: 20px; bottom: 20px; min-width: 230px; display: grid; padding-left: 14px; border-left: 4px solid var(--gold); color: white; }
.coverage-callout span { font-family: var(--font-mono); font-size: .58rem; text-transform: uppercase; color: rgba(255,255,255,.7); }
.coverage-callout strong { font-family: var(--font-display); font-size: 1.55rem; }
.coverage-callout button { width: fit-content; margin-top: 8px; padding: 0; border: 0; border-bottom: 1px solid var(--gold); background: none; color: var(--gold); font-size: .7rem; font-weight: 700; cursor: pointer; }
.next-actions { padding-bottom: 4px; }
.action-item { min-height: 72px; display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 12px; border-top: 1px solid var(--line); cursor: pointer; }
.action-item input { width: 17px; height: 17px; accent-color: var(--blue); }
.action-item > span { display: grid; }
.action-item strong { font-size: .76rem; }.action-item small { color: var(--muted); font-size: .65rem; }
.action-item b { min-width: 28px; padding: 4px 7px; border-radius: 12px; background: var(--paper-deep); text-align: center; font-family: var(--font-mono); font-size: .57rem; }
.action-item:has(input:checked) > span { opacity: .52; text-decoration: line-through; }

.directory-tools { display: grid; grid-template-columns: minmax(260px, 1fr) 180px 160px auto; gap: 10px; margin-bottom: 12px; }
.directory-tools label, .dialog-shell label { min-width: 0; }
.directory-tools input, .directory-tools select, .dialog-shell input, .dialog-shell select, .dialog-shell textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--ink); }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 13px; top: 13px; width: 17px; color: var(--muted); }
.search-field input { padding-left: 39px; }
.bulk-bar { min-height: 52px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--ink); color: var(--white); }
.bulk-bar strong { margin-right: auto; font-size: .75rem; }
.bulk-bar button { min-height: 34px; padding: 0 10px; border: 1px solid rgba(255,255,255,.34); border-radius: 3px; background: transparent; color: white; font-size: .67rem; cursor: pointer; }
.bulk-bar button:hover { background: rgba(255,255,255,.1); }.bulk-bar .danger-text { color: #ff9588; }
.directory-table-wrap, .access-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--white); }
.directory-table, .access-table { width: 100%; border-collapse: collapse; font-size: .73rem; }
.directory-table th, .directory-table td, .access-table th, .access-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.directory-table thead th, .access-table thead th { position: sticky; top: 0; z-index: 1; background: var(--paper-deep); font-family: var(--font-mono); font-size: .57rem; text-transform: uppercase; }
.directory-table tbody tr:hover { background: #f5f7f4; }
.directory-table tbody tr.is-selected { background: var(--blue-soft); }
.person-cell { min-width: 210px; display: flex; align-items: center; gap: 10px; }
.person-cell > span:last-child { display: grid; }
.person-cell small { color: var(--muted); }
.role-badge { display: inline-flex; padding: 4px 7px; border: 1px solid var(--line); border-radius: 3px; font-size: .63rem; }
.mini-progress { width: 54px; height: 5px; display: inline-block; margin-right: 7px; overflow: hidden; background: var(--paper-deep); vertical-align: middle; }
.mini-progress i { display: block; width: var(--progress); height: 100%; background: var(--blue); }
.empty-filter { padding: 50px 20px; text-align: center; color: var(--muted); }

.teams-layout, .guide-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 22px; align-items: start; }
.team-directory { padding-bottom: 4px; }
.team-row { min-height: 78px; display: grid; grid-template-columns: 40px 1fr 34px 34px; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.team-row > div { min-width: 0; display: grid; }.team-row > div span { color: var(--muted); font-size: .67rem; }.team-row b { text-align: center; font-family: var(--font-display); }
.team-icon, .history-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 4px; }
.team-icon svg, .history-icon svg { width: 18px; }.team-icon.blue { background: var(--blue-soft); color: var(--blue); }.team-icon.gold { background: var(--gold-soft); color: #7e5700; }.team-icon.mint { background: var(--mint-soft); color: var(--mint-dark); }.team-icon.red { background: var(--red-soft); color: var(--red); }.team-icon.violet { background: var(--violet-soft); color: var(--violet); }
.team-rules > p { color: var(--ink-soft); font-size: .78rem; }
.rule-row, .assignment-row { min-height: 61px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; border-top: 1px solid var(--line); font-size: .72rem; }
.rule-row span, .assignment-row span { color: var(--muted); }.rule-row strong, .assignment-row strong { text-align: right; }

.invite-method-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 26px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.invite-method-grid > button { min-height: 210px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px; border: 0; border-right: 1px solid var(--line); background: var(--white); text-align: left; cursor: pointer; }
.invite-method-grid > button:last-child { border-right: 0; }.invite-method-grid > button:hover { background: var(--gold-soft); }
.invite-method-grid svg { width: 25px; height: 25px; color: var(--blue); }.invite-method-grid strong { margin-top: 12px; font-family: var(--font-display); font-size: 1.25rem; }.invite-method-grid span { color: var(--ink-soft); font-size: .75rem; }.invite-method-grid small { margin-top: auto; color: var(--muted); font-family: var(--font-mono); font-size: .58rem; }
.segmented { display: inline-flex; border: 1px solid var(--line-dark); border-radius: 3px; overflow: hidden; }
.segmented button { min-height: 34px; padding: 0 12px; border: 0; border-right: 1px solid var(--line-dark); background: transparent; font-size: .65rem; cursor: pointer; }.segmented button:last-child { border-right: 0; }.segmented button.is-active { background: var(--ink); color: white; }
.invite-history { padding-bottom: 4px; }
.history-row { min-height: 80px; display: grid; grid-template-columns: 40px minmax(230px, 1fr) repeat(3, auto) 34px; align-items: center; gap: 16px; border-top: 1px solid var(--line); }
.history-icon { background: var(--paper-deep); }.history-row > div { min-width: 0; display: grid; }.history-row > div span { color: var(--muted); font-size: .67rem; }.history-row > span:not(.history-icon) { min-width: 70px; display: grid; text-align: center; color: var(--muted); font-size: .6rem; }.history-row > span b { color: var(--ink); font-family: var(--font-display); font-size: 1rem; }

.access-principles { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 22px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); background: var(--white); }
.access-principles > div { min-height: 170px; display: flex; flex-direction: column; padding: 24px; border-right: 1px solid var(--line); }.access-principles > div:last-child { border-right: 0; }.access-principles svg { width: 24px; color: var(--blue); }.access-principles strong { margin: 20px 0 7px; }.access-principles span { color: var(--ink-soft); font-size: .76rem; }
.access-table th:first-child { min-width: 190px; }.access-table tbody th { white-space: normal; }.access-table tbody th strong, .access-table tbody th span { display: block; }.access-table tbody th span { color: var(--muted); font-size: .62rem; font-weight: 400; }.access-table td { text-align: center; }

.guide-builder { padding-bottom: 4px; }.guide-steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }.guide-steps li { min-height: 79px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }.guide-steps li > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; font-family: var(--font-mono); font-size: .62rem; }.guide-steps li.is-complete > span { background: var(--mint-soft); border-color: var(--mint-dark); color: var(--mint-dark); }.guide-steps li > span svg { width: 15px; }.guide-steps li > div { display: grid; }.guide-steps small { color: var(--muted); }.guide-assignment { display: grid; gap: 0; }.toggle-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 10px; border-top: 1px solid var(--line); cursor: pointer; }.toggle-row > span { display: grid; }.toggle-row small { color: var(--muted); font-size: .63rem; }.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }.toggle-row > i { width: 42px; height: 23px; flex: 0 0 auto; position: relative; border-radius: 14px; background: var(--line); transition: background .18s; }.toggle-row > i::after { content: ""; position: absolute; width: 17px; height: 17px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }.toggle-row input:checked + i { background: var(--blue); }.toggle-row input:checked + i::after { transform: translateX(19px); }

.invite-dialog, .onboarding-dialog { width: min(1050px, calc(100% - 28px)); max-height: calc(100svh - 28px); overflow: hidden; padding: 0; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.onboarding-dialog { width: min(960px, calc(100% - 28px)); }
.invite-dialog::backdrop, .onboarding-dialog::backdrop { background: rgba(17,23,22,.74); backdrop-filter: blur(4px); }
.dialog-shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; max-height: calc(100svh - 30px); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 24px 26px 20px; background: var(--white); border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-family: var(--font-display); font-size: 2rem; line-height: 1; }.dialog-header p:last-child { max-width: 680px; margin: 9px 0 0; color: var(--ink-soft); font-size: .78rem; }
.invite-tabs { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border-bottom: 1px solid var(--line); }
.invite-tabs button { min-height: 64px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-right: 1px solid var(--line); background: transparent; font-size: .72rem; font-weight: 700; cursor: pointer; }.invite-tabs button:last-child { border-right: 0; }.invite-tabs button.is-active { background: var(--ink); color: white; }.invite-tabs svg { width: 17px; }
.invite-dialog-grid { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); overflow-y: auto; }
.method-panel { padding: 28px; background: var(--white); }.method-panel h3, .invite-defaults h3 { margin: 0; font-family: var(--font-display); font-size: 1.45rem; }.method-panel p { color: var(--ink-soft); font-size: .8rem; }.method-panel label, .invite-defaults label { display: grid; gap: 6px; margin-top: 17px; font-size: .7rem; font-weight: 700; }.method-panel label small, .invite-defaults label small { color: var(--muted); font-weight: 400; }.inline-toggle { display: flex !important; }.inline-notice { display: flex; gap: 9px; margin-top: 14px; padding: 12px; background: var(--mint-soft); color: #155b3e; font-size: .7rem; }.inline-notice svg { width: 17px; }
.drop-zone { width: 100%; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; border: 2px dashed var(--line-dark); background: var(--paper); cursor: pointer; }.drop-zone:hover { background: var(--blue-soft); }.drop-zone svg { width: 30px; color: var(--blue); }.drop-zone span { color: var(--muted); font-size: .68rem; }.template-link { width: fit-content; display: flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--blue); font-size: .7rem; font-weight: 700; }.template-link svg { width: 14px; }
.qr-preview { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 20px; margin: 18px 0; padding: 18px; border: 1px solid var(--line); background: var(--paper); }.qr-preview > div:last-child { display: grid; gap: 6px; }.qr-preview span, .qr-preview small { color: var(--muted); font-size: .7rem; }.qr-grid { width: 150px; aspect-ratio: 1; border: 10px solid white; background-color: var(--ink); background-image: linear-gradient(90deg, transparent 50%, white 50%), linear-gradient(transparent 50%, white 50%); background-size: 18px 18px; box-shadow: inset 0 0 0 5px var(--ink); }
.invite-defaults { padding: 28px; border-left: 1px solid var(--line); background: var(--paper); }.access-summary { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin-top: 20px; padding: 14px; border: 1px solid var(--mint-dark); background: var(--mint-soft); }.access-summary svg { width: 18px; color: var(--mint-dark); }.access-summary div { display: grid; gap: 4px; }.access-summary span { font-size: .67rem; color: #245c45; }.invite-defaults .text-button { margin-top: 16px; }
.dialog-footer { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 26px; border-top: 1px solid var(--line); background: var(--white); }.dialog-footer p { margin: 0; color: var(--muted); font-size: .68rem; }.dialog-footer > div { display: flex; gap: 9px; }

.onboarding-shell { display: grid; grid-template-rows: auto 5px minmax(0, 1fr) auto; height: min(760px, calc(100svh - 30px)); background: var(--white); }
.onboarding-top { min-height: 64px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 20px; padding: 10px 18px; border-bottom: 1px solid var(--line); }.member-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; }.onboarding-top > span { font-family: var(--font-mono); font-size: .61rem; color: var(--muted); }.onboarding-progress { overflow: hidden; background: var(--paper-deep); }.onboarding-progress i { display: block; width: var(--progress); height: 100%; background: var(--blue); transition: width .3s ease; }
.onboarding-content { min-height: 0; overflow-y: auto; padding: clamp(28px, 5vw, 56px); }.onboarding-step { max-width: 760px; margin: 0 auto; }.onboarding-step h2 { max-width: 700px; margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.8rem); line-height: .98; }.onboarding-step > p:not(.eyebrow) { max-width: 650px; color: var(--ink-soft); font-size: 1rem; }.welcome-mark, .success-mark { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 20px; border: 1px solid var(--ink); background: var(--gold); box-shadow: 5px 5px 0 var(--ink); }.welcome-mark svg, .success-mark svg { width: 27px; }.success-mark { border-radius: 50%; background: var(--mint); }
.welcome-from { max-width: 640px; display: grid; grid-template-columns: 38px 1fr; gap: 14px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }.welcome-from blockquote { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.interest-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 26px; }.interest-grid label { cursor: pointer; }.interest-grid input { position: absolute; opacity: 0; }.interest-grid span { min-height: 105px; display: grid; grid-template-columns: 28px 1fr; align-content: center; gap: 2px 10px; padding: 16px; border: 1px solid var(--line); border-radius: 4px; }.interest-grid svg { grid-row: 1 / 3; width: 22px; color: var(--blue); }.interest-grid small { color: var(--muted); }.interest-grid input:checked + span { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }.privacy-choice { max-width: 650px; min-height: 72px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.map-step { max-width: 860px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr); gap: 34px; align-items: center; }.map-step dl { margin: 22px 0; }.map-step dl div { display: grid; grid-template-columns: 130px 1fr; padding: 10px 0; border-top: 1px solid var(--line); }.map-step dt { color: var(--muted); font-size: .68rem; }.map-step dd { margin: 0; font-weight: 700; font-size: .75rem; }.member-map { height: 380px; position: relative; overflow: hidden; border: 1px solid var(--ink); background: var(--ink); }.member-map img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }.member-map span { position: absolute; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--gold); font-family: var(--font-mono); font-size: .63rem; font-weight: 700; }.member-map span svg { width: 15px; }
.first-action-list { display: grid; gap: 10px; margin-top: 24px; }.first-action-list label { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 14px; min-height: 84px; padding: 14px 16px; border: 1px solid var(--line); cursor: pointer; }.first-action-list label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }.first-action-list input { accent-color: var(--blue); }.first-action-list > label > span { display: grid; grid-template-columns: 28px 1fr; gap: 2px 8px; }.first-action-list > label > span svg { grid-row: 1 / 3; width: 21px; color: var(--blue); }.first-action-list small { color: var(--muted); }.first-action-list b { color: var(--blue); font-family: var(--font-mono); font-size: .58rem; text-transform: uppercase; }
.success-step { text-align: center; }.success-step .success-mark { margin-inline: auto; }.success-step > p { margin-inline: auto; }.member-home-preview { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.member-home-preview span { min-height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line); }.member-home-preview span:last-child { border-right: 0; }.member-home-preview svg { width: 21px; color: var(--blue); }.member-home-preview strong { margin-top: 8px; }.member-home-preview small { color: var(--muted); }
.onboarding-footer { min-height: 72px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 12px 18px; border-top: 1px solid var(--line); }.onboarding-footer > span { text-align: center; color: var(--muted); font-family: var(--font-mono); font-size: .58rem; }.onboarding-footer button:disabled { opacity: .36; cursor: not-allowed; transform: none; }
.toast { position: fixed; z-index: 600; right: 20px; bottom: 20px; max-width: min(360px, calc(100% - 40px)); display: flex; align-items: center; gap: 10px; padding: 13px 16px; border: 1px solid var(--mint-dark); border-radius: 4px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: .76rem; }.toast svg { width: 18px; color: var(--mint); }

@media (max-width: 1180px) {
  .overview-layout { grid-template-columns: 1fr; }
  .invitation-panel, .next-actions { grid-column: auto; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-strip > div:nth-child(2) { border-right: 0; }
  .metric-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .invite-method-grid { grid-template-columns: repeat(2, 1fr); }
  .invite-method-grid > button:nth-child(2) { border-right: 0; }
  .invite-method-grid > button:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .directory-tools { grid-template-columns: minmax(240px, 1fr) 170px 150px; }
  .directory-tools > .button { grid-column: 1 / -1; width: fit-content; }
}

@media (max-width: 900px) {
  :root { --topbar: 64px; }
  .mobile-menu { display: inline-grid; }
  .topbar-divider, .prototype-link span, .organization-switcher small { display: none; }
  .app-sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .app-sidebar.is-open { transform: translateX(0); }
  .group-main { margin-left: 0; padding-inline: 20px; }
  .page-heading { align-items: start; flex-direction: column; }
  .compact-heading { align-items: start; }
  .teams-layout, .guide-layout { grid-template-columns: 1fr; }
  .access-principles { grid-template-columns: 1fr; }
  .access-principles > div { min-height: 135px; border-right: 0; border-bottom: 1px solid var(--line); }
  .access-principles > div:last-child { border-bottom: 0; }
  .invite-dialog-grid { grid-template-columns: 1fr; }
  .invite-defaults { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .app-topbar { padding-inline: 10px; }
  .organization-switcher { max-width: 160px; }
  .organization-switcher strong { font-size: .7rem; }
  .topbar-actions .prototype-link, .topbar-actions .notification-button { display: none; }
  .group-main { padding: calc(var(--topbar) + 24px) 14px 46px; }
  .page-heading h1 { font-size: 2.65rem; }
  .page-actions { width: 100%; display: grid; }
  .setup-callout { grid-template-columns: 38px 1fr; padding: 18px; box-shadow: 4px 4px 0 var(--ink); }
  .setup-callout .callout-icon { width: 38px; height: 38px; }
  .setup-callout .button { grid-column: 1 / -1; }
  .metric-strip { grid-template-columns: 1fr; }
  .metric-strip > div { min-height: 108px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-strip > div:last-child { border-bottom: 0; }
  .workspace-section { padding: 19px; }
  .section-heading { align-items: start; flex-direction: column; }
  .activation-funnel > div { grid-template-columns: 108px 36px 1fr; }
  .member-row { grid-template-columns: 36px 1fr 34px; }
  .member-row .status { grid-column: 2; }
  .coverage-map { height: 360px; }
  .directory-tools { grid-template-columns: 1fr; }
  .directory-tools > .button { grid-column: auto; width: 100%; }
  .bulk-bar { overflow-x: auto; }.bulk-bar strong, .bulk-bar button { flex: 0 0 auto; }
  .invite-method-grid { grid-template-columns: 1fr; }
  .invite-method-grid > button { min-height: 170px; border-right: 0; border-bottom: 1px solid var(--line); }
  .history-row { grid-template-columns: 40px 1fr 34px; padding: 12px 0; }.history-row > span:not(.history-icon) { display: none; }
  .invite-tabs { grid-template-columns: repeat(4, 1fr); }.invite-tabs button { min-height: 58px; }.invite-tabs button span { display: none; }
  .dialog-header { padding: 20px; }.dialog-header h2 { font-size: 1.7rem; }.method-panel, .invite-defaults { padding: 20px; }.dialog-footer { align-items: stretch; flex-direction: column; padding: 14px 20px; }.dialog-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .qr-preview { grid-template-columns: 110px 1fr; }.qr-grid { width: 110px; }
  .interest-grid { grid-template-columns: 1fr; }
  .map-step { grid-template-columns: 1fr; }.member-map { height: 280px; }
  .first-action-list label { grid-template-columns: 18px 1fr; }.first-action-list label b { grid-column: 2; }
  .member-home-preview { grid-template-columns: 1fr; }.member-home-preview span { min-height: 80px; border-right: 0; border-bottom: 1px solid var(--line); }.member-home-preview span:last-child { border-bottom: 0; }
  .onboarding-footer { grid-template-columns: 1fr 1fr; }.onboarding-footer > span { display: none; }
}

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