:root {
    --ink: #172033;
    --muted: #64748b;
    --surface: #ffffff;
    --surface-soft: #f7f7ff;
    --line: #e5e7eb;
    --primary: #3730a3;
    --primary-dark: #24206f;
    --primary-light: #6366f1;
    --accent: #f59e0b;
    --accent-dark: #c56e00;
    --success: #0f8a62;
    --success-soft: #eaf9f3;
    --warning: #c46a10;
    --warning-soft: #fff5e7;
    --danger: #b42318;
    --shadow: 0 20px 55px rgba(31, 41, 88, 0.14);
    --radius-large: 26px;
    --radius-medium: 18px;
    --radius-small: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: #f8fafc;
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

svg {
    display: block;
}

.container {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.site-header {
    position: relative;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(99, 102, 241, 0.13);
    box-shadow: 0 7px 24px rgba(31, 41, 88, 0.06);
}

.logo-header-inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.logo-only img {
    width: min(430px, 72vw);
    max-height: 66px;
    object-fit: contain;
}

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    padding: 76px 0 84px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.28), transparent 34%),
        linear-gradient(135deg, #211c62 0%, #3730a3 48%, #4f46e5 100%);
}

.hero-section::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 52px;
    background: #f8fafc;
    clip-path: polygon(0 70%, 16% 42%, 36% 70%, 58% 38%, 77% 66%, 100% 34%, 100% 100%, 0 100%);
}

.hero-orb {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(2px);
}

.hero-orb-one {
    width: 370px;
    height: 370px;
    top: -190px;
    right: -90px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-orb-two {
    width: 240px;
    height: 240px;
    bottom: -130px;
    left: 40%;
    background: rgba(245, 158, 11, 0.12);
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    gap: 62px;
    align-items: center;
}

.hero-copy {
    padding: 10px 0 30px;
}

.hero-kicker,
.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero-kicker {
    padding: 8px 13px;
    color: #fff8e9;
    background: rgba(245, 158, 11, 0.22);
    border: 1px solid rgba(255, 225, 169, 0.42);
    border-radius: 999px;
}

.hero-copy h1 {
    max-width: 680px;
    margin: 22px 0 18px;
    font-size: clamp(2.25rem, 4.3vw, 4.15rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.hero-copy > p {
    max-width: 640px;
    margin: 0;
    color: rgba(255, 255, 255, 0.83);
    font-size: 1.08rem;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.hero-pills span {
    padding: 9px 13px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
}

.lookup-card,
.setup-card,
.login-card,
.message-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
}

.lookup-card {
    padding: 34px;
    color: var(--ink);
}

.lookup-card-head {
    display: flex;
    gap: 14px;
    align-items: center;
}

.lookup-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--accent), #ffbe3f);
    border-radius: 16px;
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.27);
}

.lookup-icon svg,
.lookup-row button svg,
.input-with-icon svg,
.lookup-note svg,
.result-badge svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.lookup-card-head span:not(.lookup-icon) {
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.lookup-card-head h2 {
    margin: 2px 0 0;
    font-size: 1.5rem;
}

.lookup-card > p {
    margin: 20px 0 22px;
    color: var(--muted);
}

.lookup-card label,
.form-field label {
    display: block;
    margin-bottom: 8px;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 700;
}

.lookup-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon svg {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #818cf8;
}

.input-with-icon input,
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    color: var(--ink);
    background: #fff;
    border: 1px solid #d7dbea;
    border-radius: 13px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-with-icon input {
    height: 54px;
    padding: 0 16px 0 50px;
}

.form-field input,
.form-field select {
    height: 50px;
    padding: 0 14px;
}

.form-field textarea {
    min-height: 104px;
    padding: 13px 14px;
    resize: vertical;
}

.input-with-icon input:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.lookup-row button,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    border: 0;
    border-radius: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(197, 110, 0, 0.2);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lookup-row button {
    height: 54px;
}

.lookup-row button:hover,
.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(197, 110, 0, 0.27);
}

.lookup-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 19px;
    padding: 13px 14px;
    color: #575b75;
    background: #f6f5ff;
    border-radius: 12px;
    font-size: 0.88rem;
}

.lookup-note svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: var(--primary-light);
}

.field-validation,
.validation-summary {
    color: var(--danger);
    font-size: 0.86rem;
}

.field-validation {
    display: block;
    margin-top: 7px;
}

.validation-summary:empty {
    display: none;
}

.validation-summary ul {
    margin: 0;
    padding-left: 20px;
}

.content-section {
    padding: 54px 0 84px;
}

.flash-message {
    margin-bottom: 20px;
    padding: 14px 18px;
    color: #075c43;
    background: var(--success-soft);
    border: 1px solid #bfead9;
    border-radius: 13px;
    font-weight: 700;
}

.result-panel {
    margin-bottom: 42px;
    padding: 30px;
    background: #fff;
    border: 1px solid #e8e9f2;
    border-radius: 24px;
    box-shadow: 0 16px 38px rgba(31, 41, 88, 0.08);
}

.section-heading {
    display: flex;
    gap: 24px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.eyebrow {
    color: var(--primary);
}

.eyebrow.light {
    color: #fce9bf;
}

.section-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.query-chip {
    flex: 0 0 auto;
    padding: 9px 13px;
    color: var(--primary-dark);
    background: #efefff;
    border: 1px solid #d9dafc;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
}

.result-group + .result-group {
    margin-top: 28px;
}

.result-group {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.result-group-head {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 20px 22px;
}

.eligible-group .result-group-head {
    background: linear-gradient(90deg, #eaf9f3, #f8fffc);
}

.supplemental-group .result-group-head {
    background: linear-gradient(90deg, #fff5e7, #fffaf1);
}

.result-group-head h3 {
    margin: 0;
    font-size: 1.18rem;
}

.result-group-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.result-badge {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 14px;
}

.eligible-badge {
    background: var(--success);
}

.supplemental-badge {
    background: var(--warning);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.result-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.result-table th,
.result-table td {
    padding: 14px 13px;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid #eceef4;
}

.result-table th {
    color: #4b5563;
    background: #fbfbfe;
    font-size: 0.79rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.result-table td {
    color: #384152;
    font-size: 0.92rem;
}

.result-table tbody tr:hover {
    background: #fafaff;
}

.source-tag,
.status-pass,
.status-supplemental {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 800;
}

.source-tag {
    color: #3730a3;
    background: #ececff;
}

.ministry-tag {
    color: #8a4a00;
    background: #fff0d7;
}

.status-pass {
    color: #087052;
    background: #dcf7ed;
}

.status-supplemental {
    color: #9a5208;
    background: #fff0d8;
}

.notice-banner {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 21px;
    color: #555c71;
    background: #f6f7fb;
    border: 1px solid #e3e6ef;
    border-radius: 16px;
}

.notice-banner strong,
.notice-banner span {
    display: block;
}

.notice-banner strong {
    margin-bottom: 3px;
    color: var(--ink);
}

.notice-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: grid !important;
    place-items: center;
    color: #fff;
    background: var(--primary-light);
    border-radius: 50%;
    font-weight: 900;
}

.result-guidance {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-top: 28px;
    padding: 21px 22px;
    color: #332b69;
    background: linear-gradient(135deg, #f3f2ff, #fffaf0);
    border: 1px solid #d9d7fb;
    border-left: 5px solid var(--accent);
    border-radius: 17px;
}
.persistent-guidance { margin: 0 0 28px; }

.guidance-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--primary), var(--primary-light));
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(55, 48, 163, 0.2);
}
.guidance-icon svg { width: 24px; height: 24px; fill: currentColor; }
.result-guidance h3 { margin: 0 0 8px; color: var(--primary-dark); font-size: 1.08rem; }
.result-guidance ul { margin: 0; padding-left: 21px; }
.result-guidance li { padding-left: 3px; line-height: 1.65; }
.result-guidance li + li { margin-top: 8px; }
.result-guidance strong { color: #a34800; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.info-grid article {
    position: relative;
    overflow: hidden;
    padding: 26px;
    background: #fff;
    border: 1px solid #e6e8f0;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(31, 41, 88, 0.06);
}

.info-number {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: var(--primary);
    border-radius: 13px;
    font-weight: 900;
}

.info-grid h3 {
    margin: 18px 0 8px;
}

.info-grid p {
    margin: 0;
    color: var(--muted);
}

.setup-section {
    min-height: calc(100vh - 160px);
    padding: 70px 0;
    background:
        radial-gradient(circle at 84% 10%, rgba(245, 158, 11, 0.22), transparent 27%),
        linear-gradient(135deg, #211c62, #3730a3 55%, #4f46e5);
}

.setup-container {
    display: grid;
    grid-template-columns: minmax(270px, 0.65fr) minmax(0, 1.35fr);
    gap: 50px;
    align-items: start;
}

.setup-intro {
    position: sticky;
    top: 28px;
    color: #fff;
}

.setup-intro h1 {
    margin: 13px 0 14px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.1;
}

.setup-intro p {
    color: rgba(255, 255, 255, 0.78);
}

.table-list {
    display: grid;
    gap: 9px;
    margin-top: 24px;
}

.table-list code {
    padding: 10px 12px;
    color: #fff3d4;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    word-break: break-all;
}

.setup-card {
    padding: 34px;
}

.form-section + .form-section {
    margin-top: 34px;
    padding-top: 32px;
    border-top: 1px solid #e8e9f0;
}

.form-section-title {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.form-section-title > span {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 11px;
    font-weight: 900;
}

.form-section-title h2 {
    margin: 0;
    font-size: 1.25rem;
}

.form-section-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.91rem;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field + .form-field,
.form-grid + .form-field,
.form-field + .form-grid {
    margin-top: 16px;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.check-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px;
    background: #f8f8ff;
    border: 1px solid #e1e2f4;
    border-radius: 13px;
    cursor: pointer;
}

.check-card input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.check-card strong,
.check-card small {
    display: block;
}

.check-card small {
    margin-top: 2px;
    color: var(--muted);
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 30px;
}

.secondary-link,
.primary-link,
.text-link {
    font-weight: 700;
    text-decoration: none;
}

.secondary-link,
.primary-link {
    padding: 12px 17px;
    border-radius: 12px;
}

.secondary-link {
    color: var(--primary);
    background: #eeeeff;
}

.primary-link {
    display: inline-flex;
    color: #fff;
    background: var(--primary);
}

.simple-page {
    min-height: calc(100vh - 160px);
    padding: 70px 0;
}

.login-page {
    background: linear-gradient(145deg, #f1f2ff, #fff7e7);
}

.login-card,
.message-card {
    width: min(470px, 100%);
    margin: 0 auto;
    padding: 34px;
    text-align: center;
}

.login-card > img {
    width: min(320px, 80%);
    max-height: 58px;
    margin-bottom: 22px;
    object-fit: contain;
}

.login-card h1,
.message-card h1 {
    margin: 8px 0 10px;
}

.login-card > p,
.message-card > p {
    color: var(--muted);
}

.login-card form {
    margin: 26px 0 18px;
    text-align: left;
}

.full-width {
    width: 100%;
    margin-top: 15px;
}

.text-link {
    color: var(--primary);
}

.error-card {
    border-top: 5px solid var(--danger);
}

.request-id {
    font-size: 0.9rem;
}

.footer {
    color: #d8dcff;
    background: #19164d;
}

.footer-inner {
    min-height: 76px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.footer-inner img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

@media (max-width: 980px) {
    .hero-grid,
    .setup-container {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        gap: 36px;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-copy > p {
        margin-inline: auto;
    }

    .hero-pills {
        justify-content: center;
    }

    .setup-intro {
        position: static;
        text-align: center;
    }

    .table-list {
        width: min(560px, 100%);
        margin-inline: auto;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .logo-header-inner {
        min-height: 78px;
    }

    .logo-only img {
        max-height: 54px;
    }

    .hero-section {
        padding: 54px 0 78px;
    }

    .hero-copy h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .lookup-card,
    .setup-card,
    .result-panel,
    .login-card,
    .message-card {
        padding: 22px;
        border-radius: 19px;
    }

    .lookup-row,
    .form-grid.two-columns,
    .check-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .lookup-row button {
        width: 100%;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .query-chip {
        white-space: normal;
    }

    .result-table {
        min-width: 0;
    }

    .result-table thead {
        display: none;
    }

    .result-table,
    .result-table tbody,
    .result-table tr,
    .result-table td {
        display: block;
        width: 100%;
    }

    .result-table tr {
        padding: 12px 14px;
        border-top: 1px solid #eceef4;
    }

    .result-table td {
        display: grid;
        grid-template-columns: minmax(105px, 0.42fr) minmax(0, 0.58fr);
        gap: 10px;
        padding: 7px 0;
        border: 0;
    }

    .result-table td::before {
        content: attr(data-label);
        color: #667085;
        font-size: 0.78rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .result-group-head {
        align-items: flex-start;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions .primary-button,
    .form-actions .secondary-link {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 430px) {
    .lookup-card-head {
        align-items: flex-start;
    }

    .lookup-card-head h2 {
        font-size: 1.25rem;
    }

    .result-table td {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}
