/**
 * TICH in Africa - Platform Design System
 * Brand colours, typography, components, and icon rules.
 */

/* ??? Brand tokens ??????????????????????????????????????????????????????? */

:root {
    /* Primary palette */
    --tich-green: #6cab33;
    --tich-blue: #1669a6;
    --tich-grey: #494c50;
    --tich-white: #ffffff;

    /* Derived tones */
    --tich-green-dark: #5a9430;
    --tich-green-light: #e8f3dc;
    --tich-blue-dark: #125a8c;
    --tich-blue-light: #d6e8f5;
    --tich-neutral: #f5f6f6;
    --tich-neutral-border: #e2e4e5;
    --tich-neutral-muted: #6b6e72;

    /* Typography families */
    --font-heading: "Times New Roman", Times, serif;
    --font-body: Merriweather, Georgia, serif;
    --font-ui: Arial, Calibri, ui-sans-serif, sans-serif;

    /* Type scale */
    --text-h1: 2.75rem;   /* 44px */
    --text-h2: 2rem;      /* 32px */
    --text-h3: 1.375rem;  /* 22px */
    --text-body: 0.875rem; /* 14px */
    --text-caption: 0.625rem; /* 10px */

    /* Spacing & layout */
    --container-max: 80rem;
    --tich-header-height: 4rem;
    --tich-header-bar-height: 4rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    /* Icon stroke (flat line icons) */
    --icon-stroke: 1.5;

    /* Semantic surfaces & feedback */
    --tich-on-brand: #ffffff;
    --tich-error: #c53030;
    --tich-error-bg: #fef2f2;
    --tich-error-border: #fca5a5;
    --tich-error-text: #991b1b;
    --tich-notice-warning-bg: #fff8e6;
    --tich-notice-warning-border: #f0d48a;
    --tich-notice-info-bg: #f8fafc;
    --tich-notice-info-border: #e2e8f0;
    --tich-focus-ring: rgba(22, 105, 166, 0.15);

    /* Status tones (badges) - light mode */
    --tich-status-success-bg: #dcfce7;
    --tich-status-success-text: #166534;
    --tich-status-success-border: #86efac;
    --tich-status-danger-bg: #fee2e2;
    --tich-status-danger-text: #991b1b;
    --tich-status-danger-border: #fca5a5;
    --tich-status-warning-bg: #ffedd5;
    --tich-status-warning-text: #9a3412;
    --tich-status-warning-border: #fdba74;
    --tich-status-caution-bg: #fef9c3;
    --tich-status-caution-text: #854d0e;
    --tich-status-caution-border: #fde047;
    --tich-status-info-bg: #dbeafe;
    --tich-status-info-text: #1e40af;
    --tich-status-info-border: #93c5fd;
    --tich-status-neutral-bg: #e2e8f0;
    --tich-status-neutral-text: #475569;
    --tich-status-neutral-border: #cbd5e1;

    /* Semantic aliases (modals, elevated surfaces) */
    --tich-surface: var(--tich-white);
    --tich-surface-muted: #f8fafc;
    --tich-text: var(--tich-grey);
    --tich-border: var(--tich-neutral-border);
}

/* ??? Base ??????????????????????????????????????????????????????????????? */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

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

body.tich-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--tich-grey);
    background-color: var(--tich-neutral);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#main-content:has(.tich-admin) {
    margin: 0;
    padding: 0;
}

/* ??? Typography ??????????????????????????????????????????????????????? */

.tich-h1,
h1.tich-h1 {
    font-family: var(--font-heading);
    font-size: var(--text-h1);
    font-weight: 700;
    line-height: 1.2;
    color: var(--tich-green);
    margin: 0 0 0.75rem;
    text-transform: none;
}

.tich-h2,
h2.tich-h2 {
    font-family: var(--font-heading);
    font-size: var(--text-h2);
    font-weight: 600;
    line-height: 1.25;
    color: var(--tich-grey);
    margin: 0 0 0.5rem;
    text-transform: none;
}

.tich-h3,
h3.tich-h3 {
    font-family: var(--font-heading);
    font-size: var(--text-h3);
    font-weight: 600;
    line-height: 1.3;
    color: var(--tich-blue);
    margin: 0 0 0.5rem;
    text-transform: none;
}

.tich-text {
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--tich-grey);
    line-height: 1.6;
}

.tich-text--secondary {
    color: var(--tich-neutral-muted, #6b7280);
}

.tich-caption {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    color: var(--tich-blue);
    line-height: 1.4;
}

.tich-label {
    font-family: var(--font-ui);
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--tich-grey);
}

/* ??? Links ???????????????????????????????????????????????????????????? */

.tich-link {
    color: var(--tich-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.tich-link:hover {
    color: var(--tich-blue-dark);
    text-decoration: underline;
}

/* ??? Buttons ?????????????????????????????????????????????????????????? */

.tich-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: var(--font-ui);
    font-size: var(--text-body);
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tich-btn-primary {
    background-color: var(--tich-green);
    color: var(--tich-on-brand);
    border-color: var(--tich-green);
}

.tich-btn-primary:hover {
    background-color: var(--tich-green-dark);
    border-color: var(--tich-green-dark);
    color: var(--tich-on-brand);
}

.tich-btn-secondary {
    background-color: var(--tich-white);
    color: var(--tich-blue);
    border-color: var(--tich-blue);
}

.tich-btn-secondary:hover {
    background-color: var(--tich-blue-light);
}

.tich-btn-blue {
    background-color: var(--tich-blue);
    color: var(--tich-on-brand);
    border-color: var(--tich-blue);
}

.tich-btn-blue:hover {
    background-color: var(--tich-blue-dark);
    border-color: var(--tich-blue-dark);
    color: var(--tich-on-brand);
}

.tich-btn-success {
    background-color: #059669;
    color: white;
    border-color: #059669;
}

.tich-btn-success:hover {
    background-color: #047857;
    border-color: #047857;
}

.tich-btn-danger {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
}

.tich-btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

.tich-btn-ghost {
    background-color: transparent;
    color: var(--tich-grey);
    border-color: var(--tich-neutral-border);
}

.tich-btn-ghost:hover {
    background-color: var(--tich-white);
    border-color: var(--tich-grey);
}

.tich-btn-outline-white {
    background-color: transparent;
    color: var(--tich-white);
    border-color: rgba(255, 255, 255, 0.5);
}

.tich-btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.tich-btn-block {
    width: 100%;
}

/* ??? Forms ???????????????????????????????????????????????????????????? */

.tich-form-group {
    margin-bottom: 1rem;
}

.tich-form-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tich-form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.tich-form-grid {
    display: grid;
    gap: 1rem;
}

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

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

.tich-lesson-plan-grid-wrap {
    overflow-x: auto;
}

.tich-lesson-plan-grid {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
}

.tich-lesson-plan-grid th,
.tich-lesson-plan-grid td {
    border: 1px solid var(--tich-neutral-border);
    padding: 0.5rem;
    vertical-align: top;
}

.tich-lesson-plan-grid th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--tich-neutral-surface-alt, #f8fafc);
}

.tich-lesson-plan-grid__input {
    width: 100%;
    min-height: 4rem;
    padding: 0.5rem 0.625rem;
    font-family: var(--font-ui);
    font-size: var(--text-body);
    color: var(--tich-grey);
    background: var(--tich-white);
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    resize: vertical;
}

.tich-lesson-plan-grid__actions {
    width: 5rem;
    white-space: nowrap;
}

[data-theme="dark"] .tich-lesson-plan-grid th {
    background: var(--tich-neutral-surface-alt, #1e293b);
}

[data-theme="dark"] .tich-lesson-plan-grid__input {
    background: var(--tich-neutral-surface, #0f172a);
    color: var(--tich-text, #e2e8f0);
    border-color: var(--tich-neutral-border, #334155);
}

.tich-lesson-plan-verify {
    background: var(--tich-surface-muted, #f8fafc);
    border-color: var(--tich-primary, #2563eb);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--tich-primary, #2563eb) 35%, transparent);
}

.tich-lesson-plan-verify .tich-h3,
.tich-lesson-plan-verify .tich-text {
    color: var(--tich-grey);
}

.tich-lesson-plan-verify .tich-caption {
    color: var(--tich-neutral-muted);
}

[data-theme="dark"] .tich-lesson-plan-verify {
    background: var(--tich-surface-muted);
    border-color: var(--tich-green);
    box-shadow: 0 0 0 1px rgba(108, 171, 51, 0.45);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--tich-green) 45%, transparent);
}

[data-theme="dark"] .tich-lesson-plan-verify .tich-h3,
[data-theme="dark"] .tich-lesson-plan-verify .tich-text {
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-lesson-plan-verify .tich-caption {
    color: var(--tich-neutral-muted);
}

.tich-input,
.tich-select {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    font-family: var(--font-ui);
    font-size: var(--text-body);
    color: var(--tich-grey);
    background-color: var(--tich-white);
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tich-input::placeholder {
    color: var(--tich-neutral-muted);
}

.tich-input:focus,
.tich-select:focus {
    outline: none;
    border-color: var(--tich-blue);
    box-shadow: 0 0 0 3px var(--tich-focus-ring);
}

.tich-input--error {
    border-color: var(--tich-error);
}

.tich-password-field {
    position: relative;
}

.tich-password-field__input {
    padding-right: 2.75rem;
}

.tich-password-field__toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    color: var(--tich-neutral-muted);
    background: none;
    border: none;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.15s ease;
}

.tich-password-field__toggle:hover {
    color: var(--tich-grey);
}

.tich-password-field__toggle:focus-visible {
    outline: 2px solid var(--tich-blue);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.tich-password-field__icon--hide {
    display: none;
}

.tich-password-field__toggle[aria-pressed="true"] .tich-password-field__icon--show {
    display: none;
}

.tich-password-field__toggle[aria-pressed="true"] .tich-password-field__icon--hide {
    display: block;
}

.tich-input--code {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.3em;
}

select.tich-input,
select.tich-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
    line-height: 1.4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23494c50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

select.tich-input option,
select.tich-select option {
    padding: 0.5rem 0.75rem;
    font-family: var(--font-ui);
    font-size: var(--text-body);
    color: var(--tich-grey);
    background: var(--tich-white);
}

select.tich-input option:checked,
select.tich-select option:checked {
    background: var(--tich-green-light);
    color: var(--tich-green-dark);
    font-weight: 600;
}

select.tich-input optgroup,
select.tich-select optgroup {
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tich-neutral-muted);
}

/* Custom dropdown (enhanced selects) */
.tich-dropdown {
    position: relative;
    display: block;
    width: 100%;
}

.tich-dropdown__native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    background: none !important;
    background-image: none !important;
}

.tich-dropdown__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.625rem;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-ui);
    font-size: var(--text-body);
    color: var(--tich-grey);
    background: var(--tich-white);
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    box-shadow: 0 1px 2px rgba(73, 76, 80, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.tich-dropdown__trigger:hover {
    border-color: #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, var(--tich-neutral) 100%);
}

.tich-dropdown.is-open .tich-dropdown__trigger,
.tich-dropdown__trigger:focus-visible {
    outline: none;
    border-color: var(--tich-blue);
    box-shadow: 0 0 0 3px var(--tich-focus-ring);
}

.tich-dropdown.is-error .tich-dropdown__trigger {
    border-color: var(--tich-error);
}

.tich-dropdown.is-disabled .tich-dropdown__trigger {
    opacity: 0.65;
    cursor: not-allowed;
    background: var(--tich-neutral);
}

.tich-dropdown__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tich-dropdown__label.is-placeholder {
    color: var(--tich-neutral-muted);
}

.tich-dropdown__chevron {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    color: var(--tich-neutral-muted);
    transition: transform 0.2s ease, color 0.15s ease;
}

.tich-dropdown.is-open .tich-dropdown__chevron {
    transform: rotate(180deg);
    color: var(--tich-blue);
}

.tich-dropdown__menu {
    position: absolute;
    z-index: 120;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.35rem;
    background: var(--tich-white);
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    box-shadow:
        0 16px 32px rgba(73, 76, 80, 0.12),
        0 4px 10px rgba(73, 76, 80, 0.06);
    scrollbar-width: thin;
    scrollbar-color: var(--tich-neutral-border) transparent;
}

.tich-dropdown__search {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: -0.35rem -0.35rem 0.35rem;
    padding: 0.4rem;
    background: var(--tich-white);
    border-bottom: 1px solid var(--tich-neutral-border);
}

.tich-dropdown__search-input {
    width: 100%;
    min-height: 2.1rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.8125rem;
}

.tich-dropdown__options {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.tich-dropdown__empty {
    padding: 0.65rem 0.75rem;
    color: var(--tich-neutral-muted);
    font-size: 0.8125rem;
}

.tich-dropdown__menu[hidden] {
    display: none !important;
}

.tich-dropdown__menu::-webkit-scrollbar {
    width: 0.45rem;
}

.tich-dropdown__menu::-webkit-scrollbar-thumb {
    background: var(--tich-neutral-border);
    border-radius: 999px;
}

.tich-dropdown__group-label {
    padding: 0.55rem 0.75rem 0.2rem;
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--tich-neutral-muted);
}

.tich-dropdown__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: none;
    border-radius: calc(var(--radius-md) - 2px);
    background: transparent;
    font-family: var(--font-ui);
    font-size: var(--text-body);
    color: var(--tich-grey);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.tich-dropdown__option-text {
    flex: 1;
    min-width: 0;
}

.tich-dropdown__option:hover,
.tich-dropdown__option:focus-visible {
    background: var(--tich-blue-light);
    color: var(--tich-blue-dark);
    outline: none;
}

.tich-dropdown__option.is-selected {
    background: var(--tich-green-light);
    color: var(--tich-green-dark);
    font-weight: 600;
}

.tich-dropdown__option.is-selected:hover,
.tich-dropdown__option.is-selected:focus-visible {
    background: #dceec8;
    color: var(--tich-green-dark);
}

.tich-dropdown__option.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tich-dropdown__check {
    flex-shrink: 0;
    width: 0.875rem;
    height: 0.875rem;
    opacity: 0;
    color: var(--tich-green-dark);
}

.tich-dropdown__option.is-selected .tich-dropdown__check {
    opacity: 1;
}

select.tich-input:disabled,
select.tich-select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

select.tich-input:focus,
select.tich-select:focus {
    outline: none;
    border-color: var(--tich-blue);
    box-shadow: 0 0 0 3px var(--tich-focus-ring);
}

.tich-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: var(--tich-blue);
}

.tich-field-error {
    margin-top: 0.375rem;
    font-family: var(--font-ui);
    font-size: var(--text-body);
    color: var(--tich-error);
}

/* ??? Alerts ??????????????????????????????????????????????????????????? */

.tich-alert {
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-ui);
    font-size: var(--text-body);
    border-radius: var(--radius-md);
    border: 1px solid;
}

.tich-alert--success {
    background-color: var(--tich-green-light);
    border-color: var(--tich-green);
    color: var(--tich-green-dark);
}

.tich-alert--error {
    background-color: var(--tich-error-bg);
    border-color: var(--tich-error-border);
    color: var(--tich-error-text);
}

.tich-toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(24rem, calc(100vw - 2rem));
    pointer-events: none;
}

.tich-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid;
    border-left-width: 4px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    line-height: 1.45;
    animation: tich-toast-in 0.28s ease;
}

.tich-toast--success {
    border-color: var(--tich-green);
    border-left-color: var(--tich-green);
    background: #f0fdf4;
    color: #166534;
}

.tich-toast--warning {
    border-color: #d97706;
    border-left-color: #d97706;
    background: #fffbeb;
    color: #92400e;
}

.tich-toast--error {
    border-color: var(--tich-error-border);
    border-left-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

.tich-toast__content {
    flex: 1;
    min-width: 0;
}

.tich-toast__message,
.tich-toast__title {
    margin: 0;
    font-weight: 600;
}

.tich-toast__detail {
    margin: 0.35rem 0 0;
    font-weight: 400;
    font-size: 0.875rem;
    opacity: 0.92;
}

.tich-toast__link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.tich-toast__link:hover {
    opacity: 0.85;
}

.tich-toast__list {
    margin: 0.5rem 0 0;
    padding-left: 1.15rem;
}

.tich-toast__list li + li {
    margin-top: 0.25rem;
}

.tich-toast__close {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.tich-toast__close:hover {
    opacity: 1;
    background: rgba(15, 23, 42, 0.08);
}

.tich-toast.is-leaving {
    animation: tich-toast-out 0.22s ease forwards;
}

@keyframes tich-toast-in {
    from {
        opacity: 0;
        transform: translateY(0.75rem) scale(0.98);
    }

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

@keyframes tich-toast-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(0.5rem) scale(0.98);
    }
}

.tich-notice {
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid;
}

.tich-notice--warning {
    background: var(--tich-notice-warning-bg);
    border-color: var(--tich-notice-warning-border);
}

.tich-notice--info {
    background: var(--tich-notice-info-bg);
    border-color: var(--tich-notice-info-border);
}

.tich-notice__code {
    font-family: ui-monospace, monospace;
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    font-weight: 600;
}

.tich-inset-panel {
    padding: 1rem;
    border: 1px solid var(--tich-border);
    border-radius: var(--radius-md);
    background: var(--tich-surface-muted);
}

.tich-period-dates-block {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--tich-border);
}

.tich-period-dates-block:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tich-period-dates-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(10rem, 1fr));
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 0.75rem;
}

.tich-period-dates-grid .tich-form-group {
    margin-bottom: 0;
}

.tich-period-dates-grid .tich-label {
    display: block;
}

@media (max-width: 640px) {
    .tich-period-dates-grid {
        grid-template-columns: 1fr;
    }
}

.tich-semester-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.tich-semester-list__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--tich-border);
    border-radius: var(--radius-md);
    background: var(--tich-surface);
}

.tich-semester-list__label {
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--tich-grey);
}

.tich-semester-list__meta {
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--tich-neutral-muted);
}

.tich-semester-picker {
    max-width: 20rem;
}

.tich-semester-units-panel {
    margin-top: 1rem;
}

.tich-semester-units-panel[hidden] {
    display: none;
}

.tich-semester-accordion {
    display: grid;
    gap: 0.75rem;
}

.tich-working-intake {
    border: 1px solid var(--tich-border);
    border-radius: var(--radius-md);
    background: var(--tich-surface);
    padding: 1rem 1.25rem;
}

.tich-working-intake--unset {
    border-color: var(--tich-notice-warning-border);
    background: var(--tich-notice-warning-bg);
}

.tich-working-intake__form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: flex-end;
    justify-content: space-between;
}

.tich-working-intake__copy {
    flex: 1 1 18rem;
    min-width: 0;
}

.tich-working-intake__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.tich-working-intake__controls .tich-form-group,
.tich-working-intake__controls .tich-label {
    margin: 0;
}

.tich-working-intake__controls select {
    min-width: 14rem;
}

.tich-working-intake__warning {
    margin: 0.85rem 0 0;
    color: #92400e;
    font-size: 0.92rem;
}

.tich-semester-accordion__item {
    border: 1px solid var(--tich-border);
    border-radius: var(--radius-md);
    background: var(--tich-surface);
    overflow: hidden;
}

.tich-semester-accordion__item.is-open {
    border-color: var(--tich-blue);
}

.tich-semester-accordion__trigger {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 1rem 1.1rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.tich-semester-accordion__trigger:hover {
    background: var(--tich-surface-muted);
}

.tich-semester-accordion__heading,
.tich-semester-accordion__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
}

.tich-semester-accordion__title {
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--tich-grey);
}

.tich-semester-accordion__meta {
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--tich-neutral-muted);
}

.tich-semester-accordion__chevron {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid var(--tich-neutral-muted);
    border-bottom: 2px solid var(--tich-neutral-muted);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    margin-left: 0.25rem;
}

.tich-semester-accordion__item.is-open .tich-semester-accordion__chevron {
    transform: rotate(-135deg);
}

.tich-semester-accordion__panel {
    padding: 0 1.1rem 1.1rem;
    border-top: 1px solid var(--tich-border);
}

.tich-semester-accordion__panel[hidden] {
    display: none;
}

[data-theme="dark"] .tich-semester-accordion__item.is-open {
    border-color: var(--tich-blue);
}

[data-theme="dark"] .tich-semester-accordion__title {
    color: var(--tich-text);
}

[data-theme="dark"] .tich-semester-list__item {
    background: var(--tich-white);
    border-color: var(--tich-border);
}

[data-theme="dark"] .tich-semester-list__label {
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-semester-list__meta {
    color: var(--tich-neutral-muted);
}

.tich-timetable-grid {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
}

.tich-timetable-grid th,
.tich-timetable-grid td {
    border: 1px solid var(--tich-border);
    padding: 0.65rem 0.75rem;
    vertical-align: top;
}

.tich-timetable-grid th {
    background: var(--tich-surface-muted);
    text-align: left;
    color: var(--tich-neutral-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

[data-theme="dark"] .tich-timetable-grid th,
[data-theme="dark"] .tich-timetable-grid td {
    border-color: var(--tich-border);
    color: var(--tich-text);
}

[data-theme="dark"] .tich-timetable-grid th {
    background: var(--tich-surface-muted);
    color: var(--tich-grey);
}

.tich-timetable-grid__time {
    min-width: 7rem;
    white-space: nowrap;
}

.tich-timetable-grid__break td {
    background: var(--tich-surface-muted);
    text-align: center;
    font-style: italic;
    color: var(--tich-neutral-muted);
}

.tich-timetable-session {
    display: grid;
    gap: 0.15rem;
    padding: 0.45rem 0.55rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.35rem;
    background: var(--tich-blue-light);
    border-left: 3px solid var(--tich-blue);
}

.tich-timetable-session.is-draggable {
    cursor: grab;
    position: relative;
    padding-left: 1.35rem;
}

.tich-timetable-session.is-draggable:active {
    cursor: grabbing;
}

.tich-timetable-session.is-dragging {
    opacity: 0.45;
}

.tich-timetable-session__handle {
    position: absolute;
    left: 0.35rem;
    top: 0.45rem;
    color: var(--tich-neutral-muted);
    font-size: 0.7rem;
    line-height: 1;
    letter-spacing: -0.08em;
    user-select: none;
}

.tich-timetable-session__invigilator-btn {
    display: inline-block;
    margin-top: 0.15rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.6875rem;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.tich-timetable-grid__dropzone.is-drag-over {
    background: var(--tich-blue-light);
    outline: 2px dashed var(--tich-blue);
    outline-offset: -2px;
}

.tich-timetable-grid-wrap.is-saving {
    opacity: 0.85;
    pointer-events: none;
}

.tich-timetable-drag-status {
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.tich-timetable-drag-status.is-success {
    background: #ecfdf5;
    color: #047857;
}

.tich-timetable-drag-status.is-error {
    background: #fef2f2;
    color: #b91c1c;
}

[data-theme="dark"] .tich-timetable-drag-status.is-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

[data-theme="dark"] .tich-timetable-drag-status.is-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.tich-timetable-session.is-exam,
.tich-timetable-session.is-supplementary,
.tich-timetable-session.is-special-exam {
    background: #fef2f2;
    border-left-color: #dc2626;
}

.tich-timetable-session.is-break {
    background: var(--tich-surface-muted);
    border-left-color: var(--tich-neutral-muted);
}

[data-theme="dark"] .tich-timetable-session {
    background: var(--tich-blue-light);
}

[data-theme="dark"] .tich-timetable-session.is-exam,
[data-theme="dark"] .tich-timetable-session.is-supplementary,
[data-theme="dark"] .tich-timetable-session.is-special-exam {
    background: #3f1515;
}

/* ??? Cards ???????????????????????????????????????????????????????????? */

.tich-card {
    background-color: var(--tich-white);
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.15s ease, background-color 0.2s ease;
}

.tich-card:hover {
    border-color: var(--tich-blue);
}

.tich-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    background-color: var(--tich-blue-light);
    color: var(--tich-blue);
}

.tich-card__icon--green {
    background-color: var(--tich-green-light);
    color: var(--tich-green);
}

.tich-card__icon--grey {
    background-color: var(--tich-neutral);
    color: var(--tich-grey);
}

.tich-stat {
    background-color: var(--tich-neutral);
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.tich-stat-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    min-width: 0;
}

.tich-stat-row--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tich-stat-row--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tich-stat-row--7 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.tich-stat-row .tich-stat {
    padding: 0.875rem 0.75rem;
    min-width: 0;
}

.tich-stat-row .tich-stat__label {
    font-size: 0.625rem;
    line-height: 1.3;
}

.tich-stat-row .tich-stat__value {
    font-size: 1rem;
    margin-top: 0.35rem;
}

.tich-stat-row .tich-caption {
    margin-top: 0.25rem;
    line-height: 1.25;
}

.tich-staff-table-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--tich-neutral-border);
    background: var(--tich-surface-muted, #f1f5f9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--tich-blue);
}

.tich-staff-table-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 1200px) {
    .tich-stat-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-gutter: stable;
        padding-bottom: 0.25rem;
    }

    .tich-stat-row .tich-stat {
        flex: 0 0 min(11rem, 28vw);
    }
}

.tich-dashboard-charts {
    gap: 1rem;
}

.tich-dashboard-charts__wide {
    grid-column: 1 / -1;
}

.tich-academics-dashboard__stats.tich-stat-row {
    grid-template-columns: repeat(var(--stats-cols, 7), minmax(0, 1fr));
    gap: 0.75rem;
}

.tich-academics-dashboard__stats .tich-stat {
    min-width: 0;
}

.tich-chart-card__meta {
    margin: 0.35rem 0 0;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--tich-grey);
}

.tich-chart-card__canvas-wrap {
    position: relative;
    height: 18rem;
    margin-top: 1rem;
    width: 100%;
}

.tich-chart-card__canvas-wrap canvas {
    width: 100%;
    height: 100%;
}

.tich-chart-card__canvas-wrap--line {
    height: 13rem;
}

.tich-chart-card__canvas-wrap.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tich-neutral);
    border: 1px dashed var(--tich-neutral-border);
    border-radius: var(--radius-md);
}

.tich-chart-card__empty {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    color: var(--tich-grey);
    text-align: center;
    padding: 0 1rem;
}

/* ??? Layout ??????????????????????????????????????????????????????????? */

.tich-container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .tich-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.tich-header {
    position: sticky;
    top: 0;
    z-index: 50;
    overflow: visible;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    background-color: var(--tich-white);
    border-bottom: 1px solid var(--tich-neutral-border);
    box-shadow: 0 1px 0 rgba(22, 105, 166, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
    transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.tich-header:not(.is-nav-open) > .tich-header__inner,
.tich-header:not(.is-nav-open) > .tich-admin-sidebar-mobile__toggle {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
}

body.tich-body:has(.tich-admin) .tich-header:not(.tich-header--over-hero) {
    box-shadow: none;
}

/* Dashboards / portals: slide header up after idle and free the space */
body.tich-body--autohide-header {
    --tich-header-chrome-height: var(--tich-header-height, 4rem);
    --tich-header-autohide-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --tich-header-autohide-duration: 0.4s;
}

body.tich-body--autohide-header .tich-header:not(.is-nav-open) {
    /* Sticky would pin the bar on-screen and block a real slide-away. */
    position: relative;
    top: auto;
    margin-top: 0;
    transition:
        margin-top var(--tich-header-autohide-duration) var(--tich-header-autohide-ease),
        border-color var(--tich-header-autohide-duration) var(--tich-header-autohide-ease),
        box-shadow var(--tich-header-autohide-duration) var(--tich-header-autohide-ease),
        background-color 0.35s ease;
    will-change: margin-top;
}

/* Pull the bar upward; same property reverses smoothly on slide-in. */
body.tich-body--autohide-header.is-header-idle .tich-header:not(.is-nav-open) {
    margin-top: calc(-1 * var(--tich-header-chrome-height, 4rem));
    pointer-events: none;
    box-shadow: none;
    border-bottom-color: transparent;
}

body.tich-body--autohide-header #main-content {
    transition: height var(--tich-header-autohide-duration) var(--tich-header-autohide-ease);
}

@media (max-width: 1023px) {
    body.tich-body:has(.tich-admin) .tich-header:not(.tich-header--over-hero) {
        border-bottom: 0;
    }
}

/* Transparent header over full-bleed home hero (Animal IQ / Onagi style) */
body.page-home .tich-header--over-hero {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
}

body.page-home .tich-header--over-hero .tich-nav__link,
body.page-home .tich-header--over-hero .tich-nav__action-btn--ghost {
    color: rgba(255, 255, 255, 0.92);
}

body.page-home .tich-header--over-hero .tich-nav__link:hover,
body.page-home .tich-header--over-hero .tich-nav__action-btn--ghost:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

body.page-home .tich-header--over-hero .tich-nav__link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

body.page-home .tich-header--over-hero .tich-nav__link.is-active .tich-nav__icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.page-home .tich-header--over-hero .tich-nav-toggle {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.2);
}

body.page-home .tich-header--over-hero .tich-nav-toggle span {
    background: #ffffff;
}

body.page-home .tich-header--over-hero .tich-nav__action-btn--primary {
    background: var(--tich-green);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

body.page-home .tich-header--over-hero .tich-nav__action-btn--primary:hover {
    background: var(--tich-green-dark);
    border-color: var(--tich-green-dark);
}

body.page-home .tich-header--over-hero .tich-nav__actions {
    border-left-color: rgba(255, 255, 255, 0.2);
}

body.page-home .tich-header--over-hero .tich-nav__more-menu {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

body.page-home .tich-header--over-hero .tich-nav__more-link {
    color: rgba(255, 255, 255, 0.92);
}

body.page-home .tich-header--over-hero .tich-nav__more-link:hover,
body.page-home .tich-header--over-hero .tich-nav__more-link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__more-menu {
    background: var(--tich-white);
    border-color: var(--tich-neutral-border);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__more-link {
    color: var(--tich-grey);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__more-link:hover,
body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__more-link.is-active {
    color: var(--tich-blue);
    background: var(--tich-blue-light);
}

body.page-home .tich-header--over-hero.tich-header--solid {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    /* Keep blur on a pseudo so it does not create a containing block for the mobile drawer */
    background: transparent;
    border-bottom-color: var(--tich-neutral-border);
    box-shadow: 0 1px 0 rgba(22, 105, 166, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
}

body.page-home .tich-header--over-hero.tich-header--solid::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: none;
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-brand__name,
body.page-home .tich-header--over-hero.tich-header--solid .tich-brand__tagline {
    color: var(--tich-grey);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-brand__tagline {
    color: var(--tich-blue);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__link,
body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__action-btn--ghost {
    color: var(--tich-grey);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__link:hover,
body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__action-btn--ghost:hover {
    color: var(--tich-blue);
    background-color: var(--tich-blue-light);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__link.is-active {
    color: var(--tich-blue);
    background: var(--tich-blue-light);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__link.is-active .tich-nav__icon {
    background: var(--tich-blue);
    color: #fff;
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-nav-toggle {
    border-color: var(--tich-neutral-border);
    background: var(--tich-white);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-nav-toggle span {
    background: var(--tich-grey);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-btn-ghost {
    color: var(--tich-grey);
    border-color: var(--tich-neutral-border);
}

.tich-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--tich-header-bar-height, 4rem);
}

.tich-footer {
    background-color: var(--tich-white);
    border-top: 1px solid var(--tich-neutral-border);
    padding: 2rem 0;
}

.tich-stat__value {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--tich-blue);
    margin-top: 0.5rem;
}

.tich-stat__label {
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--tich-grey);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tich-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: var(--text-body);
    color: var(--tich-grey);
}

@media (min-width: 640px) {
    .tich-footer__inner {
        flex-direction: row;
    }
}

/* ??? Hero & auth panels ??????????????????????????????????????????????? */

.tich-hero {
    background-color: var(--tich-white);
    color: var(--tich-grey);
    padding: 5rem 0;
    border-bottom: 3px solid var(--tich-green);
}

.tich-hero .tich-h1 {
    color: var(--tich-green);
}

.tich-hero__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    margin-bottom: 1rem;
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--tich-blue);
    background-color: var(--tich-blue-light);
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tich-hero__lead {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--tich-grey);
    max-width: 42rem;
}

.tich-auth-aside {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 50%;
    padding: 3rem;
    background-color: var(--tich-blue);
    color: var(--tich-white);
}

@media (min-width: 1024px) {
    .tich-auth-aside {
        display: flex;
    }
}

.tich-auth-aside .tich-h1 {
    color: var(--tich-white);
    font-size: 2.25rem;
}

.tich-auth-aside__lead {
    font-size: var(--text-body);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.tich-auth-aside__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tich-auth-aside__list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: var(--text-body);
    color: rgba(255, 255, 255, 0.9);
}

.tich-auth-aside__list li::before {
    content: "";
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background-color: var(--tich-green);
    flex-shrink: 0;
}

.tich-auth-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: 3rem 1.5rem;
}

@media (min-width: 1024px) {
    .tich-auth-main {
        width: 50%;
        padding: 3rem 4rem;
    }
}

.tich-auth-form {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
}

/* ??? Brand mark ??????????????????????????????????????????????????????? */

.tich-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.tich-brand__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--tich-on-brand);
    background-color: var(--tich-green);
    border-radius: var(--radius-md);
}

.tich-brand__logo {
    height: 2.5rem;
    width: auto;
    max-width: 8.75rem;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
    object-position: center center;
}

.tich-brand__logo--circle {
    width: 2.5rem;
    height: 2.5rem;
    max-width: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

.tich-brand__name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-body);
    line-height: 1.2;
    color: var(--tich-grey);
}

.tich-brand__tagline {
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    color: var(--tich-blue);
}

.tich-brand--light .tich-brand__name,
.tich-brand--light .tich-brand__tagline {
    color: #ffffff;
}

.tich-brand--light .tich-brand__tagline {
    color: rgba(255, 255, 255, 0.88);
}

.tich-brand--light .tich-brand__mark {
    background-color: var(--tich-green);
}

/* ??? Icons (flat line style) ?????????????????????????????????????????? */

.tich-icon svg {
    stroke: currentColor;
    stroke-width: var(--icon-stroke);
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.tich-icon--accent-green {
    color: var(--tich-green);
}

.tich-icon--accent-blue {
    color: var(--tich-blue);
}

.tich-icon--muted {
    color: var(--tich-grey);
}

/* ??? Grid helpers ????????????????????????????????????????????????????? */

.tich-grid {
    display: grid;
    gap: 1.5rem;
}

.tich-grid--2 {
    grid-template-columns: 1fr;
}

.tich-grid--3 {
    grid-template-columns: 1fr;
}

.tich-grid--4 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .tich-grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .tich-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .tich-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tich-grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .tich-grid--4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tich-grid--2-span-full {
    grid-column: 1 / -1;
}

.tich-grid--3-span-full {
    grid-column: 1 / -1;
}

.tich-section {
    padding: 4rem 0;
}

.tich-section--white {
    background-color: var(--tich-white);
    border-top: 1px solid var(--tich-neutral-border);
}

.tich-section__intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.tich-section__intro .tich-text {
    margin-top: 0.75rem;
}

/* ??? Nav ?????????????????????????????????????????????????????????????? */

.tich-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.tich-nav__primary {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    overflow: visible;
}

.tich-nav__pinned {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.125rem;
}

.tich-nav__links {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.125rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.tich-nav__item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.tich-nav__item[hidden],
.tich-nav__more[hidden] {
    display: none !important;
}

.tich-nav__more {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    overflow: visible;
}

.tich-nav__more-toggle {
    cursor: pointer;
    background: transparent;
    font: inherit;
}

.tich-nav__more-toggle .tich-nav__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -0.125rem;
    color: inherit;
    opacity: 0.72;
    transition: transform 0.15s ease;
}

.tich-nav__more-toggle .tich-nav__chevron .tich-admin-sidebar__icon-svg svg {
    width: 12px;
    height: 12px;
}

.tich-nav__more.is-open .tich-nav__more-toggle .tich-nav__chevron {
    transform: rotate(180deg);
}

.tich-nav__more.is-active > .tich-nav__more-toggle,
.tich-nav__more.is-active > .tich-nav__more-toggle:hover {
    color: var(--tich-blue);
    background: var(--tich-blue-light);
    border-color: rgba(22, 105, 166, 0.12);
}

.tich-nav__more.is-active > .tich-nav__more-toggle .tich-nav__icon {
    background: var(--tich-blue);
    color: #fff;
}

.tich-nav__more-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    min-width: 13rem;
    padding: 0.35rem;
    background: var(--tich-white);
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    z-index: 60;
    display: grid;
    gap: 0.125rem;
}

.tich-nav__more-menu[hidden] {
    display: none !important;
}

.tich-nav__more-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    border-radius: calc(var(--radius-md) - 2px);
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tich-grey);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tich-nav__more-link:hover {
    color: var(--tich-blue);
    background: var(--tich-blue-light);
}

.tich-nav__more-link.is-active {
    color: var(--tich-blue);
    background: var(--tich-blue-light);
}

.tich-nav__more-link.is-active .tich-nav__icon {
    background: var(--tich-blue);
    color: #fff;
}

.tich-nav__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    padding-left: 0.75rem;
    margin-left: 0.25rem;
    border-left: 1px solid var(--tich-neutral-border);
}

.tich-nav__link,
.tich-nav-drawer__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tich-grey);
    text-decoration: none;
    padding: 0.4rem 0.625rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.tich-nav__link:hover,
.tich-nav-drawer__link:hover {
    color: var(--tich-blue);
    background-color: var(--tich-blue-light);
}

.tich-nav__link.is-active,
.tich-nav-drawer__link.is-active {
    color: var(--tich-blue);
    background: var(--tich-blue-light);
    border-color: rgba(22, 105, 166, 0.12);
}

.tich-nav__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    flex-shrink: 0;
    border-radius: 0.4rem;
    background: var(--tich-surface-muted, rgba(15, 23, 42, 0.05));
    color: var(--tich-grey);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tich-nav__icon .tich-admin-sidebar__icon-svg svg {
    width: 14px;
    height: 14px;
}

.tich-nav__link:hover .tich-nav__icon,
.tich-nav-drawer__link:hover .tich-nav__icon {
    background: rgba(22, 105, 166, 0.12);
    color: var(--tich-blue);
}

.tich-nav__link.is-active .tich-nav__icon,
.tich-nav-drawer__link.is-active .tich-nav__icon {
    background: var(--tich-blue);
    color: #fff;
}

.tich-nav__label {
    line-height: 1.2;
}

.tich-nav__link.is-icon-only {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    gap: 0;
}

.tich-nav__link.is-icon-only .tich-nav__icon {
    margin: 0;
}

.tich-nav__action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.tich-nav__action-btn--ghost {
    background: transparent;
    color: var(--tich-grey);
    border-color: var(--tich-neutral-border);
}

.tich-nav__action-btn--ghost:hover {
    background: var(--tich-blue-light);
    border-color: rgba(22, 105, 166, 0.2);
    color: var(--tich-blue);
}

.tich-nav__action-btn--primary {
    background: var(--tich-green);
    color: #fff;
    border-color: var(--tich-green);
}

.tich-nav__action-btn--primary:hover {
    background: var(--tich-green-dark);
    border-color: var(--tich-green-dark);
    color: #fff;
}

.tich-nav__action-btn--primary .tich-nav__icon {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.tich-nav__logout {
    display: inline-flex;
    margin: 0;
}

.tich-nav__children,
.tich-nav-drawer__children {
    display: grid;
    gap: 0.125rem;
}

.tich-nav__user {
    font-family: var(--font-ui);
    font-size: var(--text-body);
    color: var(--tich-grey);
}

/* ??? Utility ?????????????????????????????????????????????????????????? */

.tich-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;
}

.tich-skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 10000;
    padding: 0.75rem 1.25rem;
    background: var(--tich-primary, #0b3d2e);
    color: #fff;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.15s ease;
}

.tich-skip-link:focus {
    top: 1rem;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.tich-flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tich-flex {
    display: flex;
    align-items: center;
}

.tich-flex--between {
    justify-content: space-between;
}

.tich-flex--start {
    align-items: flex-start;
}

.tich-flex--center {
    justify-content: center;
}

.tich-flex--wrap {
    flex-wrap: wrap;
}

.tich-flex--gap {
    gap: 0.75rem;
}

.tich-flex--gap {
    gap: 0.75rem;
}

.tich-d-inline {
    display: inline-block;
}

.tich-mt-1 { margin-top: 0.25rem; }
.tich-mt-2 { margin-top: 0.5rem; }
.tich-mt-4 { margin-top: 1rem; }
.tich-mt-6 { margin-top: 1.5rem; }
.tich-mt-8 { margin-top: 2rem; }
.tich-mb-2 { margin-bottom: 0.5rem; }
.tich-mb-4 { margin-bottom: 1rem; }
.tich-mb-6 { margin-bottom: 1.5rem; }
.tich-mb-8 { margin-bottom: 2rem; }
.tich-ml-2 { margin-left: 0.5rem; }
.tich-mr-2 { margin-right: 0.5rem; }
.tich-text-center { text-align: center; }

/* ??? Homepage hero carousel (Animal IQ / Onagi style) ??????????????? */

.tich-hero-carousel {
    --hero-white: #ffffff;
    --hero-green: #6cab33;
    --hero-green-dark: #5a9430;
    --hero-green-light: #e8f3dc;
    --hero-blue: #1669a6;
    --hero-grey: #494c50;
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: #0f172a;
}

.tich-hero-carousel__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 4rem 0 3.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0.9s ease;
    z-index: 0;
}

.tich-hero-carousel__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.tich-hero-carousel__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.tich-hero-carousel__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.tich-hero-carousel__placeholder {
    width: 100%;
    height: 100%;
}

.tich-hero-carousel__placeholder--1 {
    background: var(--hero-blue);
}

.tich-hero-carousel__placeholder--2 {
    background: var(--hero-green);
}

.tich-hero-carousel__placeholder--3 {
    background: var(--hero-grey);
}

.tich-hero-carousel__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.tich-hero-carousel__content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.tich-hero-carousel__inner {
    max-width: 52rem;
    margin: 0 auto;
    text-align: center;
    padding: 1.5rem 1rem 4.5rem;
}

.tich-hero-carousel__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.45rem 1rem;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--hero-green-light);
    background: rgba(108, 171, 51, 0.18);
    border: 1px solid rgba(108, 171, 51, 0.35);
    border-radius: var(--radius-sm);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}

.tich-hero-carousel__eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--hero-green);
}

.tich-hero-carousel__title {
    font-family: var(--font-heading);
    font-size: clamp(2.7rem, 6.75vw, 4.725rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--hero-white);
    margin: 0 0 0.75rem;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.85),
        0 2px 8px rgba(0, 0, 0, 0.65),
        0 8px 28px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(-2.75rem);
    will-change: transform, opacity;
}

.tich-hero-carousel__lead {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.92);
    max-width: 42rem;
    margin: 0 auto;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 4px 16px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(2.25rem);
    will-change: transform, opacity;
}

.tich-hero-carousel__actions {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(2.25rem);
    will-change: transform, opacity;
}

.tich-hero-carousel__inner.is-visible .tich-hero-carousel__title {
    animation: tich-hero-title-in 0.75s ease-out both;
}

.tich-hero-carousel__inner.is-visible .tich-hero-carousel__lead {
    animation: tich-hero-rise-in 0.75s ease-out 0.18s both;
}

.tich-hero-carousel__inner.is-visible .tich-hero-carousel__actions {
    animation: tich-hero-rise-in 0.75s ease-out 0.32s both;
}

.tich-hero-carousel__inner.is-visible .tich-hero-carousel__eyebrow {
    opacity: 1;
    transform: translateY(0);
    animation: tich-hero-rise-in 0.7s ease-out 0.08s both;
}

@keyframes tich-hero-title-in {
    0% {
        opacity: 0;
        transform: translateY(-2.75rem);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tich-hero-rise-in {
    0% {
        opacity: 0;
        transform: translateY(2.25rem);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tich-hero-carousel__title,
    .tich-hero-carousel__lead,
    .tich-hero-carousel__actions,
    .tich-hero-carousel__eyebrow {
        opacity: 1;
        transform: none;
        animation: none !important;
        will-change: auto;
    }
}

/* Homepage scroll reveals (cards enter with bounce) */
.tich-home-reveal {
    opacity: 0;
    will-change: transform, opacity;
}

.tich-home-reveal--from-left {
    transform: translate3d(-3.5rem, 0, 0);
}

.tich-home-reveal--from-right {
    transform: translate3d(3.5rem, 0, 0);
}

.tich-home-reveal--from-bottom {
    transform: translate3d(0, 3.25rem, 0);
}

.tich-home-reveal.is-revealed.tich-home-reveal--from-left {
    animation: tich-home-reveal-left 0.85s cubic-bezier(0.22, 1.35, 0.36, 1) both;
}

.tich-home-reveal.is-revealed.tich-home-reveal--from-right {
    animation: tich-home-reveal-right 0.85s cubic-bezier(0.22, 1.35, 0.36, 1) both;
}

.tich-home-reveal.is-revealed.tich-home-reveal--from-bottom {
    animation: tich-home-reveal-bottom 0.85s cubic-bezier(0.22, 1.35, 0.36, 1) both;
}

@keyframes tich-home-reveal-left {
    0% {
        opacity: 0;
        transform: translate3d(-3.5rem, 0, 0);
    }
    72% {
        opacity: 1;
        transform: translate3d(0.45rem, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes tich-home-reveal-right {
    0% {
        opacity: 0;
        transform: translate3d(3.5rem, 0, 0);
    }
    72% {
        opacity: 1;
        transform: translate3d(-0.45rem, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes tich-home-reveal-bottom {
    0% {
        opacity: 0;
        transform: translate3d(0, 3.25rem, 0);
    }
    72% {
        opacity: 1;
        transform: translate3d(0, -0.4rem, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tich-home-reveal,
    .tich-home-reveal.is-revealed.tich-home-reveal--from-left,
    .tich-home-reveal.is-revealed.tich-home-reveal--from-right,
    .tich-home-reveal.is-revealed.tich-home-reveal--from-bottom {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

.tich-hero-carousel .tich-btn-primary {
    background-color: var(--hero-green);
    border-color: var(--hero-green);
    color: var(--hero-white);
}

.tich-hero-carousel .tich-btn-primary:hover {
    background-color: var(--hero-green-dark);
    border-color: var(--hero-green-dark);
    color: var(--hero-white);
}

.tich-hero-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.42);
    color: var(--hero-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tich-hero-carousel__arrow:hover {
    background: rgba(0, 0, 0, 0.62);
}

.tich-hero-carousel__arrow--prev { left: 1rem; }
.tich-hero-carousel__arrow--next { right: 1rem; }

@media (min-width: 768px) {
    .tich-hero-carousel__arrow {
        width: 3rem;
        height: 3rem;
    }

    .tich-hero-carousel__arrow--prev { left: 1.5rem; }
    .tich-hero-carousel__arrow--next { right: 1.5rem; }
}

.tich-hero-carousel__indicators {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 0.5rem;
}

.tich-hero-carousel__indicator {
    width: 2rem;
    height: 0.25rem;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: background 0.3s ease, width 0.3s ease;
}

.tich-hero-carousel__indicator.is-active {
    width: 3rem;
    background: var(--hero-green);
}

@media (max-width: 767px) {
    .tich-hero-carousel__slide {
        padding: 5.5rem 0 4.5rem;
    }

    .tich-hero-carousel__inner {
        padding-top: 1.5rem;
    }

    .tich-hero-carousel__indicators {
        bottom: 1.75rem;
    }
}

/* ??? Hero ticker / marquee ??????????????????????????????????????????? */

.tich-hero-ticker {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    padding: 0.35rem 0;
    backdrop-filter: blur(4px);
}

.tich-hero-ticker__track {
    display: flex;
    width: max-content;
    animation: tich-ticker-scroll 40s linear infinite;
}

.tich-hero-ticker__item {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0 2rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.tich-hero-ticker__item::after {
    content: ' \2022';
    margin-left: 2rem;
    opacity: 0.7;
}

@keyframes tich-ticker-scroll {
    0% {
        transform: translateX(-33.333%);
    }
    100% {
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tich-hero-ticker__track {
        animation: none;
    }
}

/* ??? Homepage cards ?????????????????????????????????????????????????? */

.tich-program-card__meta {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.tich-program-card__meta li {
    font-size: var(--text-body);
    color: var(--tich-grey);
}

.tich-program-card {
    padding: 0;
    overflow: hidden;
}

.tich-program-card__media {
    display: block;
}

.tich-program-card__image,
.tich-program-card__placeholder {
    width: 100%;
    height: 11rem;
    object-fit: cover;
    object-position: center center;
    display: block;
    margin: 0;
    border-radius: 0;
    background: var(--tich-neutral, #f1f3f4);
}

.tich-program-card__placeholder {
    background: linear-gradient(135deg, var(--tich-blue-light), var(--tich-neutral));
}

.tich-program-card__body {
    padding: 1.5rem;
}

.tich-program-admin-thumb {
    width: 3.5rem;
    height: 2.5rem;
    object-fit: cover;
    border-radius: var(--radius-sm, 0.375rem);
    display: block;
}

.tich-event-card,
.tich-blog-card {
    padding: 0;
    overflow: hidden;
}

.tich-event-card__media,
.tich-blog-card__media {
    display: block;
}

.tich-event-card__date {
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--tich-blue);
}

.tich-event-card__image,
.tich-event-card__placeholder,
.tich-blog-card__image,
.tich-blog-card__placeholder {
    width: 100%;
    height: 11rem;
    object-fit: cover;
    object-position: center center;
    display: block;
    margin: 0;
    border-radius: 0;
    background: var(--tich-neutral, #f1f3f4);
}

.tich-event-card__placeholder,
.tich-blog-card__placeholder {
    background: linear-gradient(135deg, var(--tich-blue-light), var(--tich-neutral));
}

.tich-event-card__body,
.tich-blog-card__body {
    padding: 1.5rem;
}

.tich-research-card__image {
    width: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.tich-research-card__placeholder {
    padding: 2rem;
    background: var(--tich-blue-light);
    border-radius: var(--radius-lg);
    min-height: 16rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ??? Rich footer ????????????????????????????????????????????????????? */

.tich-footer--rich {
    padding: 3rem 0 1.5rem;
    background: var(--tich-white);
}

.tich-footer__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .tich-footer__grid {
        grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    }
}

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

.tich-footer__list a {
    color: var(--tich-grey);
    text-decoration: none;
}

.tich-footer__list a:hover {
    color: var(--tich-blue);
}

.tich-footer__social {
    display: flex;
    gap: 0.5rem;
}

.tich-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: var(--tich-blue-light);
    color: var(--tich-blue);
    text-decoration: none;
}

.tich-footer__social-link svg {
    display: block;
    width: 1rem;
    height: 1rem;
}

.tich-footer__social-link:hover {
    background: var(--tich-blue);
    color: #fff;
}

.tich-footer__newsletter-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tich-footer__newsletter-row .tich-input {
    flex: 1;
}

.tich-footer__bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--tich-neutral-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

@media (min-width: 640px) {
    .tich-footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ??? Responsive navigation ??????????????????????????????????????????? */

.tich-nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    margin-left: auto;
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    background: var(--tich-white);
    cursor: pointer;
    z-index: 102;
}

.tich-nav-toggle span {
    display: block;
    height: 2px;
    margin: 0 0.5rem;
    background: var(--tich-grey);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.tich-nav--desktop {
    display: none;
}

.tich-nav-drawer {
    border-top: 1px solid var(--tich-neutral-border);
    background: var(--tich-white);
    padding: 0.75rem 0 1rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.tich-nav-drawer__panel {
    width: 100%;
}

.tich-nav-drawer__backdrop {
    display: none;
}

.tich-nav-drawer__inner {
    display: grid;
    gap: 0.125rem;
}

.tich-nav-drawer__link {
    width: 100%;
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--tich-neutral-border);
    border-radius: 0;
    white-space: normal;
}

.tich-nav-drawer__link:last-of-type {
    border-bottom: 0;
}

.tich-nav-drawer__children {
    padding-left: 1.75rem;
}

.tich-nav-drawer__section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--tich-neutral-border);
}

.tich-nav-drawer__section-title {
    margin: 0 0 0.25rem;
    padding: 0.25rem 0.25rem 0.5rem;
    font-family: var(--tich-font-ui);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tich-neutral-muted);
}

.tich-nav-drawer__actions {
    display: grid;
    gap: 0.5rem;
    margin-top: 0;
    padding-top: 1rem;
    padding-bottom: 0.25rem;
    border-top: 1px solid var(--tich-neutral-border);
    background: var(--tich-white);
}

@media (max-width: 1023px) {
    .tich-brand {
        min-width: 0;
        flex: 1 1 auto;
        max-width: calc(100% - 3.5rem);
    }

    .tich-brand__name,
    .tich-brand__tagline {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tich-header {
        z-index: 200;
    }

    /* Compact sticky chrome: height fits content only */
    .tich-header__inner.tich-container,
    .tich-header > .tich-header__inner {
        min-height: 0;
        gap: 0.5rem;
        padding-top: 0.3rem;
        padding-bottom: 0.3rem;
    }

    .tich-header .tich-brand {
        gap: 0.45rem;
    }

    .tich-header .tich-brand__logo,
    .tich-header .tich-brand__logo--circle {
        height: 1.75rem;
        width: 1.75rem;
        max-width: 1.75rem;
    }

    .tich-header .tich-brand__name {
        font-size: 0.8125rem;
        line-height: 1.15;
        margin: 0;
    }

    .tich-header .tich-brand__tagline {
        display: none;
    }

    .tich-header .tich-nav-toggle {
        width: 2rem;
        height: 2rem;
        gap: 0.2rem;
    }

    .tich-header .tich-nav-toggle span {
        margin: 0 0.35rem;
    }

    .tich-header > .tich-admin-sidebar-mobile__toggle {
        min-height: 0;
        padding: 0.28rem 0.65rem;
        gap: 0.4rem;
        line-height: 1.15;
        font-size: 0.6875rem;
    }

    .tich-header > .tich-admin-sidebar-mobile__toggle .tich-admin-sidebar-mobile__toggle-icon {
        width: 1.15rem;
        height: 1.15rem;
    }

    .tich-header > .tich-admin-sidebar-mobile__toggle .tich-admin-sidebar-mobile__toggle-icon svg {
        width: 0.8rem;
        height: 0.8rem;
    }

    .tich-header.is-nav-open {
        position: fixed !important;
        inset: 0;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        height: 100dvh;
        max-height: 100dvh;
        background: transparent;
        border-bottom: 0;
        box-shadow: none;
        overflow: hidden;
    }

    .tich-header.is-nav-open::before {
        display: none;
    }

    /* Keep only the close (X) control above the drawer; menu covers the whole navbar */
    .tich-header.is-nav-open .tich-header__inner {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 3;
        flex: 0 0 auto;
        width: 100%;
        background: transparent;
        border-bottom: 0;
        box-shadow: none;
        pointer-events: none;
    }

    .tich-header.is-nav-open .tich-brand {
        visibility: hidden;
    }

    .tich-header.is-nav-open .tich-nav-toggle {
        pointer-events: auto;
        position: relative;
        z-index: 4;
        background: var(--tich-white);
    }

    .tich-header.is-nav-open .tich-admin-sidebar-mobile__toggle {
        display: none !important;
    }

    body.page-home .tich-header--over-hero.is-nav-open .tich-brand__name,
    body.page-home .tich-header--over-hero.is-nav-open .tich-brand__tagline {
        color: var(--tich-grey);
    }

    body.page-home .tich-header--over-hero.is-nav-open .tich-brand--light .tich-brand__name,
    body.page-home .tich-header--over-hero.is-nav-open .tich-brand--light .tich-brand__tagline {
        color: var(--tich-grey);
    }

    body.page-home .tich-header--over-hero.is-nav-open .tich-nav-toggle {
        border-color: var(--tich-neutral-border);
        background: var(--tich-white);
    }

    body.page-home .tich-header--over-hero.is-nav-open .tich-nav-toggle span {
        background: var(--tich-grey);
    }

    .tich-nav-drawer {
        /* absolute (not fixed) so sticky/fixed/backdrop parents cannot collapse it */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        overflow: hidden;
        display: none;
        justify-content: flex-end;
        align-items: flex-start;
        pointer-events: none;
        --nav-drawer-scale: 0.92;
        /* Do not reserve viewport height while closed - that was expanding the sticky header */
        height: 0;
        max-height: 0;
    }

    .tich-header.is-nav-open .tich-nav-drawer {
        display: flex;
        position: absolute;
        inset: 0;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
        flex: none;
        height: 100%;
        max-height: 100%;
        min-height: 0;
        pointer-events: auto;
        align-items: stretch;
    }

    .tich-nav-drawer[hidden] {
        display: none !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }

    .tich-nav-drawer__backdrop {
        display: block;
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        pointer-events: auto;
    }

    .tich-nav-drawer__panel {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        width: min(18.4rem, 88vw);
        max-width: 88vw;
        min-width: 0;
        height: 100%;
        max-height: 100%;
        margin: 0;
        overflow: hidden;
        background: var(--tich-white);
        border: 0;
        border-left: 1px solid var(--tich-neutral-border);
        border-radius: 0;
        box-shadow: -8px 0 28px rgba(15, 23, 42, 0.14);
        transform: translateX(102%);
        transition: transform 0.22s ease;
        pointer-events: auto;
        font-size: calc(1rem * var(--nav-drawer-scale));
        align-self: stretch;
    }

    .tich-nav-drawer__scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding: calc(0.45rem * var(--nav-drawer-scale)) 0 calc(0.35rem * var(--nav-drawer-scale));
        -webkit-overflow-scrolling: touch;
    }

    .tich-nav-drawer__inner {
        display: grid;
        gap: calc(0.05rem * var(--nav-drawer-scale));
        padding-inline: calc(0.55rem * var(--nav-drawer-scale));
    }

    .tich-nav-drawer__link {
        width: 100%;
        gap: calc(0.35rem * var(--nav-drawer-scale));
        padding: calc(0.55rem * var(--nav-drawer-scale)) calc(0.4rem * var(--nav-drawer-scale));
        border-bottom: 1px solid var(--tich-neutral-border);
        border-radius: var(--radius-sm);
        font-size: calc(0.8125rem * var(--nav-drawer-scale));
        white-space: normal;
    }

    .tich-nav-drawer__link .tich-nav__icon {
        width: calc(1.45rem * var(--nav-drawer-scale));
        height: calc(1.45rem * var(--nav-drawer-scale));
        border-radius: calc(0.35rem * var(--nav-drawer-scale));
    }

    .tich-nav-drawer__children {
        padding-left: calc(1.35rem * var(--nav-drawer-scale));
        display: grid;
        gap: calc(0.05rem * var(--nav-drawer-scale));
    }

    .tich-nav-drawer__section {
        margin-top: calc(0.45rem * var(--nav-drawer-scale));
        padding-top: calc(0.45rem * var(--nav-drawer-scale));
        border-top: 1px solid var(--tich-neutral-border);
    }

    .tich-nav-drawer__section-title {
        margin: 0 0 calc(0.15rem * var(--nav-drawer-scale));
        padding: calc(0.15rem * var(--nav-drawer-scale)) calc(0.25rem * var(--nav-drawer-scale)) calc(0.3rem * var(--nav-drawer-scale));
        font-size: calc(0.6875rem * var(--nav-drawer-scale));
    }

    .tich-nav-drawer__actions {
        flex: 0 0 auto;
        gap: calc(0.35rem * var(--nav-drawer-scale));
        padding: calc(0.55rem * var(--nav-drawer-scale)) calc(0.55rem * var(--nav-drawer-scale)) calc(0.65rem * var(--nav-drawer-scale));
    }

    .tich-nav-drawer__theme {
        gap: calc(0.35rem * var(--nav-drawer-scale));
        margin-bottom: calc(0.15rem * var(--nav-drawer-scale));
    }

    .tich-nav-drawer__actions .tich-btn {
        font-size: calc(0.875rem * var(--nav-drawer-scale));
        padding: calc(0.55rem * var(--nav-drawer-scale)) calc(0.75rem * var(--nav-drawer-scale));
    }

    .tich-nav-drawer:not([hidden]) .tich-nav-drawer__panel {
        transform: translateX(0);
    }

    body.is-nav-open {
        overflow: hidden;
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
        touch-action: none;
    }

    .tich-header.is-nav-open .tich-nav-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .tich-header.is-nav-open .tich-nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .tich-header.is-nav-open .tich-nav-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

@media (min-width: 1024px) {
    .tich-nav-toggle {
        display: none;
    }

    .tich-nav--desktop {
        display: flex;
    }

    .tich-nav-drawer {
        display: none !important;
    }
}

@media (min-width: 1280px) {
    .tich-nav__links {
        gap: 0.25rem;
    }
}

@media (min-width: 1024px) and (max-width: 1439px) {
    .tich-header .tich-brand {
        min-width: 0;
        flex: 0 1 auto;
        max-width: min(17rem, 34vw);
    }

    .tich-header .tich-brand__name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tich-header .tich-brand__tagline {
        display: none;
    }

    .tich-nav--desktop .tich-nav__link {
        gap: 0;
        padding: 0.35rem 0.45rem;
        font-size: 0.78125rem;
    }

    .tich-nav--desktop .tich-nav__link .tich-nav__icon {
        display: none;
    }

    .tich-nav--desktop .tich-nav__more-toggle {
        gap: 0.35rem;
        padding: 0.35rem 0.45rem;
        font-size: 0.78125rem;
    }

    .tich-nav--desktop .tich-nav__more-toggle .tich-nav__icon {
        display: none;
    }

    .tich-nav__actions {
        padding-left: 0.5rem;
        gap: 0.25rem;
    }

    .tich-nav__action-btn {
        padding: 0.35rem 0.55rem;
        font-size: 0.78125rem;
    }

    .tich-nav__action-btn .tich-nav__icon {
        display: none;
    }
}

/* ??? Admin panel layout ????????????????????????????????????????????? */

.tich-admin {
    --tich-admin-sidebar-width: 240px;
    display: grid;
    gap: 1.5rem;
    min-height: calc(100vh - var(--tich-header-height));
}

@media (min-width: 1024px) {
    .tich-admin {
        grid-template-columns: var(--tich-admin-sidebar-width) minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        gap: 0;
        align-items: stretch;
        height: 100%;
        min-height: 0;
        max-height: 100%;
        overflow: hidden;
        transition: grid-template-columns 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .tich-admin.is-sidebar-resizing {
        transition: none;
        user-select: none;
        cursor: col-resize;
    }

    .tich-admin.is-sidebar-resizing * {
        cursor: col-resize !important;
    }

    .tich-admin.is-sidebar-collapsed {
        overflow: hidden;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar {
        overflow-x: hidden;
        overflow-y: auto;
        padding-left: 0.45rem;
        padding-right: 0.45rem;
        align-items: center;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__nav {
        overflow: visible;
        align-items: center;
        padding-right: 0;
        scrollbar-gutter: auto;
    }

    .tich-admin-sidebar,
    .tich-admin-sidebar__user,
    .tich-admin-sidebar__user-photo,
    .tich-admin-sidebar__label,
    .tich-admin-sidebar__user-meta,
    .tich-admin-sidebar__title,
    .tich-admin-sidebar > .tich-caption,
    .tich-admin-sidebar__section,
    .tich-admin-sidebar__chevron,
    .tich-admin-sidebar__collapse-btn .tich-admin-sidebar__label {
        transition:
            width 0.34s cubic-bezier(0.22, 1, 0.36, 1),
            padding 0.34s cubic-bezier(0.22, 1, 0.36, 1),
            gap 0.34s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.28s ease,
            transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .tich-admin.is-sidebar-resizing .tich-admin-sidebar,
    .tich-admin.is-sidebar-resizing .tich-admin-sidebar__user,
    .tich-admin.is-sidebar-resizing .tich-admin-sidebar__user-photo,
    .tich-admin.is-sidebar-resizing .tich-admin-sidebar__label,
    .tich-admin.is-sidebar-resizing .tich-admin-sidebar__user-meta,
    .tich-admin.is-sidebar-resizing .tich-admin-sidebar__title,
    .tich-admin.is-sidebar-resizing .tich-admin-sidebar > .tich-caption,
    .tich-admin.is-sidebar-resizing .tich-admin-sidebar__section,
    .tich-admin.is-sidebar-resizing .tich-admin-sidebar__chevron,
    .tich-admin.is-sidebar-resizing .tich-admin-sidebar__collapse-btn .tich-admin-sidebar__label {
        transition: none;
    }
}

.tich-admin-sidebar {
    --sidebar-scale: 0.8;
    --sidebar-sub-scale: 0.7;
    --sidebar-font: calc(0.9375rem * var(--sidebar-scale));
    --sidebar-sub-font: calc(0.9375rem * var(--sidebar-sub-scale));
    --sidebar-icon: calc(2rem * var(--sidebar-scale));
    --sidebar-sub-icon: calc(2rem * var(--sidebar-sub-scale));
    --sidebar-icon-svg: calc(18px * var(--sidebar-scale));
    --sidebar-sub-icon-svg: calc(18px * var(--sidebar-sub-scale));
    --sidebar-chevron-svg: calc(16px * var(--sidebar-scale));
    --sidebar-gap: calc(0.75rem * var(--sidebar-scale));
    --sidebar-sub-gap: calc(0.75rem * var(--sidebar-sub-scale));
    --sidebar-pad-y: calc(0.5rem * var(--sidebar-scale));
    --sidebar-pad-x: calc(0.625rem * var(--sidebar-scale));
    --sidebar-sub-pad-y: calc(0.5rem * var(--sidebar-sub-scale));
    --sidebar-sub-pad-x: calc(0.625rem * var(--sidebar-sub-scale));

    background: var(--tich-white);
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-lg);
    padding: calc(1rem * var(--sidebar-scale)) calc(0.75rem * var(--sidebar-scale));
    display: flex;
    flex-direction: column;
    gap: calc(0.25rem * var(--sidebar-scale));
}

@media (min-width: 1024px) {
    /* Keep the left menu fixed while main content scrolls independently. */
    body.tich-body:has(.tich-admin) {
        overflow: hidden;
        height: 100vh;
        height: 100dvh;
    }

    body.tich-body:has(.tich-admin) #main-content {
        height: calc(100vh - var(--tich-header-height, 4rem));
        height: calc(100dvh - var(--tich-header-height, 4rem));
        overflow: hidden;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    body.tich-body:has(.tich-admin) #main-content > .tich-admin {
        flex: 1 1 0%;
        min-height: 0;
        height: auto;
        max-height: 100%;
    }

    .tich-admin-sidebar {
        position: relative;
        top: auto;
        align-self: stretch;
        height: auto;
        max-height: 100%;
        min-height: 0;
        width: 100%;
        min-width: 0;
        border-radius: 0;
        border-top: none;
        border-bottom: none;
        border-left: none;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }

    .tich-admin-sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .tich-admin-sidebar::-webkit-scrollbar-thumb {
        background: var(--tich-neutral-border);
        border-radius: 999px;
    }

    .tich-admin-sidebar::-webkit-scrollbar-thumb:hover {
        background: var(--tich-grey, #6b6e72);
    }

    .tich-admin-sidebar__resize {
        position: absolute;
        top: 0;
        right: -3px;
        z-index: 5;
        width: 8px;
        height: 100%;
        cursor: col-resize;
        touch-action: none;
    }

    .tich-admin-sidebar__resize::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 3px;
        width: 2px;
        background: transparent;
        transition: background-color 0.15s ease;
    }

    .tich-admin-sidebar__resize:hover::before,
    .tich-admin.is-sidebar-resizing .tich-admin-sidebar__resize::before {
        background: var(--tich-primary, #00529b);
    }

    .tich-admin-sidebar__controls {
        margin-top: calc(0.75rem * var(--sidebar-scale));
        padding-top: calc(0.75rem * var(--sidebar-scale));
        padding-bottom: 0.15rem;
        border-top: 1px solid var(--tich-neutral-border);
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: var(--tich-white);
    }

    .tich-admin-sidebar__collapse-btn {
        display: flex;
        align-items: center;
        gap: var(--sidebar-gap);
        width: 100%;
        padding: var(--sidebar-pad-y) var(--sidebar-pad-x);
        border: 0;
        border-radius: var(--radius-md);
        background: transparent;
        color: var(--tich-grey);
        font-family: var(--font-ui);
        font-size: var(--sidebar-font);
        line-height: 1.35;
        text-align: left;
        cursor: pointer;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .tich-admin-sidebar__collapse-btn:hover {
        background: var(--tich-primary-light, rgba(0, 82, 155, 0.08));
        color: var(--tich-primary);
    }

    .tich-admin-sidebar__collapse-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: var(--sidebar-icon);
        height: var(--sidebar-icon);
        border-radius: calc(0.5rem * var(--sidebar-scale));
        background: var(--tich-surface-muted, #f1f5f9);
        flex-shrink: 0;
    }

    .tich-admin-sidebar__collapse-icon svg {
        width: var(--sidebar-icon-svg);
        height: var(--sidebar-icon-svg);
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__title,
    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar > .tich-caption,
    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__section,
    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__label,
    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__user-meta,
    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__chevron {
        display: none !important;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__link > .tich-admin-sidebar__meta,
    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__group-toggle > .tich-admin-sidebar__meta {
        position: absolute;
        top: 0;
        right: 0;
        margin: 0;
        pointer-events: none;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__user {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
        border-bottom-color: transparent;
        width: 100%;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__user-photo {
        width: 2.15rem;
        height: 2.15rem;
        min-width: 2.15rem;
        min-height: 2.15rem;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__link,
    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__group-toggle,
    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__collapse-btn {
        justify-content: center;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
        gap: 0;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__group,
    .tich-admin.is-sidebar-collapsed .tich-sidebar-group {
        position: relative;
        width: 100%;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__subnav,
    .tich-admin.is-sidebar-collapsed .tich-sidebar-group__panel {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 80;
        min-width: 13.5rem;
        max-width: 18rem;
        max-height: min(24rem, calc(100vh - 2rem));
        overflow-y: auto;
        margin: 0;
        padding: 0.4rem;
        border: 1px solid var(--tich-neutral-border);
        border-left: 1px solid var(--tich-neutral-border);
        border-radius: var(--radius-md);
        background: var(--tich-white);
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
        display: grid;
        gap: 0.125rem;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__subnav[hidden],
    .tich-admin.is-sidebar-collapsed .tich-sidebar-group__panel[hidden] {
        display: none;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__subnav .tich-admin-sidebar__label,
    .tich-admin.is-sidebar-collapsed .tich-sidebar-group__panel .tich-admin-sidebar__label {
        display: inline !important;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__subnav .tich-admin-sidebar__meta,
    .tich-admin.is-sidebar-collapsed .tich-sidebar-group__panel .tich-admin-sidebar__meta,
    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__subnav .tich-admin-sidebar__chevron {
        display: inline-flex !important;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__subnav .tich-admin-sidebar__link,
    .tich-admin.is-sidebar-collapsed .tich-sidebar-group__panel .tich-admin-sidebar__link,
    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__subnav .tich-admin-sidebar__group-toggle {
        justify-content: flex-start;
        gap: var(--sidebar-gap);
        padding: var(--sidebar-pad-y) var(--sidebar-pad-x);
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__collapse-btn .tich-admin-sidebar__label {
        display: none !important;
    }

    .tich-admin.is-sidebar-collapsed .tich-notification-badge--sidebar {
        position: absolute;
        top: -0.15rem;
        right: -0.15rem;
        margin: 0;
    }

    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__link,
    .tich-admin.is-sidebar-collapsed .tich-admin-sidebar__group-toggle {
        position: relative;
    }

    .tich-admin__main {
        padding: 1.5rem;
        height: auto;
        max-height: 100%;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
}

.tich-admin-sidebar__title {
    font-family: var(--font-ui);
    font-size: calc(0.75rem * var(--sidebar-scale));
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tich-grey);
    margin: 0 0 calc(0.75rem * var(--sidebar-scale));
    padding: 0 calc(0.625rem * var(--sidebar-scale));
    flex-shrink: 0;
}

.tich-admin-sidebar__user {
    display: flex;
    align-items: center;
    gap: calc(0.75rem * var(--sidebar-scale));
    padding: 0 calc(0.625rem * var(--sidebar-scale)) calc(1rem * var(--sidebar-scale));
    margin-bottom: calc(0.25rem * var(--sidebar-scale));
    border-bottom: 1px solid var(--tich-neutral-border);
    flex-shrink: 0;
}

.tich-admin-sidebar__user-photo {
    width: calc(2.75rem * var(--sidebar-scale));
    height: calc(2.75rem * var(--sidebar-scale));
    min-width: calc(2.75rem * var(--sidebar-scale));
    min-height: calc(2.75rem * var(--sidebar-scale));
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--tich-neutral-border);
    background: var(--tich-surface-muted, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tich-admin-sidebar__user-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tich-admin-sidebar__user-initials {
    font-family: var(--font-heading);
    font-size: calc(0.875rem * var(--sidebar-scale));
    font-weight: 700;
    color: var(--tich-blue);
    line-height: 1;
}

.tich-admin-sidebar__user-meta {
    min-width: 0;
    flex: 1;
}

.tich-admin-sidebar__user-name {
    margin: 0;
    font-family: var(--font-ui);
    font-size: calc(0.875rem * var(--sidebar-scale));
    font-weight: 600;
    color: var(--tich-text, #1f2937);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tich-admin-sidebar__user-email {
    margin: 0.15rem 0 0;
    font-size: calc(0.75rem * var(--sidebar-scale));
    color: var(--tich-grey);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tich-admin-sidebar__user-roles {
    margin: 0.2rem 0 0;
    font-size: calc(0.6875rem * var(--sidebar-scale));
    font-weight: 600;
    color: var(--tich-blue);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

.tich-admin-sidebar > .tich-caption {
    flex-shrink: 0;
    padding: 0 calc(0.625rem * var(--sidebar-scale));
    margin-top: calc(-0.35rem * var(--sidebar-scale)) !important;
    margin-bottom: calc(0.75rem * var(--sidebar-scale)) !important;
    font-size: calc(0.8125rem * var(--sidebar-scale));
}

.tich-admin-sidebar__nav {
    display: grid;
    gap: 0.125rem;
    min-height: 0;
    flex: 0 0 auto;
    /* Keep menu items at natural height; do not stretch/squeeze to fill the sidebar. */
    align-content: start;
    align-items: start;
}

@media (min-width: 1024px) {
    .tich-admin-sidebar__nav {
        overflow: visible;
        padding-right: 0;
        scrollbar-gutter: auto;
    }
}

.tich-admin-sidebar__nav a,
.tich-admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: var(--sidebar-gap);
    width: 100%;
    box-sizing: border-box;
    padding: var(--sidebar-pad-y) var(--sidebar-pad-x);
    border-radius: var(--radius-md);
    color: var(--tich-grey);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: var(--sidebar-font);
    line-height: 1.35;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tich-admin-sidebar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--sidebar-icon);
    height: var(--sidebar-icon);
    flex-shrink: 0;
    border-radius: calc(0.5rem * var(--sidebar-scale));
    background: var(--tich-surface-muted, rgba(15, 23, 42, 0.05));
    color: var(--tich-grey);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tich-admin-sidebar__icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tich-admin-sidebar__link:not(.tich-admin-sidebar__link--sub) .tich-admin-sidebar__icon-svg svg,
.tich-admin-sidebar__group-toggle .tich-admin-sidebar__icon > .tich-admin-sidebar__icon-svg svg {
    width: var(--sidebar-icon-svg);
    height: var(--sidebar-icon-svg);
}

.tich-admin-sidebar__chevron .tich-admin-sidebar__icon-svg svg {
    width: var(--sidebar-chevron-svg);
    height: var(--sidebar-chevron-svg);
}

.tich-admin-sidebar__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tich-admin-sidebar__meta {
    display: inline-flex;
    align-items: center;
    gap: calc(0.35rem * var(--sidebar-scale));
    flex-shrink: 0;
    margin-left: auto;
}

.tich-admin-sidebar__link.is-muted .tich-admin-sidebar__icon {
    background: transparent;
    color: var(--tich-grey);
}

/* Mobile admin / portal sidebar drawer + compact content */
@media (max-width: 1023px) {
    .tich-admin-sidebar__resize,
    .tich-admin-sidebar__controls {
        display: none !important;
    }

    .tich-admin {
        gap: 0;
        min-height: auto;
        grid-template-columns: minmax(0, 1fr);
        padding: 0;
    }

    .tich-admin-sidebar-mobile__toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        position: relative;
        top: auto;
        z-index: 45;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0.28rem 0.65rem;
        border: 0;
        border-top: 0;
        border-bottom: 1px solid var(--tich-neutral-border);
        border-radius: 0;
        background: var(--tich-white);
        color: var(--tich-grey);
        font-family: var(--font-ui);
        font-size: 0.6875rem;
        font-weight: 600;
        line-height: 1.15;
        cursor: pointer;
        box-shadow: none;
        text-align: left;
    }

    /* When injected into the sticky site header, keep it flush under the top nav row */
    .tich-header > .tich-admin-sidebar-mobile__toggle {
        position: relative;
        top: auto;
        flex: 0 0 auto;
        margin: 0;
        border-top: 0;
        border-bottom: 1px solid var(--tich-neutral-border);
    }

    .tich-admin-sidebar-mobile__toggle-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.15rem;
        height: 1.15rem;
        flex-shrink: 0;
        border-radius: var(--radius-sm);
        background: var(--tich-neutral);
    }

    .tich-admin-sidebar-mobile__toggle-icon svg {
        width: 0.8rem;
        height: 0.8rem;
    }

    .tich-admin-sidebar-mobile__toggle-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tich-admin-sidebar-mobile__shell {
        position: fixed;
        inset: 0;
        z-index: 960;
        pointer-events: none;
        visibility: hidden;
    }

    .tich-admin.is-sidebar-open .tich-admin-sidebar-mobile__shell {
        pointer-events: auto;
        visibility: visible;
    }

    .tich-admin-sidebar-mobile__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
    }

    .tich-admin-sidebar-mobile__shell .tich-admin-sidebar {
        position: absolute;
        top: var(--tich-header-height);
        left: 0;
        bottom: 0;
        width: 70%;
        max-width: 70vw;
        min-width: 0;
        margin: 0;
        transform: translateX(-102%);
        transition: transform 0.22s ease;
        border-radius: 0;
        border-top: none;
        border-bottom: none;
        border-left: none;
        border-right: 1px solid var(--tich-neutral-border);
        box-shadow: 8px 0 28px rgba(15, 23, 42, 0.18);
        z-index: 1;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        /* Match right-side nav drawer (--nav-drawer-scale: 0.92) item sizing */
        --sidebar-scale: 0.80;
        --sidebar-sub-scale: 0.74;
        --sidebar-font: calc(0.8125rem * 0.92);
        --sidebar-sub-font: calc(0.75rem * 0.92);
        --sidebar-icon: calc(1.45rem * 0.92);
        --sidebar-sub-icon: calc(1.3rem * 0.92);
        --sidebar-icon-svg: calc(14px * 0.92);
        --sidebar-sub-icon-svg: calc(12px * 0.92);
        --sidebar-chevron-svg: calc(14px * 0.92);
        --sidebar-gap: calc(0.35rem * 0.92);
        --sidebar-sub-gap: calc(0.3rem * 0.92);
        --sidebar-pad-y: calc(0.55rem * 0.92);
        --sidebar-pad-x: calc(0.4rem * 0.92);
        --sidebar-sub-pad-y: calc(0.45rem * 0.92);
        --sidebar-sub-pad-x: calc(0.35rem * 0.92);
        padding: calc(0.45rem * 0.92) calc(0.55rem * 0.92);
        gap: calc(0.05rem * 0.92);
    }

    .tich-admin-sidebar-mobile__shell .tich-admin-sidebar__user {
        flex-shrink: 0;
    }

    .tich-admin-sidebar-mobile__shell .tich-admin-sidebar__user-photo {
        width: 2.35rem;
        height: 2.35rem;
        min-width: 2.35rem;
        min-height: 2.35rem;
    }

    .tich-admin.is-sidebar-open .tich-admin-sidebar-mobile__shell .tich-admin-sidebar {
        transform: translateX(0);
    }

    .tich-admin-sidebar-mobile__shell .tich-admin-sidebar__nav {
        overflow: visible;
        flex: 0 0 auto;
        padding-right: 0;
        scrollbar-gutter: auto;
    }

    body.is-admin-sidebar-open {
        overflow: hidden;
        touch-action: none;
    }

    .tich-admin__main {
        padding: 0.5rem 0.625rem 1rem;
        --content-scale: 0.8;
    }

    .tich-admin__main .tich-section {
        padding-top: 0.75rem;
        padding-bottom: 1rem;
    }

    .tich-admin__main .tich-container {
        padding-left: 0;
        padding-right: 0;
    }

    .tich-admin__main .tich-card {
        padding: 0.75rem;
    }

    .tich-admin__main .tich-grid {
        gap: 0.625rem;
    }

    .tich-admin__main .tich-page-toolbar {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .tich-admin__main .tich-page-toolbar__actions {
        gap: 0.35rem;
    }

    .tich-admin__main .tich-page-toolbar__title {
        font-size: calc(1.125rem * var(--content-scale));
    }

    .tich-admin__main .tich-stat {
        padding: 0.625rem 0.75rem;
    }

    .tich-admin__main .tich-stat__value {
        font-size: calc(1rem * var(--content-scale));
    }

    .tich-admin__main .tich-btn {
        padding: calc(0.5rem * var(--content-scale)) calc(0.85rem * var(--content-scale));
    }

    .tich-admin__main .tich-admin-table th,
    .tich-admin__main .tich-admin-table td {
        padding: calc(0.55rem * var(--content-scale)) calc(0.6rem * var(--content-scale));
    }

    .tich-admin__main .tich-admin-table {
        font-size: calc(0.8125rem * var(--content-scale));
    }

    .tich-dept-dashboard .tich-dept-card {
        padding: 0.75rem;
    }
}

@media (min-width: 1024px) {
    .tich-admin-sidebar-mobile__toggle {
        display: none;
    }

    .tich-admin-sidebar-mobile__shell {
        display: block;
        position: static;
        pointer-events: auto;
        visibility: visible;
    }

    .tich-admin-sidebar-mobile__backdrop {
        display: none;
    }
}

.tich-admin-sidebar__footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: calc(0.75rem * var(--sidebar-scale));
    border-top: 1px solid var(--tich-neutral-border);
    display: grid;
    gap: calc(0.125rem * var(--sidebar-scale));
}

.tich-admin-sidebar__link .tich-notification-badge--sidebar,
.tich-admin-sidebar__group-toggle .tich-notification-badge--sidebar {
    --sidebar-badge-bg: rgba(220, 38, 38, 0.16);
    --sidebar-badge-color: #b91c1c;
    --sidebar-badge-bg-hover: rgba(220, 38, 38, 0.26);
    --sidebar-badge-color-hover: #991b1b;
    min-width: calc(1.5rem * var(--sidebar-scale));
    height: calc(1.5rem * var(--sidebar-scale));
    padding: 0 calc(0.5rem * var(--sidebar-scale));
    font-size: calc(0.75rem * var(--sidebar-scale));
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    background: var(--sidebar-badge-bg);
    color: var(--sidebar-badge-color);
    box-shadow: none;
}

.tich-notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    text-decoration: none;
}

.tich-notification-badge--sidebar.is-updated {
    animation: tich-sidebar-badge-pulse 0.45s ease;
}

@keyframes tich-sidebar-badge-pulse {
    0%,
    100% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.14);
    }
}

a.tich-notification-badge:hover {
    background: #b91c1c;
    color: #fff;
}

.tich-admin-sidebar__nav a.is-active .tich-notification-badge--sidebar,
.tich-admin-sidebar__link.is-active .tich-notification-badge--sidebar,
.tich-admin-sidebar__link:hover .tich-notification-badge--sidebar,
.tich-admin-sidebar__group.is-active > .tich-admin-sidebar__group-toggle .tich-notification-badge--sidebar,
.tich-admin-sidebar__group-toggle:hover .tich-notification-badge--sidebar {
    background: var(--sidebar-badge-bg-hover);
    color: var(--sidebar-badge-color-hover);
}

.tich-admin-sidebar__nav a:hover,
.tich-admin-sidebar__nav a.is-active,
.tich-admin-sidebar__link:hover,
.tich-admin-sidebar__link.is-active {
    background: var(--tich-primary-light, rgba(0, 82, 155, 0.08));
    color: var(--tich-primary);
}

.tich-admin-sidebar__nav a:hover .tich-admin-sidebar__icon,
.tich-admin-sidebar__link:hover .tich-admin-sidebar__icon {
    background: rgba(0, 82, 155, 0.12);
    color: var(--tich-primary);
}

.tich-admin-sidebar__nav a.is-active .tich-admin-sidebar__icon,
.tich-admin-sidebar__link.is-active .tich-admin-sidebar__icon {
    background: var(--tich-primary);
    color: #fff;
}

.tich-admin-sidebar__section {
    font-family: var(--font-ui);
    font-size: calc(0.6875rem * var(--sidebar-scale));
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tich-grey);
    margin: calc(0.875rem * var(--sidebar-scale)) 0 calc(0.375rem * var(--sidebar-scale));
    padding: 0 calc(0.625rem * var(--sidebar-scale));
}

.tich-admin-sidebar__section:first-child {
    margin-top: 0;
}

.tich-admin-sidebar__disabled {
    display: flex;
    align-items: center;
    gap: var(--sidebar-gap);
    padding: var(--sidebar-pad-y) var(--sidebar-pad-x);
    border-radius: var(--radius-md);
    color: var(--tich-grey);
    font-family: var(--font-ui);
    font-size: calc(0.875rem * var(--sidebar-scale));
    opacity: 0.65;
}

.tich-admin-sidebar__disabled small {
    font-size: calc(0.75rem * var(--sidebar-scale));
}

.tich-admin-sidebar__group {
    display: grid;
    gap: 0.125rem;
    align-content: start;
    align-items: start;
}

.tich-admin-sidebar__group-toggle {
    display: flex;
    align-items: center;
    gap: var(--sidebar-gap);
    width: 100%;
    padding: var(--sidebar-pad-y) var(--sidebar-pad-x);
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--tich-grey);
    font-family: var(--font-ui);
    font-size: var(--sidebar-font);
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tich-admin-sidebar__group-toggle:hover,
.tich-admin-sidebar__group.is-active > .tich-admin-sidebar__group-toggle {
    background: var(--tich-primary-light, rgba(0, 82, 155, 0.08));
    color: var(--tich-primary);
}

.tich-admin-sidebar__group-toggle:hover .tich-admin-sidebar__icon,
.tich-admin-sidebar__group.is-active > .tich-admin-sidebar__group-toggle .tich-admin-sidebar__icon {
    background: rgba(0, 82, 155, 0.12);
    color: var(--tich-primary);
}

.tich-admin-sidebar__group-toggle .tich-admin-sidebar__label {
    flex: 1;
    min-width: 0;
}

.tich-admin-sidebar__group-toggle .tich-admin-sidebar__chevron {
    flex-shrink: 0;
}

.tich-admin-sidebar__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tich-grey);
    transition: transform 0.28s ease;
}

.tich-admin-sidebar__group.is-open .tich-admin-sidebar__chevron {
    transform: rotate(180deg);
}

.tich-admin-sidebar__subnav,
.tich-sidebar-group__panel {
    display: grid;
    gap: calc(0.125rem * var(--sidebar-sub-scale));
    margin-left: calc(0.35rem * var(--sidebar-sub-scale));
    padding-left: calc(0.65rem * var(--sidebar-sub-scale));
    border-left: calc(2px * var(--sidebar-sub-scale)) solid var(--tich-neutral-border);
    overflow: hidden;
}

.tich-admin-sidebar__subnav[hidden],
.tich-sidebar-group__panel[hidden] {
    display: none;
}

.tich-admin-sidebar__subnav--nested {
    margin-left: calc(0.5rem * var(--sidebar-sub-scale));
    padding-left: calc(0.75rem * var(--sidebar-sub-scale));
    border-left-color: var(--tich-neutral-border);
}

.tich-admin-sidebar__subgroup > .tich-admin-sidebar__group-toggle {
    padding-left: calc(0.75rem * var(--sidebar-sub-scale));
}

.tich-admin-sidebar__link--sub {
    gap: var(--sidebar-sub-gap);
    padding: var(--sidebar-sub-pad-y) var(--sidebar-sub-pad-x);
    font-size: var(--sidebar-sub-font);
}

.tich-admin-sidebar__link--sub .tich-admin-sidebar__icon {
    width: var(--sidebar-sub-icon);
    height: var(--sidebar-sub-icon);
    border-radius: calc(0.5rem * var(--sidebar-sub-scale));
}

.tich-admin-sidebar__link--sub .tich-admin-sidebar__icon-svg svg {
    width: var(--sidebar-sub-icon-svg);
    height: var(--sidebar-sub-icon-svg);
}

.tich-admin-sidebar__link--sub .tich-notification-badge--sidebar {
    min-width: calc(1.375rem * var(--sidebar-sub-scale));
    height: calc(1.375rem * var(--sidebar-sub-scale));
    padding: 0 calc(0.45rem * var(--sidebar-sub-scale));
    font-size: calc(0.6875rem * var(--sidebar-sub-scale));
}

.tich-leave-status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tich-leave-status--on {
    background: #dbeafe;
    color: #1d4ed8;
}

.tich-leave-status--off {
    background: var(--tich-surface-muted, rgba(15, 23, 42, 0.05));
    color: var(--tich-grey);
}

.tich-page-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.tich-page-toolbar:not(:has(.tich-page-toolbar__filters)) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.tich-page-toolbar:not(:has(.tich-page-toolbar__actions)) .tich-page-toolbar__filters {
    grid-column: 2;
    grid-row: 1;
}

.tich-page-toolbar__main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
    min-width: 0;
}

.tich-page-toolbar__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--tich-green);
}

.tich-page-toolbar__meta {
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--tich-grey);
}

.tich-page-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
    justify-self: end;
}

.tich-page-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    grid-column: 1 / -1;
    grid-row: 2;
    margin-left: 0;
    min-width: 0;
}

/* Standalone list filters: search + dropdowns + Filter stay on one row */
.tich-filter-bar {
    --filter-dropdown-width: 14rem;
    --filter-search-min: 16rem;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tich-filter-bar > .tich-input[type="search"],
.tich-filter-bar > input.tich-input:not([type="hidden"]) {
    flex: 1 1 var(--filter-search-min);
    width: auto;
    min-width: var(--filter-search-min);
    max-width: none;
}

.tich-filter-bar > select.tich-input {
    flex: 0 0 var(--filter-dropdown-width);
    width: var(--filter-dropdown-width);
    min-width: var(--filter-dropdown-width);
    max-width: var(--filter-dropdown-width);
}

.tich-filter-bar > .tich-btn,
.tich-filter-bar > a.tich-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.tich-page-toolbar__filters-form {
    --filter-dropdown-width: 16rem;
    --filter-search-width: calc(var(--filter-dropdown-width) * 2);
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
}

.tich-page-toolbar__filters-form .tich-search-field {
    flex: 0 0 auto;
    width: var(--filter-search-width);
    min-width: min(100%, var(--filter-search-width));
    max-width: var(--filter-search-width);
}

.tich-page-toolbar__filters-form .tich-input--compact,
.tich-page-toolbar__filters-form select.tich-input--compact {
    flex: 0 0 auto;
    width: var(--filter-dropdown-width);
    min-width: var(--filter-dropdown-width);
    max-width: var(--filter-dropdown-width);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

@media (max-width: 768px) {
    .tich-page-toolbar__filters-form {
        flex-wrap: wrap;
    }

    .tich-page-toolbar__filters-form .tich-search-field {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }

    .tich-page-toolbar__filters-form .tich-input--compact,
    .tich-page-toolbar__filters-form select.tich-input--compact {
        flex: 1 1 var(--filter-dropdown-width);
        width: auto;
        min-width: min(100%, var(--filter-dropdown-width));
        max-width: none;
    }
}

.tich-search-field {
    display: inline-flex;
    align-items: stretch;
    min-width: min(100%, 18rem);
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    background: var(--tich-white);
    overflow: hidden;
}

.tich-search-field:focus-within {
    border-color: var(--tich-primary);
    box-shadow: 0 0 0 2px var(--tich-primary-light, rgba(0, 82, 155, 0.12));
}

.tich-search-field__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0.5rem 0.75rem;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    color: var(--tich-text);
}

.tich-search-field__input:focus {
    outline: none;
}

.tich-search-field__btn {
    border: 0;
    border-left: 1px solid var(--tich-neutral-border);
    background: var(--tich-primary);
    color: #fff;
    padding: 0 0.875rem;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.tich-search-field__btn:hover {
    background: var(--tich-primary-dark, #004080);
}

.tich-input--compact {
    width: auto;
    min-width: 9rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.875rem;
}

.tich-btn--compact {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
}

.tich-link--compact {
    font-size: 0.8125rem;
}

.tich-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;
}

.tich-dept-header {
    margin-bottom: 1.5rem;
}

.tich-dept-header__title {
    font-size: 2rem;
    margin-top: 0.25rem;
}

.tich-dept-header__meta {
    margin-top: 0.5rem;
}

.tich-dept-stats {
    gap: 1rem;
}

.tich-dept-panel__head {
    margin-bottom: 1.25rem;
}

.tich-dept-panel__title {
    font-size: 1.375rem;
    margin: 0;
}

.tich-dept-cards {
    gap: 1.25rem;
    align-items: stretch;
}

.tich-dept-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tich-dept-card .tich-btn {
    margin-top: auto;
    align-self: flex-start;
}

.tich-dept-card--accent {
    border-color: var(--tich-primary);
    box-shadow: inset 3px 0 0 var(--tich-primary);
}

.tich-dept-empty {
    padding: 2rem;
}

.tich-admin__main {
    min-width: 0;
    --content-scale: 0.95;
}

/* Main dashboard body content - scaled down; small meta text unchanged */
.tich-admin__main .tich-text {
    font-size: calc(var(--text-body) * var(--content-scale));
}

.tich-admin__main .tich-label {
    font-size: calc(var(--text-body) * var(--content-scale));
}

.tich-admin__main .tich-h1 {
    font-size: calc(var(--text-h1) * var(--content-scale));
}

.tich-admin__main .tich-h2 {
    font-size: calc(var(--text-h2) * var(--content-scale));
}

.tich-admin__main .tich-h3 {
    font-size: calc(var(--text-h3) * var(--content-scale));
}

.tich-admin__main .tich-page-toolbar__title {
    font-size: calc(1.375rem * var(--content-scale));
}

.tich-admin__main .tich-admin-table {
    font-size: calc(0.9375rem * var(--content-scale));
}

.tich-admin__main .tich-admin-table tbody td {
    padding: calc(0.55rem * var(--content-scale)) calc(1rem * var(--content-scale));
}

.tich-admin__main .tich-btn {
    font-size: calc(var(--text-body) * var(--content-scale));
    padding: calc(0.625rem * var(--content-scale)) calc(1.25rem * var(--content-scale));
}

.tich-admin__main .tich-input:not(.tich-input--compact) {
    font-size: calc(var(--text-body) * var(--content-scale));
}

.tich-admin__main .tich-stat__value {
    font-size: calc(1.125rem * var(--content-scale));
}

.tich-admin__main .tich-search-field__input {
    font-size: calc(0.875rem * var(--content-scale));
}

.tich-admin__main .tich-card {
    font-size: calc(1rem * var(--content-scale));
}

/* Preserve compact / meta text (dates, types, steps, categories) */
.tich-admin__main .tich-caption,
.tich-admin__main .tich-stat__label,
.tich-admin__main .tich-admin-table .tich-caption,
.tich-admin__main .tich-admin-table td .tich-caption {
    font-size: var(--text-caption);
}

.tich-admin__main .tich-page-toolbar__meta {
    font-size: 0.8125rem;
}

.tich-admin__main .tich-admin-table th {
    font-size: 0.75rem;
    padding: calc(0.55rem * var(--content-scale)) calc(1rem * var(--content-scale));
}

.tich-admin__main .tich-leave-status {
    font-size: 0.75rem;
}

.tich-admin__main .tich-input--compact,
.tich-admin__main .tich-page-toolbar__filters-form .tich-input--compact {
    font-size: 0.8125rem;
}

.tich-admin__main .tich-search-field__btn {
    font-size: 0.8125rem;
}

.tich-admin__main .tich-btn--compact,
.tich-admin__main .tich-link--compact {
    font-size: 0.8125rem;
}

.tich-admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    line-height: 1.45;
}

.tich-admin-table th,
.tich-admin-table td {
    padding: 0.55rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--tich-neutral-border, var(--tich-border));
    vertical-align: middle;
    color: var(--tich-text);
}

.tich-admin-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tich-neutral-muted, #64748b);
    background: color-mix(in srgb, var(--tich-neutral, #f5f6f6) 72%, var(--tich-white));
    border-bottom-color: var(--tich-neutral-border, #e2e8f0);
    white-space: nowrap;
}

.tich-admin-table tbody tr {
    transition: background-color 0.12s ease;
}

.tich-admin-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--tich-neutral, #f5f6f6) 45%, var(--tich-white));
}

.tich-admin-table tbody tr:hover {
    background: color-mix(in srgb, var(--tich-blue) 7%, var(--tich-white));
}

.tich-admin-table tbody tr:last-child td {
    border-bottom: none;
}

.tich-admin-table td strong {
    font-weight: 600;
    color: var(--tich-grey, #1f2937);
}

.tich-admin-table__code {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.tich-admin-table__actions,
.tich-admin-table th.tich-admin-table__actions,
.tich-admin-table td.tich-admin-table__actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}

.tich-admin-table td.tich-admin-table__actions {
    display: table-cell;
}

.tich-admin-table__action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.tich-admin-table td .tich-badge,
.tich-admin-table td .tich-status-badge {
    vertical-align: middle;
}

.tich-fin-report-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tich-fin-report-table tfoot th,
.tich-fin-report-table tfoot td {
    background: color-mix(in srgb, var(--tich-blue) 8%, var(--tich-surface));
    border-top: 2px solid var(--tich-neutral-border);
}

.tich-fin-report-table__section td {
    background: color-mix(in srgb, var(--tich-blue) 5%, var(--tich-surface));
    font-weight: 600;
}

.tich-fin-report-table__subtotal td,
.tich-fin-report-table__subtotal th {
    background: var(--tich-surface-muted);
    font-weight: 600;
}

.tich-fin-report-table__total th,
.tich-fin-report-table__total td {
    font-weight: 700;
}

.tich-admin-table .tich-table-empty,
.tich-admin-table td.tich-table-empty {
    padding: 2.75rem 1.5rem;
    text-align: center;
    color: var(--tich-neutral-muted);
    background: transparent;
}

.tich-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.tich-table-panel {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--tich-neutral-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tich-table-panel > .tich-h2,
.tich-table-panel > .tich-h3,
.tich-table-panel > .tich-h4,
.tich-table-panel > h2,
.tich-table-panel > h3,
.tich-table-panel > h4,
.tich-table-panel__head {
    margin: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--tich-neutral-border);
    background: color-mix(in srgb, var(--tich-neutral, #f5f6f6) 55%, var(--tich-white));
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
}

.tich-table-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.tich-table-panel__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--tich-grey);
}

.tich-table-panel__meta {
    margin: 0;
    font-size: 0.75rem;
    color: var(--tich-neutral-muted, #64748b);
}

.tich-table-panel__section {
    margin: 0;
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid var(--tich-neutral-border);
    background: color-mix(in srgb, var(--tich-blue) 5%, var(--tich-white));
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--tich-blue);
}

.tich-table-panel > .tich-table-wrap,
.tich-table-panel > .tich-admin-table {
    margin: 0;
}

.tich-table-panel > .tich-admin-table.tich-mt-2,
.tich-table-panel > .tich-admin-table.tich-mt-4,
.tich-table-panel > .tich-h3 + .tich-admin-table,
.tich-table-panel > .tich-h2 + .tich-admin-table,
.tich-table-panel > h2 + .tich-admin-table,
.tich-table-panel > h3 + .tich-admin-table,
.tich-table-panel > h4 + .tich-admin-table {
    margin-top: 0 !important;
}

.tich-table-panel .tich-admin-table th:first-child,
.tich-table-panel .tich-admin-table td:first-child {
    padding-left: 1.25rem;
}

.tich-table-panel .tich-admin-table th:last-child,
.tich-table-panel .tich-admin-table td:last-child {
    padding-right: 1.25rem;
}

.tich-table-panel > .tich-caption,
.tich-table-panel > .tich-text,
.tich-table-panel > p {
    margin: 0;
    padding: 1rem 1.25rem;
}

.tich-table-panel > .tich-mt-4 {
    margin-top: 0 !important;
    padding: 0.85rem 1.25rem 1rem;
    border-top: 1px solid var(--tich-neutral-border);
}

[data-theme="dark"] .tich-admin-table th,
[data-theme="dark"] .tich-admin-table td {
    border-color: var(--tich-border);
    color: var(--tich-text);
}

[data-theme="dark"] .tich-admin-table th {
    color: var(--tich-grey);
    background: color-mix(in srgb, var(--tich-surface) 88%, #000);
}

[data-theme="dark"] .tich-table-panel {
    box-shadow: none;
}

[data-theme="dark"] .tich-table-panel > .tich-h2,
[data-theme="dark"] .tich-table-panel > .tich-h3,
[data-theme="dark"] .tich-table-panel > .tich-h4,
[data-theme="dark"] .tich-table-panel > h2,
[data-theme="dark"] .tich-table-panel > h3,
[data-theme="dark"] .tich-table-panel > h4,
[data-theme="dark"] .tich-table-panel__head,
[data-theme="dark"] .tich-table-panel__section {
    background: color-mix(in srgb, var(--tich-surface) 92%, #000);
}

[data-theme="dark"] .tich-admin-table tbody tr:nth-child(even) {
    background: var(--tich-surface-muted);
}

[data-theme="dark"] .tich-admin-table tbody tr:hover {
    background: color-mix(in srgb, var(--tich-blue) 12%, var(--tich-surface-muted));
}

.tich-me-row--warning > td {
    background: #fff7ed;
}

.tich-me-warning-label {
    color: #c2410c;
    margin-left: 0.35rem;
}

[data-theme="dark"] .tich-me-row--warning > td {
    background: color-mix(in srgb, #ea580c 18%, var(--tich-surface));
    color: var(--tich-text);
}

[data-theme="dark"] .tich-admin-table tbody tr.tich-me-row--warning:nth-child(even) > td,
[data-theme="dark"] .tich-admin-table tbody tr.tich-me-row--warning:hover > td {
    background: color-mix(in srgb, #ea580c 22%, var(--tich-surface));
}

[data-theme="dark"] .tich-me-warning-label {
    color: #fb923c;
}

.tich-status-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    border: 1px solid var(--tich-status-neutral-border);
    background: var(--tich-status-neutral-bg);
    color: var(--tich-status-neutral-text);
}

.tich-status-badge.is-pending,
.tich-status-badge.is-caution {
    background: var(--tich-status-caution-bg);
    color: var(--tich-status-caution-text);
    border-color: var(--tich-status-caution-border);
}

.tich-status-badge.is-info {
    background: var(--tich-status-info-bg);
    color: var(--tich-status-info-text);
    border-color: var(--tich-status-info-border);
}

.tich-status-badge.is-warning {
    background: var(--tich-status-warning-bg);
    color: var(--tich-status-warning-text);
    border-color: var(--tich-status-warning-border);
}

.tich-status-badge.is-success {
    background: var(--tich-status-success-bg);
    color: var(--tich-status-success-text);
    border-color: var(--tich-status-success-border);
}

.tich-status-badge.is-danger {
    background: var(--tich-status-danger-bg);
    color: var(--tich-status-danger-text);
    border-color: var(--tich-status-danger-border);
}

.tich-status-badge.is-neutral {
    background: var(--tich-status-neutral-bg);
    color: var(--tich-status-neutral-text);
    border-color: var(--tich-status-neutral-border);
}

.tich-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    border: 1px solid var(--tich-status-neutral-border);
    background: var(--tich-status-neutral-bg);
    color: var(--tich-status-neutral-text);
}

.tich-badge--success,
.tich-badge[data-status="success"] {
    background: var(--tich-status-success-bg);
    color: var(--tich-status-success-text);
    border-color: var(--tich-status-success-border);
}

.tich-badge--danger,
.tich-badge[data-status="danger"] {
    background: var(--tich-status-danger-bg);
    color: var(--tich-status-danger-text);
    border-color: var(--tich-status-danger-border);
}

.tich-badge--warning,
.tich-badge[data-status="warning"] {
    background: var(--tich-status-warning-bg);
    color: var(--tich-status-warning-text);
    border-color: var(--tich-status-warning-border);
}

.tich-badge--caution,
.tich-badge--pending,
.tich-badge[data-status="caution"],
.tich-badge[data-status="pending"] {
    background: var(--tich-status-caution-bg);
    color: var(--tich-status-caution-text);
    border-color: var(--tich-status-caution-border);
}

.tich-badge--info,
.tich-badge[data-status="info"] {
    background: var(--tich-status-info-bg);
    color: var(--tich-status-info-text);
    border-color: var(--tich-status-info-border);
}

.tich-badge--neutral,
.tich-badge--secondary,
.tich-badge[data-status="neutral"] {
    background: var(--tich-status-neutral-bg);
    color: var(--tich-status-neutral-text);
    border-color: var(--tich-status-neutral-border);
}

.tich-card--hover {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tich-card--hover:hover {
    border-color: var(--tich-blue);
    box-shadow: 0 0.5rem 1.25rem rgba(22, 105, 166, 0.12);
    transform: translateY(-1px);
}

.tich-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--tich-neutral-border);
}

.tich-list-row:last-child {
    border-bottom: none;
}

.tich-list-row--hover {
    transition: background-color 0.15s ease;
}

.tich-list-row--hover:hover {
    background-color: var(--tich-neutral);
}

.tich-list-item {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--tich-neutral-border);
    text-decoration: none;
    color: inherit;
}

.tich-list-item:last-child {
    border-bottom: none;
}

/* ??? Document Card ?????????????????????????????????????????????????????? */

.tich-doc-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--tich-neutral-border);
    border-radius: 0.5rem;
    background: var(--tich-white);
}

.tich-doc-card:last-child {
    margin-bottom: 0;
}

[data-theme="dark"] .tich-doc-card {
    background: #1a1a1a;
    border-color: #2d2d2d;
}

.tich-doc-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.tich-doc-card__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tich-doc-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    color: var(--tich-blue);
}

.tich-doc-card__svg {
    width: 1.25rem;
    height: 1.25rem;
}

.tich-doc-card__content {
    flex: 1;
    min-width: 0;
}

.tich-doc-card__title {
    display: block;
    font-weight: 600;
    color: var(--tich-grey);
    word-break: break-word;
}

.tich-doc-card__meta {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: var(--tich-neutral-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tich-doc-card__actions {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
}

.tich-badge--sm {
    font-size: 0.65rem;
    padding: 0.125rem 0.5rem;
}

.tich-btn--sm,
.tich-btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
}

.tich-btn--danger {
    color: #c53030;
    border-color: #c53030;
}

.tich-btn--danger:hover {
    background-color: #dc2626;
    color: var(--tich-white);
}

/* Status badge dark tones come from [data-theme="dark"] CSS variables. */

[data-theme="dark"] .tich-card--hover:hover {
    border-color: var(--tich-blue);
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .tich-alert--success {
    background-color: var(--tich-green-light);
    border-color: var(--tich-green);
    color: var(--tich-green);
}

[data-theme="dark"] .tich-toast {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .tich-toast--success {
    background: #14532d;
    border-color: #4ade80;
    border-left-color: #4ade80;
    color: #ecfdf5;
}

[data-theme="dark"] .tich-toast--error {
    background: #450a0a;
    border-color: #f87171;
    border-left-color: #f87171;
    color: #fef2f2;
}

[data-theme="dark"] .tich-toast__close:hover {
    background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .tich-admin {
    background: var(--tich-neutral);
}

[data-theme="dark"] .tich-admin-sidebar {
    background: var(--tich-white);
    border-color: var(--tich-neutral-border);
}

[data-theme="dark"] .tich-admin-sidebar-mobile__toggle {
    background: var(--tich-white);
    border-color: var(--tich-neutral-border);
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-admin-sidebar-mobile__toggle-icon {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .tich-admin-sidebar-mobile__backdrop {
    background: rgba(0, 0, 0, 0.62);
}

[data-theme="dark"] .tich-stat {
    background-color: var(--tich-white);
    border-color: var(--tich-neutral-border);
}

.tich-card--highlight {
    border-color: var(--tich-primary);
    box-shadow: 0 0 0 1px var(--tich-primary);
}

/* ??? Unit catalog (programme curriculum) ?????????????????????????????? */

.tich-catalog-panel { padding: 0; overflow: hidden; }
.tich-catalog-panel__head {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--tich-border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    background: var(--tich-surface);
}
.tich-catalog-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}
.tich-catalog-stat {
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--tich-border);
    background: var(--tich-surface-muted);
    color: var(--tich-text);
    font-size: 0.8125rem;
}
.tich-catalog-stat strong { font-weight: 600; color: var(--tich-text); }
.tich-catalog-unit-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tich-blue);
}
.tich-catalog-unit-name { font-weight: 500; margin-top: 0.15rem; color: var(--tich-text); }
.tich-catalog-hours { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--tich-text); }
.tich-catalog-status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}
.tich-catalog-status--active { background: #d1fae5; color: #065f46; }
.tich-catalog-status--draft { background: var(--tich-surface-muted); color: var(--tich-neutral-muted); border: 1px solid var(--tich-border); }
.tich-catalog-status--pending_registry { background: #fef3c7; color: #92400e; }
.tich-catalog-status--archived { background: #fee2e2; color: #991b1b; }
.tich-catalog-schedule-list { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.tich-catalog-schedule-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid var(--tich-border);
    background: var(--tich-surface);
    min-width: 9rem;
}
.tich-catalog-schedule-chip__period { font-size: 0.8125rem; font-weight: 600; color: var(--tich-text); }
.tich-catalog-schedule-chip__year { font-size: 0.75rem; color: var(--tich-neutral-muted); }
.tich-catalog-schedule-chip--muted {
    border-style: dashed;
    background: transparent;
    color: var(--tich-neutral-muted);
}
.tich-catalog-alloc-list { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.tich-catalog-alloc-card {
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--tich-border);
    background: var(--tich-surface);
}
.tich-catalog-alloc-card__name { font-weight: 600; font-size: 0.875rem; color: var(--tich-text); }
.tich-catalog-alloc-card__meta { font-size: 0.75rem; color: var(--tich-neutral-muted); margin-top: 0.15rem; }
.tich-catalog-alloc-empty { font-size: 0.8125rem; color: var(--tich-neutral-muted); font-style: italic; }
.tich-catalog-assign {
    margin-top: 0.65rem;
    border: 1px solid var(--tich-border);
    border-radius: 0.5rem;
    background: var(--tich-surface-muted);
    overflow: hidden;
}
.tich-catalog-assign summary {
    cursor: pointer;
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tich-blue);
    list-style: none;
}
.tich-catalog-assign summary::-webkit-details-marker { display: none; }
.tich-catalog-assign__body {
    padding: 0.75rem;
    border-top: 1px solid var(--tich-border);
    display: grid;
    gap: 0.65rem;
    background: var(--tich-surface);
}
.tich-catalog-actions { display: flex; flex-wrap: wrap; gap: 0.35rem 0.65rem; align-items: center; }
.tich-catalog-actions__group { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.tich-catalog-actions__label { font-size: 0.75rem; color: var(--tich-neutral-muted); }
.tich-catalog-hint {
    margin: 0 1.5rem 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--tich-notice-info-border);
    background: var(--tich-notice-info-bg);
    color: var(--tich-text);
    font-size: 0.875rem;
}
.tich-catalog-hint--success {
    border-color: var(--tich-green);
    background: var(--tich-green-light);
    color: var(--tich-text);
}

[data-theme="dark"] .tich-catalog-status--active {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}
[data-theme="dark"] .tich-catalog-status--draft {
    background: var(--tich-neutral);
    color: var(--tich-neutral-muted);
    border-color: var(--tich-border);
}
[data-theme="dark"] .tich-catalog-status--pending_registry {
    background: rgba(251, 191, 36, 0.2);
    color: #fcd34d;
}
[data-theme="dark"] .tich-catalog-status--archived {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}
[data-theme="dark"] .tich-catalog-hint--success {
    border-color: var(--tich-green);
    background: var(--tich-green-light);
    color: var(--tich-grey);
}

/* ??? Programs catalogue ??????????????????????????????????????????????? */

.tich-section--hero-plain {
    background: var(--tich-blue-light);
    border-bottom: 3px solid var(--tich-green);
}

.tich-featured-program {
    border: 2px solid var(--tich-green);
    padding: 0;
    overflow: hidden;
}

.tich-featured-program__media .tich-program-card__image,
.tich-featured-program__media .tich-program-card__placeholder {
    height: 18rem;
    object-fit: cover;
    object-position: center center;
    background: var(--tich-neutral, #f1f3f4);
}

.tich-featured-program__body {
    padding: 1.5rem;
}

.tich-featured-program__aside {
    padding: 1.25rem;
    background: var(--tich-neutral);
    border-radius: var(--radius-md);
}

/* ??? Application portal ??????????????????????????????????????????????? */

.tich-apply-progress {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
}

.tich-apply-progress__item {
    flex: 1;
    min-width: 5rem;
    text-align: center;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    background: var(--tich-white);
}

.tich-apply-progress__item.is-current {
    border-color: var(--tich-blue);
    background: var(--tich-blue-light);
}

.tich-apply-progress__item.is-complete {
    border-color: var(--tich-green);
}

.tich-apply-progress__index {
    display: block;
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--tich-blue);
}

.tich-apply-progress__label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--tich-grey);
    margin-top: 0.25rem;
}

.tich-apply-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.tich-review-list {
    display: grid;
    gap: 0.75rem;
}

.tich-review-list div {
    display: grid;
    gap: 0.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--tich-neutral-border);
}

.tich-review-list dt {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tich-grey);
}

.tich-review-list dd {
    margin: 0;
    font-family: var(--font-body);
    color: var(--tich-grey);
}

/* ??? Theme toggle ????????????????????????????????????????????????????? */

.tich-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--tich-grey);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tich-theme-toggle:hover {
    background: var(--tich-blue-light);
    border-color: var(--tich-blue);
    color: var(--tich-blue);
}

.tich-theme-toggle__icon {
    display: block;
}

.tich-theme-toggle__icon--sun {
    display: none;
}

.tich-theme-toggle.is-dark .tich-theme-toggle__icon--moon {
    display: none;
}

.tich-theme-toggle.is-dark .tich-theme-toggle__icon--sun {
    display: block;
}

/* ??? Nav notification bell ????????????????????????????????????????????? */

.tich-nav-notification {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--tich-grey);
    text-decoration: none;
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tich-nav-notification:hover,
.tich-nav-notification.is-active {
    background: var(--tich-blue-light);
    border-color: var(--tich-blue);
    color: var(--tich-blue);
}

.tich-nav-notification__badge {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
    border: 2px solid var(--tich-white);
    pointer-events: none;
}

[data-theme="dark"] .tich-nav-notification__badge {
    border-color: var(--tich-surface, #0f172a);
}

.tich-nav-drawer__notifications {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tich-notification-card__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.tich-notification-card__link {
    display: block;
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.tich-notification-card__link:hover .tich-h3 {
    color: var(--tich-blue);
}

.tich-notification-card__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.tich-notification-card--linked {
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tich-notification-card--linked:hover {
    border-color: var(--tich-blue);
    box-shadow: 0 0 0 1px rgba(22, 105, 166, 0.12);
}

.tich-notification-card--unread {
    border-left: 4px solid var(--tich-blue);
}

body.page-home .tich-header--over-hero .tich-nav-notification {
    border-color: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.95);
}

body.page-home .tich-header--over-hero .tich-nav-notification:hover,
body.page-home .tich-header--over-hero .tich-nav-notification.is-active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-nav-notification {
    border-color: var(--tich-neutral-border);
    color: var(--tich-grey);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-nav-notification:hover,
body.page-home .tich-header--over-hero.tich-header--solid .tich-nav-notification.is-active {
    background: var(--tich-blue-light);
    border-color: var(--tich-blue);
    color: var(--tich-blue);
}

body.page-home .tich-header--over-hero .tich-theme-toggle {
    border-color: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.95);
}

body.page-home .tich-header--over-hero .tich-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-theme-toggle {
    border-color: var(--tich-neutral-border);
    color: var(--tich-grey);
}

body.page-home .tich-header--over-hero.tich-header--solid .tich-theme-toggle:hover {
    background: var(--tich-blue-light);
    border-color: var(--tich-blue);
    color: var(--tich-blue);
}

.tich-nav-drawer__theme {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0 1rem;
    border-bottom: 1px solid var(--tich-neutral-border);
    margin-bottom: 0.5rem;
}

.tich-auth-main__toolbar {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    max-width: 28rem;
    margin: 0 auto 1rem;
}

@media (min-width: 1024px) {
    .tich-auth-main__toolbar {
        max-width: none;
        padding-right: 1rem;
    }
}

/* ??? Dark theme ??????????????????????????????????????????????????????? */

[data-theme="dark"] {
    color-scheme: dark;

    --tich-grey: #e2e8f0;
    --tich-neutral: #0f1419;
    --tich-neutral-border: #334155;
    --tich-neutral-muted: #94a3b8;
    --tich-white: #1e293b;
    --tich-green: #8bc34a;
    --tich-green-dark: #7cb342;
    --tich-green-light: #1a2e14;
    --tich-blue: #60a5fa;
    --tich-blue-dark: #3b82f6;
    --tich-blue-light: #1e3a52;
    --tich-error-bg: #3f1515;
    --tich-error-border: #7f1d1d;
    --tich-error-text: #fecaca;
    --tich-notice-warning-bg: #3b3010;
    --tich-notice-warning-border: #854d0e;
    --tich-notice-info-bg: #1e293b;
    --tich-notice-info-border: #475569;
    --tich-focus-ring: rgba(96, 165, 250, 0.25);

    --tich-status-success-bg: rgba(34, 197, 94, 0.22);
    --tich-status-success-text: #86efac;
    --tich-status-success-border: rgba(34, 197, 94, 0.45);
    --tich-status-danger-bg: rgba(239, 68, 68, 0.22);
    --tich-status-danger-text: #fca5a5;
    --tich-status-danger-border: rgba(239, 68, 68, 0.45);
    --tich-status-warning-bg: rgba(249, 115, 22, 0.24);
    --tich-status-warning-text: #fdba74;
    --tich-status-warning-border: rgba(249, 115, 22, 0.5);
    --tich-status-caution-bg: rgba(234, 179, 8, 0.24);
    --tich-status-caution-text: #fde047;
    --tich-status-caution-border: rgba(234, 179, 8, 0.5);
    --tich-status-info-bg: rgba(59, 130, 246, 0.24);
    --tich-status-info-text: #93c5fd;
    --tich-status-info-border: rgba(59, 130, 246, 0.5);
    --tich-status-neutral-bg: rgba(148, 163, 184, 0.18);
    --tich-status-neutral-text: #cbd5e1;
    --tich-status-neutral-border: rgba(148, 163, 184, 0.35);

    --tich-surface: var(--tich-white);
    --tich-surface-muted: #131c28;
    --tich-text: var(--tich-grey);
    --tich-border: var(--tich-neutral-border);
}

[data-theme="dark"] .tich-input,
[data-theme="dark"] .tich-select,
[data-theme="dark"] textarea.tich-input {
    color: var(--tich-grey);
    background-color: var(--tich-neutral);
    border-color: var(--tich-border);
}

[data-theme="dark"] .tich-input[type="date"],
[data-theme="dark"] .tich-input[type="datetime-local"],
[data-theme="dark"] .tich-input[type="time"] {
    color-scheme: dark;
}

[data-theme="dark"] .tich-input::placeholder {
    color: var(--tich-neutral-muted);
}

[data-theme="dark"] .tich-input:focus,
[data-theme="dark"] .tich-select:focus,
[data-theme="dark"] textarea.tich-input:focus {
    border-color: var(--tich-blue);
    box-shadow: 0 0 0 3px var(--tich-focus-ring);
}

[data-theme="dark"] select.tich-input,
[data-theme="dark"] select.tich-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

[data-theme="dark"] select.tich-input option,
[data-theme="dark"] select.tich-select option {
    background: var(--tich-white);
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-dropdown__trigger {
    color: var(--tich-grey);
    background: var(--tich-neutral);
    border-color: var(--tich-border);
    box-shadow: none;
}

[data-theme="dark"] .tich-dropdown__trigger:hover {
    background: #1a2430;
    border-color: #475569;
}

[data-theme="dark"] .tich-dropdown__menu {
    background: var(--tich-white);
    border-color: var(--tich-border);
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.35),
        0 4px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .tich-dropdown__option:hover,
[data-theme="dark"] .tich-dropdown__option:focus-visible {
    background: rgba(22, 105, 166, 0.18);
    color: #bfdbfe;
}

[data-theme="dark"] .tich-dropdown__option.is-selected {
    background: rgba(108, 171, 51, 0.18);
    color: #bbf7d0;
}

[data-theme="dark"] .tich-inset-panel {
    background: var(--tich-surface-muted);
    border-color: var(--tich-border);
}

[data-theme="dark"] .tich-inset-panel .tich-text,
[data-theme="dark"] .tich-inset-panel .tich-label {
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-inset-panel .tich-caption {
    color: var(--tich-neutral-muted);
}

[data-theme="dark"] .tich-h1,
[data-theme="dark"] h1.tich-h1 {
    color: var(--tich-green);
}

[data-theme="dark"] .tich-h2,
[data-theme="dark"] h2.tich-h2 {
    color: #f1f5f9;
}

[data-theme="dark"] .tich-h3,
[data-theme="dark"] h3.tich-h3 {
    color: var(--tich-blue);
}

[data-theme="dark"] .tich-caption {
    color: var(--tich-blue);
}

[data-theme="dark"] .tich-btn-secondary {
    background-color: var(--tich-white);
    color: var(--tich-blue);
}

[data-theme="dark"] .tich-btn-secondary:hover {
    background-color: var(--tich-blue-light);
}

[data-theme="dark"] .tich-btn-ghost:hover {
    background-color: var(--tich-blue-light);
    border-color: var(--tich-neutral-border);
}

[data-theme="dark"] .tich-header {
    background-color: var(--tich-white);
    border-bottom-color: var(--tich-neutral-border);
}

/* Transparent home hero nav must stay light until scroll (dark tokens remap --tich-white). */
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
}

[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-brand__name,
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-brand__tagline,
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-brand--light .tich-brand__name,
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-brand--light .tich-brand__tagline {
    color: #ffffff;
}

[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-brand--light .tich-brand__tagline {
    color: rgba(255, 255, 255, 0.88);
}

[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav__link,
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav__action-btn--ghost,
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav__more-toggle,
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-theme-toggle,
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav-notification {
    color: rgba(255, 255, 255, 0.92);
}

[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav__link:hover,
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav__action-btn--ghost:hover,
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-theme-toggle:hover,
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav-notification:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav__link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav__link.is-active .tich-nav__icon,
[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav__icon {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav-toggle {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav-toggle span {
    background: #ffffff;
}

[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-nav__actions {
    border-left-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] body.page-home .tich-header--over-hero:not(.tich-header--solid) .tich-theme-toggle {
    border-color: rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] .tich-nav-drawer {
    background: var(--tich-white);
    border-top-color: var(--tich-neutral-border);
}

[data-theme="dark"] .tich-nav-drawer__backdrop {
    background: rgba(0, 0, 0, 0.62);
}

[data-theme="dark"] .tich-header.is-nav-open {
    background: transparent;
}

[data-theme="dark"] .tich-header.is-nav-open .tich-header__inner {
    background: transparent;
}

[data-theme="dark"] .tich-header.is-nav-open .tich-nav-toggle {
    background: var(--tich-white);
}

[data-theme="dark"] .tich-nav-drawer__link {
    border-bottom-color: var(--tich-neutral-border);
}

[data-theme="dark"] .tich-nav__icon {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .tich-nav__link.is-active,
[data-theme="dark"] .tich-nav-drawer__link.is-active {
    background: var(--tich-blue-light);
}

[data-theme="dark"] .tich-nav__more-menu {
    background: var(--tich-white);
    border-color: var(--tich-neutral-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .tich-nav__more-link:hover,
[data-theme="dark"] .tich-nav__more-link.is-active {
    background: var(--tich-blue-light);
}

[data-theme="dark"] .tich-nav__actions {
    border-left-color: var(--tich-neutral-border);
}

[data-theme="dark"] body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__link.is-active .tich-nav__icon {
    background: var(--tich-blue);
    color: #fff;
}

[data-theme="dark"] .tich-section--hero-plain {
    background: var(--tich-blue-light);
}

[data-theme="dark"] .tich-featured-program__aside {
    background: var(--tich-neutral);
}

[data-theme="dark"] body.page-home .tich-header--over-hero.tich-header--solid {
    background: transparent;
    border-bottom-color: var(--tich-neutral-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] body.page-home .tich-header--over-hero.tich-header--solid::before {
    background: rgba(15, 20, 25, 0.96);
}

[data-theme="dark"] body.page-home .tich-header--over-hero.tich-header--solid .tich-brand__name,
[data-theme="dark"] body.page-home .tich-header--over-hero.tich-header--solid .tich-brand__tagline,
[data-theme="dark"] body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__link {
    color: var(--tich-grey);
}

[data-theme="dark"] body.page-home .tich-header--over-hero.tich-header--solid .tich-nav__link:hover {
    background: var(--tich-blue-light);
    color: var(--tich-blue);
}

[data-theme="dark"] body.page-home .tich-header--over-hero.tich-header--solid .tich-nav-toggle {
    background: var(--tich-white);
    border-color: var(--tich-neutral-border);
}

[data-theme="dark"] body.page-home .tich-header--over-hero.tich-header--solid .tich-nav-toggle span {
    background: var(--tich-grey);
}

[data-theme="dark"] .tich-admin-sidebar__nav a:hover,
[data-theme="dark"] .tich-admin-sidebar__nav a.is-active,
[data-theme="dark"] .tich-admin-sidebar__link:hover,
[data-theme="dark"] .tich-admin-sidebar__link.is-active {
    background: var(--tich-blue-light);
    color: var(--tich-blue);
}

[data-theme="dark"] .tich-admin-sidebar__icon {
    background: rgba(148, 163, 184, 0.12);
}

[data-theme="dark"] .tich-admin-sidebar__nav a.is-active .tich-admin-sidebar__icon,
[data-theme="dark"] .tich-admin-sidebar__link.is-active .tich-admin-sidebar__icon {
    background: var(--tich-primary);
    color: #fff;
}

[data-theme="dark"] .tich-admin-sidebar__link .tich-notification-badge--sidebar,
[data-theme="dark"] .tich-admin-sidebar__group-toggle .tich-notification-badge--sidebar {
    --sidebar-badge-bg: #dc2626;
    --sidebar-badge-color: #fff;
    --sidebar-badge-bg-hover: #ef4444;
    --sidebar-badge-color-hover: #fff;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.45);
}

[data-theme="dark"] .tich-admin-sidebar__link--sub .tich-notification-badge--sidebar {
    --sidebar-badge-bg: #b91c1c;
    --sidebar-badge-color: #fff;
    --sidebar-badge-bg-hover: #dc2626;
    --sidebar-badge-color-hover: #fff;
}

[data-theme="dark"] .tich-card--highlight {
    border-color: var(--tich-green);
    box-shadow: 0 0 0 1px var(--tich-green);
}

[data-theme="dark"] .tich-theme-toggle:hover {
    background: var(--tich-blue-light);
    color: var(--tich-blue);
}

[data-theme="dark"] .tich-auth-aside {
    background-color: var(--tich-blue-dark);
}

[data-theme="dark"] select option {
    background: var(--tich-white);
    color: var(--tich-grey);
}

/* ??? Modals (admin popups) ???????????????????????????????????????????? */

.tich-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.tich-modal.is-open {
    display: flex;
}

.tich-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(73, 76, 80, 0.55);
}

[data-theme="dark"] .tich-modal__backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.tich-modal__dialog {
    position: relative;
    width: min(100%, 32rem);
    max-height: calc(100vh - 3rem);
    overflow: auto;
    background: var(--tich-surface);
    color: var(--tich-text);
    border-radius: var(--radius-md);
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.18);
    border-top: 4px solid var(--tich-green);
}

[data-theme="dark"] .tich-modal__dialog {
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45);
}

.tich-modal__dialog--wide {
    width: min(100%, 40rem);
}

.tich-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 0;
}

.tich-modal__close {
    border: 0;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--tich-neutral-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.tich-modal__close:hover {
    color: var(--tich-text);
}

.tich-modal__body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.tich-modal__errors {
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--tich-error-border);
    border-radius: var(--radius-sm);
    background: var(--tich-error-bg);
    color: var(--tich-error-text);
}

.tich-modal__errors .tich-text {
    color: inherit;
}

.tich-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tich-border);
}

/* Employee profile photo + crop dialog */
.tich-employee-profile-photo {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.tich-employee-profile-photo__preview {
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--tich-neutral-border);
    background: var(--tich-surface-muted, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.tich-employee-profile-photo__preview.is-ready {
    border-color: var(--tich-green);
    box-shadow: 0 0 0 2px rgba(108, 171, 51, 0.25);
}

.tich-employee-profile-photo__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tich-employee-profile-photo__placeholder {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--tich-blue);
}

.tich-employee-profile-photo__actions {
    flex: 1 1 12rem;
    min-width: 0;
}

.tich-photo-crop-modal__dialog {
    width: min(100%, 34rem);
    max-height: calc(100vh - 2rem);
}

.tich-photo-crop-modal__header {
    padding-bottom: 0.5rem;
}

.tich-photo-crop-modal__body {
    padding-top: 0.5rem;
}

.tich-photo-crop-modal__stage {
    position: relative;
    max-height: min(52vh, 360px);
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #0f172a;
    border: 1px solid var(--tich-neutral-border);
}

.tich-photo-crop-modal__stage img {
    display: block;
    max-width: 100%;
}

.tich-photo-crop-modal__hint {
    margin-top: 0.75rem;
    color: var(--tich-neutral-muted);
}

.tich-photo-crop-modal__footer {
    margin-top: 0;
}

body.is-photo-crop-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .tich-photo-crop-modal__dialog {
        width: min(100%, calc(100vw - 1rem));
        margin: 0.5rem;
    }

    .tich-photo-crop-modal__stage {
        min-height: 180px;
        max-height: 45vh;
    }

    .tich-photo-crop-modal__footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .tich-photo-crop-modal__footer .tich-btn {
        width: 100%;
    }
}

.tich-squircle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--tich-border);
    border-radius: 0.65rem;
    background: var(--tich-surface);
    color: var(--tich-blue);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tich-squircle-btn:hover {
    background: var(--tich-blue-light);
    border-color: var(--tich-blue);
}

.tich-squircle-btn:focus-visible {
    outline: 2px solid var(--tich-blue);
    outline-offset: 2px;
}

/* Readable typography inside modals (overrides global dark blue headings/captions) */

[data-theme="dark"] .tich-modal .tich-h3,
[data-theme="dark"] .tich-modal h3.tich-h3 {
    color: #f1f5f9;
}

[data-theme="dark"] .tich-modal .tich-caption {
    color: var(--tich-neutral-muted);
}

[data-theme="dark"] .tich-modal .tich-label,
[data-theme="dark"] .tich-modal .tich-text {
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-modal .tich-input,
[data-theme="dark"] .tich-modal .tich-select,
[data-theme="dark"] .tich-modal textarea.tich-input {
    background-color: var(--tich-neutral);
    border-color: var(--tich-neutral-border);
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-modal .tich-input::placeholder {
    color: var(--tich-neutral-muted);
}

[data-theme="dark"] .tich-modal .tich-btn-secondary {
    background-color: var(--tich-neutral);
    border-color: var(--tich-neutral-border);
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-modal .tich-btn-secondary:hover {
    background-color: var(--tich-blue-light);
    border-color: var(--tich-blue);
    color: var(--tich-blue);
}

/* ??? Error pages ????????????????????????????????????????????????????????? */

.tich-error-page {
    min-height: calc(100vh - var(--tich-header-height) - 4rem);
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.tich-error-page__card {
    max-width: 40rem;
    margin: 0 auto;
    text-align: center;
    padding: 2.5rem 2rem;
    border-top: 4px solid var(--tich-blue);
}

.tich-error-page__code {
    font-family: var(--font-ui);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--tich-blue);
    margin: 0 0 1rem;
}

.tich-error-page__title {
    margin: 0 0 1rem;
    font-size: 2rem;
}

.tich-error-page__message {
    margin: 0 auto 0.75rem;
    max-width: 32rem;
}

.tich-error-page__hint {
    margin: 0 auto 1.5rem;
    max-width: 30rem;
    color: var(--tich-neutral-muted);
}

.tich-error-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tich-error-page__support {
    margin: 0;
    color: var(--tich-neutral-muted);
}

/* ??? Attendance verification ????????????????????????????????????????????? */

.tich-attendance-flag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.tich-attendance-flag--green {
    background: #dcfce7;
    color: #166534;
}

.tich-attendance-flag--amber {
    background: #fef3c7;
    color: #92400e;
}

.tich-attendance-flag--red {
    background: #fee2e2;
    color: #991b1b;
}

.tich-attendance-flag--neutral {
    background: var(--tich-neutral);
    color: var(--tich-neutral-muted);
}

.tich-attendance-steps {
    margin: 0;
    padding-left: 1.25rem;
}

.tich-attendance-steps li {
    margin-bottom: 1rem;
    color: var(--tich-neutral-muted);
}

.tich-attendance-steps li.is-done {
    color: var(--tich-grey);
}

.tich-attendance-steps li.is-current {
    color: var(--tich-blue);
    font-weight: 600;
}

.tich-attendance-matrix td:last-child {
    max-width: 28rem;
}

/* ??? Competency spreadsheet / performance terminal ??????????????????????? */

.tich-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tich-tabs__btn {
    border: 1px solid var(--tich-neutral-border);
    background: var(--tich-white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.875rem;
}

a.tich-tabs__btn {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tich-tabs__btn.is-active {
    background: var(--tich-blue);
    border-color: var(--tich-blue);
    color: var(--tich-on-brand);
}

.tich-tabs__panel {
    display: none;
}

.tich-tabs__panel.is-active {
    display: block;
}

.tich-competency-grid-wrap {
    overflow: auto;
    max-height: 70vh;
    border: 1px solid var(--tich-border);
    border-radius: var(--radius-md);
}

.tich-competency-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.tich-competency-grid th,
.tich-competency-grid td {
    border: 1px solid var(--tich-border);
    padding: 0.55rem 0.65rem;
    white-space: nowrap;
    background: var(--tich-surface);
    color: var(--tich-text);
}

.tich-competency-grid tbody tr:nth-child(even) td {
    background: var(--tich-surface-muted);
}

.tich-competency-grid thead th {
    background: var(--tich-surface-muted);
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--tich-neutral-muted);
}

.tich-competency-grid__sticky {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--tich-surface);
    min-width: 7rem;
}

.tich-competency-grid thead .tich-competency-grid__sticky {
    z-index: 3;
    background: var(--tich-surface-muted);
}

.tich-competency-grid__input {
    width: 4.5rem;
    padding: 0.35rem 0.4rem;
    border: 1px solid var(--tich-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    background: var(--tich-surface);
    color: var(--tich-text);
}

.tich-competency-grid__fail {
    background: #fef2f2;
}

[data-theme="dark"] .tich-competency-grid th,
[data-theme="dark"] .tich-competency-grid td {
    border-color: var(--tich-border);
    color: var(--tich-text);
}

[data-theme="dark"] .tich-competency-grid tbody tr:nth-child(even) td {
    background: var(--tich-surface-muted);
}

[data-theme="dark"] .tich-competency-grid thead th,
[data-theme="dark"] .tich-competency-grid thead .tich-competency-grid__sticky {
    background: var(--tich-surface-muted);
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-competency-grid__sticky {
    background: var(--tich-surface);
}

[data-theme="dark"] .tich-competency-grid__fail {
    background: rgba(239, 68, 68, 0.15);
}

/* Staff grading / marks terminal */
.tich-grading-question-card {
    padding: 1rem;
    background: var(--tich-surface-muted);
    border-color: var(--tich-border);
}

.tich-grading-details {
    border: 1px solid var(--tich-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    background: var(--tich-surface-muted);
}

.tich-grading-details__summary {
    cursor: pointer;
    list-style: none;
}

.tich-grading-details__summary::-webkit-details-marker {
    display: none;
}

.tich-teaching-context {
    border-left: 4px solid var(--tich-blue);
}

[data-theme="dark"] .tich-dept-header .tich-text {
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-tabs__btn {
    background: var(--tich-white);
    border-color: var(--tich-border);
    color: var(--tich-text);
}

[data-theme="dark"] .tich-tabs__btn:hover {
    background: var(--tich-surface-muted);
    border-color: #475569;
}

[data-theme="dark"] .tich-tabs__btn.is-active {
    background: var(--tich-blue);
    border-color: var(--tich-blue);
    color: #fff;
}

[data-theme="dark"] .tich-competency-grid-wrap {
    border-color: var(--tich-border);
    background: var(--tich-neutral);
}

[data-theme="dark"] .tich-competency-grid__input {
    background: var(--tich-neutral);
    border-color: var(--tich-border);
    color: var(--tich-text);
}

[data-theme="dark"] .tich-competency-grid__input:focus {
    border-color: var(--tich-blue);
    box-shadow: 0 0 0 2px var(--tich-focus-ring);
    outline: none;
}

[data-theme="dark"] .tich-competency-grid select.tich-competency-grid__input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.35rem center;
    padding-right: 1.5rem;
}

[data-theme="dark"] .tich-competency-grid select.tich-competency-grid__input option {
    background: var(--tich-white);
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-competency-grid tbody tr:nth-child(even) .tich-competency-grid__sticky {
    background: var(--tich-surface-muted);
}

[data-theme="dark"] .tich-competency-grid thead .tich-caption,
[data-theme="dark"] .tich-competency-grid .tich-competency-grid__sticky .tich-caption {
    color: var(--tich-neutral-muted);
}

[data-theme="dark"] .tich-grading-question-card {
    background: var(--tich-surface-muted);
    border-color: var(--tich-border);
}

[data-theme="dark"] .tich-grading-details {
    background: var(--tich-surface-muted);
    border-color: var(--tich-border);
}

[data-theme="dark"] .tich-grading-details .tich-text,
[data-theme="dark"] .tich-grading-details .tich-caption {
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-grading-details .tich-caption {
    color: var(--tich-neutral-muted);
}

[data-theme="dark"] .tich-teaching-context {
    background: var(--tich-white);
    border-color: var(--tich-border);
    border-left-color: var(--tich-blue);
}

[data-theme="dark"] .tich-teaching-context .tich-text {
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-teaching-context .tich-caption {
    color: var(--tich-neutral-muted);
}

[data-theme="dark"] .tich-dept-stats .tich-stat__value {
    color: var(--tich-blue);
}

[data-theme="dark"] .tich-card .tich-caption code,
[data-theme="dark"] .tich-grading-details code {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--tich-border);
    color: #e2e8f0;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
}

.tich-form-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.tich-form-toolbar .tich-caption {
    margin: 0;
    flex: 1 1 16rem;
}

.tich-autosave-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--tich-border);
    background: var(--tich-surface-muted);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tich-neutral-muted);
    white-space: nowrap;
}

.tich-autosave-status[data-state="pending"] {
    color: #92400e;
    background: #fef3c7;
    border-color: #fcd34d;
}

.tich-autosave-status[data-state="saving"] {
    color: var(--tich-blue);
    background: var(--tich-blue-light);
    border-color: rgba(22, 105, 166, 0.25);
}

.tich-autosave-status[data-state="saved"] {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.tich-autosave-status[data-state="error"] {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

[data-theme="dark"] .tich-autosave-status {
    background: var(--tich-surface-muted);
    border-color: var(--tich-border);
    color: var(--tich-neutral-muted);
}

[data-theme="dark"] .tich-autosave-status[data-state="pending"] {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .tich-autosave-status[data-state="saving"] {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .tich-autosave-status[data-state="saved"] {
    color: #86efac;
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.35);
}

[data-theme="dark"] .tich-autosave-status[data-state="error"] {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
}

/* ??? Careers & job applications ??????????????????????????????????????? */

.tich-careers-page {
    background: var(--tich-neutral);
    min-height: 60vh;
}

.tich-careers-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
}

.tich-careers-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--tich-blue-light);
    color: var(--tich-blue);
}

.tich-careers-card__excerpt {
    color: var(--tich-grey);
    margin: 0 0 1rem;
    line-height: 1.65;
}

.tich-careers-card__details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem 1.25rem;
    margin: 0;
}

.tich-careers-card__details dt {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tich-muted, #64748b);
    margin-bottom: 0.125rem;
}

.tich-careers-card__details dd {
    margin: 0;
    color: var(--tich-text, inherit);
    font-size: 0.9375rem;
}

.tich-careers-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tich-careers-grid {
    align-items: stretch;
}

.tich-careers-card__actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

.tich-careers-card__actions .tich-btn {
    flex: 1 1 auto;
    text-align: center;
    min-width: 7rem;
}

.tich-form-callout {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 1rem 1.125rem;
}

.tich-form-callout--muted {
    background: var(--tich-neutral);
    border-color: var(--tich-neutral-border);
    text-align: left;
}

.tich-careers-confirmation {
    padding: 3rem 2rem;
}

.tich-careers-confirmation__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--tich-green);
}

.tich-careers-confirmation__summary p {
    margin: 0.35rem 0;
}

[data-theme="dark"] .tich-careers-page {
    background: var(--tich-neutral);
}

[data-theme="dark"] .tich-careers-tag {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

[data-theme="dark"] .tich-careers-card__excerpt,
[data-theme="dark"] .tich-careers-card__details dt {
    color: var(--tich-muted, #94a3b8);
}

[data-theme="dark"] .tich-careers-card__details dd {
    color: var(--tich-text, #e2e8f0);
}

[data-theme="dark"] .tich-form-callout {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: var(--tich-text, #e2e8f0);
}

[data-theme="dark"] .tich-form-callout--muted {
    background: var(--tich-white);
    border-color: var(--tich-neutral-border);
}

[data-theme="dark"] input[type="file"].tich-input {
    color: var(--tich-text, #e2e8f0);
}

[data-theme="dark"] input[type="file"].tich-input::file-selector-button {
    background: var(--tich-surface-muted);
    color: var(--tich-text, #e2e8f0);
    border: 1px solid var(--tich-neutral-border);
}

[data-theme="dark"] .tich-careers-confirmation__icon {
    color: #86efac;
}

/* HR document viewer */
.doc-viewer__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-end;
}

.doc-viewer__application-select {
    min-width: min(100%, 20rem);
}

.doc-viewer {
    display: grid;
    grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
    gap: 1rem;
    min-height: 32rem;
}

.doc-viewer__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 40rem;
    overflow: auto;
    padding-right: 0.25rem;
}

.doc-viewer__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--tich-border, #e2e4e5);
    border-radius: 0.375rem;
    background: var(--tich-surface, #fff);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.doc-viewer__item:hover,
.doc-viewer__item.is-active {
    border-color: var(--tich-blue, #1669a6);
    background: rgba(22, 105, 166, 0.06);
}

.doc-viewer__item-label {
    font-weight: 600;
    color: var(--tich-text, #494c50);
    font-size: 0.9375rem;
}

.doc-viewer__item-file {
    font-size: 0.75rem;
    color: #6b6e72;
    word-break: break-word;
}

.doc-viewer__panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--tich-border, #e2e4e5);
    border-radius: 0.375rem;
    overflow: hidden;
    background: #fafafa;
}

.doc-viewer__panel--full {
    grid-column: 1 / -1;
}

.doc-viewer__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.875rem 1rem;
    background: var(--tich-surface, #fff);
    border-bottom: 1px solid var(--tich-border, #e2e4e5);
}

.doc-viewer__toolbar-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.doc-viewer__toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: auto;
}

.doc-viewer__stage {
    flex: 1;
    min-height: 28rem;
    background: #525659;
}

.doc-viewer__frame,
.doc-viewer__image {
    width: 100%;
    height: 100%;
    min-height: 28rem;
    border: 0;
    display: block;
    object-fit: contain;
    background: #525659;
}

.doc-viewer__fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 28rem;
    padding: 2rem;
    text-align: center;
    background: var(--tich-surface, #fff);
}

@media (max-width: 900px) {
    .doc-viewer {
        grid-template-columns: 1fr;
    }

    .doc-viewer__list {
        max-height: none;
    }

    .doc-viewer__toolbar-actions {
        margin-left: 0;
        width: 100%;
    }
}

[data-theme="dark"] .doc-viewer__item {
    background: var(--tich-white);
    border-color: var(--tich-neutral-border);
}

[data-theme="dark"] .doc-viewer__item:hover,
[data-theme="dark"] .doc-viewer__item.is-active {
    background: rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
}

[data-theme="dark"] .doc-viewer__item-label {
    color: var(--tich-text, #e2e8f0);
}

[data-theme="dark"] .doc-viewer__item-file {
    color: var(--tich-muted, #94a3b8);
}

[data-theme="dark"] .doc-viewer__panel,
[data-theme="dark"] .doc-viewer__toolbar,
[data-theme="dark"] .doc-viewer__fallback {
    background: var(--tich-white);
    border-color: var(--tich-neutral-border);
}

/* ??? Leave portal UI ??????????????????????????????????????????????????? */

.tich-modal__dialog--leave {
    width: min(100%, 36rem);
}

.tich-leave-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1.5rem 1.75rem;
    border-radius: var(--radius-md);
    background: var(--tich-surface);
    border: 1px solid var(--tich-border);
    border-left: 4px solid var(--tich-green);
}

.tich-leave-hero__title {
    margin: 0.35rem 0 0;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.tich-leave-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 0.75rem;
}

.tich-leave-hero__dates {
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--tich-text);
}

.tich-leave-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    text-align: right;
}

.tich-leave-hero__stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: var(--tich-green);
}

.tich-kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 1.25rem 1.5rem;
}

.tich-pagination-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
}

.tich-pagination-footer__meta {
    font-size: 0.8125rem;
    color: var(--tich-text-muted, #64748b);
}

.tich-pagination-footer__links {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.tich-pagination-footer__per-page {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}

.tich-pagination-footer__per-page .tich-input--compact {
    width: auto;
    min-width: 4.5rem;
}

.tich-admin-table th.tich-col-num,
.tich-admin-table td.tich-col-num {
    width: 3rem;
    text-align: right;
    color: var(--tich-text-muted, #64748b);
    white-space: nowrap;
}

/* Generic entity detail pages (procurement, HR docs, etc.) */
.tich-entity-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1.35rem 1.6rem;
    margin-top: 1.5rem;
    border-radius: var(--radius-md);
    background: var(--tich-white, #fff);
    border: 1px solid var(--tich-neutral-border, var(--tich-border));
    border-left: 4px solid var(--tich-blue, #1d4ed8);
}

.tich-entity-hero--success {
    border-left-color: var(--tich-green, #15803d);
}

.tich-entity-hero--warning {
    border-left-color: #d97706;
}

.tich-entity-hero--danger {
    border-left-color: #dc2626;
}

.tich-entity-hero__eyebrow {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tich-text-muted, #64748b);
}

.tich-entity-hero__title {
    margin: 0.3rem 0 0;
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--tich-text, #0f172a);
}

.tich-entity-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.9rem;
    margin-top: 0.65rem;
    color: var(--tich-text-muted, #64748b);
    font-size: 0.875rem;
}

.tich-entity-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    text-align: right;
    min-width: 7rem;
}

.tich-entity-hero__stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--tich-text-muted, #64748b);
}

.tich-entity-hero__stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--tich-blue, #1d4ed8);
    word-break: break-word;
}

.tich-detail-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: start;
}

@media (min-width: 768px) {
    .tich-detail-grid--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tich-detail-grid--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.tich-detail-card {
    padding: 1.25rem 1.35rem;
    background: var(--tich-white, #fff);
    border: 1px solid var(--tich-neutral-border, var(--tich-border));
    border-radius: var(--radius-md);
}

.tich-detail-card--span {
    grid-column: 1 / -1;
}

.tich-detail-card__title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tich-text-muted, #64748b);
    margin: 0 0 0.85rem;
}

.tich-detail-card__subtitle {
    margin: -0.35rem 0 0.85rem;
    font-size: 0.8125rem;
    color: var(--tich-text-muted, #64748b);
}

.tich-dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.tich-dl > dt,
.tich-dl > dd {
    margin: 0;
}

/* Legacy bare dt/dd pairs (without __row) still read as label/value rows */
.tich-dl:not(:has(.tich-dl__row)) {
    display: grid;
    grid-template-columns: minmax(7rem, 36%) 1fr;
    gap: 0.55rem 0.85rem;
    align-items: baseline;
}

.tich-dl:not(:has(.tich-dl__row)) > dt {
    font-size: 0.8125rem;
    color: var(--tich-text-muted, #64748b);
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--tich-neutral-border, #e2e8f0);
}

.tich-dl:not(:has(.tich-dl__row)) > dd {
    font-size: 0.9375rem;
    word-break: break-word;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--tich-neutral-border, #e2e8f0);
}

.tich-dl:not(:has(.tich-dl__row)) > dt:nth-last-of-type(1),
.tich-dl:not(:has(.tich-dl__row)) > dd:nth-last-of-type(1) {
    border-bottom: none;
    padding-bottom: 0;
}

.tich-dl__row {
    display: grid;
    grid-template-columns: minmax(7rem, 38%) 1fr;
    gap: 0.75rem;
    align-items: baseline;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--tich-neutral-border, #e2e8f0);
}

.tich-dl__row:first-child {
    padding-top: 0;
}

.tich-dl__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tich-dl__label {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--tich-text-muted, #64748b);
}

.tich-dl__value {
    margin: 0;
    font-size: 0.9375rem;
    word-break: break-word;
    color: var(--tich-text, #0f172a);
}

.tich-approval-track {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 0;
}

.tich-approval-step {
    flex: 1 1 8rem;
    min-width: 7rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--tich-neutral-border, #e2e8f0);
    background: var(--tich-surface-muted, #f8fafc);
}

.tich-approval-step__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--tich-text-muted, #64748b);
}

.tich-approval-step__state {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tich-text, #0f172a);
}

.tich-approval-step.is-done {
    border-color: #86efac;
    background: #f0fdf4;
}

.tich-approval-step.is-done .tich-approval-step__state {
    color: #15803d;
}

.tich-approval-step.is-current {
    border-color: #93c5fd;
    background: #eff6ff;
}

.tich-approval-step.is-current .tich-approval-step__state {
    color: #1d4ed8;
}

.tich-approval-step.is-rejected {
    border-color: #fca5a5;
    background: #fef2f2;
}

.tich-approval-step.is-rejected .tich-approval-step__state {
    color: #b91c1c;
}

.tich-doc-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.tich-doc-link-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--tich-neutral-border, #e2e8f0);
    border-radius: var(--radius-md);
    background: var(--tich-surface-muted, #f8fafc);
}

[data-theme="dark"] .tich-entity-hero,
[data-theme="dark"] .tich-detail-card,
[data-theme="dark"] .tich-approval-step,
[data-theme="dark"] .tich-doc-link-list li {
    background: var(--tich-surface, #111827);
    border-color: var(--tich-border, #334155);
}

[data-theme="dark"] .tich-entity-hero__title,
[data-theme="dark"] .tich-dl__value,
[data-theme="dark"] .tich-approval-step__state {
    color: var(--tich-text, #e2e8f0);
}

[data-theme="dark"] .tich-dl__row,
[data-theme="dark"] .tich-dl:not(:has(.tich-dl__row)) > dt,
[data-theme="dark"] .tich-dl:not(:has(.tich-dl__row)) > dd {
    border-bottom-color: var(--tich-border, #334155);
}

[data-theme="dark"] .tich-approval-step.is-done {
    background: rgba(21, 128, 61, 0.15);
    border-color: rgba(134, 239, 172, 0.35);
}

[data-theme="dark"] .tich-approval-step.is-current {
    background: rgba(29, 78, 216, 0.18);
    border-color: rgba(147, 197, 253, 0.35);
}

[data-theme="dark"] .tich-approval-step.is-rejected {
    background: rgba(185, 28, 28, 0.18);
    border-color: rgba(252, 165, 165, 0.35);
}

.tich-kv-grid__label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--tich-neutral-muted);
}

.tich-kv-grid__value {
    font-weight: 600;
    color: var(--tich-text);
    line-height: 1.45;
}

.tich-kv-grid__value--block {
    font-weight: 400;
    white-space: pre-wrap;
}

.tich-leave-balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 1rem;
}

.tich-leave-balance-card {
    padding: 1rem 1.1rem;
    border: 1px solid var(--tich-border);
    border-radius: var(--radius-sm);
    background: var(--tich-surface-muted);
}

.tich-leave-balance-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.tich-leave-balance-card__name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.tich-leave-balance-card__remaining {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tich-green);
    white-space: nowrap;
}

.tich-leave-balance-card__meter {
    height: 0.4rem;
    border-radius: 999px;
    background: var(--tich-neutral-border);
    overflow: hidden;
}

.tich-leave-balance-card__meter-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--tich-green);
}

.tich-leave-balance-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--tich-neutral-muted);
}

.tich-leave-request-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tich-leave-request-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem 1rem;
    align-items: center;
    padding: 1rem 1.15rem;
    border: 1px solid var(--tich-border);
    border-radius: var(--radius-sm);
    background: var(--tich-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tich-leave-request-item:hover {
    border-color: color-mix(in srgb, var(--tich-blue) 35%, var(--tich-border));
    box-shadow: 0 0.25rem 0.75rem rgba(22, 105, 166, 0.08);
}

.tich-leave-request-item__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.tich-leave-request-item__meta {
    margin-top: 0.35rem;
    color: var(--tich-neutral-muted);
    font-size: 0.875rem;
}

.tich-leave-request-item__note {
    margin-top: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--tich-warning, #f59e0b) 12%, var(--tich-surface));
    border-left: 3px solid var(--tich-warning, #f59e0b);
    font-size: 0.875rem;
}

.tich-leave-actions__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--tich-border);
}

.tich-leave-actions__tab {
    border: 1px solid var(--tich-border);
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    background: var(--tich-surface);
    color: var(--tich-text);
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tich-leave-actions__tab:hover {
    border-color: var(--tich-blue);
    color: var(--tich-blue);
}

.tich-leave-actions__tab.is-active {
    background: var(--tich-green);
    border-color: var(--tich-green);
    color: #fff;
}

.tich-leave-actions__tab.is-danger.is-active {
    background: #dc2626;
    border-color: #dc2626;
}

.tich-leave-actions__panel {
    padding-top: 1.25rem;
}

.tich-leave-actions__panel[hidden] {
    display: none !important;
}

.tich-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    gap: 1rem;
}

.tich-quick-action {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--tich-border);
    border-radius: var(--radius-md);
    background: var(--tich-surface);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tich-quick-action:hover {
    border-color: var(--tich-green);
    box-shadow: 0 0.35rem 1rem rgba(34, 139, 87, 0.12);
    transform: translateY(-1px);
}

.tich-quick-action__label {
    font-weight: 700;
    color: var(--tich-text);
}

.tich-quick-action__hint {
    font-size: 0.875rem;
    color: var(--tich-neutral-muted);
}

.tich-employee-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tich-employee-section-nav button,
.tich-employee-section-nav a {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--tich-border);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--tich-text);
    background: var(--tich-surface);
    font-family: var(--font-ui);
    cursor: pointer;
}

.tich-employee-section-nav button:hover,
.tich-employee-section-nav a:hover {
    border-color: var(--tich-blue);
    color: var(--tich-blue);
}

.tich-employee-section-nav button.is-active,
.tich-employee-section-nav a.is-active {
    background: var(--tich-green);
    border-color: var(--tich-green);
    color: #fff;
}

.tich-employee-section-nav button.is-active:hover,
.tich-employee-section-nav a.is-active:hover {
    color: #fff;
    border-color: var(--tich-green);
}

.tich-employee-panel[hidden] {
    display: none !important;
}

[data-theme="dark"] .tich-leave-hero {
    background: var(--tich-surface);
    border-color: var(--tich-border);
}

[data-theme="dark"] .tich-leave-balance-card {
    background: var(--tich-surface);
}

[data-theme="dark"] .tich-leave-request-item:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.25);
}

/* ??? Lazy loading (YouTube-style progressive media) ????????????????????? */

.tich-lazy-media {
    background-color: var(--tich-neutral);
    transition: opacity 0.35s ease, filter 0.35s ease;
}

.tich-lazy-media.is-loading:not(.is-loaded) {
    opacity: 0.84;
    filter: blur(2px);
    background: linear-gradient(
        90deg,
        var(--tich-neutral) 0%,
        #e8eaec 45%,
        var(--tich-neutral) 90%
    );
    background-size: 220% 100%;
    animation: tich-lazy-shimmer 1.15s ease-in-out infinite;
}

.tich-lazy-media.is-loaded {
    opacity: 1;
    filter: none;
    animation: none;
    background: transparent;
}

.tich-lazy-media.is-error {
    opacity: 0.65;
    filter: none;
    animation: none;
}

.tich-lazy-iframe.is-loading {
    min-height: 12rem;
    border-radius: var(--radius-md);
}

@keyframes tich-lazy-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tich-lazy-media.is-loading:not(.is-loaded) {
        animation: none;
        filter: none;
    }

    .tich-lazy-media {
        transition: none;
    }
}

/* ??? UI State Components ??????????????????????????????????????????????? */

.tich-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    gap: 0.75rem;
}

.tich-state--inline {
    padding: 2rem 1rem;
}

.tich-state__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.tich-state__icon svg {
    width: 1.75rem;
    height: 1.75rem;
    stroke-width: 1.5;
    fill: none;
    stroke: currentColor;
}

.tich-state__icon--empty {
    background: var(--tich-neutral);
    color: var(--tich-neutral-muted);
}

.tich-state__icon--error {
    background: var(--tich-error-bg);
    color: var(--tich-error);
}

.tich-state__icon--offline {
    background: #fef3c7;
    color: #92400e;
}

.tich-state__icon--slow {
    background: #fff7ed;
    color: #c2410c;
}

.tich-state__icon--no-results {
    background: var(--tich-blue-light);
    color: var(--tich-blue);
}

.tich-state__icon--permission {
    background: #fef2f2;
    color: #991b1b;
}

.tich-state__icon--session {
    background: #fef3c7;
    color: #78350f;
}

.tich-state__icon--success {
    background: var(--tich-green-light);
    color: var(--tich-green-dark);
}

.tich-state__icon--loading {
    background: var(--tich-neutral);
    color: var(--tich-blue);
    animation: tich-state-pulse 1.5s ease-in-out infinite;
}

.tich-state__title {
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 600;
    color: var(--tich-grey);
    margin: 0;
}

.tich-state__description {
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: var(--tich-neutral-muted);
    margin: 0;
    max-width: 28rem;
    line-height: 1.5;
}

.tich-state__action {
    margin-top: 0.75rem;
}

@keyframes tich-state-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes tich-state-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tich-state__icon--loading svg {
    animation: tich-state-spin 1.2s linear infinite;
}

/* Dark theme overrides */
[data-theme="dark"] .tich-state__title {
    color: #e5e7eb;
}

[data-theme="dark"] .tich-state__description {
    color: #9ca3af;
}

[data-theme="dark"] .tich-state__icon--empty {
    background: rgba(107, 110, 114, 0.15);
    color: #9ca3af;
}

[data-theme="dark"] .tich-state__icon--error {
    background: rgba(197, 48, 48, 0.15);
    color: #fca5a5;
}

[data-theme="dark"] .tich-state__icon--offline {
    background: rgba(146, 64, 14, 0.15);
    color: #fbbf24;
}

[data-theme="dark"] .tich-state__icon--slow {
    background: rgba(194, 65, 12, 0.15);
    color: #fb923c;
}

[data-theme="dark"] .tich-state__icon--no-results {
    background: rgba(22, 105, 166, 0.15);
    color: #93c5fd;
}

[data-theme="dark"] .tich-state__icon--permission {
    background: rgba(153, 27, 27, 0.15);
    color: #fca5a5;
}

[data-theme="dark"] .tich-state__icon--session {
    background: rgba(120, 53, 15, 0.15);
    color: #fde68a;
}

[data-theme="dark"] .tich-state__icon--success {
    background: rgba(108, 171, 51, 0.15);
    color: #86efac;
}

[data-theme="dark"] .tich-state__icon--loading {
    background: rgba(22, 105, 166, 0.15);
    color: #93c5fd;
}

/* System status toasts (offline / slow / session) ? bottom-right popups */
.tich-toast-stack--system {
    z-index: 1210;
}

.tich-system-toast {
    display: none;
}

.tich-system-toast.is-visible {
    display: flex;
}

.tich-system-toast.is-leaving {
    display: flex;
}

/* Loading skeleton for tables */
.tich-skeleton-row td {
    padding: 0.75rem;
}

.tich-skeleton-bar {
    height: 0.75rem;
    background: linear-gradient(90deg, var(--tich-neutral) 25%, var(--tich-neutral-border) 50%, var(--tich-neutral) 75%);
    background-size: 200% 100%;
    animation: tich-skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
    width: 80%;
}

.tich-skeleton-bar--short { width: 40%; }
.tich-skeleton-bar--medium { width: 60%; }

@keyframes tich-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

[data-theme="dark"] .tich-skeleton-bar {
    background: linear-gradient(90deg, rgba(107,110,114,0.15) 25%, rgba(107,110,114,0.3) 50%, rgba(107,110,114,0.15) 75%);
    background-size: 200% 100%;
    animation: tich-skeleton-shimmer 1.5s ease-in-out infinite;
}

/* Public About Us ? alternating image sides + scroll reveal */
.tich-about-block {
    margin-bottom: 4.5rem;
}

.tich-about-block:last-child {
    margin-bottom: 0;
}

.tich-about-block__grid {
    gap: 2.25rem;
    align-items: center;
}

.tich-about-block--text-only .tich-about-block__grid {
    grid-template-columns: 1fr;
}

.tich-about-block__image {
    width: 100%;
    height: auto;
    max-height: 22rem;
    object-fit: cover;
    border-radius: var(--radius-md, 0.5rem);
}

@media (min-width: 640px) {
    .tich-about-block--media-left .tich-about-block__media {
        order: -1;
    }
}

.tich-about-page__intro,
.tich-about-block [data-about-slide] {
    opacity: 0;
    transform: translate3d(0, 1.25rem, 0);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.tich-about-page__intro {
    transform: translate3d(0, -2.25rem, 0);
    transition:
        opacity 0.7s ease-out,
        transform 0.7s ease-out;
}

@media (min-width: 640px) {
    .tich-about-block--media-right [data-about-slide="inward-start"],
    .tich-about-block--media-left [data-about-slide="inward-end"],
    .tich-about-block--text-only [data-about-slide="inward-start"] {
        transform: translate3d(-2.5rem, 0, 0);
    }

    .tich-about-block--media-right [data-about-slide="inward-end"],
    .tich-about-block--media-left [data-about-slide="inward-start"] {
        transform: translate3d(2.5rem, 0, 0);
    }
}

.tich-about-page__intro.is-revealed,
.tich-about-block.is-revealed [data-about-slide] {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.tich-about-block.is-revealed [data-about-slide="inward-end"] {
    transition-delay: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
    .tich-about-page__intro,
    .tich-about-block [data-about-slide] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Public event detail */
.tich-event-show__hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    color: #fff;
    background: var(--tich-green-dark);
}

.tich-event-show__hero-content {
    position: relative;
    z-index: 1;
    padding-top: 2.5rem;
    padding-bottom: 2.25rem;
}

.tich-event-show__figure {
    margin: 0 0 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
}

.tich-event-show__figure-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.tich-event-show__back {
    margin: 0 0 1rem;
}

.tich-event-show__back-link {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.95rem;
}

.tich-event-show__back-link:hover {
    color: #fff;
    text-decoration: underline;
}

.tich-event-show__eyebrow {
    margin: 0;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
}

.tich-event-show__title {
    margin: 0.65rem 0 0;
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    line-height: 1.15;
    max-width: 40rem;
    color: #fff;
}

.tich-event-show__lead {
    margin: 0.85rem 0 0;
    max-width: 36rem;
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
}

.tich-event-show__body {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
}

.tich-event-show__layout {
    display: grid;
    gap: 2rem;
}

@media (min-width: 900px) {
    .tich-event-show__layout {
        grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 0.9fr);
        gap: 3rem;
        align-items: start;
    }
}

.tich-event-show__description {
    margin-top: 1rem;
    white-space: pre-wrap;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--tich-text, #1f2933);
}

.tich-event-show__aside {
    padding: 1.5rem;
    border: 1px solid var(--tich-border, #e2e4e5);
    border-radius: var(--radius-md, 0.5rem);
    background: var(--tich-surface, #fff);
}

.tich-event-show__meta {
    margin: 1rem 0 0;
}

.tich-event-show__meta > div {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--tich-border, #e2e4e5);
}

.tich-event-show__meta > div:last-child {
    border-bottom: 0;
}

.tich-event-show__meta dt {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tich-muted, #64748b);
}

.tich-event-show__meta dd {
    margin: 0.3rem 0 0;
    font-weight: 600;
    color: var(--tich-text, #1f2933);
}

.tich-event-show__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Public programme detail */
.tich-program-show__hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    color: #fff;
    background: var(--tich-green-dark);
}

.tich-program-show__hero-content {
    position: relative;
    z-index: 1;
    padding-top: 2.5rem;
    padding-bottom: 2.25rem;
}

.tich-program-show__figure {
    margin: 0 0 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
}

.tich-program-show__figure-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.tich-program-show__back {
    margin: 0 0 1rem;
}

.tich-program-show__back-link {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.95rem;
}

.tich-program-show__back-link:hover {
    color: #fff;
    text-decoration: underline;
}

.tich-program-show__eyebrow {
    margin: 0;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
}

.tich-program-show__title {
    margin: 0.65rem 0 0;
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    line-height: 1.15;
    max-width: 40rem;
    color: #fff;
}

.tich-program-show__lead {
    margin: 0.85rem 0 0;
    max-width: 36rem;
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
}

.tich-program-show__body {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
}

.tich-program-show__layout {
    display: grid;
    gap: 2rem;
}

@media (min-width: 900px) {
    .tich-program-show__layout {
        grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 0.9fr);
        gap: 3rem;
        align-items: start;
    }
}

.tich-program-show__copy {
    white-space: pre-wrap;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--tich-text, #1f2933);
}

.tich-program-show__aside {
    padding: 1.5rem;
    border: 1px solid var(--tich-border, #e2e4e5);
    border-radius: var(--radius-md, 0.5rem);
    background: var(--tich-surface, #fff);
}

.tich-program-show__meta {
    margin: 1rem 0 0;
}

.tich-program-show__meta > div {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--tich-border, #e2e4e5);
}

.tich-program-show__meta > div:last-child {
    border-bottom: 0;
}

.tich-program-show__meta dt {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tich-muted, #64748b);
}

.tich-program-show__meta dd {
    margin: 0.3rem 0 0;
    font-weight: 600;
    color: var(--tich-text, #1f2933);
}

.tich-program-show__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}


/* Public page entrance animations */
.tich-animate {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.tich-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tich-animate--left {
    opacity: 0;
    transform: translateX(-28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.tich-animate--left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.tich-animate--right {
    opacity: 0;
    transform: translateX(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.tich-animate--right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.tich-animate--bottom {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.tich-animate--bottom.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tich-animate--top {
    opacity: 0;
    transform: translateY(-2.25rem);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.tich-animate--top.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tich-animate--fade {
    opacity: 0;
    transition: opacity 0.7s ease;
}

.tich-animate--fade.is-visible {
    opacity: 1;
}

.tich-animate--scale {
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
    .tich-animate,
    .tich-animate--left,
    .tich-animate--right,
    .tich-animate--bottom,
    .tich-animate--top,
    .tich-animate--fade,
    .tich-animate--scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}


/* Profile update prompts (HR / ICT ? employee portal) */
.tich-check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
}

.tich-check-row input[type="checkbox"] {
    margin-top: 0.15rem;
}

.tich-profile-prompt-fields__group {
    min-width: 0;
}

.tich-profile-field--highlighted {
    border: 2px solid #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
    border-radius: var(--tich-radius-md, 8px);
    background: #fffbeb;
}

.tich-card.tich-profile-field--highlighted {
    padding: 1.25rem;
}

.tich-grid .tich-profile-field--highlighted {
    padding: 0.75rem;
}

/* Student portal layout polish + mobile responsiveness */
.tich-admin--student-portal {
    background: var(--tich-neutral, #f5f6f6);
    max-width: 100%;
    box-sizing: border-box;
}

.tich-admin--student-portal .tich-admin__main {
    padding: 1rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .tich-admin--student-portal .tich-admin__main {
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 1023px) {
    .tich-admin--student-portal {
        --portal-mobile-scale: 0.94;
        padding: 0;
        gap: 0;
    }

    .tich-admin--student-portal .tich-admin-sidebar-mobile__toggle {
        position: relative;
        top: auto;
        z-index: 45;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0.28rem 0.65rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: 0;
        font-size: calc(0.6875rem * var(--portal-mobile-scale));
        line-height: 1.15;
        box-shadow: none;
    }

    .tich-admin--student-portal .tich-admin-sidebar-mobile__toggle-icon {
        width: 1.15rem;
        height: 1.15rem;
    }

    .tich-admin--student-portal .tich-admin-sidebar-mobile__toggle-icon svg {
        width: 0.8rem;
        height: 0.8rem;
    }

    .tich-admin--student-portal .tich-admin-sidebar-mobile__shell .tich-admin-sidebar {
        /* Keep left menu sized like the right nav drawer (do not inflate with portal scale) */
        --sidebar-scale: 0.80;
        --sidebar-sub-scale: 0.74;
        padding: calc(0.45rem * 0.92) calc(0.55rem * 0.92);
    }
}

@media (max-width: 767px) {
    .tich-admin--student-portal {
        font-size: calc(1rem * var(--portal-mobile-scale));
        overflow-x: hidden;
        gap: calc(0.5rem * var(--portal-mobile-scale));
    }

    .tich-admin--student-portal .tich-admin-sidebar {
        max-width: 100%;
        box-sizing: border-box;
    }

    .tich-admin--student-portal .tich-admin__main {
        padding: calc(0.75rem * var(--portal-mobile-scale)) calc(0.625rem * var(--portal-mobile-scale));
        overflow-x: hidden;
    }

    .tich-admin--student-portal .tich-card,
    .tich-admin--student-portal .tich-portal-item-card,
    .tich-admin--student-portal .tich-table-panel,
    .tich-admin--student-portal .tich-dept-panel {
        max-width: 100%;
        box-sizing: border-box;
    }

    .tich-admin--student-portal .tich-h1,
    .tich-admin--student-portal .tich-h2,
    .tich-admin--student-portal .tich-h3,
    .tich-admin--student-portal .tich-text,
    .tich-admin--student-portal .tich-caption {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .tich-admin--student-portal .tich-table-wrap {
        max-width: 100%;
        margin-inline: 0;
    }

    .tich-admin--student-portal .tich-portal-actions {
        width: 100%;
    }

    .tich-admin--student-portal .tich-portal-actions .tich-btn {
        flex: 1 1 auto;
        min-width: 0;
    }
}

.tich-portal-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tich-portal-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.tich-portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

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

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

@media (min-width: 1100px) {
    .tich-portal-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.tich-portal-item-card {
    background: var(--tich-white);
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md, 0.5rem);
    padding: 1rem 1.125rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tich-portal-item-card--muted {
    opacity: 0.92;
    border-color: color-mix(in srgb, var(--tich-neutral-border) 80%, #f59e0b);
}

.tich-portal-item-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.tich-portal-item-card__code {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tich-blue);
    margin: 0;
}

.tich-portal-item-card__title {
    font-size: 1rem;
    line-height: 1.35;
    margin: 0 0 0.75rem;
    color: var(--tich-grey);
}

.tich-portal-item-card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
    margin: 0;
}

.tich-portal-item-card__meta dt {
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tich-neutral-muted, #6b6e72);
    margin: 0;
}

.tich-portal-item-card__meta dd {
    margin: 0.15rem 0 0;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    color: var(--tich-grey);
}

.tich-portal-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.tich-portal-badge--success {
    background: color-mix(in srgb, var(--tich-green) 14%, transparent);
    color: var(--tich-green-dark, #5a9430);
}

.tich-portal-badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.tich-portal-summary-card,
.tich-portal-module-card {
    border-radius: var(--radius-md, 0.5rem);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tich-portal-module-card:hover {
    border-color: color-mix(in srgb, var(--tich-blue) 35%, var(--tich-neutral-border));
    box-shadow: 0 4px 14px rgba(22, 105, 166, 0.08);
}

.tich-portal-overview-grid,
.tich-portal-module-grid {
    gap: 1rem;
}

@media (max-width: 767px) {
    .tich-admin--student-portal .tich-dept-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: calc(0.65rem * var(--portal-mobile-scale, 0.94));
    }

    .tich-admin--student-portal .tich-stat {
        padding: calc(0.75rem * var(--portal-mobile-scale, 0.94));
    }

    .tich-admin--student-portal .tich-stat__value {
        font-size: calc(1.125rem * var(--portal-mobile-scale, 0.94));
    }

    .tich-admin--student-portal .tich-page-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: calc(0.5rem * var(--portal-mobile-scale, 0.94));
    }

    .tich-admin--student-portal .tich-page-toolbar__actions {
        width: 100%;
    }

    .tich-admin--student-portal .tich-page-toolbar__actions .tich-btn {
        width: 100%;
        justify-content: center;
    }

    .tich-portal-overview-grid,
    .tich-portal-module-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: calc(0.75rem * var(--portal-mobile-scale, 0.94));
    }

    .tich-portal-card-grid {
        gap: calc(0.65rem * var(--portal-mobile-scale, 0.94));
    }

    .tich-portal-item-card {
        padding: calc(0.85rem * var(--portal-mobile-scale, 0.94)) calc(0.95rem * var(--portal-mobile-scale, 0.94));
    }

    .tich-portal-item-card__title {
        font-size: calc(1rem * var(--portal-mobile-scale, 0.94));
        margin-bottom: calc(0.65rem * var(--portal-mobile-scale, 0.94));
    }

    .tich-portal-item-card__meta {
        grid-template-columns: minmax(0, 1fr);
        gap: calc(0.5rem * var(--portal-mobile-scale, 0.94));
    }

    .tich-portal-item-card__meta dd {
        font-size: calc(0.875rem * var(--portal-mobile-scale, 0.94));
    }

    .tich-portal-panel {
        gap: calc(0.65rem * var(--portal-mobile-scale, 0.94));
    }

    .tich-portal-panel__head {
        gap: calc(0.5rem * var(--portal-mobile-scale, 0.94));
    }
}

/* ??? Dashboard (mobile compact 2-up) ???????????????????????????????? */

@media (max-width: 767px) {
    .tich-dashboard {
        padding: 1.25rem 0 1.75rem;
    }

    .tich-dashboard .tich-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .tich-dashboard__intro {
        margin-bottom: 1rem;
    }

    .tich-dashboard__title.tich-h1,
    .tich-dashboard .tich-dashboard__title {
        font-size: 1.35rem;
        line-height: 1.25;
        margin-bottom: 0.35rem;
    }

    .tich-dashboard__intro > .tich-text {
        font-size: 0.75rem;
        line-height: 1.4;
        margin-top: 0.25rem;
    }

    .tich-dashboard__intro .tich-caption {
        font-size: 0.625rem;
    }

    .tich-dashboard__intro .tich-alert {
        margin-top: 0.75rem;
        padding: 0.65rem 0.75rem;
        font-size: 0.75rem;
    }

    .tich-dashboard__grid.tich-grid,
    .tich-dashboard__grid.tich-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .tich-dashboard__grid > .tich-card {
        padding: 0.7rem 0.75rem;
        border-radius: var(--radius-md, 0.5rem);
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .tich-dashboard__grid > .tich-card .tich-caption {
        font-size: 0.5625rem;
        line-height: 1.3;
    }

    .tich-dashboard__grid > .tich-card .tich-h3 {
        font-size: 0.8125rem;
        line-height: 1.25;
        margin-bottom: 0.25rem;
    }

    .tich-dashboard__grid > .tich-card .tich-mt-2 {
        margin-top: 0.3rem;
    }

    .tich-dashboard__grid > .tich-card .tich-mt-4 {
        margin-top: 0.55rem;
    }

    .tich-dashboard__grid > .tich-card .tich-text {
        font-size: 0.6875rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tich-dashboard__grid > .tich-card .tich-btn {
        width: 100%;
        padding: 0.4rem 0.5rem;
        font-size: 0.6875rem;
        gap: 0.25rem;
        margin-top: auto;
    }

    .tich-dashboard__grid > .tich-card .tich-notification-badge {
        font-size: 0.5625rem;
        padding: 0.1rem 0.35rem;
        min-width: 1.1rem;
    }
}

/* ??? Academics dashboard (mobile compact) ???????????????????????????? */

@media (max-width: 767px) {
    .tich-admin__main .tich-academics-dashboard__stats .tich-stat {
        padding: 0.55rem 0.6rem;
        min-width: 0;
        border-radius: var(--radius-md, 0.5rem);
        flex: 0 0 min(9.5rem, 42vw);
    }

    .tich-admin__main .tich-academics-dashboard__stats .tich-caption {
        font-size: 0.5625rem;
        line-height: 1.3;
    }

    .tich-admin__main .tich-academics-dashboard__stats .tich-stat__value {
        font-size: 0.9375rem;
        margin-top: 0.3rem;
    }

    .tich-admin__main .tich-academics-dashboard__stats .tich-text,
    .tich-admin__main .tich-academics-dashboard__stats .tich-link {
        font-size: 0.625rem;
        line-height: 1.3;
    }

    .tich-admin__main .tich-academics-dashboard__stats .tich-mt-2 {
        margin-top: 0.25rem;
    }

    .tich-admin__main .tich-academics-dashboard__charts .tich-grid,
    .tich-admin__main .tich-academics-dashboard__charts .tich-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .tich-admin__main .tich-academics-dashboard__charts .tich-chart-card {
        padding: 0.55rem 0.6rem;
        min-width: 0;
        border-radius: var(--radius-md, 0.5rem);
    }

    .tich-admin__main .tich-academics-dashboard__charts .tich-chart-card .tich-h3 {
        font-size: 0.75rem;
        line-height: 1.25;
        margin: 0;
    }

    .tich-admin__main .tich-academics-dashboard__charts .tich-chart-card__meta {
        font-size: 0.5625rem;
        line-height: 1.3;
        margin-top: 0.2rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tich-admin__main .tich-academics-dashboard__charts .tich-chart-card__canvas-wrap {
        height: 9.5rem;
        margin-top: 0.55rem;
    }
}

/* ??? Blog CMS editor + prose article ?????????????????????????????????? */

.tich-blog-compose {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tich-blog-compose__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.tich-cms-editor {
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-lg);
    background: var(--tich-white);
    overflow: hidden;
}

.tich-cms-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--tich-neutral-border);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.tich-cms-toolbar__group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding-right: 0.5rem;
    border-right: 1px solid var(--tich-neutral-border);
}

.tich-cms-toolbar__group:last-child {
    border-right: 0;
}

.tich-cms-toolbar button,
.tich-cms-toolbar select {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    line-height: 1.2;
    border: 1px solid transparent;
    border-radius: var(--radius-sm, 0.35rem);
    background: transparent;
    color: var(--tich-grey);
    padding: 0.3rem 0.45rem;
    cursor: pointer;
}

.tich-cms-toolbar button:hover,
.tich-cms-toolbar select:hover {
    background: #fff;
    border-color: var(--tich-neutral-border);
    color: var(--tich-blue);
}

.tich-cms-toolbar select {
    max-width: 8.5rem;
    background: #fff;
    border-color: var(--tich-neutral-border);
}

.tich-cms-toolbar__swatch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius-sm, 0.35rem);
    border: 1px solid var(--tich-neutral-border);
    background: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
}

.tich-cms-toolbar__swatch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.tich-cms-surface {
    min-height: 28rem;
    padding: 1.25rem 1.35rem 2rem;
    outline: none;
    overflow-y: auto;
    max-height: 70vh;
}

.tich-cms-surface:focus {
    box-shadow: inset 0 0 0 2px rgba(22, 105, 166, 0.12);
}

.tich-cms-hidden-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

.tich-cms-find {
    display: grid;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--tich-neutral-border);
    background: #fffbeb;
}

.tich-cms-find__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.tich-cms-find__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tich-prose,
.tich-prose-article {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--tich-grey);
}

.tich-prose p,
.tich-prose-article p {
    margin: 0 0 1rem;
}

.tich-prose h1,
.tich-prose-article h1,
.tich-prose-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--tich-green);
    margin: 1.5rem 0 0.75rem;
}

.tich-prose h2,
.tich-prose-article h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--tich-blue);
    margin: 1.35rem 0 0.65rem;
}

.tich-prose h3,
.tich-prose-article h3 {
    font-size: 1.4rem;
    color: var(--tich-blue);
    margin: 1.2rem 0 0.55rem;
}

.tich-prose h4,
.tich-prose-article h4 {
    font-size: 1.2rem;
    margin: 1.1rem 0 0.5rem;
}

.tich-prose h5,
.tich-prose-article h5 {
    font-size: 1.05rem;
    margin: 1rem 0 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tich-prose-quote,
.tich-prose blockquote,
.tich-prose-article blockquote {
    margin: 1.25rem 0;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--tich-blue);
    background: var(--tich-blue-light);
    font-style: italic;
}

.tich-prose-quote--intense {
    border-left-color: var(--tich-green);
    background: var(--tich-green-light);
    font-size: 1.15rem;
    font-weight: 600;
}

.tich-prose-image,
.tich-prose img,
.tich-prose-article img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    display: block;
}

.tich-prose-table,
.tich-prose table,
.tich-prose-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.95rem;
}

.tich-prose-table th,
.tich-prose-table td,
.tich-prose table th,
.tich-prose table td,
.tich-prose-article table th,
.tich-prose-article table td {
    border: 1px solid var(--tich-neutral-border);
    padding: 0.55rem 0.7rem;
    text-align: left;
}

.tich-prose-table th,
.tich-prose table th,
.tich-prose-article table th {
    background: var(--tich-neutral);
    font-weight: 700;
}

.tich-prose-hr,
.tich-prose hr,
.tich-prose-article hr {
    border: 0;
    border-top: 2px solid var(--tich-neutral-border);
    margin: 1.5rem 0;
}

.tich-prose ul,
.tich-prose ol,
.tich-prose-article ul,
.tich-prose-article ol {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

.tich-prose a,
.tich-prose-article a {
    color: var(--tich-blue);
    font-weight: 600;
}

.tich-shape {
    display: inline-block;
    vertical-align: middle;
    margin: 0 0.25rem;
}

.tich-shape--circle,
.tich-shape--square,
.tich-shape--rounded,
.tich-shape--diamond {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--tich-blue);
}

.tich-shape--circle { border-radius: 50%; }
.tich-shape--rounded { border-radius: 0.65rem; }
.tich-shape--diamond { transform: rotate(45deg); width: 1.85rem; height: 1.85rem; }
.tich-shape--triangle {
    width: 0;
    height: 0;
    border-left: 1.25rem solid transparent;
    border-right: 1.25rem solid transparent;
    border-bottom: 2.2rem solid var(--tich-green);
}
.tich-shape--star,
.tich-shape--arrow {
    font-size: 1.75rem;
    color: var(--tich-green);
    line-height: 1;
}

.tich-article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tich-article-actions .tich-btn {
    text-decoration: none;
}

@media print {
    .tich-header,
    .tich-nav-drawer,
    .tich-footer,
    .tich-skip-link,
    .tich-article-actions,
    .tich-article-back {
        display: none !important;
    }

    .tich-prose-article,
    .tich-section {
        padding: 0 !important;
    }

    body {
        background: #fff !important;
        color: #111 !important;
    }
}

[data-theme="dark"] .tich-cms-toolbar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: var(--tich-border, #334155);
}

[data-theme="dark"] .tich-cms-editor,
[data-theme="dark"] .tich-cms-toolbar button:hover,
[data-theme="dark"] .tich-cms-toolbar select {
    background: var(--tich-surface, #0f172a);
    border-color: var(--tich-border, #334155);
    color: var(--tich-grey);
}

[data-theme="dark"] .tich-cms-find {
    background: #422006;
}

.tich-cms-editor--basic .tich-cms-toolbar {
    padding: 0.45rem 0.55rem;
}

.tich-cms-editor--basic .tich-cms-surface {
    padding: 0.85rem 1rem;
}

/* ??? QA forms (assessment builder + capacity) ??????????????????????? */

.qa-form-page,
.qa-capacity-page {
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.qa-form-section {
    background: var(--tich-white);
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
}

.qa-form-section__head {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--tich-neutral-border);
}

.qa-form-section__head .tich-h3 {
    margin: 0;
}

.qa-form-fields {
    display: grid;
    gap: 1.25rem;
}

.qa-form-fields--schedule,
.qa-form-fields--capacity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
}

.qa-form-fields__full {
    grid-column: 1 / -1;
}

@media (max-width: 720px) {
    .qa-form-fields--schedule,
    .qa-form-fields--capacity {
        grid-template-columns: 1fr;
    }
}

.qa-dept-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.75rem;
}

.qa-dept-picker__item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    background: var(--tich-surface-muted, #f8fafc);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.qa-dept-picker__item:hover {
    border-color: var(--tich-primary, #00529b);
    background: rgba(0, 82, 155, 0.04);
}

.qa-dept-picker__item input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.qa-dept-picker__name {
    display: block;
    font-weight: 600;
    color: var(--tich-text, #1f2937);
    line-height: 1.35;
}

.qa-criteria-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.qa-criterion {
    padding: 1.25rem;
    border: 1px solid var(--tich-neutral-border);
    border-radius: var(--radius-md);
    background: var(--tich-surface-muted, #f8fafc);
}

.qa-criterion__badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 82, 155, 0.1);
    color: var(--tich-primary, #00529b);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.qa-criterion__fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qa-criterion__text {
    width: 100%;
}

.qa-criterion__meta {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(5.5rem, 0.55fr) minmax(5.5rem, 0.55fr) minmax(11rem, 1fr);
    gap: 0.85rem 1rem;
    align-items: end;
}

.qa-criterion__evidence {
    display: flex;
    align-items: center;
    min-height: 2.625rem;
    padding-bottom: 0.15rem;
}

.qa-criterion__evidence .qa-check {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .qa-criterion__meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qa-criterion__evidence {
        grid-column: 1 / -1;
        min-height: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 560px) {
    .qa-criterion__meta {
        grid-template-columns: 1fr;
    }
}

.qa-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    font-size: 0.9375rem;
    color: var(--tich-text, #1f2937);
    cursor: pointer;
}

.qa-criteria-add {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--tich-neutral-border);
}

.qa-form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.qa-form-section--table {
    max-width: none;
}

.qa-capacity-page {
    max-width: 60rem;
}

.qa-capacity-page .qa-form-section--table .tich-table-wrap {
    margin-top: 0.25rem;
}

[data-theme="dark"] .qa-form-section,
[data-theme="dark"] .qa-criterion,
[data-theme="dark"] .qa-dept-picker__item {
    background: var(--tich-surface, #0f172a);
    border-color: var(--tich-border, #334155);
}

[data-theme="dark"] .qa-dept-picker__item:hover {
    background: rgba(148, 163, 184, 0.08);
}

[data-theme="dark"] .qa-form-section__head,
[data-theme="dark"] .qa-criteria-add {
    border-color: var(--tich-border, #334155);
}

[data-theme="dark"] .qa-form-footer {
    /* inherits */
}

[data-theme="dark"] .qa-dept-picker__name {
    color: var(--tich-grey);
}

.tich-badge--with-signal {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tich-signal-dot {
    position: relative;
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #dc2626;
    flex-shrink: 0;
}

.tich-signal-dot::before,
.tich-signal-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #dc2626;
    animation: tich-signal-wave 1.7s ease-out infinite;
}

.tich-signal-dot::after {
    animation-delay: 0.85s;
}

@keyframes tich-signal-wave {
    0% {
        transform: scale(1);
        opacity: 0.75;
    }
    100% {
        transform: scale(3.4);
        opacity: 0;
    }
}
