/* STRAC palette: https://www.strac.org/wp-content/uploads/elementor/css/post-5.css */
:root {
    color-scheme: light;
    --bg: #f4f4f4;
    --panel: #fff;
    --panel-soft: #eaf0ef;
    --text: #19282f;
    --muted: #53656e;
    --brand-muted: #6a7f89;
    --line: #c7d6d5;
    --accent: #b38742;
    --accent-strong: #9e7435;
    --brand-blue: #3e91cc;
    --danger: #ba1100;
    --success: #285f4b;
    --focus: #23658f;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body.modal-open { overflow: hidden; }
.staging-notice { padding: 10px 20px; background: #f5ecd9; color: #19282f; text-align: center; font-size: 0.8125rem; }
button, input, select, textarea { font: inherit; }
a { color: var(--focus); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.025em; }
h2 { margin: 0 0 8px; font-size: 1.75rem; line-height: 1.25; letter-spacing: -0.025em; }
.app-header { background: var(--text); color: white; }
.app-header-inner { max-width: 1240px; min-height: 96px; padding: 18px 32px; margin: auto; display: flex; align-items: center; gap: 28px; }
.brand-logo { display: block; width: 210px; height: auto; }
.app-header .brand-logo { width: 222px; padding: 9px 12px; background: white; border-radius: 4px; }
.app-header h1 { padding-left: 28px; border-left: 1px solid #56656c; }
.header-meta { margin-left: auto; flex-shrink: 0; font-size: 0.75rem; color: #d6e0e4; }
.header-meta span, .header-meta strong { display: block; }
.header-meta strong { font-weight: 500; font-variant-numeric: tabular-nums; }
.page-shell { width: min(960px, calc(100% - 48px)); margin: 0 auto; padding: 0 0 48px; }
.feedback-form { border: 0; background: transparent; }
.stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 24px 48px 20px; }
.stepper-item { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: center; min-height: 68px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.9375rem; font-weight: 500; }
.stepper-item::after { content: ""; position: absolute; left: calc(50% + 23px); right: calc(-50% + 23px); top: 21px; height: 1px; background: #acbdbd; }
.stepper-item:last-child::after { display: none; }
.stepper-item > span { display: grid; place-items: center; width: 42px; height: 42px; background: #dfe6e5; border-radius: 50%; color: var(--muted); font-size: 1rem; }
.stepper-item.is-active { color: var(--text); font-weight: 700; }
.stepper-item.is-active > span, .stepper-item.is-complete > span { background: var(--text); color: white; }
.stepper-item.is-complete::after { background: var(--text); }
.stepper-item:hover > span { box-shadow: inset 0 0 0 2px var(--brand-muted); }
.form-surface { background: var(--panel); border: 1px solid #dce2e2; border-radius: 12px; }
.form-section { display: none; padding: 30px 32px 24px; }
.form-section.is-active { display: block; }
.section-heading { margin-bottom: 24px; }
.section-heading p { max-width: 72ch; margin: 0; color: var(--muted); font-size: 0.9375rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; align-items: start; }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field > span, .field-label-row > span { font-size: 0.875rem; font-weight: 600; line-height: 1.4; }
.field b { margin-left: 8px; color: #765622; font-size: 0.75rem; font-weight: 500; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field small { color: var(--muted); font-size: 0.8125rem; line-height: 1.4; }
.field:focus-within small, .field.has-error small { max-height: none; opacity: 1; transform: none; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid #9eafb5; border-radius: 6px; background: white; color: var(--text); padding: 10px 12px; }
input::placeholder, textarea::placeholder { color: #64757d; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--brand-muted); }
input:disabled, select:disabled { background: var(--bg); color: var(--muted); cursor: wait; }
.inline-action { min-height: 24px; border: 0; padding: 0; background: transparent; color: var(--focus); font-size: 0.8125rem; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 20px 28px; }
.main-actions { border-top: 1px solid var(--line); margin: 0 32px; padding: 20px 0 24px; }
.completion-meter { margin-right: auto; max-width: 340px; min-width: 0; }
.completion-meter strong { display: block; font-size: 0.8125rem; font-weight: 600; }
.completion-meter span { display: block; font-size: 0.75rem; color: var(--muted); }
.completion-track { margin-top: 8px; width: 130px; height: 3px; background: var(--line); overflow: hidden; }
.completion-fill { width: 100%; height: 100%; background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform 180ms var(--ease-out); }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 12px; border-radius: 6px; padding: 10px 20px; border: 1px solid transparent; cursor: pointer; font-size: 0.9375rem; font-weight: 600; text-decoration: none; transition: background-color 160ms var(--ease-out); }
.button-primary { background: var(--accent); color: #19282f; }
.button-primary:hover { background: #c69a55; }
.button-secondary { border-color: #9eafb5; background: white; color: var(--text); }
.button-secondary:hover { background: var(--panel-soft); }
.button:disabled { color: #6a7a81; background: #f4f4f4; border-color: #d8e0e0; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.section-heading h2:focus { outline: none; }
.review-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; }
.review-item { min-width: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.review-item span { display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 4px; }
.review-item strong { display: block; font-size: 0.9375rem; overflow-wrap: anywhere; }
.result-shell { display: grid; min-height: 100vh; place-items: center; }
.result-panel { width: min(720px, 100%); padding: 36px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.result-panel .brand-logo { margin-bottom: 32px; }
.result-panel h1 { margin-bottom: 12px; font-size: 2rem; }
.lede { color: var(--muted); }

.native-select-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.custom-select {
    position: relative;
}

.time-picker {
    position: relative;
}

.custom-select-input {
    padding-right: 46px;
    cursor: pointer;
}

.custom-select.has-value .custom-select-input {
    padding-right: 98px;
}

.time-picker.has-value input {
    padding-right: 98px;
}

.custom-select.is-searchable .custom-select-input {
    cursor: text;
}

.custom-select-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0 5px 5px 0;
    background: transparent;
    cursor: pointer;
}

.time-picker-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0 5px 5px 0;
    background: transparent;
    cursor: pointer;
}

.custom-select-clear {
    position: absolute;
    top: 7px;
    right: 42px;
    display: none;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0 9px;
    transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 120ms var(--ease-out);
}

.time-picker-clear {
    position: absolute;
    top: 7px;
    right: 42px;
    display: none;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0 9px;
    transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 120ms var(--ease-out);
}

.custom-select.has-value .custom-select-clear {
    display: inline-flex;
    align-items: center;
}

.time-picker.has-value .time-picker-clear {
    display: inline-flex;
    align-items: center;
}

.custom-select-clear:hover,
.custom-select-clear:focus,
.time-picker-clear:hover,
.time-picker-clear:focus {
    color: var(--text);
    background: var(--panel-soft);
    outline: none;
}

.custom-select-clear:active,
.time-picker-clear:active {
    transform: scale(0.97);
}

.custom-select-toggle span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translate(-50%, -62%) rotate(45deg);
    transition: transform 140ms var(--ease-out);
}

.time-picker-toggle span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid var(--muted);
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.time-picker-toggle span::before,
.time-picker-toggle span::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: var(--muted);
    transform-origin: left center;
}

.time-picker-toggle span::before {
    width: 5px;
    height: 2px;
    transform: translate(-1px, -1px) rotate(0deg);
}

.time-picker-toggle span::after {
    width: 2px;
    height: 6px;
    transform: translate(-1px, -5px);
}

.custom-select.is-open .custom-select-toggle span {
    transform: translate(-50%, -35%) rotate(225deg);
}

.custom-select-list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: none;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(23, 33, 43, 0.16);
    padding: 6px;
    transform-origin: top center;
}

.time-picker-list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(23, 33, 43, 0.16);
    padding: 8px;
}

.custom-select.is-open .custom-select-list {
    display: grid;
    gap: 2px;
}

.time-picker.is-open .time-picker-list {
    display: grid;
}

.custom-select-option,
.custom-select-empty,
.time-picker-option {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    padding: 9px 10px;
    text-align: left;
}

.custom-select-option {
    cursor: pointer;
}

.time-picker-option {
    cursor: pointer;
    text-align: center;
}

.custom-select-option:hover,
.custom-select-option:focus,
.custom-select-option.is-selected,
.time-picker-option:hover,
.time-picker-option:focus,
.time-picker-option.is-selected {
    outline: none;
    background: var(--panel-soft);
}

.custom-select-option.is-selected,
.time-picker-option.is-selected {
    color: var(--accent-strong);
    font-weight: 700;
}

.custom-select-empty {
    color: var(--muted);
}





.inline-action:hover,
.inline-action:focus {
    color: var(--text);
}





.field:focus-within small,
.field.has-error small {
    max-height: 60px;
    opacity: 1;
    transform: translateY(0);
}

.field:not(.has-error):not(:focus-within) small + .field-error {
    margin-top: 0;
}

.field-error {
    color: var(--danger);
    font-size: 0.84rem;
    font-weight: 700;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: var(--danger);
    background: #fffafa;
}

.field.has-error b {
    color: var(--danger);
}

input[aria-invalid="true"]:focus,
select[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
    outline-color: rgba(180, 35, 24, 0.2);
    border-color: var(--danger);
}

textarea {
    min-height: 116px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.stepper-item:focus,
.button:focus {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
    border-color: var(--focus);
}













.button:active {
    transform: scale(0.98);
}











.modal-backdrop {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(16, 26, 32, 0.48);
    padding: 24px;
}

.modal-panel {
    width: min(820px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(16, 26, 32, 0.28);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--line);
}

.modal-header h2 {
    margin-bottom: 4px;
}

.modal-header p {
    margin-bottom: 0;
    color: var(--muted);
}

.modal-close {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    font-weight: 700;
    padding: 6px 10px;
}

.modal-close:hover,
.modal-close:focus {
    background: var(--panel-soft);
    color: var(--text);
}

.agency-request-form {
    padding: 0;
}

.agency-form-section {
    padding: 24px 28px;
    border-bottom: 1px solid var(--line);
}

.agency-form-section h3 {
    margin: 0 0 16px;
    font-size: 1rem;
}

.form-status {
    min-height: 0;
    margin: 20px 28px 0;
    font-weight: 700;
}

.form-status.is-error {
    color: var(--danger);
}

.form-status.is-success {
    color: var(--success);
}

.success-notice {
    margin: 28px;
    padding: 28px;
    border: 1px solid #c7dacd;
    border-radius: 8px;
    background: #f2f8f4;
    color: var(--success);
    text-align: center;
}

.success-notice h3 {
    margin: 0 0 6px;
    color: var(--success);
    font-size: 1.3rem;
}

.success-notice p {
    margin: 0;
    color: var(--text);
}

.modal-actions {
    padding-top: 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.is-hidden {
    display: none;
}







.message-list {
    display: grid;
    gap: 8px;
    margin: 24px 0;
}

.message-list p {
    margin: 0;
    padding: 12px 14px;
    border-radius: 6px;
    background: #f7fafb;
}

.result-error .message-list p {
    color: var(--danger);
    background: #fff1f0;
}

.result-success .message-list p {
    color: var(--success);
    background: #eff8f2;
}

.result-actions {
    padding: 0;
    justify-content: flex-start;
}



@media (max-width: 900px) {
    .header-meta { display: none; }
    .app-header-inner { padding: 16px 24px; }
}
@media (max-width: 640px) {
    .app-header-inner { min-height: auto; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
    .app-header .brand-logo { width: 180px; }
    .app-header h1 { width: 100%; border: 0; padding: 0; font-size: 1.25rem; }
    .page-shell { width: calc(100% - 24px); padding-bottom: 24px; }
    .stepper { padding: 20px 0 16px; }
    .stepper-item { font-size: 0.8125rem; }
    .stepper-item > span { width: 38px; height: 38px; }
    .stepper-item::after { top: 19px; }
    .form-section { padding: 24px 20px; }
    h2 { font-size: 1.5rem; }
    .field-grid, .review-grid { grid-template-columns: 1fr; gap: 18px; }
    .field-label-row { flex-wrap: wrap; gap: 2px; }
    .inline-action { min-height: 36px; }
    .main-actions { margin: 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
    .completion-meter { grid-column: 1 / -1; max-width: none; width: 100%; }
    .completion-track { width: 100%; }
    .main-actions .button { width: 100%; padding-inline: 12px; }
    .main-actions #submit_request { font-size: 0.8125rem; }
    .modal-backdrop { padding: 12px; }
    .modal-panel { max-height: calc(100dvh - 24px); }
    .modal-header, .agency-form-section { padding: 20px; }
    .modal-header { gap: 12px; }
    .modal-header h2 { font-size: 1.25rem; }
    .modal-header p { font-size: 0.875rem; }
    .modal-actions { flex-wrap: wrap; padding: 20px; }
    .modal-close { min-height: 44px; }
    .result-panel { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* A visible secondary action, with the same stroke language as form navigation. */
#open_agency_request {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-soft);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
#open_agency_request svg { flex-shrink: 0; color: var(--focus); }
#open_agency_request:hover { border-color: var(--focus); background: var(--panel); }
#open_agency_request:active { background: var(--line); }
#open_agency_request:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.form-security-error { margin: 20px 32px; color: var(--danger); }
@media (max-width: 640px) {
    #open_agency_request { padding: 6px 8px; font-size: 12px; }
}
