@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap");

:root {
    --tl-bg: #fff8f7;
    --tl-surface: #fff8f7;
    --tl-surface-lowest: #ffffff;
    --tl-surface-low: #fff0ee;
    --tl-surface-container: #ffe9e6;
    --tl-surface-high: #fde2df;
    --tl-surface-highest: #f7ddd9;
    --tl-text: #261816;
    --tl-muted: #59413e;
    --tl-outline: #8d706d;
    --tl-outline-soft: #e1bfba;
    --tl-primary: #a4211d;
    --tl-primary-strong: #c63a32;
    --tl-on-primary: #ffffff;
    --tl-primary-soft: #ffdad6;
    --tl-secondary-soft: #c2e0fe;
    --tl-secondary-text: #47647d;
    --tl-tertiary: #005d71;
    --tl-tertiary-soft: #b3ebff;
    --tl-error: #ba1a1a;
    --tl-error-soft: #ffdad6;
    --tl-shadow: 0 6px 18px rgba(122, 42, 35, 0.08);
}

body.dark-mode {
    --tl-bg: #18191a;
    --tl-surface: #18191a;
    --tl-surface-lowest: #18191a;
    --tl-surface-low: #242526;
    --tl-surface-container: #242526;
    --tl-surface-high: #2d2e30;
    --tl-surface-highest: #3a3b3c;
    --tl-text: #e4e6eb;
    --tl-muted: #b0b3b8;
    --tl-outline: #76777A;
    --tl-outline-soft: #3e4042;
    --tl-primary: #e66a61;
    --tl-primary-strong: #c63a32;
    --tl-on-primary: #470805;
    --tl-primary-soft: #72241f;
    --tl-secondary-soft: #3a3b3c;
    --tl-secondary-text: #e4e6eb;
    --tl-tertiary: #8fc3e6;
    --tl-tertiary-soft: #183f58;
    --tl-error: #ffb4ab;
    --tl-error-soft: #3d2224;
    --tl-shadow: none;
}

.ahust-action-hint-floating {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 6200;
    max-width: min(440px, calc(100vw - 28px));
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #7dd3fc;
    background: #0ea5e9;
    color: #f8fdff;
    box-shadow: 0 20px 42px rgba(3, 105, 161, 0.28);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.55;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.ahust-action-hint-floating::before {
    content: '';
    position: absolute;
    left: var(--ahust-action-hint-arrow-x, 50%);
    bottom: -6px;
    width: 12px;
    height: 12px;
    border-right: 1px solid #7dd3fc;
    border-bottom: 1px solid #7dd3fc;
    background: #0ea5e9;
    transform: translateX(-50%) rotate(45deg);
}

.ahust-action-hint-floating.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ahust-action-hint-floating.is-positioning {
    transition: none;
    visibility: hidden;
    opacity: 0;
}

.ahust-action-hint-floating.is-below::before {
    top: -6px;
    bottom: auto;
    border-right: 0;
    border-bottom: 0;
    border-left: 1px solid #7dd3fc;
    border-top: 1px solid #7dd3fc;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--tl-bg);
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--tl-bg);
    color: var(--tl-text);
    font-family: "Be Vietnam Pro", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

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

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

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

.material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.tl-icon-fill {
    font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.tl-topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: 64px;
    background: var(--tl-surface);
    border-bottom: 1px solid var(--tl-outline-soft);
}

.tl-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 32px;
}

.tl-brand {
    color: var(--tl-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
}

.tl-top-left,
.tl-top-actions,
.tl-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.tl-nav a {
    display: flex;
    align-items: center;
    height: 64px;
    padding-top: 4px;
    color: var(--tl-muted);
    font-size: 12px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}

.tl-nav a.is-active {
    color: var(--tl-primary);
    border-bottom-color: var(--tl-primary);
}

.tl-nav-menu {
    position: relative;
    display: flex;
    align-items: center;
    height: 64px;
}

.tl-nav-dropdown {
    position: absolute;
    top: calc(100% - 1px);
    left: 50%;
    z-index: 90;
    display: grid;
    gap: 6px;
    width: 300px;
    padding: 10px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 12px;
    background: var(--tl-surface);
    box-shadow: var(--tl-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.tl-nav-menu:hover .tl-nav-dropdown,
.tl-nav-menu:focus-within .tl-nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.tl-nav-dropdown a {
    display: grid;
    height: auto;
    min-height: 52px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    color: var(--tl-text);
}

.tl-nav-dropdown a:hover,
.tl-nav-dropdown a:focus-visible {
    background: var(--tl-surface-container);
}

.tl-nav-dropdown strong {
    color: var(--tl-primary);
    font-size: 12px;
}

.tl-nav-dropdown span {
    overflow: hidden;
    color: var(--tl-muted);
    font-size: 12px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tl-top-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 234px;
    height: 42px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 999px;
    background: var(--tl-surface-low);
}

.tl-top-search button,
.tl-smart-row button,
.tl-course-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 0;
    background: transparent;
    color: var(--tl-muted);
    cursor: pointer;
}

.tl-top-search .material-symbols-outlined {
    color: var(--tl-muted);
    font-size: 20px;
}

.tl-top-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--tl-text);
    padding: 0 14px 0 10px;
    font-size: 13px;
}

.tl-top-search input::placeholder,
.tl-search-input::placeholder,
.tl-field input::placeholder,
.tl-field textarea::placeholder {
    color: color-mix(in srgb, var(--tl-muted) 68%, transparent);
}

.tl-search-results {
    display: grid;
    gap: 6px;
    min-width: min(420px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 12px;
    background: var(--tl-surface);
    box-shadow: var(--tl-shadow);
    color: var(--tl-text);
}

.tl-top-search .tl-search-results,
.tl-course-search .tl-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 80;
}

.tl-top-search .tl-search-results {
    width: min(420px, calc(100vw - 32px));
}

.tl-course-search .tl-search-results {
    width: min(560px, calc(100vw - 32px));
}

.tl-smart-search .tl-search-results {
    min-width: 100%;
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
}

.tl-search-results-label,
.tl-search-status {
    padding: 8px 10px;
    color: var(--tl-muted);
    font-size: 12px;
    font-weight: 600;
}

.tl-search-status.warning {
    color: var(--tl-error);
}

.tl-search-status.loading {
    color: var(--tl-primary);
}

.tl-search-result {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--tl-text);
}

.tl-search-result:hover,
.tl-search-result:focus-visible {
    background: var(--tl-surface-container);
}

.tl-search-result > .material-symbols-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tl-primary) 12%, transparent);
    color: var(--tl-primary);
    font-size: 20px;
}

.tl-search-result-body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.tl-search-result-body strong,
.tl-search-result-body small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tl-search-result-body strong {
    color: var(--tl-text);
    font-size: 13px;
    font-weight: 800;
}

.tl-search-result-body small {
    color: var(--tl-muted);
    font-size: 12px;
    line-height: 1.35;
}

.tl-search-result-badge {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--tl-surface-low);
    color: var(--tl-muted);
    font-size: 11px;
    font-weight: 800;
}

.tl-search-page-form {
    display: grid;
    gap: 16px;
    margin-bottom: 30px;
    padding: 18px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 12px;
    background: var(--tl-surface-lowest);
    box-shadow: var(--tl-shadow);
}

.tl-search-page-query {
    display: flex;
    align-items: center;
    min-height: 54px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 10px;
    background: var(--tl-surface-low);
}

.tl-search-page-query button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 0;
    background: transparent;
    color: var(--tl-primary);
    cursor: pointer;
}

.tl-search-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tl-search-filter-grid label {
    display: grid;
    gap: 6px;
    color: var(--tl-muted);
    font-size: 12px;
    font-weight: 700;
}

.tl-search-filter-grid input,
.tl-search-filter-grid select {
    min-height: 40px;
    width: 100%;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 8px;
    background: var(--tl-surface-lowest);
    color: var(--tl-text);
    padding: 0 10px;
}

.tl-search-page-actions,
.tl-pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tl-pagination {
    justify-content: center;
    margin-top: 28px;
}

.tl-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 8px;
    color: var(--tl-text);
    font-weight: 700;
}

.tl-pagination a.is-active {
    border-color: var(--tl-primary);
    background: var(--tl-primary);
    color: var(--tl-on-primary);
}

.tl-top-search-kbd {
    margin-right: 8px;
    padding: 2px 6px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 5px;
    color: var(--tl-muted);
    font-size: 11px;
}

.tl-action-btn,
.tl-primary-btn,
.tl-secondary-btn,
.tl-ghost-btn,
.tl-icon-btn {
    border: 0;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.tl-action-btn,
.tl-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 18px;
    border-radius: 8px;
    background: var(--tl-primary-strong);
    color: var(--tl-on-primary);
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--tl-shadow);
}

body.dark-mode .tl-action-btn,
body.dark-mode .tl-primary-btn {
    background: var(--tl-primary);
    color: var(--tl-on-primary);
}

.tl-secondary-btn,
.tl-ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--tl-outline);
    background: transparent;
    color: var(--tl-text);
    font-size: 13px;
    font-weight: 500;
}

.tl-secondary-btn:hover,
.tl-ghost-btn:hover,
.tl-card:hover {
    border-color: var(--tl-primary);
}

.tl-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: transparent;
    color: var(--tl-muted);
}

.tl-icon-btn:hover {
    background: var(--tl-surface-low);
    color: var(--tl-primary);
}

.tl-header-account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 40px;
    max-width: 190px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 8px;
    background: var(--tl-surface-lowest);
    color: var(--tl-primary);
    font-size: 12px;
    font-weight: 700;
}

.tl-header-account:hover,
.tl-header-account:focus-visible {
    border-color: var(--tl-primary);
    background: var(--tl-primary-soft);
    outline: none;
}

.tl-header-account .material-symbols-outlined {
    flex: 0 0 auto;
    font-size: 21px;
}

.tl-header-account-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tl-user-account-box,
.tl-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tl-user-account-box[data-auth-ready="0"] {
    visibility: hidden;
}

.tl-header-logout img {
    width: 18px;
    height: 18px;
}

.tl-shell {
    display: block;
    min-height: 0;
    padding-top: 64px;
}

.tl-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    z-index: 40;
    display: none;
    flex-direction: column;
    width: 256px;
    height: calc(100vh - 64px);
    padding: 16px;
    background: var(--tl-surface-low);
    border-right: 1px solid color-mix(in srgb, var(--tl-outline-soft) 70%, transparent);
}

body.dark-mode .tl-sidebar {
    background: var(--tl-surface-low);
}

.tl-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 28px;
    border: 1px solid color-mix(in srgb, var(--tl-outline-soft) 70%, transparent);
    border-radius: 8px;
    background: var(--tl-surface-lowest);
    box-shadow: var(--tl-shadow);
}

.tl-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 999px;
    background: var(--tl-secondary-soft);
    color: var(--tl-secondary-text);
    font-weight: 700;
    overflow: hidden;
}

.tl-profile strong {
    display: block;
    color: var(--tl-text);
    font-size: 13px;
    line-height: 1.25;
}

.tl-profile span {
    display: block;
    color: var(--tl-muted);
    font-size: 12px;
    line-height: 1.25;
}

.tl-side-nav {
    display: grid;
    gap: 4px;
}

.tl-side-nav a,
.tl-side-bottom a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--tl-muted);
    font-size: 13px;
    font-weight: 600;
}

.tl-side-nav a.is-active {
    background: var(--tl-secondary-soft);
    color: var(--tl-secondary-text);
    font-weight: 700;
}

body.dark-mode .tl-side-nav a.is-active {
    background: var(--tl-primary-soft);
    color: #ffdad7;
}

.tl-side-spacer {
    flex: 1;
}

.tl-side-upload {
    width: 100%;
    margin-bottom: 16px;
}

.tl-side-bottom {
    display: grid;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--tl-outline-soft) 70%, transparent);
}

.tl-main {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px;
}

.tl-main.has-sidebar {
    margin-left: auto;
    max-width: 1280px;
    padding: 32px;
}

.tl-main.compact {
    max-width: 1280px;
}

.tl-hero {
    position: relative;
    overflow: hidden;
    min-height: 458px;
    margin-bottom: 28px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 12px;
    background: var(--tl-surface-lowest);
    box-shadow: var(--tl-shadow);
}

.tl-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    opacity: 0;
    pointer-events: none;
}

body.dark-mode .tl-hero {
    background: var(--tl-surface-lowest);
}

.tl-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 780px;
    min-height: 458px;
    margin: 0 auto;
    padding: 48px 24px;
    text-align: center;
}

.tl-hero h1 {
    margin: 0 0 18px;
    color: var(--tl-text);
    font-size: 48px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
}

.tl-hero p,
.tl-page-lead {
    margin: 0;
    color: var(--tl-muted);
    font-size: 16px;
    line-height: 1.65;
}

.tl-smart-search {
    width: min(100%, 672px);
    margin-top: 32px;
    overflow: hidden;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 12px;
    background: var(--tl-surface);
    box-shadow: var(--tl-shadow);
}

.tl-smart-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--tl-outline-soft) 45%, transparent);
}

.tl-smart-row .material-symbols-outlined {
    color: var(--tl-muted);
    font-size: 28px;
}

.tl-search-input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--tl-text);
    font-size: 16px;
}

.tl-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 30px;
    padding: 3px 8px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 5px;
    background: var(--tl-surface-container);
    color: var(--tl-muted);
    font-size: 12px;
}

body.dark-mode .tl-kbd {
    background: var(--tl-surface-high);
}

.tl-suggestions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    overflow-x: auto;
    background: var(--tl-surface-low);
}

.tl-suggestions span {
    flex: 0 0 auto;
    color: var(--tl-muted);
    font-size: 12px;
}

.tl-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 4px 12px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 999px;
    background: var(--tl-surface-container);
    color: var(--tl-muted);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.tl-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

a.tl-chip,
a.tl-chip:hover,
a.tl-author-tag,
a.tl-author-tag:hover {
    text-decoration: none;
}

a.tl-chip:hover,
a.tl-author-tag:hover {
    border-color: color-mix(in srgb, currentColor 45%, var(--tl-outline-soft));
}

.tl-chip.blue {
    background: var(--tl-secondary-soft);
    color: var(--tl-secondary-text);
    border-color: color-mix(in srgb, var(--tl-secondary-soft) 70%, var(--tl-outline-soft));
}

.tl-chip.red {
    background: var(--tl-primary-soft);
    color: var(--tl-primary);
}

body.dark-mode .tl-chip.red {
    background: #c1121f;
    color: #ffffff;
    border-color: #c1121f;
}

.tl-section {
    margin-bottom: 40px;
}

.tl-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.tl-section-title h2,
.tl-page-title {
    margin: 0;
    color: var(--tl-text);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.tl-section-title a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--tl-primary);
    font-size: 13px;
    font-weight: 600;
}

.tl-home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 300px);
    align-items: stretch;
    gap: 22px;
    margin-bottom: 34px;
}

.tl-home-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
    min-height: 0;
}

.tl-home-layout .tl-section,
.tl-home-bottom-grid .tl-section {
    margin-bottom: 0;
}

.tl-home-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.tl-home-document-card {
    min-height: 244px;
}

.tl-home-side {
    display: flex;
    flex-direction: column;
    height: 0;
    min-height: 100%;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 12px;
    background: color-mix(in srgb, var(--tl-surface-lowest) 72%, var(--tl-surface-low));
    box-shadow: var(--tl-shadow);
}

.tl-home-side .tl-section-title {
    margin-bottom: 14px;
}

.tl-home-side .tl-section-title h2 {
    font-size: 22px;
}

.tl-home-school-list {
    display: grid;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.tl-home-side > .tl-sr-only + .tl-home-school-list {
    height: 100%;
}

.tl-home-side .tl-school-tile {
    background: var(--tl-surface-lowest);
}

.tl-home-school-more {
    flex: 0 0 auto;
    margin-top: 12px;
    box-shadow: none;
}

.tl-home-side .tl-school-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

.tl-home-side .tl-expand-panel .tl-school-grid {
    padding: 0 12px 12px;
}

.tl-home-bottom-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.88fr) minmax(0, 2.35fr);
    align-items: stretch;
    gap: 24px;
    margin-bottom: 40px;
}

.tl-home-bottom-grid > .tl-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tl-home-bottom-grid > .tl-section:first-child {
    height: 0;
    min-height: 100%;
    overflow: hidden;
}

.tl-feature-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
}

.tl-carousel {
    position: relative;
}

.tl-horizontal-strip {
    display: grid;
    grid-auto-columns: minmax(280px, 360px);
    grid-auto-flow: column;
    gap: 16px;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.tl-horizontal-strip::-webkit-scrollbar {
    display: none;
}

.tl-horizontal-strip > * {
    scroll-snap-align: start;
}

.tl-carousel-btn {
    position: absolute;
    top: 50%;
    z-index: 7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 86px;
    border: 0;
    border-radius: 14px;
    background: color-mix(in srgb, var(--tl-surface-lowest) 78%, transparent);
    color: var(--tl-primary);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    opacity: 0.28;
    transform: translateY(-50%);
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.tl-carousel:hover .tl-carousel-btn,
.tl-carousel:focus-within .tl-carousel-btn,
.tl-carousel-btn:hover,
.tl-carousel-btn:focus-visible {
    opacity: 0.92;
}

.tl-carousel-btn:hover,
.tl-carousel-btn:focus-visible {
    background: var(--tl-surface-lowest);
    transform: translateY(-50%) scale(1.04);
}

.tl-carousel-btn[disabled] {
    pointer-events: none;
    opacity: 0;
}

.tl-carousel-btn .material-symbols-outlined {
    font-size: 42px;
}

.tl-carousel-btn.is-prev {
    left: 10px;
}

.tl-carousel-btn.is-next {
    right: 10px;
}

.tl-feature-card {
    min-height: 226px;
}

.tl-school-strip {
    grid-auto-columns: minmax(256px, 320px);
    margin-bottom: 16px;
}

.tl-feature-large {
    grid-row: span 2;
}

.tl-card,
.tl-school-tile,
.tl-resource-card,
.tl-metric-card,
.tl-form-card,
.tl-guide-card,
.tl-activity {
    border: 1px solid var(--tl-outline-soft);
    border-radius: 12px;
    background: var(--tl-surface-lowest);
    box-shadow: var(--tl-shadow);
}

.tl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 132px;
    padding: 16px;
    overflow: hidden;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.tl-feature-large {
    min-height: 280px;
    padding: 24px;
}

.tl-card:hover {
    border-color: var(--tl-secondary-text);
    background: color-mix(in srgb, var(--tl-secondary-soft) 34%, var(--tl-surface-lowest));
    transform: translateY(-1px);
}

body.dark-mode .tl-card:hover {
    border-color: var(--tl-error);
    background: color-mix(in srgb, var(--tl-error-soft) 28%, var(--tl-surface-lowest));
}

.tl-card-type {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 5px;
    background: var(--tl-surface-container);
    color: var(--tl-muted);
    font-size: 12px;
    font-weight: 700;
}

.tl-card-type.blue {
    background: var(--tl-secondary-soft);
    color: var(--tl-secondary-text);
}

.tl-card-type.red {
    background: var(--tl-primary-strong);
    color: #ffffff;
}

.tl-card-type.teal {
    background: var(--tl-tertiary);
    color: #ffffff;
}

.tl-card h3 {
    margin: 16px 0 8px;
    color: var(--tl-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.tl-feature-large h3 {
    margin-top: 24px;
    font-size: 25px;
    font-weight: 500;
}

.tl-card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--tl-outline-soft);
    background: var(--tl-surface-low);
}

.tl-card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tl-card.has-image h3 {
    margin-top: 12px;
}

.tl-card p {
    margin: 0;
    color: var(--tl-muted);
    font-size: 13px;
}

.tl-card-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--tl-muted);
    font-size: 12px;
}

.tl-card-meta-badge {
    flex: 0 0 auto;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.tl-feature-large .tl-card-meta {
    border-top: 1px solid color-mix(in srgb, var(--tl-outline-soft) 55%, transparent);
}

.tl-inline-stats {
    display: none;
}

.tl-school-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.tl-school-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 16px;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.tl-school-tile:hover {
    border-color: var(--tl-secondary-text);
    background: color-mix(in srgb, var(--tl-secondary-soft) 34%, var(--tl-surface-lowest));
}

body.dark-mode .tl-school-tile:hover {
    border-color: var(--tl-error);
    background: color-mix(in srgb, var(--tl-error-soft) 28%, var(--tl-surface-lowest));
}

.tl-card:hover .tl-card-type,
.tl-school-tile:hover .tl-school-logo,
a.tl-activity-row:hover .tl-activity-icon,
a.tl-activity-row:focus-visible .tl-activity-icon {
    background: var(--tl-secondary-soft);
    color: var(--tl-secondary-text);
}

body.dark-mode .tl-card:hover .tl-card-type,
body.dark-mode .tl-school-tile:hover .tl-school-logo,
body.dark-mode a.tl-activity-row:hover .tl-activity-icon,
body.dark-mode a.tl-activity-row:focus-visible .tl-activity-icon {
    background: var(--tl-error-soft);
    color: var(--tl-error);
}

.tl-school-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 999px;
    background: var(--tl-surface-container);
    color: var(--tl-text);
    font-weight: 700;
    overflow: hidden;
}

.tl-school-logo img {
    width: 100%;
    height: 100%;
    padding: 8px;
    object-fit: contain;
}

.tl-school-tile strong {
    display: block;
    color: var(--tl-text);
    font-size: 13px;
}

.tl-school-tile span {
    display: block;
    color: var(--tl-muted);
    font-size: 12px;
}

.tl-expand-panel {
    border: 1px solid var(--tl-outline-soft);
    border-radius: 12px;
    background: var(--tl-surface-lowest);
    box-shadow: var(--tl-shadow);
}

.tl-expand-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 0 16px;
    color: var(--tl-text);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.tl-expand-panel summary::-webkit-details-marker {
    display: none;
}

.tl-expand-panel summary .material-symbols-outlined {
    transition: transform 0.18s ease;
}

.tl-expand-panel[open] summary .material-symbols-outlined {
    transform: rotate(180deg);
}

.tl-expand-panel .tl-school-grid {
    padding: 0 16px 16px;
}

.tl-ad {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / var(--tl-ad-height-ratio, 0.18);
    min-height: var(--tl-ad-min-height, 96px);
    max-height: var(--tl-ad-max-height, 280px);
    padding: 16px;
    overflow: hidden;
    border: 1px dashed var(--tl-outline-soft);
    border-radius: 12px;
    background: color-mix(in srgb, var(--tl-surface-container) 52%, transparent);
    color: var(--tl-muted);
    text-align: center;
}

.tl-ad > ins,
.tl-ad > iframe {
    width: 100%;
    max-width: 100%;
}

.tl-ad > ins.adsbygoogle {
    height: 100%;
}

.tl-ad::before {
    content: "SPONSORED";
    position: absolute;
    top: 12px;
    left: 12px;
    color: color-mix(in srgb, var(--tl-muted) 60%, transparent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.tl-activity {
    overflow: hidden;
}

.tl-home-bottom-grid .tl-activity {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.tl-activity-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--tl-outline-soft) 45%, transparent);
    color: var(--tl-text);
    transition: background 0.18s ease;
}

a.tl-activity-row:hover,
a.tl-activity-row:focus-visible {
    background: color-mix(in srgb, var(--tl-secondary-soft) 34%, var(--tl-surface-lowest));
}

body.dark-mode a.tl-activity-row:hover,
body.dark-mode a.tl-activity-row:focus-visible {
    background: color-mix(in srgb, var(--tl-error-soft) 28%, var(--tl-surface-lowest));
}

.tl-home-school-list,
.tl-home-bottom-grid .tl-activity {
    scrollbar-width: none;
    scroll-behavior: auto;
}

.tl-home-school-list::-webkit-scrollbar,
.tl-home-bottom-grid .tl-activity::-webkit-scrollbar {
    display: none;
}

.tl-home-school-list.is-auto-scrolling,
.tl-home-bottom-grid .tl-activity.is-auto-scrolling {
    pointer-events: auto;
}

body.dark-mode .tl-home-school-list,
body.dark-mode .tl-home-bottom-grid .tl-activity {
    scrollbar-width: none;
}

.tl-home-layout,
.tl-home-bottom-grid,
.tl-home-card-grid {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--tl-secondary-text) 55%, transparent) transparent;
}

body.dark-mode .tl-home-layout,
body.dark-mode .tl-home-bottom-grid,
body.dark-mode .tl-home-card-grid {
    scrollbar-color: color-mix(in srgb, var(--tl-error) 55%, transparent) transparent;
}

.tl-activity-row:last-child {
    border-bottom: 0;
}

.tl-activity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 999px;
    background: var(--tl-surface-container);
    color: var(--tl-muted);
}

.tl-activity p {
    margin: 0;
    color: var(--tl-text);
    font-size: 13px;
}

.tl-activity a:not(.tl-activity-row),
.tl-activity-link {
    color: var(--tl-primary);
    font-weight: 600;
}

.tl-activity time {
    display: block;
    color: var(--tl-muted);
    font-size: 12px;
}

.tl-footer {
    margin-top: auto;
    padding: 34px 24px;
    border-top: 1px solid var(--tl-outline-soft);
    background: var(--tl-surface);
}

.tl-footer.with-sidebar {
    margin-left: 256px;
    width: calc(100% - 256px);
}

.tl-footer-inner {
    display: grid;
    align-items: center;
    justify-items: center;
    gap: 14px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.tl-footer-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.tl-footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--tl-surface-lowest);
    transition: transform 0.18s ease, background 0.18s ease;
}

.tl-footer-socials a:hover,
.tl-footer-socials a:focus-visible {
    background: var(--tl-surface-container);
    transform: translateY(-2px);
}

.tl-footer-socials img {
    width: 24px;
    height: 24px;
    display: block;
}

.tl-footer-copyright {
    color: var(--tl-muted);
    font-size: 13px;
    font-weight: 600;
}

.tl-page-head {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
}

.tl-document-head {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    align-items: start;
    column-gap: 36px;
}

.tl-document-head .tl-breadcrumb {
    grid-column: 1 / -1;
}

.tl-document-head-main {
    min-width: 0;
}

.tl-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--tl-muted);
    font-size: 13px;
}

.tl-breadcrumb .material-symbols-outlined {
    font-size: 16px;
}

.tl-course-headline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tl-course-headline h1,
.tl-document-title,
.tl-contribute-title {
    margin: 0;
    color: var(--tl-text);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
}

.tl-course-code {
    padding: 6px 10px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 6px;
    background: var(--tl-surface-container);
    color: var(--tl-muted);
    font-size: 12px;
    letter-spacing: 0.08em;
}

.tl-page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tl-course-search {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(100%, 560px);
    height: 60px;
    padding: 0 16px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 10px;
    background: var(--tl-surface-lowest);
}

.tl-course-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--tl-text);
    font-size: 16px;
}

.tl-tabs {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 40px 0 28px;
    border-bottom: 1px solid var(--tl-outline-soft);
}

.tl-tab {
    padding: 0 4px 12px;
    border-bottom: 3px solid transparent;
    color: var(--tl-muted);
    font-weight: 500;
}

.tl-tab.is-active {
    border-bottom-color: var(--tl-primary);
    color: var(--tl-primary);
    font-weight: 700;
}

.tl-course-grid,
.tl-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.tl-document-mosaic {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 18px;
    align-items: stretch;
}

.tl-course-card {
    min-height: clamp(170px, 18vw, 230px);
    padding: 20px;
}

.tl-course-card h3 {
    margin-top: 18px;
    font-size: clamp(17px, 1.55vw, 24px);
    font-weight: 700;
}

.tl-mosaic-card {
    grid-column: span 2;
}

.tl-mosaic-card.tl-span-2 {
    grid-column: span 3;
}

.tl-mosaic-card.tl-span-3 {
    grid-column: span 4;
}

.tl-load-more {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.tl-load-hidden {
    display: none !important;
}

.tl-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 10px;
    background: var(--tl-surface-lowest);
    color: var(--tl-text);
    font-weight: 600;
}

.tl-alert.success {
    border-color: color-mix(in srgb, #16a34a 45%, var(--tl-outline-soft));
    color: #166534;
}

.tl-alert.error {
    border-color: color-mix(in srgb, var(--tl-error) 55%, var(--tl-outline-soft));
    color: var(--tl-error);
}

body.dark-mode .tl-alert.success {
    color: #86efac;
}

.tl-doc-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tl-document-title {
    font-size: 24px;
}

.tl-doc-description {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--tl-muted);
    line-height: 1.7;
    white-space: normal;
}

.tl-document-cover {
    width: min(720px, 100%);
    margin: 18px 0 0;
}

.tl-document-cover img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--tl-outline-soft);
    background: var(--tl-surface-low);
}

.ahust-img-here {
    margin: 18px 0;
}

.ahust-img-left {
    text-align: left;
}

.ahust-img-center {
    text-align: center;
}

.ahust-img-right {
    text-align: right;
}

.ahust-img-here img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--tl-outline-soft);
    background: var(--tl-surface-low);
}

.tl-doc-inline-image figcaption {
    margin-top: 8px;
    color: var(--tl-muted);
    font-size: 13px;
    line-height: 1.5;
}

.tl-document-head-tags {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.tl-author-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid color-mix(in srgb, var(--tl-primary) 35%, var(--tl-outline-soft));
    border-radius: 999px;
    background: color-mix(in srgb, var(--tl-primary-soft) 72%, var(--tl-surface-lowest));
    color: var(--tl-primary);
    font-size: 15px;
    font-weight: 800;
}

.tl-author-tag .material-symbols-outlined {
    font-size: 20px;
}

.tl-doc-updated {
    margin: 10px 0 0;
    color: var(--tl-primary);
    font-weight: 700;
}

.tl-doc-content-summary {
    max-width: 720px;
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--tl-primary) 28%, var(--tl-outline-soft));
    border-radius: 10px;
    background: color-mix(in srgb, var(--tl-primary-soft) 45%, var(--tl-surface-lowest));
}

.tl-doc-content-summary h2 {
    margin: 0 0 8px;
    color: var(--tl-text);
    font-size: 17px;
}

.tl-doc-content-summary p {
    margin: 0;
    color: var(--tl-text);
    line-height: 1.7;
}

.tl-doc-quick-facts {
    padding: 14px 16px;
}

.tl-doc-quick-facts ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 18px;
    color: var(--tl-text);
    line-height: 1.55;
}

.tl-document-course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0;
}

.tl-document-tags-panel {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 10px;
    min-height: 180px;
    margin: 8px 0 0;
    padding: 18px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 12px;
    background: var(--tl-surface-lowest);
    box-shadow: var(--tl-shadow);
}

.tl-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0 30px;
}

.tl-metric-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 70px;
    padding: 14px;
}

.tl-metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--tl-primary-soft);
    color: var(--tl-primary);
}

.tl-metric-card strong {
    display: block;
    color: var(--tl-text);
    font-size: 22px;
    font-weight: 500;
}

.tl-metric-card span {
    color: var(--tl-muted);
    font-size: 12px;
}

.tl-preview-panel {
    display: flex;
    flex-direction: column;
    height: 600px;
    margin-bottom: 28px;
    overflow: hidden;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 12px;
    background: var(--tl-surface-lowest);
}

.tl-preview-panel:fullscreen {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
}

.tl-preview-panel:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
}

.tl-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 40px;
    padding: 0 14px;
    border-bottom: 1px solid var(--tl-outline-soft);
    background: var(--tl-surface-low);
    color: var(--tl-text);
    font-size: 12px;
    font-weight: 500;
}

.tl-preview-download-hint {
    color: var(--tl-muted);
    font-size: 12px;
}

.tl-preview-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-left: auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 8px;
    background: var(--tl-surface-lowest);
    color: var(--tl-text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.tl-preview-fullscreen-btn:hover,
.tl-preview-fullscreen-btn:focus-visible {
    border-color: var(--tl-primary);
    color: var(--tl-primary);
}

.tl-preview-surface {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 16px;
    overflow: hidden;
    background: var(--tl-surface-high);
}

body.dark-mode .tl-preview-surface {
    background: var(--tl-surface-low);
}

.tl-preview-surface iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.tl-drive-preview-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fff;
}

.tl-drive-preview-frame::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 68px;
    height: 56px;
    border-radius: 8px;
    background: var(--tl-surface-high);
    pointer-events: auto;
}

body.dark-mode .tl-drive-preview-frame::after {
    background: var(--tl-surface-low);
}

.tl-preview-surface img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #fff;
}

.tl-inline-preview img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px 0;
    border-radius: 8px;
}

.tl-inline-preview,
.tl-code {
    width: 100%;
    max-width: 900px;
    max-height: 100%;
    overflow: auto;
    padding: 22px;
    border-radius: 8px;
    background: var(--tl-surface-lowest);
    color: var(--tl-text);
}

.tl-code {
    font-family: Consolas, "Courier New", monospace;
    white-space: pre-wrap;
}

.tl-resource-section {
    margin-top: 28px;
}

.tl-resource-section h2,
.tl-related-section h2 {
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tl-outline-soft);
    color: var(--tl-text);
    font-size: 20px;
    font-weight: 700;
}

.tl-resource-list {
    display: grid;
    gap: 14px;
}

.tl-resource-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
}

.tl-resource-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tl-resource-icon,
.tl-related-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 8px;
    background: var(--tl-primary-soft);
    color: var(--tl-primary);
}

.tl-resource-card h3 {
    margin: 0;
    color: var(--tl-text);
    font-size: 20px;
    font-weight: 500;
}

.tl-resource-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    color: var(--tl-tertiary);
    font-size: 12px;
}

.tl-resource-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tl-flag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--tl-muted);
}

.tl-flag-btn:hover {
    background: var(--tl-error-soft);
    color: var(--tl-error);
}

.tl-related-section {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--tl-outline-soft);
}

.tl-related-card {
    min-height: 165px;
}

.tl-related-card h3 {
    font-size: 21px;
    font-weight: 500;
}

.tl-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 32px;
    align-items: start;
}

.tl-contribute-title {
    margin-bottom: 10px;
    font-size: 56px;
    font-weight: 400;
}

.tl-form-card,
.tl-guide-card {
    padding: 32px;
}

.tl-form {
    display: grid;
    gap: 22px;
}

.tl-field {
    display: grid;
    gap: 7px;
}

.tl-field label,
.tl-fieldset-label {
    color: var(--tl-text);
    font-size: 13px;
    font-weight: 500;
}

.tl-required {
    color: var(--tl-error);
}

.tl-field input,
.tl-field select,
.tl-field textarea {
    width: 100%;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 8px;
    background: var(--tl-surface);
    color: var(--tl-text);
    outline: 0;
    padding: 10px 12px;
}

.tl-field textarea {
    min-height: 98px;
    resize: vertical;
}

.tl-field input:focus,
.tl-field select:focus,
.tl-field textarea:focus,
.tl-course-search:focus-within,
.tl-smart-search:focus-within {
    border-color: var(--tl-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tl-primary) 28%, transparent);
}

.tl-field-help {
    margin: 0;
    color: var(--tl-muted);
    font-size: 12px;
}

.tl-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tl-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tl-type-option {
    position: relative;
}

.tl-type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tl-type-option span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 5px 14px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 999px;
    color: var(--tl-text);
    cursor: pointer;
    font-size: 12px;
}

.tl-type-option input:checked + span {
    background: var(--tl-primary-soft);
    color: var(--tl-primary);
    border-color: var(--tl-primary);
}

.tl-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--tl-outline-soft);
}

.tl-guide-card h2 {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--tl-text);
    font-size: 28px;
    line-height: 1.15;
}

.tl-guide-list {
    display: grid;
    gap: 20px;
}

.tl-guide-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
}

.tl-guide-item .material-symbols-outlined {
    color: var(--tl-primary);
    font-size: 18px;
}

.tl-guide-item strong {
    display: block;
    color: var(--tl-text);
    font-size: 13px;
}

.tl-guide-item p {
    margin: 2px 0 0;
    color: var(--tl-muted);
    font-size: 13px;
}

.tl-guide-note {
    margin-top: 28px;
    padding: 14px;
    border: 1px solid var(--tl-outline-soft);
    border-radius: 8px;
    background: var(--tl-surface-container);
    color: var(--tl-muted);
    font-size: 13px;
}

.tl-empty {
    padding: 24px;
    border: 1px dashed var(--tl-outline-soft);
    border-radius: 12px;
    color: var(--tl-muted);
    text-align: center;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1180px) {
    .tl-home-layout {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    }

    .tl-home-bottom-grid {
        grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    }

    .tl-home-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tl-home-school-list {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .tl-home-bottom-grid .tl-activity {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

@media (max-width: 1024px) {
    .tl-sidebar {
        display: none;
    }

    .tl-footer.with-sidebar {
        margin-left: 0;
        width: 100%;
    }

    .tl-main.has-sidebar {
        margin-left: 0;
    }

    .tl-home-side .tl-school-grid {
        grid-template-columns: 1fr;
    }

    .tl-feature-grid,
    .tl-course-grid,
    .tl-related-grid,
    .tl-document-mosaic,
    .tl-search-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tl-mosaic-card,
    .tl-mosaic-card.tl-span-2,
    .tl-mosaic-card.tl-span-3 {
        grid-column: span 1;
    }

    .tl-school-grid,
    .tl-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tl-form-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .tl-topbar-inner {
        padding: 0 16px;
    }

    .tl-top-search,
    .tl-nav {
        display: none;
    }

    .tl-action-btn {
        display: none;
    }

    .tl-header-account {
        width: 40px;
        padding: 0;
        border-radius: 999px;
    }

    .tl-header-account-label {
        display: none;
    }

    .tl-main,
    .tl-main.has-sidebar {
        padding: 20px 16px;
    }

    .tl-hero,
    .tl-hero-inner {
        min-height: 420px;
    }

    .tl-hero h1 {
        font-size: 32px;
    }

    .tl-home-layout,
    .tl-home-bottom-grid {
        grid-template-columns: 1fr;
        overflow: hidden;
    }

    .tl-home-layout > *,
    .tl-home-bottom-grid > .tl-section {
        min-width: 0;
    }

    .tl-home-side,
    .tl-home-bottom-grid > .tl-section:first-child {
        height: auto;
        min-height: 0;
    }

    .tl-home-card-grid,
    .tl-home-school-list,
    .tl-home-bottom-grid .tl-activity {
        display: grid;
        width: 100%;
        max-width: 100%;
        grid-auto-flow: column;
        grid-template-columns: none;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .tl-home-card-grid {
        grid-auto-columns: minmax(260px, 86vw);
        padding-bottom: 4px;
    }

    .tl-home-school-list {
        grid-auto-columns: minmax(260px, 82vw);
        gap: 14px;
        height: auto;
        padding: 0 0 4px;
    }

    .tl-home-bottom-grid .tl-activity {
        grid-auto-columns: minmax(260px, 82vw);
    }

    .tl-home-card-grid > *,
    .tl-home-school-list > *,
    .tl-home-bottom-grid .tl-activity-row {
        scroll-snap-align: start;
    }

    .tl-home-bottom-grid .tl-activity-row {
        align-items: flex-start;
        min-height: 118px;
        border-right: 1px solid color-mix(in srgb, var(--tl-outline-soft) 45%, transparent);
        border-bottom: 0;
    }

    .tl-home-bottom-grid .tl-activity-row:last-child {
        border-right: 0;
    }

    .tl-home-side .tl-school-grid {
        grid-template-columns: 1fr;
    }

    .tl-feature-grid,
    .tl-course-grid,
    .tl-related-grid,
    .tl-document-mosaic,
    .tl-school-grid,
    .tl-metric-grid,
    .tl-form-grid,
    .tl-search-filter-grid {
        grid-template-columns: 1fr;
    }

    .tl-course-headline {
        align-items: flex-start;
        flex-direction: column;
    }

    .tl-document-head {
        grid-template-columns: 1fr;
    }

    .tl-course-headline h1,
    .tl-contribute-title {
        font-size: 34px;
    }

    .tl-resource-card {
        align-items: stretch;
        flex-direction: column;
    }

    .tl-resource-actions {
        width: 100%;
    }

    .tl-resource-actions .tl-primary-btn,
    .tl-resource-actions .tl-secondary-btn {
        flex: 1;
    }

    .tl-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
