:root {
  --ink: #123f32;
  --ink-strong: #102f27;
  --muted: #6f746f;
  --sand: #fbf8ef;
  --paper: #fffefa;
  --green: #24a94b;
  --green-deep: #11833a;
  --green-dark: #0c5c35;
  --lime: #dff47d;
  --lime-soft: #f2f7d8;
  --line: #ddd9cf;
  --danger: #a3372e;
  --shadow-soft: 0 16px 40px rgba(41, 58, 48, .07);
  color: var(--ink-strong);
  background: var(--sand);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--sand); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--sand); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: max(16px, env(safe-area-inset-top)) max(24px, calc((100vw - 1180px) / 2)) 16px; background: rgba(251, 248, 239, .96); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 16px; color: var(--ink); font-size: 1.22rem; font-weight: 760; text-decoration: none; }
.brand-logo { display: block; width: 122px; height: auto; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 22px auto 80px; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; color: var(--ink); letter-spacing: -.035em; line-height: 1.06; margin: .3rem 0 1rem; }
h1 { font-size: clamp(2.25rem, 6vw, 4.15rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
p { line-height: 1.55; }
.eyebrow { margin: 0 0 12px; color: var(--green-deep); font-size: .74rem; font-weight: 820; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.auth-card, .hero-card, .question-card { width: min(650px, 100%); margin: 5vh auto 0; padding: clamp(26px, 5vw, 50px); background: rgba(255, 254, 250, .82); border: 1px solid rgba(128, 122, 106, .18); border-radius: 30px; box-shadow: var(--shadow-soft); }
.stack { display: grid; gap: 18px; margin-top: 28px; }
.auth-secondary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-top: 8px; }
label { display: grid; gap: 8px; font-size: .9rem; font-weight: 720; }
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; min-height: 50px; padding: 14px 16px; color: var(--ink-strong); background: var(--paper); border: 1px solid #d5d1c7; border-radius: 15px; outline: none; transition: border-color .16s, box-shadow .16s, background .16s; }
textarea { min-height: 132px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(36, 169, 75, .14); }
.button { min-height: 50px; padding: 14px 20px; border: 0; border-radius: 16px; font-weight: 790; cursor: pointer; touch-action: manipulation; transition: transform .15s, background .15s, box-shadow .15s; }
.button:active { transform: translateY(1px); }
.button:focus-visible, .text-button:focus-visible, .choice:focus-within { outline: 3px solid rgba(36, 169, 75, .33); outline-offset: 3px; }
.button:disabled { opacity: .54; cursor: not-allowed; }
.primary { color: white; background: var(--green); box-shadow: 0 10px 24px rgba(36, 169, 75, .16); }
.primary:hover { background: var(--green-deep); }
.secondary { color: var(--ink); background: var(--lime); }
.ghost { color: var(--green-dark); background: var(--lime-soft); border: 1px solid transparent; }
.compact { min-height: 42px; padding: 10px 15px; border-radius: 13px; }
.text-button { min-height: 44px; padding: 10px 2px; color: var(--green-dark); background: none; border: 0; font-weight: 760; cursor: pointer; }
.error { padding: 13px 15px; color: var(--danger); background: #fbe9e6; border-radius: 13px; font-weight: 650; }
.notice { width: min(650px, 100%); margin: 18px auto; padding: 18px 20px; color: var(--ink); background: var(--lime-soft); border-radius: 16px; }
.notice p { margin: .3rem 0 0; }
.hero-card .button { margin-top: 18px; }
.survey-shell { width: min(760px, 100%); margin: 22px auto 0; }
.survey-identity { width: max-content; max-width: 100%; display: flex; align-items: center; gap: 11px; margin: 0 0 26px; padding: 8px 15px 8px 9px; background: rgba(255, 255, 255, .64); border: 1px solid var(--line); border-radius: 999px; }
.identity-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: var(--ink); background: var(--lime); border-radius: 50%; font-size: .74rem; font-weight: 850; }
.survey-identity > span:last-child { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.survey-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.survey-identity small { color: var(--muted); font-weight: 720; }
.survey-identity small::before { content: "· "; }
.progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.progress-meta strong { color: var(--ink); font-size: 1.25rem; }
.progress { display: none; }
.progress-steps { min-height: 6px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 9px; margin-bottom: 26px; }
.progress-steps span { display: block; height: 6px; background: #ddd8cb; border-radius: 999px; }
.progress-steps span.complete { background: var(--green); }
.progress-steps span.current { background: #c6e63b; }
.question-card { width: 100%; min-height: 390px; margin: 0; padding: 28px 6px 20px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.question-card h2 { max-width: 700px; margin-bottom: 16px; }
.question-card > .muted { max-width: 600px; margin: 0 0 24px; font-size: 1.05rem; }
.profile-badge { display: inline-flex; width: max-content; margin: 0 0 30px; padding: 9px 15px; color: var(--ink); background: var(--lime-soft); border-radius: 999px; font-size: .92rem; font-weight: 760; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.choice { min-height: 94px; display: flex; align-items: center; gap: 14px; padding: 17px; color: var(--ink); background: rgba(255, 255, 255, .72); border: 1px solid var(--line); border-radius: 19px; cursor: pointer; font-size: 1rem; font-weight: 780; transition: border-color .16s, background .16s, box-shadow .16s, transform .16s; }
.choice:hover { border-color: #a7c6aa; }
.choice:active { transform: translateY(1px); }
.choice:has(input:checked) { background: #f4f9dd; border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.choice input { width: 28px; min-width: 28px; height: 28px; min-height: 28px; margin: 0; padding: 0; accent-color: var(--green); box-shadow: none; }
.choice span { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.survey-actions { position: sticky; bottom: 0; z-index: 12; display: grid; grid-template-columns: minmax(104px, .36fr) minmax(190px, 1fr); gap: 13px; margin: 20px -20px 0; padding: 14px 20px max(14px, env(safe-area-inset-bottom)); background: rgba(255, 254, 250, .97); border-top: 1px solid rgba(128, 122, 106, .14); }
.survey-actions .button { min-height: 58px; border-radius: 19px; }
.survey-actions .ghost { grid-column: 1; }
.survey-actions .primary { grid-column: 2; }
.survey-actions .ghost.hidden + .primary { grid-column: 1 / -1; }
.location-status { margin-top: 18px; padding: 16px; background: #edf8e7; border-radius: 15px; }
.review-list { display: grid; gap: 11px; }
.review-item { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.success-icon { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 20px; color: var(--green-dark); background: var(--lime); border-radius: 50%; font-size: 28px; font-weight: 900; }
.admin { display: grid; gap: 20px; }
.admin-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-heading h1 { margin-bottom: 0; font-size: clamp(2.4rem, 5vw, 4.3rem); }
.admin-intro { max-width: 650px; margin: 14px 0 0; color: var(--muted); font-size: 1.04rem; }
.source-pill { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; padding: 10px 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; font-size: .78rem; font-weight: 800; }
.source-pill span { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 5px rgba(36, 169, 75, .12); }
.filters, .inline-form { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); align-items: end; gap: 12px; padding: 18px; background: rgba(255, 254, 250, .78); border: 1px solid var(--line); border-radius: 20px; }
.filter-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dashboard-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.dashboard-meta span:first-child { color: var(--ink); }
.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.metric { min-height: 142px; display: flex; flex-direction: column; padding: 20px; color: var(--ink); background: var(--lime-soft); border-radius: 18px; }
.metric:first-child { color: white; background: var(--green); }
.metric strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 3vw, 2.35rem); line-height: 1; }
.metric span { margin-top: 12px; font-size: .78rem; font-weight: 800; opacity: .82; }
.metric small { margin-top: auto; padding-top: 16px; color: inherit; font-size: .69rem; line-height: 1.35; opacity: .68; }
.empty-dashboard { padding: 20px 22px; color: var(--ink); background: var(--lime-soft); border: 1px solid #d5e3a0; border-radius: 18px; }
.empty-dashboard p { margin: 5px 0 0; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.panel { overflow: hidden; padding: 21px; background: rgba(255, 254, 250, .78); border: 1px solid var(--line); border-radius: 20px; }
.panel h2 { margin: 0; overflow-wrap: anywhere; font-size: 1.7rem; }
.panel-description { margin: 7px 0 0; color: var(--muted); font-size: .9rem; }
.section-kicker { margin: 0 0 7px; color: var(--green-deep); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.chart-panel { grid-column: span 6; min-height: 340px; }
.chart-panel.chart-wide { grid-column: span 8; }
.chart-panel.chart-wide + .chart-panel { grid-column: span 4; }
.chart-callout { flex: 0 0 auto; padding: 7px 10px; color: var(--ink); background: var(--lime-soft); border-radius: 999px; font-size: .72rem; font-weight: 800; }
.chart-body { min-height: 230px; display: grid; align-items: center; margin-top: 20px; }
.chart-empty { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; }
.chart-empty span { width: 42px; height: 42px; display: grid; place-items: center; color: var(--green-dark); background: var(--lime-soft); border-radius: 50%; font-size: 1.2rem; }
.chart-empty p { max-width: 260px; margin: 0; font-size: .88rem; }
.trend-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid-line { stroke: #e4e0d6; stroke-width: 1; }
.chart-axis-label { fill: var(--muted); font-family: Inter, sans-serif; font-size: 11px; }
.trend-line { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.trend-point { fill: var(--lime); stroke: var(--green-dark); stroke-width: 3; }
.bar-chart, .answer-bars { display: grid; gap: 18px; }
.bar-item, .answer-bar { display: grid; gap: 8px; }
.bar-label, .answer-bar > div { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; font-size: .84rem; }
.bar-label > span { min-width: 0; font-weight: 760; }
.bar-label small { display: block; margin-top: 2px; color: var(--muted); font-size: .68rem; }
.bar-label strong, .answer-bar strong { flex: 0 0 auto; font-size: .78rem; }
.bar-label strong small { display: inline; margin-left: 4px; font-weight: 650; }
progress { width: 100%; height: 9px; overflow: hidden; appearance: none; border: 0; border-radius: 999px; background: #ebe7dc; }
progress::-webkit-progress-bar { background: #ebe7dc; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--green); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--green); border-radius: 999px; }
.insights-panel { padding: 26px; }
.question-insights { display: grid; gap: 30px; margin-top: 24px; }
.profile-results { display: grid; gap: 16px; }
.profile-results + .profile-results { padding-top: 28px; border-top: 1px solid var(--line); }
.profile-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .76rem; font-weight: 750; }
.profile-chip { display: inline-flex; width: max-content; padding: 6px 10px; color: var(--green-dark); background: var(--lime-soft); border-radius: 999px; font-size: .72rem; font-weight: 820; }
.insight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.insight-card { min-width: 0; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 17px; }
.insight-card h3 { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.16rem; line-height: 1.25; }
.insight-meta { margin: 8px 0 18px; color: var(--muted); font-size: .72rem; }
.answer-bars { gap: 13px; }
.answer-bar > div { align-items: baseline; font-size: .78rem; }
.answer-bar > div span { padding-right: 8px; }
.answer-bar strong { color: var(--muted); }
.numeric-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.numeric-stats > div { padding: 13px; background: var(--sand); border-radius: 13px; }
.numeric-stats span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.numeric-stats strong { font-size: .93rem; }
.verbatims { display: grid; gap: 8px; }
.verbatims blockquote { margin: 0; padding: 12px 14px; color: var(--ink); background: var(--sand); border-left: 3px solid var(--lime); border-radius: 0 11px 11px 0; font-size: .8rem; line-height: 1.45; }
.privacy-note { margin: 0; padding: 13px; color: var(--muted); background: var(--sand); border-radius: 12px; font-size: .78rem; line-height: 1.45; }
.inline-form { grid-template-columns: 1fr 2fr 1fr auto; margin-top: 15px; background: var(--sand); }
.enumerator-list { display: grid; gap: 7px; margin-top: 14px; }
.enumerator-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto minmax(160px, auto); align-items: center; gap: 14px; padding: 13px 10px; border-bottom: 1px solid var(--line); }
.status { display: inline-flex; padding: 5px 9px; color: var(--green-dark); background: #e9f5df; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.status.inactive { color: var(--danger); background: #fbe9e6; }
.table-wrap { overflow: auto; margin-top: 14px; }
table { width: 100%; min-width: 980px; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: .85rem; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.map-link { color: var(--green-dark); font-weight: 720; text-decoration: none; }
.response-dialog { width: min(760px, calc(100% - 28px)); max-height: min(86vh, 900px); padding: 0; color: var(--ink); background: var(--paper); border: 0; border-radius: 24px; box-shadow: 0 24px 80px rgba(16, 47, 39, .24); }
.response-dialog::backdrop { background: rgba(16, 47, 39, .52); backdrop-filter: blur(5px); }
.dialog-heading { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 18px; background: rgba(255, 254, 250, .97); border-bottom: 1px solid var(--line); }
.dialog-heading h2 { margin: 0; font-size: 1.75rem; }
.dialog-close { width: 42px; height: 42px; flex: 0 0 auto; color: var(--ink); background: var(--lime-soft); border: 0; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.dialog-meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 26px; border-bottom: 1px solid var(--line); }
.dialog-meta > span, .dialog-meta > a { padding: 7px 10px; background: var(--sand); border-radius: 999px; font-size: .72rem; }
.dialog-answers { display: grid; padding: 4px 26px 28px; }
.dialog-answer { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.2fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.dialog-answer span { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.dialog-answer strong { font-size: .86rem; line-height: 1.45; }
@media (max-width: 780px) {
  .topbar { min-height: 66px; padding: max(11px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 11px max(18px, env(safe-area-inset-left)); border-bottom: 1px solid rgba(128, 122, 106, .1); }
  .brand { gap: 11px; font-size: 1.05rem; }
  .brand-logo { width: 104px; }
  .topbar .ghost { width: 42px; min-width: 42px; min-height: 42px; padding: 0; overflow: hidden; border-radius: 50%; color: var(--ink); background: var(--lime); text-overflow: clip; white-space: nowrap; }
  .shell { width: min(100% - 32px, 700px); margin-top: 12px; }
  .auth-card, .hero-card { margin-top: 22px; padding: 26px 23px; border-radius: 24px; }
  .survey-shell { margin-top: 12px; }
  .survey-identity { margin-bottom: 14px; }
  .progress-meta { margin-bottom: 7px; }
  .progress-meta strong { font-size: 1.1rem; }
  .progress-steps { gap: 7px; margin-bottom: 15px; }
  .question-card { min-height: min(390px, calc(100svh - 255px)); padding-top: 10px; }
  .question-card h2 { margin-bottom: 12px; font-size: clamp(1.45rem, 6vw, 1.9rem); line-height: 1.1; }
  .question-card > .muted { margin-bottom: 16px; font-size: .92rem; }
  .profile-badge { margin-bottom: 14px; padding: 7px 13px; font-size: .82rem; }
  .eyebrow { margin-bottom: 8px; font-size: .66rem; }
  .choice-grid { gap: 10px; margin-top: 16px; }
  .choice { min-height: 72px; padding: 12px; font-size: .94rem; border-radius: 17px; }
  .survey-actions { margin-right: -16px; margin-left: -16px; padding-right: max(16px, env(safe-area-inset-right)); padding-left: max(16px, env(safe-area-inset-left)); box-shadow: 0 -12px 30px rgba(41, 58, 48, .05); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { grid-column: 1 / -1; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 132px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-meta { align-items: flex-start; flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .chart-panel, .chart-panel.chart-wide, .chart-panel.chart-wide + .chart-panel { grid-column: 1; min-height: 0; }
  .chart-body { min-height: 210px; }
  .insights-panel { padding: 20px; }
  .insight-grid { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .enumerator-row { grid-template-columns: minmax(0, 1fr) auto; }
  .enumerator-row > strong { min-width: 0; overflow-wrap: anywhere; }
  .enumerator-row > strong .muted { display: block; margin-top: 3px; }
  .enumerator-row > .muted { grid-column: 1 / -1; }
  .dialog-heading, .dialog-meta, .dialog-answers { padding-right: 18px; padding-left: 18px; }
  .dialog-answer { grid-template-columns: 1fr; gap: 7px; }
}
@media (max-width: 560px) {
  .shell { width: calc(100% - 24px); margin-bottom: max(54px, env(safe-area-inset-bottom)); }
  body[data-view="surveyView"] .shell { margin-bottom: 0; }
  h1 { font-size: clamp(2.05rem, 10vw, 2.7rem); }
  .auth-card, .hero-card { margin-top: 14px; padding: 25px 20px; border-radius: 22px; }
  .auth-card .stack { gap: 15px; margin-top: 22px; }
  input, select, textarea { font-size: 16px; }
  .auth-secondary-actions { align-items: stretch; flex-direction: column; gap: 0; }
  .auth-secondary-actions .text-button { width: max-content; max-width: 100%; text-align: left; }
  .survey-identity { width: 100%; padding-right: 12px; }
  .survey-identity > span:last-child { flex: 1; }
  .survey-identity strong { max-width: 58vw; }
  #surveyForm { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .survey-actions { position: fixed; right: 0; bottom: 0; left: 0; width: 100%; margin: 0; padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(12px, env(safe-area-inset-left)); }
  .choice-grid { grid-template-columns: 1fr; gap: 9px; }
  .choice { min-height: 60px; padding: 12px 14px; }
  .choice input { width: 26px; min-width: 26px; height: 26px; min-height: 26px; }
  .location-status { overflow-wrap: anywhere; }
  .review-item { align-items: flex-start; flex-direction: column; gap: 4px; }
  .review-item strong { overflow-wrap: anywhere; }
  .admin { gap: 16px; }
  .admin-heading h1 { font-size: clamp(2.35rem, 12vw, 3.25rem); }
  .admin-intro { margin-top: 10px; font-size: .95rem; }
  .source-pill { padding: 8px 12px; }
  .filters { overflow: hidden; gap: 10px; padding: 14px; border-radius: 17px; }
  .filters label { min-width: 0; }
  .filters .filter-date { grid-column: 1 / -1; min-width: 0; min-inline-size: 0; max-width: 100%; max-inline-size: 100%; overflow: hidden; }
  .filters input[type="date"] { display: block; width: 100%; inline-size: 100%; min-width: 0; min-inline-size: 0; max-width: 100%; max-inline-size: 100%; padding: 0; overflow: hidden; }
  .filters input[type="date"]::-webkit-date-and-time-value { min-width: 0; min-inline-size: 0; padding: 14px 0 14px 16px; text-align: left; }
  .filters input[type="date"]::-webkit-datetime-edit { min-width: 0; min-inline-size: 0; overflow: hidden; }
  .filters input[type="date"]::-webkit-calendar-picker-indicator { flex: 0 0 auto; margin: 0 14px 0 6px; }
  .filter-actions { gap: 9px; }
  .filter-actions .button { min-width: 0; padding-right: 10px; padding-left: 10px; }
  .metrics { gap: 9px; }
  .metric { min-height: 122px; padding: 15px; border-radius: 16px; }
  .metric strong { font-size: clamp(1.55rem, 8vw, 2rem); overflow-wrap: anywhere; }
  .metric span { margin-top: 9px; }
  .metric small { padding-top: 12px; }
  .panel { padding: 17px; border-radius: 18px; }
  .panel-heading { align-items: flex-start; flex-wrap: wrap; }
  .panel h2 { font-size: 1.55rem; }
  .chart-callout { max-width: 100%; white-space: normal; }
  .chart-body { min-height: 180px; margin-top: 16px; }
  .insights-panel { padding: 17px; }
  .question-insights { gap: 24px; margin-top: 20px; }
  .profile-results-heading { align-items: flex-start; flex-wrap: wrap; }
  .insight-card { padding: 17px; }
  .bar-label, .answer-bar > div { align-items: flex-start; }
  .bar-label strong, .answer-bar strong { text-align: right; }
  .enumerator-row { gap: 10px; padding: 14px 3px; }
  .responses-panel { overflow: visible; }
  .table-wrap { overflow: visible; margin-top: 12px; }
  table, tbody, tr, td { display: block; width: 100%; }
  table { min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  tbody { display: grid; gap: 12px; }
  tbody tr { overflow: hidden; padding: 5px 14px 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
  tbody td { display: grid; grid-template-columns: minmax(82px, .7fr) minmax(0, 1.3fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  tbody td::before { content: attr(data-label); color: var(--muted); font-size: .68rem; font-weight: 820; letter-spacing: .05em; text-transform: uppercase; }
  tbody td > * { min-width: 0; }
  tbody .response-action { display: block; padding: 12px 0 0; border-bottom: 0; }
  tbody .response-action::before { display: none; }
  tbody .response-action .text-button { width: 100%; padding: 11px 14px; background: var(--lime-soft); border-radius: 12px; text-align: center; }
  tbody .empty-row { padding: 14px; }
  tbody .empty-row td { display: block; padding: 0; border: 0; }
  tbody .empty-row td::before { display: none; }
  .map-link { display: inline-block; overflow-wrap: anywhere; }
  .response-dialog { width: calc(100% - 16px); max-height: min(92dvh, 900px); border-radius: 20px; }
  .dialog-heading { padding-top: 19px; }
  .dialog-heading h2 { font-size: 1.5rem; }
}
@media (max-width: 390px) {
  .brand-logo { width: 94px; }
  .brand { font-size: .98rem; }
  .question-card h2 { font-size: clamp(1.5rem, 7vw, 1.78rem); }
  .survey-actions { grid-template-columns: 96px 1fr; margin: 0; padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(12px, env(safe-area-inset-left)); }
}
@media (max-width: 340px) {
  .topbar { padding-right: 12px; padding-left: 12px; }
  .brand { gap: 8px; }
  .brand-logo { width: 86px; }
  .shell { width: calc(100% - 20px); }
  .survey-identity > span:last-child { display: grid; align-items: center; gap: 1px; }
  .survey-identity strong { max-width: 100%; }
  .survey-identity small::before { content: ""; }
  .survey-actions { margin: 0; padding-right: max(10px, env(safe-area-inset-right)); padding-left: max(10px, env(safe-area-inset-left)); }
  .filters { grid-template-columns: 1fr; }
  .filters .filter-date { grid-column: 1; }
  .filter-actions { grid-column: 1; }
  .metric { min-height: 116px; padding: 13px; }
  .metric strong { font-size: 1.45rem; }
  .metric small { font-size: .65rem; }
  .numeric-stats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
