@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@600;700&family=IBM+Plex+Serif:ital,wght@0,300;0,400;0,600;1,600&display=swap');

:root {
    color-scheme: light;
    --bg: #e4decd;
    --bg-soft: #e8e7e5;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --surface-tint: rgba(210, 223, 139, 0.2);
    --text: #2c2c2d;
    --muted: rgba(44, 44, 45, 0.72);
    --heading: #791714;
    --primary: #848923;
    --primary-strong: #6d711c;
    --accent: #eb5a3a;
    --accent-soft: #f49a6b;
    --petrol: #80c8be;
    --lilac: #be9bc3;
    --line: rgba(44, 44, 45, 0.12);
    --line-strong: rgba(121, 23, 20, 0.16);
    --shadow: 0 28px 80px rgba(44, 44, 45, 0.12);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --content-width: min(1180px, calc(100% - 40px));
    --narrow-width: min(760px, calc(100% - 40px));
    --focus-ring: 0 0 0 4px rgba(128, 200, 190, 0.32);
    --brand-mark-url: url('/assets/bildmarke.svg');
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'IBM Plex Serif', Georgia, serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(128, 200, 190, 0.38), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(190, 155, 195, 0.24), transparent 20%),
        linear-gradient(135deg, rgba(228, 222, 205, 0.94), rgba(232, 231, 229, 0.94)),
        var(--bg);
}

body::before,
body::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: -1;
    background-image: var(--brand-mark-url);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0.18;
}

body::before {
    width: 270px;
    height: 338px;
    left: -102px;
    top: 72px;
    transform: rotate(0deg);
}

body::after {
    width: 210px;
    height: 263px;
    right: -84px;
    bottom: 42px;
    transform: rotate(180deg);
}

a {
    color: inherit;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.page-shell {
    width: var(--content-width);
    margin: 0 auto;
    padding: 28px 0 72px;
}

.page-shell--narrow {
    width: var(--narrow-width);
}

.page-stack {
    display: grid;
    gap: 28px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.82));
    border: 1px solid var(--line-strong);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: auto auto -72px -72px;
    width: 220px;
    height: 275px;
    background-image: var(--brand-mark-url);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0.16;
    transform: rotate(90deg);
}

.page-hero__content,
.page-hero__aside {
    position: relative;
    padding: 38px;
}

.page-hero__content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.68));
}

.page-hero__aside {
    display: grid;
    align-content: space-between;
    gap: 20px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(44, 44, 45, 0.06), rgba(44, 44, 45, 0.08)),
        linear-gradient(145deg, var(--primary), var(--accent));
}

.page-hero__aside--soft {
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.18)),
        linear-gradient(145deg, var(--petrol), var(--lilac));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-family: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
}

.eyebrow::before {
    content: '';
    width: 34px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}

h1,
h2,
h3,
.headline-font {
    margin: 0;
    font-family: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--heading);
}

.page-title {
    max-width: 12ch;
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    line-height: 0.9;
}

.page-title em,
.section-title em,
.metric-value em {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-style: italic;
    font-weight: 600;
}

.page-subtitle,
.lede,
.hero-note,
.muted-text {
    margin: 18px 0 0;
    max-width: 62ch;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.72;
}

.hero-note {
    max-width: none;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
}

.page-hero__aside--soft .hero-note,
.page-hero__aside--soft .hero-kicker,
.page-hero__aside--soft .stat-card__label,
.page-hero__aside--soft .stat-card__value {
    color: var(--text);
}

.hero-kicker {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.86);
}

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

.hero-support {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
}

.hero-support__title {
    color: #fff;
    font-size: 1.35rem;
    line-height: 0.98;
}

.hero-support__copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.58;
}

.hero-support__action {
    width: fit-content;
    background: rgba(255, 255, 255, 0.92);
}

.stat-card {
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
}

.stat-card__label {
    margin: 0 0 8px;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.76);
}

.stat-card__value {
    margin: 0;
    font-family: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 0.95;
    color: #fff;
}

.split-grid,
.metrics-grid,
.resource-list,
.help-grid,
.screenshot-grid,
.actions-cluster,
.filter-grid,
.button-row,
.info-grid,
.link-grid {
    display: grid;
    gap: 20px;
}

.split-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.surface,
.panel,
.mentor-card,
.resource-card,
.notice,
.empty-state,
.form-card,
.info-card,
.help-card,
.screenshot-card,
.filter-panel,
.topbar,
.user-menu-dropdown {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.panel,
.notice,
.empty-state,
.form-card,
.info-card,
.help-card,
.screenshot-card,
.filter-panel {
    border-radius: var(--radius-lg);
    padding: 24px;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    line-height: 0.96;
}

.section-copy {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.66;
}

.topbar {
    position: sticky;
    top: 18px;
    z-index: 200;
    width: var(--content-width);
    margin: 18px auto 0;
    padding: 14px 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    text-decoration: none;
}

.topbar-brand-mark {
    width: 34px;
    height: 42px;
    flex-shrink: 0;
    object-fit: contain;
}

.topbar-brand-text {
    min-width: 0;
}

.topbar-brand-name {
    display: block;
    font-family: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1;
    color: var(--heading);
}

.topbar-brand-subline {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.2;
}

.user-menu {
    position: relative;
}

.user-menu-trigger,
.button,
.button-secondary,
.button-ghost,
.chip-link,
.btn-primary,
.btn-secondary,
.btn-edit,
.btn-delete,
.mail-link,
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 11px 18px;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.button:hover,
.button-secondary:hover,
.button-ghost:hover,
.chip-link:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-edit:hover,
.btn-delete:hover,
.mail-link:hover,
.back-link:hover,
.user-menu-trigger:hover {
    transform: translateY(-1px);
}

.button,
.btn-primary,
.btn-sync {
    border: 1px solid rgba(121, 23, 20, 0.18);
    background: linear-gradient(135deg, var(--accent), var(--heading));
    color: #fff;
    box-shadow: 0 18px 32px rgba(121, 23, 20, 0.2);
}

.button-secondary,
.btn-secondary,
.btn-edit,
.user-menu-trigger,
.mail-link,
.back-link {
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
}

.button-ghost,
.btn-delete {
    border: 1px solid rgba(121, 23, 20, 0.18);
    background: rgba(121, 23, 20, 0.06);
    color: var(--heading);
}

.button-label,
.back-link,
.mail-link,
.resource-link,
.user-menu-trigger,
.btn-primary,
.btn-secondary,
.btn-edit,
.btn-delete,
.filter-label,
.field-label,
.form-label,
.support-note-title,
.status-badge,
.tag,
.metric-label {
    font-family: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
}

.button-icon,
.back-link svg,
.mail-link svg {
    flex-shrink: 0;
}

.resource-link,
.ct-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: var(--heading);
    word-break: break-word;
}

.button-row,
.actions-cluster,
.link-grid {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: start;
    align-items: start;
}

.actions-cluster {
    justify-content: end;
}

.user-menu-trigger {
    cursor: pointer;
    border-radius: 999px;
}

.user-menu-trigger svg {
    transition: transform 0.2s ease;
}

.user-menu[open] .user-menu-trigger svg {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    background: #ffffff;
    backdrop-filter: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 240px;
    border-radius: 22px;
    overflow: hidden;
}

.user-name {
    display: block;
    padding: 16px 18px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

.user-menu-item {
    display: block;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    text-align: left;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}

.user-menu-item:last-child {
    border-bottom: 0;
}

.user-menu-item:hover {
    background: rgba(128, 200, 190, 0.12);
}

.metric-card {
    border-radius: var(--radius-lg);
    padding: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.84));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.metric-label {
    margin: 0 0 10px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
}

.metric-value {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.9rem);
    line-height: 0.94;
}

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

.filter-panel {
    display: grid;
    gap: 18px;
}

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

.search-highlight {
    background: var(--accent-soft);
    color: var(--heading);
    border-radius: 4px;
    padding: 0 2px;
}

.filter-group,
.form-group,
.field,
.resource-body,
.support-note,
.hero-actions {
    display: grid;
    gap: 8px;
}

.filter-label,
.field-label,
.form-label,
.status-badge,
.tag {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.filter-select,
.form-input,
.form-textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    padding: 14px 16px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.filter-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23791714' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.filter-select:hover,
.form-input:hover,
.form-textarea:hover {
    border-color: rgba(121, 23, 20, 0.24);
}

.filter-select:focus,
.form-input:focus,
.form-textarea:focus {
    border-color: rgba(121, 23, 20, 0.32);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.65;
}

.form-input.has-error,
.form-textarea.has-error {
    border-color: rgba(121, 23, 20, 0.48);
}

.form-error {
    color: var(--heading);
    font-size: 0.92rem;
}

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

.mentor-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 26px;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.mentor-card::before {
    content: '';
    position: absolute;
    top: -48px;
    right: -38px;
    width: 132px;
    height: 132px;
    border-radius: 999px;
    border: 16px solid rgba(128, 200, 190, 0.18);
}

.mentor-card__header,
.mentor-card__body,
.mentor-card__footer {
    position: relative;
    z-index: 1;
}

.mentor-card__header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
}

.avatar {
    width: 88px;
    height: 88px;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(128, 200, 190, 0.34), rgba(244, 154, 107, 0.3));
    display: grid;
    place-items: center;
    color: var(--heading);
    font-family: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    font-size: 2rem;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.status-badge.available {
    background: rgba(210, 223, 139, 0.28);
    border-color: rgba(132, 137, 35, 0.22);
    color: var(--primary-strong);
}

.status-badge.other {
    background: rgba(244, 154, 107, 0.18);
    border-color: rgba(235, 90, 58, 0.22);
    color: var(--heading);
}

.mentor-name {
    font-size: 1.65rem;
    line-height: 0.95;
}

.mentor-age {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--muted);
}

.fields {
    display: grid;
    gap: 16px;
}

.field-value {
    line-height: 1.65;
    color: var(--text);
    white-space: pre-line;
}

.field-expandable {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.54);
}

.field-expandable summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    font-family: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--heading);
}

.field-expandable summary::-webkit-details-marker {
    display: none;
}

.field-expandable summary::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: auto;
    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='%23791714' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.18s ease;
}

.field-expandable[open] summary::after {
    transform: rotate(180deg);
}

.field-expandable .field-value {
    display: block;
    padding: 0 20px 18px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag,
.supervisor-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(128, 200, 190, 0.24);
    background: rgba(128, 200, 190, 0.16);
    color: var(--heading);
}

.supervisor-badge {
    background: rgba(190, 155, 195, 0.18);
    border-color: rgba(121, 23, 20, 0.14);
}

.mentor-card__footer {
    display: flex;
    justify-content: flex-start;
}

.mail-link {
    width: fit-content;
}

.notice {
    line-height: 1.65;
}

.notice.success {
    background: rgba(210, 223, 139, 0.26);
    border-color: rgba(132, 137, 35, 0.2);
}

.resources-sync-notice.success {
    background: rgba(214, 238, 188, 0.82);
    border-color: rgba(115, 154, 77, 0.4);
    color: #315223;
}

.notice.error {
    background: rgba(244, 154, 107, 0.18);
    border-color: rgba(121, 23, 20, 0.18);
}

.empty-state,
.no-results {
    text-align: center;
    line-height: 1.7;
}

.no-results {
    display: none;
}

.resource-list {
    grid-template-columns: 1fr;
}

.resource-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 24px 26px;
    border-radius: var(--radius-lg);
}

.resource-name {
    font-size: 1.45rem;
    line-height: 1;
}

.resource-desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.resource-actions {
    display: grid;
    gap: 10px;
    align-content: start;
    justify-items: end;
}

.resource-action-icon {
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
    font-size: 1.05rem;
    line-height: 1;
}

.info-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
}

.info-card {
    display: grid;
    gap: 14px;
}

.ct-steps {
    display: grid;
    gap: 18px;
}

.ct-step {
    display: grid;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.ct-step:first-child {
    padding-top: 0;
    border-top: 0;
}

.ct-step h3 {
    font-size: 1.15rem;
    line-height: 1.1;
}

.ct-step .button-secondary {
    justify-self: start;
    width: auto;
}

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

.help-card,
.screenshot-card {
    display: grid;
    gap: 14px;
}

.screenshot-card {
    padding: 18px;
}

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

.screenshot-caption,
.microcopy {
    margin: 0;
    color: var(--muted);
    line-height: 1.58;
    font-size: 0.95rem;
}

.warning-note {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(244, 154, 107, 0.16);
    border: 1px solid rgba(235, 90, 58, 0.18);
    color: var(--heading);
}

.form-card {
    padding: 30px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.auth-layout,
.not-found-layout {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding: 32px 0;
}

.auth-card,
.not-found-card {
    overflow: hidden;
    border-radius: 36px;
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.88));
}

.auth-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.92fr);
}

.auth-main,
.auth-side,
.not-found-card {
    position: relative;
    padding: 42px;
}

.auth-main::before,
.not-found-card::before {
    content: '';
    position: absolute;
    left: -86px;
    top: -34px;
    width: 220px;
    height: 275px;
    background-image: var(--brand-mark-url);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0.16;
    transform: rotate(90deg);
}

.auth-side {
    display: grid;
    align-content: end;
    gap: 18px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(44, 44, 45, 0.08), rgba(44, 44, 45, 0.12)),
        linear-gradient(145deg, var(--heading), var(--accent));
}

.auth-points {
    margin: 0;
    padding-left: 18px;
    line-height: 1.75;
}

.auth-actions {
    margin-top: 32px;
}

.not-found-card {
    width: min(640px, 100%);
    display: grid;
    gap: 22px;
}

.not-found-code {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(190, 155, 195, 0.18);
    color: var(--heading);
    font-family: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

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

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

    .page-hero,
    .split-grid,
    .info-grid,
    .auth-card {
        grid-template-columns: 1fr;
    }

    .page-hero__aside {
        min-height: 240px;
    }

    .topbar,
    .page-shell,
    .page-shell--narrow {
        width: min(100%, calc(100% - 32px));
    }
}

@media (max-width: 760px) {
    body::before,
    body::after {
        display: none;
    }

    body {
        overflow-x: hidden;
    }

    .topbar {
        top: 10px;
        margin-top: 10px;
        padding: 12px 14px;
        border-radius: 24px;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .topbar-brand,
    .user-menu,
    .user-menu-trigger {
        width: 100%;
    }

    .topbar-brand {
        gap: 12px;
    }

    .topbar-brand-mark {
        width: 28px;
        height: 34px;
    }

    .topbar-brand-name {
        font-size: 0.95rem;
    }

    .topbar-brand-subline {
        font-size: 0.72rem;
    }

    .user-menu-trigger {
        justify-content: space-between;
        padding: 12px 14px;
        min-height: 44px;
        font-size: 0.92rem;
    }

    .user-menu-dropdown {
        position: static;
        margin-top: 10px;
        min-width: 0;
        width: 100%;
        border-radius: 18px;
    }

    .page-shell,
    .page-shell--narrow,
    .auth-layout,
    .not-found-layout {
        width: min(100%, calc(100% - 24px));
        padding-top: 18px;
        padding-bottom: 52px;
    }

    .page-hero__content,
    .page-hero__aside,
    .auth-main,
    .auth-side,
    .not-found-card,
    .form-card,
    .panel,
    .notice,
    .empty-state,
    .info-card,
    .help-card,
    .screenshot-card,
    .filter-panel {
        padding: 20px;
    }

    .page-stack {
        gap: 20px;
    }

    .page-hero {
        border-radius: 26px;
    }

    .page-hero::before,
    .auth-main::before,
    .not-found-card::before,
    .mentor-card::before {
        opacity: 0.1;
    }

    .page-hero__content,
    .auth-main,
    .not-found-card {
        gap: 12px;
    }

    .page-hero__aside {
        min-height: 0;
        gap: 16px;
    }

    .hero-grid,
    .metrics-grid,
    .help-grid,
    .screenshot-grid,
    .info-grid,
    .split-grid {
        gap: 16px;
    }

    .hero-support {
        padding: 18px;
    }

    .hero-support__title {
        font-size: 1.2rem;
    }

    .hero-support__action {
        width: 100%;
    }

    .mentor-grid,
    .metrics-grid,
    .help-grid,
    .filter-grid,
    .filter-row,
    .resource-card {
        grid-template-columns: 1fr;
    }

    .actions-cluster,
    .button-row,
    .link-grid {
        grid-auto-flow: row;
        grid-auto-columns: 1fr;
        justify-content: stretch;
        gap: 10px;
    }

    .resource-actions {
        display: flex;
        gap: 10px;
        justify-content: flex-end;
    }

    .actions-cluster > *,
    .button-row > *,
    .link-grid > * {
        width: 100%;
    }

    .resource-actions form button.resource-action-icon,
    .resource-actions > .resource-action-icon {
        width: 46px;
    }

    .button,
    .button-secondary,
    .button-ghost,
    .btn-primary,
    .btn-secondary,
    .btn-edit,
    .btn-delete,
    .mail-link,
    .back-link {
        width: 100%;
        padding: 12px 14px;
        min-height: 44px;
    }

    .resource-link,
    .ct-link {
        width: 100%;
        align-items: flex-start;
        line-height: 1.45;
    }

    .metric-card,
    .mentor-card,
    .resource-card,
    .help-card,
    .info-card,
    .form-card,
    .filter-panel,
    .screenshot-card,
    .empty-state,
    .notice {
        border-radius: 20px;
    }

    .mentor-card,
    .resource-card {
        gap: 14px;
        padding: 20px;
    }

    .mentor-card__body {
        min-width: 0;
    }

    .mentor-name {
        font-size: 1.4rem;
    }

    .status-badge,
    .supervisor-badge,
    .tag {
        max-width: 100%;
        line-height: 1.3;
        white-space: normal;
    }

    .fields {
        gap: 14px;
    }

    .field-expandable summary {
        padding: 14px 18px;
    }

    .field-expandable .field-value {
        padding: 0 18px 16px;
    }

    .mentor-card__header {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .avatar {
        width: 84px;
        height: 84px;
        border-radius: 24px;
    }

    .page-title {
        max-width: 10ch;
        font-size: clamp(2.15rem, 12vw, 3.3rem);
        line-height: 0.92;
    }

    .section-title {
        font-size: clamp(1.55rem, 8.5vw, 2.1rem);
    }

    .page-subtitle,
    .section-copy,
    .hero-note,
    .microcopy,
    .screenshot-caption,
    .resource-desc,
    .field-value,
    .not-found-card .page-subtitle {
        font-size: 0.97rem;
        line-height: 1.58;
    }

    .metric-value,
    .stat-card__value {
        font-size: clamp(1.65rem, 8vw, 2.2rem);
    }

    .filter-select,
    .form-input,
    .form-textarea {
        padding: 13px 14px;
        font-size: 0.96rem;
    }

    .filter-select {
        padding-right: 40px;
        background-position: right 12px center;
    }

    .auth-layout,
    .not-found-layout {
        align-items: start;
        min-height: auto;
        padding-top: 24px;
    }

    .auth-points {
        padding-left: 16px;
        line-height: 1.6;
    }
}