:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f1f8fc;
  --ink: #132c3f;
  --muted: #496174;
  --muted-light: #5c7182;
  --border: #dbe9f2;
  --accent: #006b98;
  --accent-dark: #005475;
  --accent-soft: #e3f4fc;
  --azure: #008fc6;
  --chart-blue: #0080b2;
  --surface: #fff;
  --ok: #08744e;
  --error: #9c2340;
  --shadow: 0 2px 6px #12394e09;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 290px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #0079ab; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
svg { display: block; width: 1.15rem; height: 1.15rem; flex: none; }
[data-icon] { display: inline-flex; flex: none; }
.skip { position: fixed; inset: .65rem auto auto .65rem; z-index: 3; transform: translateY(-150%); background: white; padding: .6rem; }
.skip:focus { transform: none; }
.shell { min-height: 100dvh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; min-height: 100dvh; position: sticky; top: 0; align-self: start; background: white; border-right: 1px solid var(--border); padding: 21px 16px 16px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1rem; font-weight: 780; text-decoration: none; letter-spacing: -.025em; }
.sidebar .brand { padding: 0 8px; }
.brand-mark { display: block; flex: none; width: 42px; height: auto; }
.menu { display: grid; gap: 6px; margin-top: 44px; }
.menu a { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-weight: 560; font-size: .9rem; text-decoration: none; }
.menu a:hover { background: #eff8fd; color: var(--accent-dark); }
.menu a[aria-current] { color: var(--accent-dark); background: var(--accent-soft); font-weight: 720; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--border); padding: 16px 5px 1px; display: flex; align-items: center; gap: 11px; font-size: .875rem; }
.sidebar-footer small { display: block; font-size: .78rem; color: var(--muted); margin-top: 3px; }
.avatar { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; color: #006486; background: #e4f5fc; }
.topbar { min-height: 72px; background: white; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px clamp(18px, 4vw, 44px); border-bottom: 1px solid var(--border); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: .875rem; }
.breadcrumb span + span { color: var(--ink); font-weight: 670; }
.breadcrumb span + span::before { content: "/"; color: #657d8e; margin-right: 8px; font-weight: 400; }
.content { width: min(100%, 1390px); margin-inline: auto; padding: 32px clamp(18px, 4vw, 44px) 48px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 25px; }
.page-heading h1, .survey-intro h1 { font-size: clamp(1.85rem, 2.9vw, 2.55rem); line-height: 1.13; letter-spacing: -.052em; overflow-wrap: anywhere; }
.page-heading p, .survey-intro p { color: var(--muted); margin-top: 8px; line-height: 1.55; }
.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 8px 14px; font-size: .875rem; font-weight: 690; text-decoration: none; cursor: pointer; background: transparent; color: var(--ink); }
.button:disabled { opacity: .55; cursor: default; }
.button-primary { background: var(--accent); color: white; box-shadow: 0 2px 4px #006b9825; }
.button-primary:not(:disabled):hover { background: var(--accent-dark); }
.button-outline { border-color: var(--border); background: white; }
.button-outline:not(:disabled):hover { border-color: #9fc9de; background: #f3faff; }
.button-subtle { color: var(--accent-dark); background: var(--accent-soft); }
.button-subtle:hover { background: #d4edf9; }
.button-icon { width: 40px; min-height: 40px; padding: 0; }
.button-danger { color: var(--error); }
.hero { position: relative; overflow: hidden; isolation: isolate; min-height: 162px; padding: 22px 25px; border-radius: 16px; color: white; background: linear-gradient(112deg, #004969, #00678e 70%, #0075a3); display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.hero::before, .hero::after { content: ""; position: absolute; width: 345px; height: 345px; border-radius: 50%; z-index: -1; border: 1px solid #ffffff33; box-shadow: 0 0 0 26px #ffffff0e, 0 0 0 55px #ffffff0b, 0 0 0 84px #ffffff0a; }
.hero::before { right: -105px; top: -175px; }
.hero::after { right: 34px; top: 94px; width: 250px; height: 250px; }
.hero h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); margin: 10px 0 5px; letter-spacing: -.04em; overflow-wrap: anywhere; }
.hero p { line-height: 1.5; color: #edfaff; font-size: .94rem; }
.hero .button { white-space: nowrap; color: var(--accent-dark); }
.pill { color: inherit; background: #ffffff24; border: 1px solid #ffffff36; display: inline-flex; align-items: center; gap: 7px; border-radius: 28px; padding: 4px 9px; font-size: .78rem; font-weight: 650; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c9e3ef; }
.pill.active::before { background: #86f3bc; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card { background: white; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.metric { min-width: 0; padding: 16px; }
.metric-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 9px; background: #e3f4fc; color: var(--accent); }
.metric:nth-child(2) .metric-icon { background: #e6f8f1; color: #105f49; }
.metric:nth-child(3) .metric-icon { background: #e3effc; color: #205889; }
.metric:nth-child(4) .metric-icon { background: #e0f3f9; color: #086278; }
.metric strong { display: block; margin: 10px 0 2px; font-size: 1.78rem; line-height: 1.1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.metric p { color: var(--muted); font-size: .875rem; line-height: 1.35; }
.overview-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 14px; margin-top: 16px; align-items: start; }
.panel { padding: 21px; min-width: 0; }
.panel h2, .editor-section h2 { font-size: 1.13rem; letter-spacing: -.026em; }
.panel-description { font-size: .875rem; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.panel-heading select { width: auto; max-width: 55%; min-height: 38px; font-size: .875rem; }
.graph { height: 174px; margin: 16px 0 7px; display: grid; grid-template-columns: repeat(14, minmax(0,1fr)); gap: clamp(2px,.7vw,9px); align-items: end; border-bottom: 1px solid #bcd6e5; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #e8f2f8 calc(25% - 1px), #e8f2f8 25%); padding: 8px 5px 0; }
.graph meter { appearance: none; width: 100%; height: 100%; min-width: 0; transform: rotate(180deg); writing-mode: vertical-lr; }
.graph meter::-webkit-meter-bar { height: 100%; width: 100%; border: 0; border-radius: 5px; background: transparent; }
.graph meter::-webkit-meter-optimum-value { background: var(--chart-blue); border-radius: 0 0 4px 4px; }
.graph meter::-moz-meter-bar { background: var(--chart-blue); border-radius: 0 0 4px 4px; }
.graph .zero { min-height: 3px; border-radius: 3px 3px 0 0; background: #c0ddeb; }
.graph-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 27px 14px; color: var(--muted); line-height: 1.5; }
.empty strong { color: var(--ink); }
.empty p { max-width: 31rem; font-size: .9rem; }
.empty-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); }
.breakdown { display: grid; gap: 18px; margin-top: 16px; max-height: 365px; overflow: auto; }
.breakdown h3 { margin-bottom: 7px; font-size: .875rem; overflow-wrap: anywhere; }
.option-row { display: flex; align-items: start; justify-content: space-between; gap: 10px; font-size: .83rem; line-height: 1.45; color: var(--muted); margin-top: 6px; }
.option-row span { overflow-wrap: anywhere; }
.option-row strong { white-space: nowrap; }
progress { display: block; width: 100%; height: 6px; margin-top: 3px; border: 0; border-radius: 10px; overflow: hidden; background: #e3f0f7; color: var(--accent); }
progress::-webkit-progress-bar { background: #e3f0f7; }
progress::-webkit-progress-value { background: var(--chart-blue); }
progress::-moz-progress-bar { background: var(--chart-blue); }
.registry-filter { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; padding: 16px; }
.registry-filter .search { flex: 1; min-width: min(230px, 100%); }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span, fieldset legend { color: var(--ink); font-weight: 670; font-size: .9rem; overflow-wrap: anywhere; }
.field small { color: var(--muted); line-height: 1.4; }
input:not([type=checkbox]):not([type=radio]), textarea, select { width: 100%; min-height: 43px; padding: 9px 11px; background: white; border: 1px solid #a5bfd0; border-radius: 8px; color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23496174' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
.registry-results { margin-top: 14px; overflow: hidden; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
th { background: #f4f9fc; color: var(--muted); font-weight: 650; white-space: nowrap; }
td:last-child { text-align: right; }
td:first-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
td:nth-child(2) { overflow-wrap: anywhere; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 13px 16px; color: var(--muted); font-size: .875rem; }
.pagination div { display: flex; gap: 6px; }
.message { padding: 13px 15px; background: #e8f5fc; color: var(--accent-dark); border-radius: 8px; line-height: 1.5; }
.message:empty { display: none; }
.message.error { color: var(--error); background: #fff0f4; }
.message.success { color: var(--ok); background: #ecf9f3; }
.editor { max-width: 880px; display: grid; gap: 15px; }
.editor-section { padding: 18px; display: grid; gap: 15px; }
.question-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.question-heading h3 { font-size: .925rem; }
.question-actions { display: flex; gap: 5px; }
.question-card { background: #f4fafe; border: 1px solid var(--border); border-radius: 9px; padding: 13px; display: grid; gap: 11px; }
.question-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
#questions { display: grid; gap: 12px; }
.editor-footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 630; width: fit-content; }
.original { color: var(--accent-dark); font-size: .875rem; width: fit-content; }
dialog { border: 1px solid var(--border); border-radius: 14px; color: var(--ink); width: min(640px, calc(100% - 24px)); max-height: 85dvh; padding: 22px; box-shadow: 0 18px 50px #132c3f45; }
dialog::backdrop { background: #132c3f77; }
dialog dl { margin: 16px 0 0; display: grid; gap: 12px; }
dialog dt { font-size: .9rem; font-weight: 690; margin-bottom: 3px; overflow-wrap: anywhere; }
dialog dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); line-height: 1.5; }
.survey-top { background: white; border-bottom: 1px solid var(--border); padding: 14px max(16px, calc((100% - 680px)/2)); }
.survey-content { width: min(100% - 30px, 680px); margin: 25px auto 45px; }
.survey-intro { padding: 22px; border-top: 5px solid var(--azure); margin-bottom: 14px; }
.survey-intro p { white-space: pre-wrap; overflow-wrap: anywhere; }
.survey-intro .required-note { font-size: .875rem; }
.respondent form { display: grid; gap: 12px; }
.respondent .question { padding: 17px; min-width: 0; }
fieldset.question { margin: 0; padding-top: 10px; }
fieldset.question legend { padding: 0 5px; }
.choice { display: flex; align-items: start; gap: 10px; padding: 9px 0; line-height: 1.4; overflow-wrap: anywhere; }
.choice input { margin-top: 2px; }
.required { color: var(--error); margin-left: 4px; }
.submit-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.submit-row .message { flex: 1; min-width: min(235px, 100%); }
.success-card { padding: 22px; }
.success-card h1 { margin: 12px 0 6px; font-size: 1.6rem; }
.success-card p { line-height: 1.5; color: var(--muted); }
.success-card a { margin-top: 14px; }
@media (max-width: 1040px) {
  .shell { grid-template-columns: 200px minmax(0,1fr); }
  .overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { min-height: 0; position: static; padding: 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar .brand { padding: 0; }
  .menu { display: flex; flex-wrap: wrap; margin-top: 12px; }
  .menu a { min-height: 40px; gap: 6px; padding: 8px 10px; }
  .sidebar-footer { display: none; }
  .topbar { min-height: 56px; }
  .breadcrumb span:first-child, .breadcrumb span + span::before { display: none; }
  .content { padding-top: 19px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .hero { flex-wrap: wrap; padding: 16px; }
  .panel { padding: 15px; }
  .question-fields { grid-template-columns: 1fr; }
}
@media (max-width: 365px) {
  .menu a svg { display: none; }
  .registry-filter > .field { width: 100%; }
}
.survey-panel { display: grid; gap: 14px; padding: 20px; }
.survey-panel h2, .survey-section-title { font-size: 1.2rem; letter-spacing: -.02em; }
.survey-panel .panel-description { margin-top: 0; }
.survey-panel .button { justify-self: start; }
.survey-content .survey-pagination { margin-bottom: 8px; color: var(--accent-dark); font-size: .875rem; font-weight: 680; }
.contact-cell span { display: block; overflow-wrap: anywhere; }
.contact-cell small { display: block; margin-top: 3px; color: var(--muted); font-size: .83rem; white-space: nowrap; }
.inspection-panel { display: grid; gap: 19px; padding: clamp(15px, 4vw, 24px); }
.inspection-panel .card-field > span { line-height: 1.4; }
.survey-group { min-width: 0; padding: 14px; margin: 0; }
.survey-group legend { padding: 0 5px; }
.matrix { display: grid; gap: 4px; }
.matrix-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 12px; padding: 7px 0; }
.matrix-row + .matrix-row { border-top: 1px solid var(--border); }
.repeat-item { padding: 11px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 9px; background: #f4fafe; }
.repeat-fields { display: grid; gap: 10px; margin-top: 10px; }
.yard-id { overflow-wrap: anywhere; user-select: all; }
.editor-outline { padding: 10px 14px; }
.editor-outline summary { cursor: pointer; font-weight: 680; }
.editor-outline ul { display: grid; gap: 5px; }
.record-section { margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--border); }
.record-section h3 { margin-bottom: 9px; font-size: 1rem; }
.record-section dl { margin-top: 7px; }
.record-section dd ul, .record-section dd ol { padding-left: 1.2rem; }
.record-items li + li { margin-top: 10px; }
.survey-group input[type=file] { height: auto; }
@media (max-width: 500px) {
  .matrix-row { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}

.district-summary th, .district-summary td { padding: .75rem .5rem; }
.district-summary thead th { white-space: normal; }
.district-summary tbody th { background: transparent; font-weight: 500; }
.district-summary :is(th, td):not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.district-summary tfoot { font-weight: 700; }
.district-summary .panel-description { margin-top: 1rem; }
@media (max-width: 520px) {
  .district-summary :is(th, td) { padding: .6rem .25rem; }
  .district-summary thead th { overflow-wrap: anywhere; }
}

.area-filter { max-width: 22rem; margin-bottom: 1rem; }
#dash-summary { display: grid; gap: 1rem; }
#dash-summary .metric-grid { margin: 0; }
#dash-summary .metric small { color: var(--muted); }
.dashboard-quality .option-row { gap: 1rem; padding: .45rem 0; }
.yard-locations { margin-top: 1rem; }
.yard-locations .field { max-width: 30rem; margin: .75rem 0; }
.yard-locations summary { cursor: pointer; font-size: 1.125rem; font-weight: 650; }
