:root {
    --portal-primary: #1f72d4;
    --portal-primary-deep: #1a56ae;
    --portal-orange: #ef9318;
    --page-bg: #eef4ff;
    --page-bg-soft: #f8fbff;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --surface-soft: #f3f7ff;
    --surface-muted: #e9f0ff;
    --line-soft: rgba(119, 154, 206, 0.28);
    --text-strong: #153056;
    --text-base: #3d5574;
    --text-soft: #6f84a0;
    --text-on-brand: #ffffff;
    --hero-gradient: linear-gradient(110deg, #207bdd 0%, #235dbb 46%, #1a1864 100%);
    --button-gradient: linear-gradient(90deg, #2577da 0%, #1b5ab7 48%, #1d1b73 100%);
    --button-shadow: 0 22px 38px -24px rgba(26, 59, 131, 0.65);
    --shadow-soft: 0 18px 40px -28px rgba(18, 41, 88, 0.22);
    --shadow-panel: 0 36px 80px -54px rgba(20, 43, 94, 0.34);
    --font-display: "Sora", "Avenir Next", "Segoe UI", sans-serif;
    --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

html.theme-dark,
html[data-theme="dark"] {
    color-scheme: dark;
    --page-bg: #08111f;
    --page-bg-soft: #0d1727;
    --surface: rgba(11, 22, 41, 0.88);
    --surface-strong: #101b30;
    --surface-soft: #12233f;
    --surface-muted: #10213b;
    --line-soft: rgba(114, 149, 196, 0.22);
    --text-strong: #f5f7fb;
    --text-base: #d8e3f7;
    --text-soft: #96abca;
    --hero-gradient: linear-gradient(110deg, #0f4f96 0%, #153f81 46%, #10123f 100%);
    --button-gradient: linear-gradient(90deg, #337ee0 0%, #2661bf 48%, #22256f 100%);
    --button-shadow: 0 24px 42px -28px rgba(2, 8, 23, 0.9);
    --shadow-soft: 0 20px 42px -30px rgba(0, 0, 0, 0.78);
    --shadow-panel: 0 38px 90px -56px rgba(0, 0, 0, 0.85);
}

html {
    font-size: 14px;
    scroll-padding-top: 7rem;
    background: var(--page-bg);
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-base);
    background: var(--page-bg);
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

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

button {
    cursor: pointer;
}

h1,
h2,
h3,
h4,
.portal-brand__eyebrow,
.portal-stat__value,
.portal-section__eyebrow,
.portal-label,
.portal-footer__title {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.92em;
}

::selection {
    background: rgba(37, 119, 218, 0.2);
}

.portal-shell {
    min-height: 100vh;
    background: var(--page-bg);
}

.portal-header {
    position: relative;
    overflow: hidden;
    padding: 1.2rem 1rem 8.9rem;
    color: var(--text-on-brand);
    background: var(--hero-gradient);
}

.portal-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: 0.23;
    pointer-events: none;
}

.portal-header::after {
    content: "";
    position: absolute;
    left: -18%;
    right: -18%;
    bottom: -7.8rem;
    height: 15.8rem;
    background: var(--page-bg);
    border-radius: 100% 100% 0 0 / 88% 88% 0 0;
    z-index: 0;
}

.portal-header__inner {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding-right: 5.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.portal-brand {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    max-width: 56rem;
}

.portal-brand__logo {
    display: block;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    padding: 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 36px -26px rgba(0, 0, 0, 0.55);
}

.portal-brand__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.portal-brand__content {
    padding-top: 0.15rem;
}

.portal-brand__eyebrow {
    margin: 0.85rem 0 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(228, 239, 255, 0.88);
}

.portal-brand__title {
    margin: 0.5rem 0 0.45rem;
    font-size: clamp(2rem, 2.5vw, 3.05rem);
    line-height: 1;
    color: #ffffff;
}

.portal-brand__subtitle {
    margin: 0;
    max-width: 70ch;
    font-size: 1.08rem;
    color: rgba(228, 239, 255, 0.9);
}

.theme-toggle-wrap {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.17);
}

.theme-toggle__icon {
    width: 1.18rem;
    height: 1.18rem;
}

.portal-main {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: -4.5rem auto 0;
    padding: 0 1rem 4rem;
}

.jGrowl {
    top: 1.25rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 10020;
}

.jGrowl.top-right {
    top: 1.25rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.jGrowl .jGrowl-notification {
    width: min(24rem, calc(100vw - 2rem));
    margin-bottom: 0.85rem;
    border: 1px solid rgba(16, 24, 40, 0.08);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.97);
    color: var(--text-base);
    box-shadow: 0 18px 42px rgba(15, 42, 84, 0.18);
    font-family: "Source Sans 3", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    opacity: 1;
}

.jGrowl .jGrowl-notification .jGrowl-header {
    display: none;
}

.jGrowl .jGrowl-notification .jGrowl-message {
    line-height: 1.45;
}

.jGrowl .jGrowl-notification .jGrowl-close {
    color: inherit;
    opacity: 0.75;
    font-size: 1.1rem;
}

.jGrowl .jGrowl-notification.jgrowl-info {
    border-color: rgba(37, 119, 218, 0.2);
    background: rgba(238, 246, 255, 0.98);
    color: #1956a8;
}

.jGrowl .jGrowl-notification.jgrowl-success {
    border-color: rgba(31, 141, 89, 0.22);
    background: rgba(237, 250, 243, 0.98);
    color: #15673f;
}

.jGrowl .jGrowl-notification.jgrowl-warning {
    border-color: rgba(239, 147, 24, 0.24);
    background: rgba(255, 248, 233, 0.99);
    color: #9a5a09;
}

.jGrowl .jGrowl-notification.jgrowl-danger {
    border-color: rgba(220, 38, 38, 0.18);
    background: rgba(254, 242, 242, 0.99);
    color: #a11c1c;
}

.page-stack {
    display: grid;
    gap: 1.6rem;
}

.error-shell {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 1rem 0 0.5rem;
}

.error-shell::before,
.error-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(10px);
}

.error-shell::before {
    width: 16rem;
    height: 16rem;
    top: 1rem;
    left: max(-2rem, calc(50% - 28rem));
    background: radial-gradient(circle, rgba(31, 114, 212, 0.16), transparent 72%);
}

.error-shell::after {
    width: 18rem;
    height: 18rem;
    right: max(-2rem, calc(50% - 30rem));
    bottom: 0;
    background: radial-gradient(circle, rgba(239, 147, 24, 0.16), transparent 70%);
}

.error-card {
    position: relative;
    width: min(100%, 42rem);
    padding: 2.2rem 2rem 2rem;
    border: 1px solid rgba(59, 104, 183, 0.16);
    border-radius: 2rem;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 255, 0.98) 52%, rgba(235, 243, 255, 0.98) 100%);
    box-shadow: 0 34px 70px -46px rgba(18, 41, 88, 0.44);
    text-align: center;
    overflow: hidden;
}

.error-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 0.5rem;
    background: linear-gradient(90deg, #1f72d4 0%, #4e89dd 54%, #ef9318 100%);
}

.error-card__orb {
    position: relative;
    display: grid;
    place-items: center;
    width: 7rem;
    height: 7rem;
    margin: 0 auto 1.3rem;
}

.error-card__orb-ring,
.error-card__orb-core {
    position: absolute;
    border-radius: 999px;
}

.error-card__orb-ring {
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.96), rgba(232, 241, 255, 0.96) 68%, rgba(176, 202, 240, 0.7));
    box-shadow: inset 0 0 0 1px rgba(31, 114, 212, 0.12);
}

.error-card__orb-core {
    width: 3.6rem;
    height: 3.6rem;
    background: linear-gradient(135deg, #1f72d4, #ef9318);
    box-shadow: 0 16px 34px -24px rgba(31, 114, 212, 0.65);
}

.error-card__eyebrow {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--portal-orange);
}

.error-card__title {
    margin: 1rem 0 0;
    color: var(--text-strong);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.error-card__code {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 1rem 0 0;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(31, 114, 212, 0.08);
    color: var(--portal-primary-deep);
    font-size: 0.95rem;
    font-weight: 700;
}

.error-card__message {
    max-width: 31rem;
    margin: 1.2rem auto 0;
    color: var(--text-base);
    font-size: 1.18rem;
    line-height: 1.7;
}

.error-card__status {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 1.45rem auto 0;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(59, 104, 183, 0.14);
    color: var(--text-soft);
    font-weight: 600;
}

.error-card__status-dot {
    width: 0.68rem;
    height: 0.68rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #ef9318, #d87700);
    box-shadow: 0 0 0 0.28rem rgba(239, 147, 24, 0.16);
}

.error-card__actions {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 1.6rem;
    flex-wrap: wrap;
}

.error-card__button {
    min-width: 11rem;
}

.error-card__hint {
    max-width: 30rem;
    margin: 1.4rem auto 0;
    color: var(--text-soft);
}

.portal-panel {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border: 1px solid var(--line-soft);
    border-radius: 1.65rem;
    background: var(--surface);
    box-shadow: var(--shadow-panel);
    backdrop-filter: blur(12px);
}

.portal-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--portal-primary) 0%, rgba(66, 108, 212, 0.46) 72%, var(--portal-orange) 100%);
}

.portal-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.portal-section__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.92rem;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--portal-primary-deep);
    border: 1px solid rgba(37, 119, 218, 0.14);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-section__title {
    margin: 0.9rem 0 0.35rem;
    font-size: clamp(1.45rem, 2vw, 2.1rem);
    line-height: 1.15;
    color: var(--text-strong);
}

.portal-section__desc {
    margin: 0;
    max-width: 56ch;
    color: var(--text-soft);
    font-size: 1.02rem;
}

.portal-stat {
    min-width: 10rem;
    padding: 1rem 1.1rem;
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(233, 242, 255, 0.96), rgba(245, 249, 255, 0.88));
    border: 1px solid rgba(45, 112, 213, 0.14);
    text-align: right;
}

.portal-stat__label,
.portal-stat__hint {
    display: block;
}

.portal-stat__label {
    color: var(--text-soft);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-stat__value {
    display: block;
    margin: 0.18rem 0;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-strong);
}

.portal-stat__hint {
    color: var(--portal-primary-deep);
    font-size: 0.92rem;
    font-weight: 700;
}

.portal-table-desktop {
    display: block;
}

.portal-mobile-stack {
    display: none;
}

.result-year-accordion {
    display: grid;
    gap: 0.95rem;
}

.result-year-panel {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 1.2rem;
    background: linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
    box-shadow: var(--shadow-soft);
}

.result-year-panel[open] {
    background: var(--surface-strong);
}

.result-year-panel__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 5rem;
    padding: 1rem 1.1rem;
    color: var(--text-strong);
    list-style: none;
    cursor: pointer;
}

.result-year-panel__summary::-webkit-details-marker {
    display: none;
}

.result-year-panel__main,
.result-year-panel__meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.result-year-panel__main {
    min-width: 0;
}

.result-year-panel__label {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.result-year-panel__year {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 800;
    line-height: 1;
}

.result-year-panel__count,
.result-year-panel__hint,
.result-year-panel__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
}

.result-year-panel__count {
    color: var(--portal-primary-deep);
    background: rgba(37, 119, 218, 0.1);
}

.result-year-panel__hint {
    min-width: 4.1rem;
    color: #ffffff;
    background: var(--portal-primary);
}

.result-year-panel__hint-close,
.result-year-panel[open] .result-year-panel__hint-open {
    display: none;
}

.result-year-panel[open] .result-year-panel__hint-close {
    display: inline;
}

.result-year-panel__badge {
    color: #10663e;
    background: rgba(31, 141, 89, 0.14);
}

.result-year-panel__badge--current {
    color: #9b4d0a;
    background: rgba(239, 147, 24, 0.16);
}

.result-year-panel__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    flex: 0 0 auto;
    border-radius: 999px;
    color: var(--portal-primary-deep);
    background: rgba(37, 119, 218, 0.1);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.result-year-panel__chevron svg {
    width: 1.15rem;
    height: 1.15rem;
}

.result-year-panel__chevron path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.result-year-panel[open] .result-year-panel__chevron {
    transform: rotate(180deg);
    background: rgba(37, 119, 218, 0.16);
}

.result-year-panel__body {
    padding: 0 1.1rem 1.1rem;
}

.result-year-panel__body .portal-table-shell {
    border-radius: 1rem;
}

.portal-table-shell {
    overflow: auto;
    border: 1px solid var(--line-soft);
    border-radius: 1.25rem;
    background: var(--surface-strong);
}

.portal-table {
    width: 100%;
    min-width: 860px;
    border-collapse: separate;
    border-spacing: 0;
}

.portal-table thead th {
    padding: 1rem 1.15rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    background:  #1f74d5 ;
}

.portal-table thead th:first-child {
    border-top-left-radius: 1.15rem;
}

.portal-table thead th:last-child {
    border-top-right-radius: 1.15rem;
}

.portal-table tbody td {
    padding: 1.05rem 1.15rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--line-soft);
    background: var(--surface-strong);
}

.portal-table tbody tr:last-child td {
    border-bottom: 0;
}

.portal-table tbody tr:hover td {
    background: var(--surface-soft);
}

.portal-table__exam {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.portal-table__exam strong,
.portal-mini-card__title,
.portal-info-card__title {
    display: block;
    color: var(--text-strong);
    font-size: 1.05rem;
}

.portal-table__exam span:last-child {
    display: block;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.portal-table__date {
    color: var(--text-strong);
    font-weight: 700;
}

.portal-table__time {
    color: var(--portal-primary-deep);
    font-size: 0.92rem;
}

.portal-table__action {
    width: 1%;
    white-space: nowrap;
}

.wing-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.15rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wing-pill--hse {
    color: #10663e;
    background: rgba(31, 141, 89, 0.14);
}

.wing-pill--vhse {
    color: #9b4d0a;
    background: rgba(239, 147, 24, 0.16);
}

.wing-pill--general {
    color: #1e4fa6;
    background: rgba(37, 119, 218, 0.12);
}

.portal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3.2rem;
    padding: 0.85rem 1.35rem;
    border-radius: 1rem;
    border: 0;
    appearance: none;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.portal-button:hover {
    transform: translateY(-1px);
}

.portal-button--primary {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: var(--button-gradient);
    box-shadow: var(--button-shadow);
}

.portal-button--secondary {
    border: 1px solid rgba(37, 119, 218, 0.34);
    color: var(--portal-primary-deep);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.portal-button--secondary:hover {
    background: rgba(37, 119, 218, 0.08);
    border-color: rgba(37, 119, 218, 0.48);
}

.portal-button--block {
    width: 100%;
}

.portal-button--compact {
    min-height: auto;
    padding: 0.8rem 1.1rem;
    white-space: nowrap;
}

.portal-mini-card {
    padding: 1.2rem;
    border-radius: 1.2rem;
    border: 1px solid var(--line-soft);
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
}

.portal-mini-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
}

.portal-mini-card__age {
    color: var(--portal-primary-deep);
    font-weight: 700;
}

.portal-mini-card__meta {
    margin: 0.35rem 0 1rem;
    color: var(--text-soft);
}

.portal-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.portal-info-card {
    padding: 1.25rem;
    border-radius: 1.2rem;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
    box-shadow: var(--shadow-soft);
}

.portal-info-card__label {
    display: inline-flex;
    margin-bottom: 0.75rem;
    color: var(--portal-primary-deep);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-info-card__date {
    margin: 0.35rem 0 0;
    color: var(--text-strong);
    font-weight: 700;
}

.portal-info-card__hint {
    margin: 0.35rem 0 0;
    color: var(--portal-orange);
    font-weight: 700;
}

.portal-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 7rem;
    padding: 1.3rem;
    border-radius: 1.2rem;
    border: 1px dashed rgba(37, 119, 218, 0.28);
    background: rgba(243, 247, 255, 0.9);
    color: var(--portal-primary-deep);
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
}

.portal-panel--form {
    max-width: 880px;
    margin: 0 auto;
}

.result-check-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.portal-field {
    display: grid;
    gap: 0.48rem;
}

.portal-field--full {
    grid-column: 1 / -1;
}

.portal-label {
    color: var(--text-strong);
    font-size: 0.98rem;
    font-weight: 700;
}

.portal-help {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.portal-body input[type="text"],
.portal-body input[type="date"],
.portal-body input[type="number"],
.portal-body input[type="search"],
.portal-body select,
.portal-body textarea,
.portal-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.95rem 1rem;
    border: 1px solid var(--line-soft);
    border-radius: 1rem;
    background: var(--surface-strong);
    color: var(--text-strong);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.portal-body input::placeholder,
.portal-body textarea::placeholder {
    color: var(--text-soft);
}

.portal-body input[type="text"]:focus,
.portal-body input[type="date"]:focus,
.portal-body input[type="number"]:focus,
.portal-body input[type="search"]:focus,
.portal-body select:focus,
.portal-body textarea:focus,
.portal-input:focus {
    outline: none;
    border-color: rgba(37, 119, 218, 0.48);
    box-shadow: 0 0 0 4px rgba(37, 119, 218, 0.14);
}

.portal-body input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.7;
}

.captcha-box {
    display: grid;
    grid-template-columns: minmax(10rem, 0.46fr) auto minmax(0, 1.28fr);
    gap: 0.8rem;
    align-items: stretch;
}

.captcha-box__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4rem;
    /* padding: 0.65rem 1rem; */
    border-radius: 1rem;
    border: 1px solid var(--line-soft);
    background: var(--surface-soft);
}

.captcha-box__preview img {
    width: auto;
    /* max-height: 42px; */
}

.captcha-box__refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 4rem;
    padding: 0 1.15rem;
    border-radius: 1rem;
    border: 1px solid var(--line-soft);
    background: var(--surface-strong);
    color: var(--portal-primary-deep);
    font-weight: 700;
}

.captcha-box__input {
    min-width: 0;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1.35rem;
}

.form-actions--single {
    margin-top: 1rem;
}

.portal-note {
    margin-top: 1.25rem;
    padding: 1.1rem 1.15rem;
    border-radius: 1.1rem;
    border: 1px solid var(--line-soft);
    background: var(--surface-soft);
}

.portal-note strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-strong);
}

.portal-note p {
    margin: 0.15rem 0 0;
    color: var(--text-base);
}

.portal-note--warning {
    border-color: rgba(239, 147, 24, 0.22);
    background: rgba(255, 247, 230, 0.82);
}

.portal-footer {
    margin-top: 3rem;
    border-top: 1px solid var(--line-soft);
    background: rgba(236, 243, 255, 0.82);
    backdrop-filter: blur(10px);
}

.portal-footer__grid {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    padding: 1.85rem 1rem 1.25rem;
}

.portal-footer__title {
    margin: 0;
    color: var(--text-strong);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portal-footer__list {
    margin: 0.85rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.portal-footer__text {
    margin: 0.85rem 0 0;
    color: var(--text-base);
}

.portal-footer__text + .portal-footer__text {
    margin-top: 0.2rem;
}

.portal-footer__link {
    color: var(--text-base);
    transition: color 0.2s ease;
}

.portal-footer__link:hover {
    color: var(--portal-primary-deep);
}

.portal-footer__meta {
    border-top: 1px solid var(--line-soft);
    padding: 1rem;
    text-align: center;
    color: var(--text-soft);
    font-size: 0.88rem;
}

.portal-footer__meta p {
    margin: 0.15rem 0;
}

.portal-footer__runtime {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    color: var(--text-base);
}

html.theme-dark .jGrowl .jGrowl-notification,
html[data-theme="dark"] .jGrowl .jGrowl-notification {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(13, 24, 42, 0.96);
    color: #e5eefc;
    box-shadow: 0 18px 42px rgba(1, 7, 18, 0.42);
}

html.theme-dark .jGrowl .jGrowl-notification.jgrowl-info,
html[data-theme="dark"] .jGrowl .jGrowl-notification.jgrowl-info {
    border-color: rgba(98, 155, 235, 0.28);
    background: rgba(14, 35, 66, 0.96);
    color: #c5deff;
}

html.theme-dark .jGrowl .jGrowl-notification.jgrowl-success,
html[data-theme="dark"] .jGrowl .jGrowl-notification.jgrowl-success {
    border-color: rgba(57, 163, 104, 0.28);
    background: rgba(12, 42, 28, 0.96);
    color: #bbf7d0;
}

html.theme-dark .jGrowl .jGrowl-notification.jgrowl-warning,
html[data-theme="dark"] .jGrowl .jGrowl-notification.jgrowl-warning {
    border-color: rgba(239, 147, 24, 0.28);
    background: rgba(64, 38, 6, 0.96);
    color: #fde68a;
}

html.theme-dark .jGrowl .jGrowl-notification.jgrowl-danger,
html[data-theme="dark"] .jGrowl .jGrowl-notification.jgrowl-danger {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(72, 19, 19, 0.96);
    color: #fecaca;
}

html.theme-dark .error-card,
html[data-theme="dark"] .error-card {
    border-color: rgba(98, 155, 235, 0.18);
    background:
        linear-gradient(160deg, rgba(14, 27, 49, 0.98) 0%, rgba(12, 25, 45, 0.98) 54%, rgba(13, 22, 37, 0.98) 100%);
    box-shadow: 0 38px 90px -52px rgba(0, 0, 0, 0.85);
}

html.theme-dark .error-card__orb-ring,
html[data-theme="dark"] .error-card__orb-ring {
    background: radial-gradient(circle at 30% 30%, rgba(35, 67, 112, 0.95), rgba(17, 31, 55, 0.96) 72%, rgba(10, 16, 29, 0.9));
    box-shadow: inset 0 0 0 1px rgba(111, 168, 245, 0.14);
}

html.theme-dark .error-card__code,
html[data-theme="dark"] .error-card__code {
    background: rgba(37, 119, 218, 0.14);
    color: #c5deff;
}

html.theme-dark .error-card__status,
html[data-theme="dark"] .error-card__status {
    background: rgba(10, 19, 34, 0.9);
    border-color: rgba(98, 155, 235, 0.14);
    color: #9eb5d4;
}

html.theme-dark .error-card__hint,
html[data-theme="dark"] .error-card__hint {
    color: #9eb5d4;
}

@media (max-width: 640px) {
    .error-shell {
        padding-top: 0.4rem;
    }

    .error-card {
        padding: 1.8rem 1.2rem 1.5rem;
        border-radius: 1.5rem;
    }

    .error-card__message {
        font-size: 1.03rem;
    }

    .error-card__status {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        border-radius: 1rem;
    }

    .error-card__actions {
        flex-direction: column;
    }

    .error-card__button {
        width: 100%;
        min-width: 0;
    }
}

html.theme-dark .portal-stat,
html[data-theme="dark"] .portal-stat {
    background: linear-gradient(180deg, rgba(17, 33, 58, 0.92), rgba(12, 23, 40, 0.94));
    border-color: rgba(97, 142, 220, 0.22);
}

html.theme-dark .portal-stat__hint,
html[data-theme="dark"] .portal-stat__hint,
html.theme-dark .portal-table__time,
html[data-theme="dark"] .portal-table__time,
html.theme-dark .portal-mini-card__age,
html[data-theme="dark"] .portal-mini-card__age,
html.theme-dark .portal-info-card__label,
html[data-theme="dark"] .portal-info-card__label {
    color: #8fc8ff;
}

html.theme-dark .result-year-panel,
html[data-theme="dark"] .result-year-panel {
    background: linear-gradient(180deg, rgba(16, 27, 48, 0.98), rgba(18, 35, 63, 0.92));
}

html.theme-dark .result-year-panel[open],
html[data-theme="dark"] .result-year-panel[open] {
    background: var(--surface-strong);
}

html.theme-dark .result-year-panel__count,
html[data-theme="dark"] .result-year-panel__count,
html.theme-dark .result-year-panel__chevron,
html[data-theme="dark"] .result-year-panel__chevron {
    color: #8fc8ff;
    background: rgba(143, 200, 255, 0.12);
}

html.theme-dark .portal-button--secondary,
html[data-theme="dark"] .portal-button--secondary {
    color: #dbe7ff;
    background: rgba(16, 27, 48, 0.18);
    border-color: rgba(98, 155, 235, 0.42);
    box-shadow: inset 0 0 0 1px rgba(143, 200, 255, 0.12);
}

html.theme-dark .portal-button--secondary:hover,
html[data-theme="dark"] .portal-button--secondary:hover {
    background: rgba(98, 155, 235, 0.12);
    border-color: rgba(143, 200, 255, 0.58);
}

html.theme-dark .portal-empty-state,
html[data-theme="dark"] .portal-empty-state {
    background: rgba(18, 35, 63, 0.58);
    border-color: rgba(98, 155, 235, 0.3);
    color: #dbe7ff;
}

html.theme-dark .portal-note--warning,
html[data-theme="dark"] .portal-note--warning {
    background: rgba(88, 53, 6, 0.44);
    border-color: rgba(239, 147, 24, 0.26);
}

html.theme-dark .portal-footer,
html[data-theme="dark"] .portal-footer {
    background: rgba(11, 22, 41, 0.9);
}

html.theme-dark .table-striped tbody tr:nth-child(odd) td,
html[data-theme="dark"] .table-striped tbody tr:nth-child(odd) td {
    background: rgba(18, 35, 63, 0.76);
}

html.theme-dark .portal-body input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] .portal-body input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-end {
    text-align: right;
}

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

.table,
.xxtable-bordered,
.btbl,
#Table2,
#Table3,
#Table4,
#Table5 {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    margin-bottom: 0;
    font-size: 0.88rem;
    line-height: 1.35;
}

.table td,
.table th,
.xxtable-bordered td,
.xxtable-bordered th,
.btbl td,
.btbl th,
#Table2 td,
#Table2 th,
#Table3 td,
#Table3 th,
#Table4 td,
#Table4 th,
#Table5 td,
#Table5 th {
    padding: 0.4rem;
    border: 1px solid var(--line-soft);
    background: var(--surface-strong);
    color: var(--text-strong);
    vertical-align: middle;
}

.table-hover tbody tr:hover td {
    background: var(--surface-soft);
}

.table-striped tbody tr:nth-child(odd) td {
    background: rgba(234, 241, 255, 0.72);
}

.table-secondary,
.table-info,
.table-warning,
.mark2,
.hdg1,
.hdgnew,
.hdg,
.hdgnew2,
.tbr {
    background: rgba(219, 231, 250, 0.9) !important;
    color: var(--text-strong) !important;
    font-weight: 700;
}

.mark,
.mak {
    background: var(--surface-strong) !important;
    color: var(--text-strong) !important;
}

@media (max-width: 959px) {
    .portal-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .portal-header {
        padding-bottom: 7.2rem;
    }

    .portal-header::after {
        left: -22%;
        right: -22%;
        bottom: -5.7rem;
        height: 10.5rem;
    }

    .portal-header__inner,
    .portal-section-heading,
    .portal-brand {
        flex-direction: column;
    }

    .portal-header__inner,
    .portal-brand {
        align-items: center;
    }

    .portal-header__inner {
        width: min(100%, 24rem);
        padding-right: 0;
        gap: 0.85rem;
    }

    .portal-brand {
        margin: 0 auto;
        width: 100%;
        max-width: 22rem;
        text-align: center;
    }

    .portal-brand__logo {
        margin: 0 auto;
    }

    .portal-brand__content {
        padding-top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .theme-toggle-wrap {
        position: static;
        order: -1;
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .theme-toggle {
        padding: 0.65rem;
    }

    .portal-brand__eyebrow,
    .portal-brand__title,
    .portal-brand__subtitle {
        text-align: center;
    }

    .portal-brand__subtitle {
        max-width: 28ch;
    }

    .portal-brand__title {
        font-size: 1.9rem;
    }

    .portal-brand__subtitle {
        font-size: 1rem;
    }

    .portal-main {
        margin-top: -3rem;
    }

    .portal-panel {
        padding: 1.2rem;
        border-radius: 1.35rem;
    }

    .portal-stat {
        width: 100%;
        text-align: left;
    }

    .result-year-panel__summary,
    .result-year-panel__main,
    .result-year-panel__meta {
        align-items: flex-start;
    }

    .result-year-panel__summary {
        flex-direction: column;
        padding: 1rem;
    }

    .result-year-panel__main {
        flex-direction: column;
        gap: 0.25rem;
    }

    .result-year-panel__meta {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.55rem;
    }

    .result-year-panel__count {
        order: -1;
    }

    .result-year-panel__hint {
        margin-left: auto;
    }

    .result-year-panel__body {
        padding: 0 1rem 1rem;
    }

    .portal-table-desktop {
        display: none;
    }

    .portal-mobile-stack {
        display: grid;
        gap: 1rem;
    }

    .portal-card-grid,
    .result-check-form__grid,
    .portal-footer__grid {
        grid-template-columns: 1fr;
    }

    .captcha-box {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .captcha-box__input {
        grid-column: 1 / -1;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .portal-button {
        width: 100%;
        max-width: 100%;
    }

    .captcha-box__refresh {
        min-height: 3.25rem;
        min-width: 7.25rem;
        padding: 0 0.95rem;
        white-space: nowrap;
    }
}

@media (min-width: 1024px) {
    html {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
