/* ==========================================================================
   JSPG public identity — "Modern gov-tech"
   --------------------------------------------------------------------------
   White surfaces on a soft green-tinted page, 12–16 px radii, restrained
   elevation, a single deep-green gradient for primary actions. One file, no
   webfonts, no icon font: the icon set is an inline SVG sprite in the HTML.

   Sections
     1  tokens
     2  base + utilities
     3  government bar
     4  brand / masthead
     5  layout: account screens
     6  cards, forms, buttons
     7  sheet pages (role select, OTP, reset)
     8  toast / notice
     9  complaint record + timeline
    10  directory
    11  footer
    12  responsive
   ========================================================================== */

/* 1 — tokens ------------------------------------------------------------- */
:root {
    --ink: #0c1d16;
    --ink-2: #31443b;
    --ink-3: #667c71;

    --paper: #f3f7f4;
    --paper-2: #ffffff;
    --paper-3: #eef4f0;

    --rule: #e2eae5;
    --rule-strong: #cfdcd5;

    --green: #0f5132;
    --green-2: #136b42;
    --green-3: #1a8654;
    --green-soft: #e7f2ec;
    --green-ring: rgba(15, 81, 50, .16);

    --rust: #b4462a;
    --rust-soft: #fbece7;
    --gold: #a15c07;
    --gold-soft: #fdf3e2;
    --ok: #0f7a54;
    --danger: #b3261e;
    --danger-soft: #fdeceb;

    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --serif: var(--sans); /* kept so shared widgets never fall back to a serif */

    --wrap: 1140px;

    --r: 16px;
    --r-sm: 12px;
    --r-xs: 9px;
    --pill: 999px;

    --shadow-xs: 0 1px 2px rgba(12, 29, 22, .05);
    --shadow-sm: 0 2px 4px rgba(12, 29, 22, .04), 0 10px 24px -18px rgba(12, 29, 22, .45);
    --shadow-md: 0 24px 56px -34px rgba(12, 29, 22, .55);
    --focus: 0 0 0 4px var(--green-ring);

    --ease: cubic-bezier(.2, .7, .3, 1);
}

/* 2 — base + utilities --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background-color: var(--paper);
    background-image: linear-gradient(180deg, #eaf4ee 0, #f6faf7 300px, var(--paper) 100%);
    -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, p { margin: 0; }
img, svg { display: block; max-width: 100%; }

a {
    color: var(--green);
    text-decoration: none;
    font-weight: 550;
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: #cfe8da; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip {
    position: absolute;
    left: 12px; top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--r-xs);
    background: var(--green);
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    transition: top .18s var(--ease);
}
.skip:focus { top: 12px; text-decoration: none; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* bilingual helper spans */
.hi {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 400;
    color: var(--ink-3);
    letter-spacing: 0;
}
.hi-inline { font-size: 12px; font-weight: 400; color: var(--ink-3); }

/* Inline SVG sprite icons */
.ico {
    width: 18px; height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -.18em;
}
.ico-sm { width: 14px; height: 14px; }
.ico-lg { width: 22px; height: 22px; }

/* 3 — government bar ----------------------------------------------------- */
.govbar {
    background: linear-gradient(90deg, #0a3a24, #0f5132 48%, #136b42);
    color: #d7e8de;
    font-size: 12.5px;
}
.govbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 38px;
    padding-top: 9px;
    padding-bottom: 9px;
}
.govbar .wrap > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    min-width: 0;
}
.govbar b { color: #fff; font-weight: 650; }
.govbar .hi-inline { color: #a9c9b6; font-size: 11.5px; }

/* 4 — brand / masthead --------------------------------------------------- */
.auth-brand { min-width: 0; }

.brand-mark { display: flex; align-items: center; gap: 14px; }

.brand-logo {
    width: 52px; height: 52px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #147247, #0b3f27);
    color: #fff;
    box-shadow: 0 12px 24px -14px rgba(15, 81, 50, .95);
}
.brand-logo .ico { width: 26px; height: 26px; stroke-width: 1.9; }

.brand-name {
    font-size: 24px;
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -.025em;
    color: var(--ink);
    overflow-wrap: anywhere;
}
.brand-name .hi {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--green-2);
}

.brand-rule {
    width: 54px; height: 3px;
    margin: 22px 0 18px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--green), #3fb277);
}

.brand-lede {
    max-width: 42ch;
    margin-bottom: 24px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--ink-2);
}
.brand-lede .hi { margin-top: 8px; }

/* 5 — account screens ---------------------------------------------------- */
.auth-container {
    display: grid;
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    gap: 28px;
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 40px 20px 56px;
    align-items: stretch;
}

.auth-left {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px 30px 26px;
    background: linear-gradient(165deg, #e9f4ee 0%, #f4faf6 62%, #f7fbf8 100%);
    border: 1px solid var(--rule);
    border-radius: 20px;
    overflow: hidden;
}
.auth-left::after {
    content: "";
    position: absolute;
    right: -110px; top: -120px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 134, 84, .14), transparent 68%);
    pointer-events: none;
}

.auth-right { min-width: 0; }

/* Registration: no brand panel, a single wide sheet. */
.auth-container.is-single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 860px;
    gap: 0;
}

.dc-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    padding: 15px 16px;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 14px;
    box-shadow: var(--shadow-xs);
}
.dc-photo {
    width: 58px; height: 58px;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px var(--rule-strong);
}
.dc-body { min-width: 0; }
.dc-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--green-2);
}
.dc-name { margin-top: 2px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.dc-role { font-size: 12.5px; color: var(--ink-3); }
.dc-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-2);
}
.dc-socials { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dc-socials a {
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: var(--pill);
    background: var(--paper-3);
    border: 1px solid var(--rule);
    color: var(--ink-2);
}
.dc-socials a:hover { border-color: var(--green); color: var(--green); text-decoration: none; }

/* 6 — cards, forms, buttons ---------------------------------------------- */
.auth-form-wrapper,
.sheet {
    position: relative;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    border-radius: 18px;
    padding: 30px 30px 24px;
    box-shadow: var(--shadow-md);
}

.auth-form-wrapper h2,
.sheet h2 {
    font-size: clamp(23px, 2.4vw, 29px);
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -.025em;
    color: var(--ink);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    line-height: 1.62;
    color: var(--ink-3);
    margin-bottom: 22px;
}
.auth-subtitle .hi { margin-top: 5px; font-size: 12.5px; color: #5a6f64; }

.form-tab {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.form-tab b {
    padding: 4px 10px;
    border-radius: var(--pill);
    background: var(--green-soft);
    color: var(--green);
    font-size: 10.5px;
    letter-spacing: .08em;
}
.form-tab .hi-inline { text-transform: none; letter-spacing: 0; font-size: 11.5px; }

.form-group { margin-bottom: 18px; }

/* Two fields per row (registration). Collapses to one column on phones. */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
}

.form-label {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 6px;
    margin-bottom: 7px;
    font-size: 12.5px;
    font-weight: 650;
    letter-spacing: .01em;
    color: var(--ink-2);
}
.form-label .req { color: var(--rust); font-weight: 700; }
.form-label .hi-inline { font-size: 11.5px; }

.input-group { position: relative; }

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    font-family: var(--sans);
    font-size: 15px;
    color: var(--ink);
    background: #fbfdfc;
    border: 1.5px solid var(--rule-strong);
    border-radius: var(--r-sm);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-control::placeholder { color: #8b9c92; }
.form-control:hover { border-color: #b9cbc1; }
.form-control:focus {
    outline: none;
    border-color: var(--green-2);
    background: #fff;
    box-shadow: var(--focus);
}
.form-control.is-invalid {
    border-color: #d99a92;
    background: #fffafa;
    box-shadow: 0 0 0 4px rgba(179, 38, 30, .08);
}

.input-group.has-icon .form-control { padding-right: 46px; }
.input-icon {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    color: #8b9c92;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 5px; top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--r-xs);
    background: transparent;
    color: var(--ink-3);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.toggle-password:hover { background: var(--paper-3); color: var(--green); }
.toggle-password:focus-visible { outline: 2px solid var(--green-2); outline-offset: 1px; }

.input-hint, .password-hint {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-3);
}
.input-hint.error { color: var(--danger); }

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 13px;
}
.forgot-link { font-size: 13px; font-weight: 600; }

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-2);
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px; height: 17px;
    margin: 2px 0 0;
    accent-color: var(--green);
    cursor: pointer;
}
.checkbox-label a { font-weight: 600; }
.form-group > .checkbox-label + .checkbox-label { margin-top: 10px; }

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 50px;
    padding: 12px 18px;
    border: 0;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, #136b42, #0b4128);
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow: 0 12px 24px -16px rgba(15, 81, 50, .95);
    transition: transform .15s var(--ease), box-shadow .15s ease, filter .15s ease;
}
.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -16px rgba(15, 81, 50, .95);
}
.btn-primary:active { transform: translateY(0); filter: brightness(.98); }
.btn-primary:focus-visible { outline: 2px solid var(--green-2); outline-offset: 3px; }
.btn-primary[disabled],
.btn-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    filter: none;
}
.btn-primary .hi-inline { color: #d8ebe1; font-size: 11.5px; }

.btn, .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 18px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    font-weight: 650;
    cursor: pointer;
    text-decoration: none;
}
.btn {
    background: #fff;
    border: 1.5px solid var(--rule-strong);
    color: var(--ink-2);
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.btn:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.btn-ghost {
    background: var(--green-soft);
    border: 1px solid transparent;
    color: var(--green);
}
.btn-ghost:hover { background: #dcf0e5; text-decoration: none; }

.auth-footer {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
    font-size: 13px;
    color: var(--ink-3);
}
.auth-footer p { font-size: 13px; }
.auth-footer a { font-weight: 600; }
.auth-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.auth-footer-row > * { margin: 0; }
.auth-footer-sep { color: var(--rule-strong); }
.auth-track-link { display: inline-flex; align-items: center; gap: 6px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 600;
}
.auth-footer .back-link { margin-top: 0; }
.auth-footer button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--green);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.auth-footer button[disabled] { color: var(--ink-3); cursor: not-allowed; text-decoration: none; }

.support-strip {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 18px;
    padding: 12px 13px;
    background: #f7faf8;
    border: 1px solid var(--rule);
    border-radius: var(--r-sm);
}
.support-strip .mark {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--green-2), var(--green));
    color: #fff;
}
.support-strip .mark .ico { width: 17px; height: 17px; }
.support-strip .who { min-width: 0; flex: 1; }
.support-strip .who-label {
    display: block;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--green-2);
}
.support-strip .who strong { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.support-strip .who span { display: block; font-size: 11.5px; color: var(--ink-3); }
.support-strip .contact {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-3);
}
.support-strip .career {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

/* alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 16px;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    font-size: 13px;
    line-height: 1.5;
}
.alert .ico { margin-top: 1px; }
.alert-error { background: var(--danger-soft); border-color: #f3c9c5; color: #8f1d16; }
.alert-success { background: #eaf7f1; border-color: #bfe6d5; color: #0b5c40; }
.alert-dismiss { opacity: 0; transform: translateY(-4px); transition: opacity .35s ease, transform .35s ease; }

/* 7 — sheet pages (role select, OTP, reset) ------------------------------ */
.sheet-page {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}
.sheet-page .auth-brand { margin-bottom: 24px; }
.sheet .form-tab { margin-bottom: 16px; }
.sheet .auth-subtitle { margin-bottom: 18px; }
.sheet .account-list { margin-bottom: 18px; }
.sheet.is-reset { border-top: 3px solid var(--rust); }

.account-list { display: grid; gap: 10px; margin-bottom: 22px; }

.account-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 15px;
    background: #fbfdfc;
    border: 1.5px solid var(--rule);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.account-card:hover { border-color: #b9cbc1; background: #fff; }
.account-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.account-card .tick {
    flex: 0 0 auto;
    width: 20px; height: 20px;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--rule-strong);
    border-radius: 50%;
    background: #fff;
    color: transparent;
    font-size: 10px;
    transition: background .15s ease, border-color .15s ease;
}
.account-card .tick .ico { width: 11px; height: 11px; stroke-width: 2.6; }
.account-card .who { flex: 1; min-width: 0; }
.account-card .who strong {
    display: block;
    font-size: 14.5px;
    font-weight: 650;
    letter-spacing: -.01em;
    color: var(--ink);
    overflow-wrap: anywhere;
}
.account-card .who .ref {
    display: block;
    margin-top: 5px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-card .badge {
    flex: 0 0 auto;
    width: 38px; height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--green-soft);
    color: var(--green);
}
.account-card .badge .ico { width: 17px; height: 17px; }
.account-card .chev { color: #9db0a5; }
.account-card:has(input[type="radio"]:checked) {
    border-color: var(--green-2);
    background: #f4faf6;
    box-shadow: 0 0 0 3px var(--green-ring);
}
.account-card input[type="radio"]:checked ~ .tick {
    background: var(--green-2);
    border-color: var(--green-2);
    color: #fff;
}

.role-tag {
    display: inline-block;
    margin-top: 5px;
    padding: 3px 9px;
    border-radius: var(--pill);
    background: var(--paper-3);
    border: 1px solid var(--rule);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-2);
}

/* OTP + reset */
.otp-input-wrapper, .otp-container {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}
.otp-input {
    flex: 1;
    min-width: 0;
    height: 56px;
    padding: 0;
    text-align: center;
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
    background: #fbfdfc;
    border: 1.5px solid var(--rule-strong);
    border-radius: var(--r-sm);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.otp-input:focus {
    outline: none;
    border-color: var(--green-2);
    background: #fff;
    box-shadow: var(--focus);
}

.recipient-info {
    margin-bottom: 18px;
    padding: 12px 14px;
    background: #f7faf8;
    border: 1px solid var(--rule);
    border-radius: var(--r-sm);
}
.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ink-2);
}
.info-row + .info-row { margin-top: 7px; }
.info-row .ico { color: var(--green-2); }
.info-row strong { font-weight: 650; color: var(--ink-3); }

/* Dev-mode code. No panel chrome: the six cells sit in the same column as the
   six inputs, so they share its width and can be compared digit for digit. */
.dev-otp-box {
    margin-bottom: 18px;
}
.dev-otp-box .label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #8a6414;
}
.dev-otp-box .label::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d9a521;
}
.otp-digits {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.otp-digit {
    flex: 1;
    min-width: 0;
    height: 56px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: var(--r-sm);
    background: #fdf2d2;
    border: 1.5px solid var(--rule-strong);
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    margin-top: 9px;
}
.password-requirements p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ink-3);
}
.password-requirements p::before {
    content: "";
    flex: 0 0 auto;
    width: 7px; height: 7px;
    border: 1px solid var(--rule-strong);
    border-radius: 50%;
}
.password-requirements p.valid { color: var(--ok); }
.password-requirements p.valid::before {
    content: "✓";
    width: auto; height: auto;
    border: 0;
    border-radius: 0;
    font-size: 11px;
    font-weight: 700;
}

.match-status { margin: 7px 0 0; font-size: 12.5px; min-height: 18px; }
.match-status.match { color: var(--ok); }
.match-status.no-match { color: var(--danger); }

/* 8 — toast / notice ----------------------------------------------------- */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 13px;
    background: #fff;
    border: 1px solid var(--rule);
    border-left: 3px solid var(--ink-3);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    animation: toast-in .22s var(--ease) both;
    transition: opacity .25s ease, transform .25s ease;
}
.toast.hiding { opacity: 0; transform: translateY(-6px); }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
}
.toast-success { border-left-color: var(--ok); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--gold); }
.toast-icon {
    flex: 0 0 auto;
    width: 20px; height: 20px;
    display: grid;
    place-items: center;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--paper-3);
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
}
.toast-info .toast-icon::before { content: "i"; }
.toast-success .toast-icon { background: #e4f4ec; color: var(--ok); }
.toast-success .toast-icon::before { content: "✓"; }
.toast-error .toast-icon { background: var(--danger-soft); color: var(--danger); }
.toast-error .toast-icon::before { content: "!"; }
.toast-warning .toast-icon { background: var(--gold-soft); color: var(--gold); }
.toast-warning .toast-icon::before { content: "!"; }
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.toast-message { margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
.toast-close {
    flex: 0 0 auto;
    padding: 0 2px;
    border: 0;
    background: none;
    color: var(--ink-3);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.notice-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 29, 22, .48);
    backdrop-filter: blur(2px);
}
.notice-overlay.show { display: flex; }
.notice-box {
    width: 100%;
    max-width: 360px;
    padding: 26px 24px 22px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 18px;
    box-shadow: 0 40px 80px -40px rgba(12, 29, 22, .6);
    animation: notice-in .2s var(--ease) both;
}
@keyframes notice-in {
    from { opacity: 0; transform: translateY(8px) scale(.97); }
}
.notice-mark {
    width: 52px; height: 52px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--danger-soft);
    color: var(--danger);
}
.notice-mark .ico { width: 22px; height: 22px; }
.notice-title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.notice-msg { font-size: 13.5px; line-height: 1.55; color: var(--ink-3); margin-bottom: 20px; }
.notice-box .btn-ghost { width: 100%; }

/* 9 — complaint record + timeline ---------------------------------------- */
.track-shell {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 56px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding: 5px 11px;
    border-radius: var(--pill);
    background: var(--green-soft);
    color: var(--green);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.track-head { margin-bottom: 24px; }
.track-head h1,
.dir-head h1 {
    font-size: clamp(30px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--ink);
}
.track-head h1 .hi,
.dir-head h1 .hi { margin-top: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink-3); }
.track-head p {
    max-width: 64ch;
    margin-top: 10px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--ink-3);
}
.track-head p .hi { margin-top: 6px; font-size: 12.5px; }

.track-stack { display: grid; gap: 22px; }

.slip,
.record {
    background: var(--paper-2);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
}
.slip { padding: 24px; }
.slip h2 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin-bottom: 8px;
}
.slip .form-tab { margin-bottom: 14px; }
.slip .form-group:last-of-type { margin-bottom: 20px; }
.form-actions { margin-top: 4px; }

.record { overflow: hidden; }
.record-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--rule);
    background: linear-gradient(180deg, #f7fbf9, #fff);
}
.record-head .ref {
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--green-2);
}
.record-head h2 {
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -.01em;
}
.record-body { padding: 22px 24px 24px; }

.stamp {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: var(--pill);
    background: var(--paper-3);
    border: 1px solid var(--rule);
    color: var(--ink-2);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    white-space: nowrap;
}
.stamp.is-pending { background: var(--gold-soft); border-color: #f0dcb4; color: #7d5a10; }
.stamp.is-rejected { background: var(--danger-soft); border-color: #f3c9c5; color: #8f1d16; }
.stamp.is-closed { background: var(--green-soft); border-color: #c8e6d7; color: var(--green); }

.record-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
    margin: 0 0 4px;
}
.record-meta dt {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.record-meta dd {
    margin: 3px 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink-2);
    overflow-wrap: anywhere;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 24px 0 12px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ink-2);
}
.section-title .ico { color: var(--green-2); }
.record-body > .section-title:first-child { margin-top: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
    position: relative;
    padding: 0 0 16px 22px;
    border-left: 1px solid var(--rule);
}
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
    content: "";
    position: absolute;
    left: -5px; top: 4px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--rule-strong);
}
.timeline li.is-done::before { background: var(--green-2); border-color: var(--green-2); }
.timeline li.is-current::before { box-shadow: 0 0 0 4px var(--green-ring); }
.timeline .what { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.timeline .when { margin-top: 2px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

.remark { padding: 12px 0; border-top: 1px solid var(--rule); }
.remark:first-of-type { padding-top: 0; border-top: 0; }
.remark-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
    margin-bottom: 4px;
    font-size: 11.5px;
    color: var(--ink-3);
}
.remark-head strong { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.remark p { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }

.empty-note {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-3);
    background: #f9fcfa;
    border: 1px dashed var(--rule-strong);
    border-radius: var(--r-sm);
}
.empty-note .btn-ghost { width: auto; margin: 12px auto 0; }

.fine-print {
    margin-top: 16px;
    padding: 12px 14px;
    background: #f8fbf9;
    border: 1px solid var(--rule);
    border-radius: var(--r-sm);
}
.fine-print ul { list-style: none; margin: 0; padding: 0; }
.fine-print li {
    position: relative;
    padding-left: 13px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--ink-3);
}
.fine-print li + li { margin-top: 4px; }
.fine-print li::before {
    content: "";
    position: absolute;
    left: 0; top: 7px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--rule-strong);
}

.track-signin {
    display: flex;
    justify-content: center;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px dashed var(--rule);
}
.track-signin .back-link { margin-top: 0; }

/* 10 — directory --------------------------------------------------------- */
.dir-shell {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 56px;
}

.dir-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}
.dir-head p {
    max-width: 60ch;
    margin-top: 10px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--ink-3);
}
.dir-head p .hi { margin-top: 6px; font-size: 12.5px; }
.dir-count {
    font-size: 12.5px;
    color: var(--ink-3);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.dir-head .back-link { margin-top: 6px; font-size: 12.5px; }

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
}
.filter-bar .back-link { margin: 0; white-space: nowrap; }
.filter-bar select.form-control {
    min-width: 168px;
    padding-right: 38px;
    padding-top: 0;
    padding-bottom: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667c71' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 15px 15px;
    cursor: pointer;
}

.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border: 1px solid var(--rule);
    border-radius: var(--pill);
    background: #fff;
    color: var(--ink-2);
    font-size: 12.5px;
    font-weight: 600;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.cat-tab:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.cat-tab .n { font-family: var(--mono); font-size: 10.5px; opacity: .75; }
.cat-tab.is-active {
    background: linear-gradient(135deg, #136b42, #0b4128);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 18px -12px rgba(15, 81, 50, .9);
}
.cat-tab.is-sub { padding: 5px 11px; font-size: 11.5px; background: transparent; }
.cat-tab.is-sub.is-active { background: var(--ink); color: #fff; }

.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}

.site-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
    transition: transform .16s var(--ease), box-shadow .16s ease, border-color .16s ease;
}
.site-card:hover {
    transform: translateY(-3px);
    border-color: var(--rule-strong);
    box-shadow: var(--shadow-md);
}
.site-card.is-featured {
    border-color: #ecd6a8;
    background: linear-gradient(180deg, #fffdf8, #fff 60%);
}
.site-card .site-flag {
    position: absolute;
    top: 14px; right: 14px;
    padding: 3px 9px;
    border-radius: var(--pill);
    background: var(--gold-soft);
    border: 1px solid #f0dcb4;
    color: #7d5a10;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.site-card .site-top { display: flex; align-items: center; gap: 12px; padding-right: 54px; }
.site-card .site-logo {
    flex: 0 0 auto;
    width: 42px; height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--green-soft);
    color: var(--green);
    overflow: hidden;
}
.site-card .site-logo img { width: 100%; height: 100%; object-fit: cover; }
.site-card .site-logo .ico { width: 19px; height: 19px; }
.site-card .site-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15.5px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -.015em;
    color: var(--ink);
}
.site-card .site-cat {
    margin-top: 3px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.site-card .site-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-3);
}
.site-card .site-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.site-card .site-tag {
    padding: 2px 8px;
    border: 1px solid var(--rule);
    border-radius: var(--pill);
    background: var(--paper-3);
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink-3);
}
.site-card .site-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--green);
}
.site-card .site-link:hover { text-decoration: none; color: var(--green-3); }
.site-card .site-link.muted { color: var(--ink-3); }

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
}
.pager a, .pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: #fff;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
}
.pager a:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.pager .is-current { background: var(--green); border-color: var(--green); color: #fff; }
.pager span.mono { border: 0; background: none; color: var(--ink-3); }

/* 11 — footer ------------------------------------------------------------ */
.public-foot {
    margin-top: auto;
    background: #fff;
    border-top: 1px solid var(--rule);
    font-size: 12.5px;
    color: var(--ink-3);
}
.public-foot .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding-top: 16px;
    padding-bottom: 16px;
}
.public-foot strong { color: var(--ink-2); font-weight: 650; }
.public-foot a { color: var(--ink-2); }
.public-foot .sep { margin: 0 5px; color: var(--rule-strong); }
.public-foot .stats { display: flex; flex-wrap: wrap; gap: 7px; }
.public-foot .stats > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--rule);
    border-radius: var(--pill);
    background: var(--paper-3);
    font-variant-numeric: tabular-nums;
}
.public-foot .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #23a06a;
    box-shadow: 0 0 0 3px rgba(35, 160, 106, .16);
}
.visitor-stats-trigger { cursor: pointer; }
.visitor-stats-trigger:hover { border-color: var(--green); color: var(--green); }

/* 12 — responsive -------------------------------------------------------- */
@media (max-width: 1080px) {
    .auth-container { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 22px; }
    .auth-left { padding: 26px 24px 22px; }
    .auth-form-wrapper { padding: 26px 24px 20px; }
    .govbar .hi-inline { display: none; }
}

@media (max-width: 960px) {
    .auth-container { grid-template-columns: 1fr; gap: 18px; padding-top: 28px; }
    .auth-left { padding: 24px 22px 20px; }
    .auth-left::after { display: none; }
    .dc-card { margin-top: 18px; }
    .brand-rule { margin: 18px 0 14px; }
    .dir-head { align-items: flex-start; }
    .filter-bar { grid-template-columns: 1fr; }
    .filter-bar .btn { width: 100%; }
    .filter-bar .back-link { justify-content: center; }
}

@media (max-width: 860px) {
    .govbar .wrap > span:last-child { display: none; }
}

@media (max-width: 720px) {
    .form-grid-2 { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 640px) {
    .auth-container, .track-shell, .dir-shell, .sheet-page { padding-left: 16px; padding-right: 16px; }
    .auth-container { padding-top: 22px; padding-bottom: 40px; }
    .auth-form-wrapper { padding: 22px 18px 18px; border-radius: 16px; }
    .sheet { padding: 20px 18px 18px; }
    .brand-logo { width: 46px; height: 46px; border-radius: 12px; }
    .brand-logo .ico { width: 23px; height: 23px; }
    .brand-name { font-size: 21px; }
    .auth-form-wrapper h2, .sheet h2 { font-size: 23px; }
    .record-head { padding: 16px 18px; }
    .record-body { padding: 18px; }
    .slip { padding: 20px 18px; }
    .dir-count { text-align: left; }
    .site-grid { grid-template-columns: 1fr; }
    .dir-head .back-link { margin-top: 0; }
    .password-requirements { grid-template-columns: 1fr; }
    .track-head h1, .dir-head h1 { font-size: 29px; }
    .record-meta { gap: 12px 18px; }
}

@media (max-width: 520px) {
    .govbar { font-size: 11px; }
    .govbar .wrap { min-height: 34px; padding-top: 7px; padding-bottom: 7px; }
    .govbar b { font-weight: 650; }

    .auth-left { padding: 20px 16px 18px; border-radius: 16px; }
    .dc-card { padding: 12px; gap: 11px; }
    .dc-photo { width: 50px; height: 50px; }
    .dc-socials { gap: 5px; }
    .dc-socials a { font-size: 11px; padding: 2px 8px; }

    .auth-footer-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .auth-footer-sep { display: none; }
    .support-strip { flex-wrap: wrap; }
    .support-strip .career { margin-left: auto; }

    .form-tab { gap: 6px; }
    .otp-input-wrapper, .otp-container { gap: 6px; }
    .otp-input { height: 50px; font-size: 20px; }
    .otp-digits { gap: 6px; }
    .otp-digit { height: 50px; font-size: 20px; }
    .recipient-info { padding: 11px 12px; }
    .info-row { font-size: 12px; }

    .account-card { gap: 10px; padding: 12px 13px; }
    .account-card .badge { display: none; }

    .public-foot .wrap { padding-right: 78px; }
    .public-foot .stats { gap: 5px; }
    .public-foot .stats > span { padding: 3px 8px; font-size: 11.5px; }

    .toast-container { top: 12px; right: 12px; left: 12px; width: auto; }
    .record-head { flex-direction: column; }
    .record-head .stamp { align-self: flex-start; }
    .filter-bar { padding: 10px; }
    .pager a, .pager span { min-width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .site-card:hover, .btn-primary:hover { transform: none; }
}
