:root {
    color-scheme: light;
    --brand-yellow: #ffcc00;
    --brand-yellow-hover: #e8b900;
    --brand-ink: #111315;
    --brand-ink-soft: #202326;
    --surface: #ffffff;
    --surface-subtle: #f5f6f7;
    --surface-muted: #eceff1;
    --border: #d9dde1;
    --border-strong: #b9c0c7;
    --text: #17191b;
    --text-muted: #5d646b;
    --text-faint: #747c84;
    --danger: #b42318;
    --danger-soft: #fff1f0;
    --success: #176b3a;
    --success-soft: #edf8f1;
    --warning: #815d00;
    --warning-soft: #fff7db;
    --info: #155b75;
    --info-soft: #edf7fb;
    --focus: #966f00;
    --sidebar-width: 264px;
    --topbar-height: 76px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-dialog: 0 24px 80px rgba(17, 19, 21, 0.24);
    --font-body: "Inter", "Segoe UI", Arial, sans-serif;
    --font-display: "Montserrat", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--surface-subtle);
}

body {
    min-width: 320px;
    min-height: 100dvh;
    margin: 0;
    background: var(--surface-subtle);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
}

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

button,
a,
input,
select,
textarea,
[contenteditable="true"] {
    outline: none;
}

:focus-visible {
    outline: 3px solid rgba(150, 111, 0, 0.46) !important;
    outline-offset: 2px;
}

a {
    color: inherit;
}

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

[hidden] {
    display: none !important;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1200;
    transform: translateY(-160%);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--brand-yellow);
    color: var(--brand-ink);
    font-weight: 800;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

.section-label,
.breadcrumb-label {
    margin: 0 0 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.auth-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    min-height: 100dvh;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    overflow: hidden;
    background: var(--surface);
}

.auth-loading-brand {
    position: relative;
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(40px, 6vw, 88px);
    background:
        radial-gradient(circle at 62% 34%, rgba(255, 204, 0, 0.08), transparent 31%),
        var(--brand-ink);
}

.auth-loading-brand::after {
    position: absolute;
    right: -14vw;
    bottom: -18vw;
    width: min(46vw, 620px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 204, 0, 0.24);
    border-radius: 50%;
    content: "";
}

.auth-loading-brand-frame {
    position: relative;
    z-index: 1;
    width: min(310px, 58%);
    padding: 17px 20px;
    border-left: 7px solid var(--brand-yellow);
}

.auth-loading-brand-frame img {
    width: 100%;
}

.auth-loading-brand-copy {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 650px);
    gap: 13px;
}

.auth-loading-panel {
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: clamp(32px, 7vw, 96px);
}

.auth-loading-card {
    width: min(100%, 440px);
}

.auth-loading-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    border-radius: 15px;
}

.auth-loading-message {
    display: flex;
    gap: 9px;
    align-items: center;
    margin-bottom: 30px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 720;
    letter-spacing: 0.02em;
}

.auth-loading-pulse {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--brand-yellow-hover);
}

.auth-loading-form-skeleton {
    display: grid;
    gap: 14px;
}

.auth-skeleton {
    --skeleton-base: #e2e5e7;
    --skeleton-highlight: #f7f8f8;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--skeleton-base);
}

.auth-loading-brand .auth-skeleton {
    --skeleton-base: #2b2e31;
    --skeleton-highlight: #3a3d40;
}

.auth-skeleton-kicker {
    width: 31%;
    height: 11px;
    margin-bottom: 9px;
}

.auth-skeleton-display {
    width: 82%;
    height: clamp(42px, 5.2vw, 76px);
}

.auth-skeleton-display-short {
    width: 58%;
    margin-bottom: 15px;
}

.auth-skeleton-copy {
    width: 76%;
    height: 15px;
}

.auth-skeleton-copy-short {
    width: 54%;
}

.auth-skeleton-label {
    width: 25%;
    height: 10px;
}

.auth-skeleton-title {
    width: 68%;
    height: 43px;
    margin-bottom: 2px;
}

.auth-skeleton-intro {
    width: 92%;
    height: 14px;
    margin-bottom: 14px;
}

.auth-skeleton-field {
    width: 100%;
    height: 52px;
}

.auth-skeleton-button {
    width: 100%;
    height: 52px;
    margin-top: 5px;
    background: #ecd77b;
}

@media (prefers-reduced-motion: no-preference) {
    .auth-skeleton {
        background: linear-gradient(90deg, var(--skeleton-base) 18%, var(--skeleton-highlight) 42%, var(--skeleton-base) 68%);
        background-size: 240% 100%;
        animation: auth-skeleton-shimmer 1.35s ease-in-out infinite;
    }

    .auth-loading-pulse {
        animation: auth-loading-pulse 1.15s ease-in-out infinite;
    }
}

@keyframes auth-skeleton-shimmer {
    to { background-position: -240% 0; }
}

@keyframes auth-loading-pulse {
    0%, 100% { transform: scale(0.82); opacity: 0.46; }
    50% { transform: scale(1); opacity: 1; }
}

.login-screen {
    display: grid;
    min-height: 100dvh;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    background: var(--surface);
}

.login-brand {
    position: relative;
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(40px, 6vw, 88px);
    background:
        linear-gradient(145deg, rgba(255, 204, 0, 0.05), transparent 46%),
        var(--brand-ink);
    color: #f7f7f5;
}

.login-brand::after {
    position: absolute;
    right: -14vw;
    bottom: -18vw;
    width: min(46vw, 620px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 204, 0, 0.28);
    border-radius: 50%;
    content: "";
}

.brand-frame {
    position: relative;
    z-index: 1;
    width: min(310px, 58%);
    padding: 17px 20px;
    border-left: 7px solid var(--brand-yellow);
}

.brand-frame img {
    width: 100%;
}

.login-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 660px;
}

.login-brand-copy .section-label {
    color: var(--brand-yellow);
}

.login-brand-copy h1 {
    max-width: 13ch;
    margin: 0 0 24px;
    font-family: var(--font-display);
    font-size: clamp(2.75rem, 5vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 0.96;
    text-wrap: balance;
    text-transform: uppercase;
}

.login-brand-copy > p:last-child {
    max-width: 49ch;
    margin: 0;
    color: #c4c8cb;
    font-size: 1.06rem;
}

.login-panel {
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: clamp(32px, 7vw, 96px);
}

.login-form {
    width: min(100%, 440px);
}

.login-logo-small {
    display: none;
    width: 220px;
    margin-bottom: 44px;
}

.login-form h1 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.85rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.login-intro {
    margin: 0 0 32px;
    color: var(--text-muted);
}

.login-password-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.login-password-heading a {
    flex: 0 0 auto;
    padding-bottom: 1px;
    border-bottom: 2px solid var(--brand-yellow);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
}

.login-password-heading a:hover {
    border-bottom-color: var(--warning);
}

.login-security-note {
    margin: 18px auto 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
    text-align: center;
}

.signup-invitation {
    display: grid;
    gap: 7px;
    margin-top: 28px;
    padding: 20px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--brand-yellow);
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
}

.signup-invitation-label {
    color: var(--warning);
    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.signup-invitation strong {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 850;
}

.signup-invitation p {
    margin: 0 0 7px;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.signup-invitation .btn {
    display: grid;
    place-items: center;
    text-decoration: none;
}

.password-change-screen {
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: clamp(20px, 5vw, 64px);
    background: var(--brand-ink);
}

.password-change-card {
    width: min(100%, 520px);
    padding: clamp(26px, 5vw, 52px);
    border-top: 7px solid var(--brand-yellow);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-dialog);
}

.password-change-logo {
    width: min(230px, 66%);
    margin-bottom: 42px;
}

.password-change-card h1 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 7vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1;
}

.password-change-intro {
    margin: 0 0 28px;
    color: var(--text-muted);
}

.password-change-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
}

.form-field {
    display: grid;
    gap: 7px;
    margin-bottom: 20px;
}

.form-field label,
.field-label {
    color: var(--text);
    font-size: 0.89rem;
    font-weight: 760;
}

.form-field small,
.form-help {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.form-control,
.form-select {
    min-height: 46px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    color: var(--text);
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(150, 111, 0, 0.17);
}

textarea.form-control {
    min-height: 112px;
    resize: vertical;
}

.form-control::placeholder {
    color: #6e757c;
}

.field-error {
    min-height: 0;
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 650;
}

.field-error:not(:empty) {
    min-height: 20px;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
    background-image: none;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 80px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
}

.button-text {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: var(--brand-yellow-hover);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.button-text:hover {
    color: #5e4800;
}

.btn {
    min-height: 42px;
    border-radius: var(--radius-sm);
    font-weight: 760;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn-brand {
    border: 1px solid var(--brand-yellow);
    background: var(--brand-yellow);
    color: var(--brand-ink);
}

.btn-brand:hover,
.btn-brand:focus {
    border-color: var(--brand-yellow-hover);
    background: var(--brand-yellow-hover);
    color: var(--brand-ink);
}

.btn-secondary {
    border-color: var(--border-strong);
    background: var(--surface);
    color: var(--text);
}

.btn-secondary:hover,
.btn-secondary:focus {
    border-color: var(--text);
    background: var(--surface-subtle);
    color: var(--text);
}

.btn-danger {
    border-color: var(--danger);
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover,
.btn-danger:focus {
    border-color: #8e190f;
    background: #8e190f;
    color: #ffffff;
}

.btn-quiet {
    min-height: 34px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.8rem;
}

.btn-quiet:hover {
    border-color: var(--text-muted);
    background: var(--surface-subtle);
}

.admin-shell {
    min-height: 100dvh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    background: var(--brand-ink);
    color: #edf0f1;
}

.sidebar-brand {
    display: flex;
    min-height: var(--topbar-height);
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-brand a {
    display: block;
    width: 172px;
}

.sidebar-close {
    display: none;
    padding: 5px;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 0.78rem;
    text-decoration: underline;
}

.sidebar-nav {
    display: grid;
    gap: 5px;
    padding: 26px 14px;
}

.sidebar-nav a {
    position: relative;
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 10px 14px 10px 18px;
    border-radius: var(--radius-sm);
    color: #c9ced1;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-nav a::before {
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 3px;
    border-radius: 2px;
    background: transparent;
    content: "";
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.sidebar-nav a.active {
    background: rgba(255, 204, 0, 0.09);
    color: var(--brand-yellow);
}

.sidebar-nav a.active::before {
    background: var(--brand-yellow);
}

.sidebar-footer {
    display: grid;
    gap: 14px;
    margin-top: auto;
    padding: 22px 28px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-footer a,
.sidebar-footer .button-text {
    color: #c9ced1;
    font-size: 0.82rem;
    text-align: left;
}

.sidebar-footer a:hover,
.sidebar-footer .button-text:hover {
    color: var(--brand-yellow);
}

.sidebar-backdrop {
    display: none;
}

.admin-workspace {
    min-height: 100dvh;
    margin-left: var(--sidebar-width);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    min-height: var(--topbar-height);
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px clamp(20px, 3vw, 46px);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
}

.topbar-start {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 16px;
}

.topbar h2 {
    overflow: hidden;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 820;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb-label {
    margin-bottom: 1px;
    color: var(--text-muted);
    font-size: 0.64rem;
}

.menu-button {
    display: none;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 760;
}

.account-menu {
    position: relative;
}

.account-button {
    display: flex;
    max-width: 270px;
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text);
    text-align: left;
}

.account-button:hover,
.account-button[aria-expanded="true"] {
    border-color: var(--border);
    background: var(--surface-subtle);
}

.account-initials {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #d0aa12;
    border-radius: 50%;
    background: var(--brand-yellow);
    color: var(--brand-ink);
    font-size: 0.78rem;
    font-weight: 900;
}

.account-copy {
    display: grid;
    min-width: 0;
}

.account-copy strong,
.account-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-copy strong {
    font-size: 0.83rem;
}

.account-copy small {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.account-popover {
    position: absolute;
    display: grid;
    top: calc(100% + 9px);
    right: 0;
    z-index: 35;
    width: 250px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 14px 40px rgba(17, 19, 21, 0.14);
    gap: 12px;
}

.account-popover p {
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.account-popover .button-text {
    justify-self: start;
}

.admin-main {
    min-height: calc(100dvh - var(--topbar-height));
    padding: clamp(24px, 3.5vw, 52px) clamp(18px, 4vw, 58px) 80px;
}

#page-content,
.page-loading {
    width: min(100%, 1460px);
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.page-header h1 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.45rem);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 1;
}

.page-header p {
    max-width: 64ch;
    margin: 0;
    color: var(--text-muted);
}

.page-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.metric-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 0.8fr;
    gap: 14px;
    margin-bottom: 32px;
}

.metric-card {
    min-height: 154px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.metric-card:first-child {
    background: var(--brand-ink);
    color: #ffffff;
}

.metric-card:first-child .metric-label,
.metric-card:first-child .metric-detail {
    color: #bdc2c5;
}

.metric-label {
    display: block;
    margin-bottom: 26px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 780;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.metric-value {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 3.1rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
}

.metric-detail {
    color: var(--text-muted);
    font-size: 0.77rem;
}

.overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
    gap: 20px;
}

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.panel-header h2,
.panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 820;
}

.panel-body {
    padding: 22px;
}

.recent-list,
.activity-list,
.plain-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.recent-item,
.activity-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.recent-item:first-child,
.activity-item:first-child {
    padding-top: 0;
}

.recent-item:last-child,
.activity-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.recent-item strong,
.activity-item strong {
    display: block;
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.recent-item small,
.activity-item small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.quick-actions {
    display: grid;
    gap: 10px;
}

.quick-action {
    display: grid;
    gap: 4px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
    color: var(--text);
    text-decoration: none;
}

.quick-action:hover {
    border-color: var(--brand-yellow-hover);
    background: var(--warning-soft);
    color: var(--text);
}

.quick-action strong {
    font-size: 0.88rem;
}

.quick-action span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.resource-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.resource-filters {
    display: grid;
    flex: 1;
    grid-template-columns: minmax(220px, 2fr) minmax(150px, 0.7fr);
    gap: 12px;
}

.compact-field {
    display: grid;
    gap: 5px;
}

.compact-field label {
    color: var(--text-muted);
    font-size: 0.71rem;
    font-weight: 760;
}

.view-toggle {
    display: flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
}

.view-toggle button {
    min-height: 34px;
    padding: 6px 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 760;
}

.view-toggle button.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(17, 19, 21, 0.11);
}

.table-shell {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    min-width: 800px;
    margin: 0;
    border-collapse: collapse;
}

.data-table th {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-strong);
    background: var(--surface-subtle);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 820;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 0.84rem;
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background: #fffdf2;
}

.resource-cell {
    display: flex;
    min-width: 230px;
    align-items: center;
    gap: 12px;
}

.resource-thumb {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
}

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

.resource-thumb.placeholder {
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 0.66rem;
    text-align: center;
}

.resource-copy {
    min-width: 0;
}

.resource-copy strong {
    display: block;
    overflow: hidden;
    max-width: 310px;
    margin-bottom: 2px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-copy small {
    display: block;
    overflow: hidden;
    max-width: 310px;
    color: var(--text-muted);
    font-size: 0.73rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.status-badge,
.role-badge,
.context-badge {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface-subtle);
    color: var(--text-muted);
    font-size: 0.69rem;
    font-weight: 760;
    white-space: nowrap;
}

.status-published,
.status-active,
.status-ready {
    border-color: #9fc8ae;
    background: var(--success-soft);
    color: var(--success);
}

.status-draft,
.status-pending {
    border-color: #dfc875;
    background: var(--warning-soft);
    color: var(--warning);
}

.status-archived,
.status-disabled,
.status-inactive {
    border-color: #d9b1ad;
    background: var(--danger-soft);
    color: var(--danger);
}

.resource-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
}

.resource-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.resource-card-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-muted);
}

.resource-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resource-card-content {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.resource-card-content h3 {
    overflow: hidden;
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-card-content p {
    display: -webkit-box;
    min-height: 2.5em;
    overflow: hidden;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.resource-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.resource-card-actions {
    display: flex;
    gap: 7px;
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

.empty-state,
.error-state {
    display: grid;
    min-height: 310px;
    place-items: center;
    padding: 42px 20px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    text-align: center;
}

.empty-state > div,
.error-state > div {
    max-width: 470px;
}

.empty-state h2,
.error-state h2 {
    margin: 0 0 9px;
    font-size: 1.3rem;
    font-weight: 850;
}

.empty-state p,
.error-state p {
    margin: 0 0 20px;
    color: var(--text-muted);
}

.error-state {
    border-color: #deb7b3;
    background: var(--danger-soft);
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 20px;
    align-items: start;
}

.editor-main,
.editor-sidebar {
    display: grid;
    gap: 18px;
}

.editor-sidebar {
    position: sticky;
    top: calc(var(--topbar-height) + 20px);
}

.form-section {
    padding: clamp(18px, 2.5vw, 28px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.form-section-header {
    margin-bottom: 22px;
}

.form-section-header h2,
.form-section-header h3 {
    margin: 0 0 5px;
    font-size: 1.03rem;
    font-weight: 850;
}

.form-section-header p {
    max-width: 65ch;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

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

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

.form-field.compact {
    margin: 0;
}

.input-with-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.conditional-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
    gap: 18px;
}

.editor-action-stack {
    display: grid;
    gap: 9px;
}

.editor-meta {
    display: grid;
    gap: 10px;
    margin: 0;
}

.editor-meta div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.editor-meta div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.editor-meta dt {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.editor-meta dd {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: right;
}

.sticky-save-status {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
}

.list-builder {
    display: grid;
    gap: 9px;
}

.list-builder-row {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr) auto;
    gap: 8px;
    align-items: center;
}

.media-picker {
    display: grid;
    gap: 12px;
}

.media-picker-grid {
    display: grid;
    max-height: 410px;
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 9px;
    overflow-y: auto;
    padding: 2px;
}

.media-choice {
    position: relative;
    display: grid;
    gap: 7px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
}

.media-choice:hover {
    border-color: var(--border-strong);
}

.media-choice:has(input:checked) {
    border-color: #c19a00;
    background: var(--warning-soft);
    box-shadow: inset 0 0 0 1px #c19a00;
}

.media-choice input {
    position: absolute;
    top: 11px;
    left: 11px;
    width: 18px;
    height: 18px;
    accent-color: #8a6800;
}

.media-choice img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    object-fit: cover;
    background: var(--surface-muted);
}

.media-choice span {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-media-order {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.selected-media-order li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
}

.selected-media-order img {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    object-fit: cover;
}

.selected-media-order span {
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.rich-editor {
    display: grid;
    gap: 12px;
}

.rich-editor-toolbar {
    position: sticky;
    top: calc(var(--topbar-height) + 8px);
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.98);
}

.rich-editor-toolbar .toolbar-group {
    display: flex;
    gap: 4px;
    padding-right: 6px;
    border-right: 1px solid var(--border);
}

.rich-editor-toolbar .toolbar-group:last-child {
    padding-right: 0;
    border-right: 0;
}

.toolbar-button {
    min-height: 34px;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 740;
}

.toolbar-button:hover,
.toolbar-button[aria-pressed="true"] {
    border-color: var(--focus);
    background: var(--warning-soft);
}

.toolbar-button strong,
.toolbar-button em {
    font-size: 0.9rem;
}

.rich-block-list {
    display: grid;
    gap: 10px;
}

.rich-block {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
}

.rich-block.dragging {
    opacity: 0.52;
}

.rich-block:focus-within {
    border-color: #bea343;
    box-shadow: 0 0 0 2px rgba(190, 163, 67, 0.13);
}

.rich-editor.read-only .rich-block {
    grid-template-columns: minmax(0, 1fr);
}

.rich-editor.read-only .rich-list-item {
    grid-template-columns: 26px minmax(0, 1fr);
}

.block-handle {
    display: grid;
    align-content: start;
    gap: 4px;
}

.block-handle button {
    min-height: 27px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.63rem;
}

.block-body {
    min-width: 0;
}

.block-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.block-meta-left {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.block-type-select,
.block-level-select,
.block-style-select {
    min-height: 31px;
    padding: 3px 26px 3px 7px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--surface);
    color: var(--text-muted);
    font-size: 0.7rem;
}

.block-remove {
    min-height: 30px;
    padding: 4px 7px;
    border: 0;
    background: transparent;
    color: var(--danger);
    font-size: 0.7rem;
    font-weight: 750;
    text-decoration: underline;
}

.rich-input,
.list-item-rich-input {
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    line-height: 1.65;
    white-space: pre-wrap;
}

.rich-input[data-placeholder]:empty::before,
.list-item-rich-input[data-placeholder]:empty::before {
    color: #717981;
    content: attr(data-placeholder);
    pointer-events: none;
}

.rich-input.heading-level-2 {
    font-size: 1.35rem;
    font-weight: 820;
    line-height: 1.3;
}

.rich-input.heading-level-3 {
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.35;
}

.rich-input.quote-input {
    border-left: 4px solid var(--brand-yellow-hover);
    font-style: italic;
}

.quote-cite-field {
    margin-top: 8px;
}

.rich-list-items {
    display: grid;
    gap: 7px;
}

.rich-list-item {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 7px;
    align-items: start;
}

.list-item-index {
    display: grid;
    min-height: 38px;
    place-items: center;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.list-item-rich-input {
    min-height: 42px;
    padding: 7px 9px;
}

.image-block-content {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.image-block-preview {
    display: grid;
    aspect-ratio: 4 / 3;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 0.7rem;
}

.image-block-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rich-empty {
    padding: 34px 18px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.83rem;
    text-align: center;
}

.preview-shell {
    max-width: 860px;
    min-height: 520px;
    margin: 0 auto;
    padding: clamp(24px, 5vw, 64px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.preview-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 34px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
}

.preview-category {
    margin: 0 0 8px;
    color: var(--warning);
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.preview-title {
    max-width: 18ch;
    margin: 0 0 13px;
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5vw, 4.3rem);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 1;
}

.preview-subtitle {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 1.15rem;
}

.preview-byline {
    margin: 0 0 38px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.rich-preview {
    color: #272a2d;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.02rem;
    line-height: 1.82;
}

.rich-preview h2,
.rich-preview h3 {
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 860;
    letter-spacing: -0.03em;
}

.rich-preview h2 {
    margin: 2.2em 0 0.7em;
    font-size: 1.75rem;
}

.rich-preview h3 {
    margin: 1.8em 0 0.6em;
    font-size: 1.3rem;
}

.rich-preview p {
    margin: 0 0 1.3em;
}

.rich-preview blockquote {
    margin: 1.8em 0;
    padding: 4px 0 4px 22px;
    border-left: 4px solid var(--brand-yellow-hover);
    font-size: 1.16rem;
    font-style: italic;
}

.rich-preview blockquote cite {
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-style: normal;
}

.rich-preview figure {
    margin: 2em 0;
}

.rich-preview figure img {
    width: 100%;
    border-radius: var(--radius-sm);
}

.rich-preview figcaption {
    margin-top: 7px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.76rem;
}

.editor-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.editor-tabs button {
    min-height: 37px;
    padding: 7px 14px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.79rem;
    font-weight: 780;
}

.editor-tabs button.active {
    background: var(--brand-ink);
    color: #ffffff;
}

.media-storage-panel {
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.media-storage-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    padding: 20px 22px 18px;
}

.media-storage-heading h2 {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.media-storage-heading > p {
    max-width: 52ch;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-align: right;
}

.media-storage-grid {
    display: grid;
    grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.media-storage-stat {
    min-width: 0;
    padding: 20px 22px 21px;
}

.media-storage-stat + .media-storage-stat {
    border-left: 1px solid var(--border);
}

.media-storage-stat span,
.media-storage-stat strong,
.media-storage-stat small {
    display: block;
}

.media-storage-stat span {
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.media-storage-stat strong {
    margin: 8px 0 4px;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-variant-numeric: tabular-nums;
    font-weight: 880;
    letter-spacing: -0.045em;
}

.media-storage-stat small {
    overflow-wrap: anywhere;
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1.45;
}

.media-storage-stat.current {
    background: var(--brand-ink);
    color: #ffffff;
}

.media-storage-stat.current span,
.media-storage-stat.current small {
    color: #c4c8cb;
}

.media-storage-stat.unavailable strong {
    font-size: clamp(1.16rem, 1.75vw, 1.5rem);
    letter-spacing: -0.025em;
}

.media-storage-note {
    margin: 0;
    padding: 13px 22px 15px;
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1.5;
}

.media-storage-note strong {
    color: var(--text);
    font-weight: 780;
}

.upload-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
    gap: 20px;
    align-items: start;
}

.upload-panel {
    position: sticky;
    top: calc(var(--topbar-height) + 20px);
}

.dropzone {
    display: grid;
    min-height: 210px;
    place-items: center;
    padding: 28px;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface-subtle);
    cursor: pointer;
    text-align: center;
}

.dropzone:hover,
.dropzone.drag-active {
    border-color: #ad8900;
    background: var(--warning-soft);
}

.dropzone strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

.dropzone span {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.upload-queue {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.upload-queue-item {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.upload-file-line {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
}

.upload-file-preview {
    width: 46px;
    height: 46px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--surface-muted);
}

.upload-file-name {
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-file-size {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.upload-progress {
    width: 100%;
    height: 6px;
    overflow: hidden;
    border: 0;
    border-radius: 3px;
    background: var(--surface-muted);
    color: #a07b00;
    appearance: none;
}

.upload-progress::-webkit-progress-bar {
    border-radius: 3px;
    background: var(--surface-muted);
}

.upload-progress::-webkit-progress-value {
    border-radius: 3px;
    background: #a07b00;
    transition: width 180ms ease;
}

.upload-progress::-moz-progress-bar {
    border-radius: 3px;
    background: #a07b00;
    transition: width 180ms ease;
}

.upload-layout.no-upload {
    grid-template-columns: 1fr;
}

.upload-item-status {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.upload-item-status.error {
    color: var(--danger);
}

.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.media-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.media-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--surface-muted);
}

.media-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-card-image .context-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    border-color: rgba(255, 255, 255, 0.64);
    background: rgba(17, 19, 21, 0.86);
    color: #ffffff;
}

.media-card-body {
    display: grid;
    gap: 8px;
    padding: 13px;
}

.media-card-body h3 {
    display: -webkit-box;
    min-height: 2.4em;
    overflow: hidden;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 760;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.media-card-meta {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.media-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

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

.role-choice-grid {
    display: grid;
    max-height: 360px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    overflow-y: auto;
    padding: 2px;
}

.permission-choice {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
}

.permission-choice input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin-top: 2px;
    accent-color: #8a6800;
}

.permission-choice strong,
.permission-choice small {
    display: block;
}

.role-choice:has(input:checked) {
    border-color: #c19a00;
    background: var(--warning-soft);
    box-shadow: inset 0 0 0 1px #c19a00;
}

.role-choice:has(input:not(:disabled)) {
    cursor: pointer;
}

.permission-choice strong {
    font-size: 0.78rem;
}

.permission-choice small {
    color: var(--text-muted);
    font-size: 0.69rem;
}

.security-callout {
    padding: 13px 15px;
    border-left: 4px solid var(--brand-yellow-hover);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--warning-soft);
    color: #554200;
    font-size: 0.78rem;
}

.app-dialog {
    width: min(680px, calc(100% - 28px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-dialog);
}

.app-dialog::backdrop {
    background: rgba(13, 15, 17, 0.72);
}

.pwa-install-dialog {
    width: min(520px, calc(100% - 28px));
    max-height: calc(100dvh - 28px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-top: 5px solid var(--brand-yellow);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-dialog);
}

.pwa-install-dialog::backdrop {
    background: rgba(10, 12, 13, 0.82);
    backdrop-filter: blur(5px);
}

.pwa-install-card {
    position: relative;
    max-height: calc(100dvh - 33px);
    overflow-y: auto;
    padding: 34px 36px 30px;
}

.pwa-install-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-muted);
    transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.pwa-install-close:hover {
    border-color: var(--border-strong);
    color: var(--text);
    transform: rotate(4deg);
}

.pwa-install-close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.pwa-install-icon {
    width: 86px;
    height: 86px;
    margin-bottom: 23px;
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(17, 19, 21, 0.2);
}

.pwa-install-dialog .section-label {
    color: var(--warning);
}

.pwa-install-dialog h2 {
    max-width: 12ch;
    margin: 0 0 14px;
    font-size: clamp(1.85rem, 5vw, 2.55rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 0.98;
    text-wrap: balance;
}

.pwa-install-dialog #pwa-install-description {
    max-width: 44ch;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.58;
}

.pwa-install-benefits {
    display: grid;
    gap: 13px;
    margin: 25px 0 27px;
    padding: 21px 0;
    border-block: 1px solid var(--border);
    list-style: none;
}

.pwa-install-benefits li {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.pwa-install-benefits svg {
    width: 25px;
    height: 25px;
    padding: 5px;
    border-radius: 50%;
    background: var(--warning-soft);
    fill: none;
    stroke: var(--warning);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.pwa-install-benefits strong {
    display: block;
    margin-bottom: 1px;
    color: var(--text);
    font-size: 0.84rem;
}

.pwa-install-later {
    display: block;
    margin: 17px auto 0;
    color: var(--text-muted);
}

.dialog-shell {
    display: grid;
    max-height: calc(100dvh - 32px);
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.dialog-header,
.dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
}

.dialog-header {
    border-bottom: 1px solid var(--border);
}

.dialog-header h2 {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 850;
}

.dialog-footer {
    justify-content: flex-end;
    border-top: 1px solid var(--border);
}

.dialog-body {
    overflow-y: auto;
    padding: 22px;
}

.dialog-body p:last-child {
    margin-bottom: 0;
}

.dialog-body .form-grid {
    gap: 15px;
}

.toast-region {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    display: grid;
    width: min(390px, calc(100vw - 32px));
    gap: 9px;
    pointer-events: none;
}

.app-toast {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px 15px;
    border: 1px solid var(--border-strong);
    border-left: 5px solid var(--info);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: 0 12px 36px rgba(17, 19, 21, 0.17);
    pointer-events: auto;
}

.app-toast.success {
    border-left-color: var(--success);
}

.app-toast.error {
    border-left-color: var(--danger);
}

.app-toast strong,
.app-toast span {
    display: block;
}

.app-toast strong {
    margin-bottom: 2px;
    font-size: 0.82rem;
}

.app-toast span {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.app-toast button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-decoration: underline;
}

.page-loading {
    display: grid;
    gap: 16px;
}

.skeleton-line,
.skeleton-grid span {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: #e4e7e9;
}

.skeleton-line {
    width: 48%;
    height: 16px;
}

.skeleton-title {
    width: 29%;
    height: 44px;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.skeleton-grid span {
    height: 170px;
}

@media (prefers-reduced-motion: no-preference) {
    .skeleton-line,
    .skeleton-grid span {
        background: linear-gradient(90deg, #e4e7e9 18%, #f6f7f8 42%, #e4e7e9 68%);
        background-size: 240% 100%;
        animation: skeleton-shimmer 1.4s ease-in-out infinite;
    }

    .app-toast {
        animation: toast-in 180ms ease-out both;
    }
}

@keyframes skeleton-shimmer {
    to { background-position: -240% 0; }
}

@keyframes toast-in {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.noscript-message {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--brand-ink);
    color: #ffffff;
    font-weight: 750;
    text-align: center;
}

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

    .editor-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
    }

    .upload-layout {
        grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    }
}

@media (max-width: 960px) {
    .login-screen {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-logo-small {
        display: block;
    }

    .sidebar {
        width: min(320px, calc(100vw - 44px));
        transform: translateX(-105%);
        box-shadow: 18px 0 50px rgba(17, 19, 21, 0.24);
        transition: transform 180ms ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close,
    .menu-button {
        display: block;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 39;
        display: none;
        border: 0;
        background: rgba(17, 19, 21, 0.58);
    }

    .sidebar-backdrop.open {
        display: block;
    }

    .admin-workspace {
        margin-left: 0;
    }

    .overview-grid,
    .editor-layout,
    .upload-layout {
        grid-template-columns: 1fr;
    }

    .editor-sidebar,
    .upload-panel {
        position: static;
    }

    .editor-sidebar {
        order: -1;
    }
}

@media (max-width: 720px) {
    .login-panel {
        align-items: start;
        padding: 36px 20px 56px;
    }

    .login-logo-small {
        width: 190px;
        margin-bottom: 52px;
    }

    .topbar {
        min-height: 68px;
        padding: 8px 14px;
    }

    .account-copy {
        display: none;
    }

    .account-button {
        padding: 4px;
    }

    .admin-main {
        padding: 23px 14px 70px;
    }

    .page-header {
        display: grid;
        gap: 18px;
    }

    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-actions .btn {
        flex: 1;
    }

    .media-storage-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .media-storage-heading > p {
        text-align: left;
    }

    .media-storage-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .media-storage-stat + .media-storage-stat {
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 126px;
    }

    .metric-label {
        margin-bottom: 18px;
    }

    .resource-toolbar {
        display: grid;
        align-items: stretch;
    }

    .resource-filters,
    .form-grid,
    .conditional-fields,
    .permission-grid,
    .role-choice-grid {
        grid-template-columns: 1fr;
    }

    .view-toggle {
        justify-self: start;
    }

    .list-builder-row {
        grid-template-columns: 1fr auto;
    }

    .list-builder-row input:nth-child(2) {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .image-block-content {
        grid-template-columns: 90px minmax(0, 1fr);
    }

    .rich-editor-toolbar {
        position: static;
    }

    .rich-block {
        grid-template-columns: 1fr;
    }

    .block-handle {
        display: flex;
    }

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

    .dialog-header,
    .dialog-body,
    .dialog-footer {
        padding: 16px;
    }

    .toast-region {
        right: 16px;
        bottom: 16px;
    }

    .skeleton-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 470px) {
    .topbar h2 {
        max-width: 145px;
    }

    .breadcrumb-label {
        display: none;
    }

    .resource-card-grid,
    .media-gallery {
        grid-template-columns: 1fr;
    }

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

    .rich-editor-toolbar .toolbar-group {
        padding-right: 0;
        border-right: 0;
    }

    .image-block-content {
        grid-template-columns: 1fr;
    }

    .image-block-preview {
        max-width: 150px;
    }
}

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

/* Course completion, progressive documents and certificates */
.sidebar-count-badge {
    display: inline-grid;
    min-width: 23px;
    height: 23px;
    margin-left: auto;
    padding: 0 6px;
    place-items: center;
    border: 1px solid rgba(255, 204, 0, 0.44);
    border-radius: 6px;
    background: var(--brand-yellow);
    color: var(--brand-ink);
    font-size: 0.65rem;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    line-height: 1;
}

.sidebar-count-badge[hidden] {
    display: none;
}

.student-library-email.automatic-email,
.student-notification-choice.automatic-email {
    grid-template-columns: minmax(0, 1fr);
}

.course-completion-badge {
    position: absolute;
    z-index: 3;
    right: 16px;
    bottom: 16px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 7px;
    background: rgba(17, 19, 21, 0.88);
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.course-library-card.is-completed {
    border-color: rgba(23, 107, 58, 0.28);
}

.course-library-card.is-completed .course-card-progress > div span {
    background: #2d8450;
}

.course-card-certificate {
    display: block !important;
    margin: 10px 0 0 !important;
    color: var(--text-muted);
    font-size: 0.7rem !important;
    font-weight: 760;
    line-height: 1.45;
    -webkit-line-clamp: unset !important;
}

.course-card-certificate.status-issued {
    color: #176b3a !important;
}

.course-card-certificate.status-requested {
    color: #7a5b00 !important;
}

.course-classroom-top > nav {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.course-classroom-top > nav > span[aria-current="page"] {
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-classroom-hero.completed {
    box-shadow: inset 0 -5px 0 #2d8450;
}

.course-next-step {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    color: var(--brand-yellow);
    font-size: 0.76rem;
    font-weight: 820;
    text-decoration: none;
}

.course-next-step svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: transform 180ms ease;
}

.course-next-step:hover svg,
.course-next-step:focus-visible svg {
    transform: translateY(2px);
}

.course-journey {
    max-width: 1080px;
    margin: -10px auto 34px;
    padding: 0 24px;
}

.course-journey ol {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.course-journey li {
    position: relative;
    display: grid;
    min-width: 0;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 17px 20px;
}

.course-journey li + li {
    border-left: 1px solid var(--border);
}

.course-journey li > span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 850;
}

.course-journey li.done > span,
.course-journey li.certificate-issued > span {
    border-color: #2d8450;
    background: #2d8450;
    color: #ffffff;
}

.course-journey li.current > span,
.course-journey li.certificate-eligible > span,
.course-journey li.certificate-requested > span {
    border-color: var(--brand-yellow-hover);
    background: var(--brand-yellow);
    color: var(--brand-ink);
}

.course-journey small,
.course-journey strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-journey small {
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 0.63rem;
    font-weight: 680;
}

.course-journey strong {
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 820;
}

.course-document-hub {
    max-width: 1200px;
    margin: 0 auto 52px;
    padding: clamp(24px, 4vw, 38px);
    border-radius: 16px;
    background: #f0f2f3;
}

.course-document-hub > header {
    display: grid;
    grid-template-columns: minmax(220px, 0.42fr) minmax(0, 0.58fr);
    align-items: end;
    gap: 34px;
    margin-bottom: 24px;
}

.course-document-hub h2 {
    margin: 2px 0 0;
    font-size: clamp(1.65rem, 3vw, 2.75rem);
    font-weight: 890;
    letter-spacing: -0.05em;
}

.course-document-hub > header > p {
    max-width: 620px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.65;
}

.course-document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--border);
}

.course-document-card {
    display: grid;
    min-width: 0;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--surface);
}

.course-document-card.certificate {
    grid-column: 1 / -1;
    background: var(--brand-ink);
    color: #ffffff;
}

.course-document-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 9px;
    background: var(--surface-muted);
    color: var(--text);
}

.course-document-card.certificate .course-document-icon {
    background: var(--brand-yellow);
    color: var(--brand-ink);
}

.course-document-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.65;
}

.course-document-card small,
.course-document-card h3,
.course-document-card p {
    margin: 0;
}

.course-document-card small {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 0.61rem;
    font-weight: 780;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.course-document-card h3 {
    overflow: hidden;
    font-size: 0.86rem;
    font-weight: 820;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-document-card p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.45;
}

.course-document-card.certificate small,
.course-document-card.certificate p {
    color: #bfc5c8;
}

.course-document-card.certificate h3 {
    color: #ffffff;
}

.course-document-card.locked:not(.certificate) {
    color: #686e73;
}

.course-document-action,
.course-document-locked {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 800;
    text-decoration: none;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

button.course-document-action {
    cursor: pointer;
}

.course-document-action:hover,
.course-document-action:focus-visible {
    border-color: var(--brand-yellow-hover);
    background: var(--brand-yellow);
    color: var(--brand-ink);
}

.course-document-action:active {
    transform: scale(0.98);
}

.course-document-card.certificate .course-document-action {
    border-color: var(--brand-yellow);
    background: var(--brand-yellow);
    color: var(--brand-ink);
}

.course-document-locked {
    border-color: transparent;
    background: var(--surface-muted);
    color: var(--text-muted);
}

.course-document-locked.requested {
    background: var(--brand-yellow);
    color: var(--brand-ink);
}

.learning-module.current {
    background: linear-gradient(90deg, rgba(255, 204, 0, 0.08), transparent 72%);
}

.learning-module.current .learning-module-heading strong {
    color: var(--text);
}

.module-material-hint {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-left: 3px solid var(--brand-yellow-hover);
    background: #fff9df;
    color: #6b5400;
    font-size: 0.76rem;
    line-height: 1.55;
}

/* Certificate administration */
.certificate-page-header {
    align-items: end;
}

.certificate-header-callout {
    display: grid;
    min-width: 190px;
    justify-items: end;
}

.certificate-header-callout strong {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    letter-spacing: -0.075em;
    line-height: 0.82;
}

.certificate-header-callout span {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 760;
}

.certificate-metric.attention {
    border-left: 4px solid var(--brand-yellow-hover);
}

.certificate-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.certificate-admin-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
}

.certificate-admin-card.status-requested {
    border-top: 4px solid var(--brand-yellow-hover);
}

.certificate-admin-card.status-issued {
    border-top: 4px solid #2d8450;
}

.certificate-admin-card-header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 22px 22px 18px;
}

.certificate-student-avatar {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 11px;
    background: var(--brand-ink);
    color: var(--brand-yellow);
    font-size: 0.76rem;
    font-weight: 880;
}

.certificate-admin-card-header .section-label,
.certificate-admin-card-header h2,
.certificate-admin-card-header a {
    margin: 0;
}

.certificate-admin-card-header h2 {
    overflow: hidden;
    font-size: 1.02rem;
    font-weight: 840;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.certificate-admin-card-header a {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.certificate-status-badge {
    padding: 7px 9px;
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 0.61rem;
    font-weight: 820;
    text-transform: uppercase;
}

.certificate-status-badge.status-requested {
    background: #fff4bf;
    color: #6b5300;
}

.certificate-status-badge.status-issued {
    background: #e7f4eb;
    color: #176b3a;
}

.certificate-course-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    padding: 20px 22px;
    background: #f3f4f5;
}

.certificate-course-summary small,
.certificate-course-summary h3,
.certificate-course-summary p {
    margin: 0;
}

.certificate-course-summary small {
    color: var(--text-muted);
    font-size: 0.63rem;
    font-weight: 740;
}

.certificate-course-summary h3 {
    margin-top: 4px;
    font-size: 1.02rem;
    font-weight: 850;
    letter-spacing: -0.025em;
}

.certificate-course-summary p {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.certificate-course-summary > a {
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 800;
}

.certificate-admin-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0 22px;
}

.certificate-admin-meta > div {
    min-width: 0;
    padding: 18px 12px 18px 0;
}

.certificate-admin-meta > div + div {
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.certificate-admin-meta dt,
.certificate-admin-meta dd {
    margin: 0;
}

.certificate-admin-meta dt {
    color: var(--text-muted);
    font-size: 0.61rem;
    font-weight: 720;
}

.certificate-admin-meta dd {
    margin-top: 4px;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    font-weight: 760;
}

.certificate-admin-meta dd small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-weight: 600;
}

.certificate-upload-form {
    display: grid;
    grid-template-areas:
        "certificate-file certificate-file"
        "certificate-name certificate-action"
        "certificate-note certificate-note";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 13px;
    padding: 20px 22px 22px;
    border-top: 1px solid var(--border);
}

.certificate-upload-form > .form-field:first-of-type {
    min-width: 0;
    grid-area: certificate-file;
}

.certificate-upload-form > .form-field:nth-of-type(2) {
    min-width: 0;
    grid-area: certificate-name;
}

.certificate-upload-form > .btn {
    grid-area: certificate-action;
    white-space: nowrap;
}

.certificate-upload-form input[type="file"] {
    width: 100%;
    min-width: 0;
}

.certificate-upload-form .certificate-email-note {
    grid-area: certificate-note;
    margin: -2px 0 0;
    color: var(--text-muted);
    font-size: 0.66rem;
}

.certificate-issued-file {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 18px 22px;
    border-top: 1px solid var(--border);
}

.certificate-issued-file > div:first-child {
    min-width: 0;
}

.certificate-issued-file small,
.certificate-issued-file strong,
.certificate-issued-file span {
    display: block;
}

.certificate-issued-file small,
.certificate-issued-file span {
    color: var(--text-muted);
    font-size: 0.65rem;
}

.certificate-issued-file strong {
    overflow: hidden;
    max-width: 100%;
    margin: 2px 0;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.certificate-issued-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

.certificate-replace-panel {
    border-top: 1px solid var(--border);
}

.certificate-replace-panel > summary {
    padding: 14px 22px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 760;
}

.certificate-readonly-note {
    display: block;
    margin: 0;
    padding: 18px 22px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Certificates inside a student profile */
.student-certificates-card {
    margin-top: 22px;
    padding: clamp(22px, 3.5vw, 34px);
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
}

.student-certificate-list {
    display: grid;
    gap: 1px;
    overflow: hidden;
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--border);
}

.student-certificate-item {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1.3fr);
    align-items: center;
    gap: 22px;
    padding: 20px;
    background: var(--surface);
}

.student-certificate-copy span {
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 780;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.student-certificate-copy h3 {
    margin: 4px 0;
    font-size: 0.94rem;
    font-weight: 830;
}

.student-certificate-copy p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.student-certificate-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.student-certificate-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

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

@media (max-width: 840px) {
    .course-journey {
        padding: 0;
    }

    .course-journey ol,
    .course-document-hub > header,
    .course-document-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .course-journey li + li {
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .course-document-card.certificate {
        grid-column: auto;
    }

    .course-document-hub > header {
        align-items: start;
        gap: 12px;
    }

    .certificate-upload-form {
        grid-template-areas:
            "certificate-file"
            "certificate-name"
            "certificate-action"
            "certificate-note";
        grid-template-columns: minmax(0, 1fr);
    }

    .student-certificate-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-certificate-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .course-completion-badge {
        right: 12px;
        bottom: 12px;
    }

    .course-document-hub {
        margin-bottom: 34px;
        padding: 22px 15px;
        border-radius: 12px;
    }

    .course-document-card {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 17px 14px;
    }

    .course-document-card .course-document-action,
    .course-document-card .course-document-locked {
        grid-column: 2;
        width: max-content;
    }

    .certificate-header-callout {
        min-width: 0;
        justify-items: start;
    }

    .certificate-admin-card-header {
        grid-template-columns: 44px minmax(0, 1fr);
        padding-inline: 16px;
    }

    .certificate-status-badge {
        grid-column: 2;
        width: max-content;
    }

    .certificate-course-summary,
    .certificate-admin-meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .certificate-admin-meta > div,
    .certificate-admin-meta > div + div {
        padding: 12px 0;
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .certificate-upload-form,
    .certificate-issued-file,
    .student-certificate-item {
        padding-inline: 16px;
    }

    .certificate-issued-file {
        align-items: flex-start;
        flex-direction: column;
    }

    .certificate-issued-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .student-certificate-upload {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .course-next-step svg,
    .course-document-action {
        transition: none;
    }
}

/* Student relationship workspace */
.student-profile-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid #262b2f;
    border-radius: 18px;
    background: #111315;
    color: #ffffff;
    box-shadow: 0 20px 55px rgba(17, 19, 21, 0.12);
}

.student-profile-hero::after {
    position: absolute;
    right: -110px;
    bottom: -210px;
    z-index: -1;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 204, 0, 0.24);
    border-radius: 50%;
    content: "";
}

.student-profile-hero-main {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: clamp(25px, 4vw, 44px);
}

.student-profile-avatar {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: var(--brand-yellow);
    color: var(--brand-ink);
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    box-shadow: 0 0 0 8px rgba(255, 204, 0, 0.08);
}

.student-profile-identity .section-label {
    margin-bottom: 7px;
    color: var(--brand-yellow);
}

.student-profile-identity h1 {
    max-width: 24ch;
    margin: 0 0 7px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.55rem);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 0.98;
    text-wrap: balance;
}

.student-profile-identity > a {
    color: #c8cdd1;
    font-size: 0.86rem;
    text-decoration-color: rgba(255, 204, 0, 0.62);
    text-underline-offset: 4px;
}

.student-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 16px;
}

.student-profile-tags > span {
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.06);
    color: #c8cdd1;
    font-size: 0.64rem;
    font-weight: 760;
}

.student-profile-tags .status-badge {
    border-color: rgba(127, 225, 158, 0.35);
    background: rgba(29, 123, 67, 0.18);
    color: #a6efbd;
}

.btn-on-dark {
    min-height: 42px;
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    text-decoration: none;
}

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

.student-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.16);
}

.student-profile-stats > div {
    display: grid;
    min-height: 118px;
    align-content: center;
    gap: 4px;
    padding: 21px clamp(18px, 2.5vw, 30px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.student-profile-stats > div:last-child {
    border-right: 0;
}

.student-profile-stats span {
    color: #969da3;
    font-size: 0.62rem;
    font-weight: 820;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.student-profile-stats strong {
    overflow-wrap: anywhere;
    font-size: 1.05rem;
    font-weight: 850;
}

.student-profile-stats small {
    color: #aeb4b9;
    font-size: 0.67rem;
}

.student-profile-data-card,
.student-library-section {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.student-profile-data-card {
    margin-bottom: 22px;
    padding: clamp(23px, 3.5vw, 38px);
}

.student-security-card {
    border-top: 5px solid var(--brand-yellow);
}

.student-security-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-top: 28px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--border);
}

.student-security-status > div {
    display: grid;
    gap: 5px;
    padding: 17px 18px;
    background: var(--surface-subtle);
}

.student-security-status span {
    color: var(--text-muted);
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.student-security-status strong {
    overflow-wrap: anywhere;
    font-size: 0.78rem;
}

.student-security-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.student-security-note {
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.55;
}

.student-password-dialog > p:first-child {
    margin-top: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.student-password-dialog .form-grid {
    margin-top: 18px;
}

.student-password-generate {
    margin-top: 14px;
}

.student-profile-data-heading,
.student-library-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
}

.student-profile-data-heading h2,
.student-library-header h2,
.student-create-action-card h2 {
    margin: 2px 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1;
}

.student-profile-data-heading > p,
.student-library-header > div > p:last-child {
    max-width: 48ch;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.student-profile-data-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(28px, 5vw, 70px);
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

.student-profile-data-groups h3 {
    margin: 0 0 11px;
    font-size: 0.77rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.student-profile-data-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
    margin: 0;
}

.student-profile-data-list > div {
    min-width: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.student-profile-data-list dt {
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.student-profile-data-list dd {
    overflow-wrap: anywhere;
    margin: 0;
    font-size: 0.82rem;
    font-weight: 750;
}

.student-profile-data-list dd small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.67rem;
    font-weight: 500;
}

.student-library-section {
    overflow: hidden;
    border-top: 5px solid var(--brand-yellow);
}

.student-library-header {
    padding: clamp(24px, 3.5vw, 38px);
}

.student-library-summary {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.student-library-summary span {
    display: grid;
    min-width: 105px;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-subtle);
    color: var(--text-muted);
    font-size: 0.66rem;
}

.student-library-summary strong {
    color: var(--text);
    font-size: 1.05rem;
}

.student-library-tools {
    display: grid;
    grid-template-columns: auto minmax(210px, 1fr) minmax(260px, 0.85fr);
    gap: 12px;
    align-items: stretch;
    padding: 17px clamp(24px, 3.5vw, 38px);
    border-block: 1px solid var(--border);
    background: #f6f7f8;
}

.student-library-tabs {
    display: flex;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
}

.student-library-tabs button {
    min-height: 39px;
    padding: 8px 13px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.73rem;
    font-weight: 800;
}

.student-library-tabs button span {
    margin-left: 4px;
    color: inherit;
    opacity: 0.72;
}

.student-library-tabs button.is-active {
    background: var(--brand-ink);
    color: #ffffff;
}

.student-library-search {
    display: block;
}

.student-library-search .form-control {
    min-height: 49px;
    background: var(--surface);
}

.student-library-email,
.student-notification-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e0c34c;
    border-radius: 9px;
    background: #fff8d8;
    cursor: pointer;
}

.student-library-email input,
.student-notification-choice input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin-top: 2px;
    accent-color: #8a6800;
}

.student-library-email strong,
.student-library-email small,
.student-notification-choice strong,
.student-notification-choice small {
    display: block;
}

.student-library-email strong,
.student-notification-choice strong {
    color: #403400;
    font-size: 0.74rem;
}

.student-library-email small,
.student-notification-choice small {
    margin-top: 2px;
    color: #6a5a16;
    font-size: 0.65rem;
    line-height: 1.35;
}

.student-library-filters {
    display: flex;
    gap: 7px;
    padding: 16px clamp(24px, 3.5vw, 38px) 0;
}

.student-library-filters button {
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 780;
}

.student-library-filters button.is-active {
    border-color: var(--brand-ink);
    background: var(--brand-ink);
    color: #ffffff;
}

.student-library-pane {
    padding: 9px clamp(24px, 3.5vw, 38px) 30px;
}

.student-library-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.student-library-item {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) minmax(230px, 0.8fr) minmax(150px, auto);
    gap: 18px;
    align-items: center;
    min-height: 86px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.student-library-item:last-child {
    border-bottom: 0;
}

.student-library-item-copy {
    display: grid;
    min-width: 0;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.student-library-index {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-subtle);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 900;
}

.student-library-item.is-accessible .student-library-index {
    border-color: #d2af17;
    background: var(--brand-yellow);
    color: var(--brand-ink);
}

.student-library-item-copy strong,
.student-library-item-copy small {
    display: block;
}

.student-library-item-copy strong {
    overflow-wrap: anywhere;
    font-size: 0.82rem;
}

.student-library-item-copy small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.student-library-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.content-chip {
    padding: 5px 7px;
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--text-muted);
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
}

.content-chip.is-free {
    border-color: #a9d8ba;
    background: #eefaf2;
    color: #176b37;
}

.content-chip.is-premium {
    border-color: #e0c34c;
    background: #fff8d8;
    color: #705600;
}

.content-chip.is-granted {
    border-color: #b8c2ca;
    background: #edf1f3;
    color: #283038;
}

.student-library-control {
    display: flex;
    justify-content: flex-end;
}

.student-library-control-stack {
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
}

.student-library-resend {
    font-size: 0.64rem;
}

.automatic-access {
    display: grid;
    justify-items: end;
}

.automatic-access strong {
    color: #176b37;
    font-size: 0.7rem;
}

.automatic-access small {
    color: var(--text-muted);
    font-size: 0.62rem;
}

.access-switch {
    display: grid;
    grid-template-columns: 38px auto;
    gap: 0 9px;
    align-items: center;
    cursor: pointer;
}

.access-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.access-switch > span[aria-hidden] {
    position: relative;
    width: 38px;
    height: 22px;
    border: 1px solid #aab1b7;
    border-radius: 99px;
    background: #dfe3e6;
    transition: border-color 180ms ease, background 180ms ease;
}

.access-switch > span[aria-hidden]::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(17, 19, 21, 0.25);
    content: "";
    transition: transform 180ms ease;
}

.access-switch input:checked + span[aria-hidden] {
    border-color: #b89300;
    background: var(--brand-yellow);
}

.access-switch input:checked + span[aria-hidden]::after {
    transform: translateX(16px);
}

.access-switch input:focus-visible + span[aria-hidden] {
    outline: 3px solid rgba(164, 122, 0, 0.28);
    outline-offset: 2px;
}

.access-switch input:disabled + span[aria-hidden] {
    opacity: 0.55;
}

.access-switch em {
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 780;
}

.student-library-empty {
    margin-top: 16px;
    padding: 24px;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    color: var(--text-muted);
}

.student-library-empty strong {
    color: var(--text);
    font-size: 0.84rem;
}

.student-library-empty p {
    margin: 4px 0 0;
    font-size: 0.74rem;
}

.student-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(285px, 0.32fr);
    gap: 20px;
    align-items: start;
}

.student-create-main {
    display: grid;
    gap: 20px;
}

.student-create-section {
    margin: 0;
}

.student-create-section .form-field label span {
    color: var(--text-muted);
    font-size: 0.63rem;
    font-weight: 550;
}

.student-create-sidebar {
    position: sticky;
    top: calc(var(--topbar-height) + 22px);
}

.student-create-action-card {
    margin: 0;
    border-top: 5px solid var(--brand-yellow);
}

.student-create-action-card > p:not(.section-label) {
    margin: 12px 0 20px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.student-notification-choice {
    margin-bottom: 16px;
}

.student-create-security {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 0.66rem;
    text-align: center;
}

.student-create-course-search {
    margin-bottom: 12px;
}

.student-create-course-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.student-create-course-list label {
    display: flex;
    min-width: 0;
    gap: 10px;
    align-items: flex-start;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-subtle);
    cursor: pointer;
}

.student-create-course-list label:has(input:checked) {
    border-color: #c19a00;
    background: var(--warning-soft);
    box-shadow: inset 0 0 0 1px #c19a00;
}

.student-create-course-list input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: #8a6800;
}

.student-create-course-list strong,
.student-create-course-list small {
    display: block;
}

.student-create-course-list strong {
    overflow-wrap: anywhere;
    font-size: 0.77rem;
}

.student-create-course-list small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.65rem;
}

@media (max-width: 1120px) {
    .student-profile-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-profile-stats > div:nth-child(2) {
        border-right: 0;
    }

    .student-profile-stats > div:nth-child(-n + 2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .student-library-tools {
        grid-template-columns: auto minmax(220px, 1fr);
    }

    .student-library-email {
        grid-column: 1 / -1;
    }

    .student-library-item {
        grid-template-columns: minmax(220px, 1fr) minmax(210px, 0.8fr) auto;
    }

    .student-create-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

@media (max-width: 860px) {
    .student-profile-hero-main {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .student-profile-avatar {
        width: 68px;
        height: 68px;
    }

    .student-profile-hero-main .btn-on-dark {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .student-profile-data-heading,
    .student-library-header {
        display: grid;
    }

    .student-profile-data-groups,
    .student-create-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-create-sidebar {
        position: static;
    }

    .student-library-summary {
        justify-self: start;
    }

    .student-library-item {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px 16px;
    }

    .student-library-badges {
        grid-column: 1;
        padding-left: 48px;
    }

    .student-library-control {
        grid-row: 1 / span 2;
        grid-column: 2;
    }
}

@media (max-width: 620px) {
    .student-profile-hero {
        margin-inline: -4px;
        border-radius: 13px;
    }

    .student-profile-hero-main {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 15px;
        padding: 22px 18px;
    }

    .student-profile-avatar {
        width: 52px;
        height: 52px;
        font-size: 1rem;
        box-shadow: 0 0 0 5px rgba(255, 204, 0, 0.08);
    }

    .student-profile-identity h1 {
        font-size: clamp(1.65rem, 8vw, 2.25rem);
    }

    .student-profile-identity > a {
        font-size: 0.74rem;
    }

    .student-profile-tags span {
        font-size: 0.58rem;
    }

    .student-profile-stats > div {
        min-height: 101px;
        padding: 16px;
    }

    .student-profile-stats strong {
        font-size: 0.88rem;
    }

    .student-profile-data-card {
        padding: 22px 18px;
        border-radius: 13px;
    }

    .student-security-status {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-security-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .student-security-actions .btn {
        width: 100%;
    }

    .student-certificate-actions {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-certificate-actions .btn {
        width: 100%;
        min-width: 0;
        padding-inline: 8px;
    }

    .student-certificate-actions .btn:last-child {
        grid-column: 1 / -1;
    }

    .student-profile-data-groups,
    .student-profile-data-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-profile-data-groups {
        gap: 28px;
    }

    .student-library-section {
        margin-inline: -4px;
        border-radius: 13px;
    }

    .student-library-header,
    .student-library-tools,
    .student-library-filters,
    .student-library-pane {
        padding-right: 18px;
        padding-left: 18px;
    }

    .student-library-summary {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-library-summary span {
        min-width: 0;
    }

    .student-library-tools {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-library-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-library-email {
        grid-column: auto;
    }

    .student-library-filters {
        overflow-x: auto;
        padding-bottom: 3px;
        scrollbar-width: none;
    }

    .student-library-filters::-webkit-scrollbar {
        display: none;
    }

    .student-library-filters button {
        flex: 0 0 auto;
    }

    .student-library-item {
        grid-template-columns: minmax(0, 1fr);
        padding: 17px 0;
    }

    .student-library-badges {
        grid-column: 1;
        padding-left: 48px;
    }

    .student-library-control {
        grid-row: auto;
        grid-column: 1;
        justify-content: flex-start;
        padding-left: 48px;
    }

    .automatic-access {
        justify-items: start;
    }

    .student-create-course-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .access-switch > span[aria-hidden],
    .access-switch > span[aria-hidden]::after {
        transition: none;
    }
}

@media print {
    .sidebar,
    .topbar,
    .page-actions,
    .editor-tabs,
    .rich-editor-toolbar,
    .toast-region {
        display: none !important;
    }

    .admin-workspace {
        margin: 0;
    }

    .admin-main {
        padding: 0;
    }

    .preview-shell {
        border: 0;
    }
}

/* Mantem a pontuacao editorial consistente mesmo se a classe do Bootstrap for usada no futuro. */
.blockquote-footer::before {
    content: "- ";
}

/* Member library, maps management and lead profiles */
.member-page-header .section-label {
    color: var(--warning);
}

.member-map-list {
    display: grid;
    gap: 22px;
}

.member-map-card,
.member-home-feature {
    display: grid;
    grid-template-columns: minmax(320px, 1.12fr) minmax(300px, 0.88fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.member-map-visual,
.member-home-visual {
    position: relative;
    min-height: 390px;
    overflow: hidden;
    background: var(--brand-ink);
}

.member-map-visual img,
.member-home-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-featured-badge,
.member-home-visual span {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 7px 10px;
    background: var(--brand-yellow);
    color: var(--brand-ink);
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.member-map-copy,
.member-home-feature > div:last-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 4vw, 58px);
}

.member-map-copy h2,
.member-home-feature h2 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.7rem);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.member-map-copy > p:not(.section-label),
.member-home-feature p:not(.section-label) {
    margin: 0 0 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.member-map-subtitle {
    color: var(--text) !important;
    font-weight: 750;
}

.member-map-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0 0 25px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 750;
}

.member-map-meta span + span::before {
    margin-right: 18px;
    color: var(--brand-yellow-hover);
    content: "•";
}

.map-download-button,
.member-home-feature .btn {
    align-self: flex-start;
    min-width: 190px;
    padding-inline: 22px;
    text-align: center;
    text-decoration: none;
}

.map-editor-preview {
    width: 100%;
    max-height: 520px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: var(--surface-muted);
}

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

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

.table-secondary {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.69rem;
    font-weight: 500;
}

.activity-time {
    display: grid;
    gap: 2px;
}

.activity-time strong {
    font-size: 0.8rem;
}

.activity-time small {
    color: var(--text-muted);
    font-size: 0.67rem;
}

.student-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.profile-data {
    display: grid;
    gap: 0;
    margin: 0;
}

.profile-data > div {
    display: grid;
    gap: 3px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.profile-data > div:first-child {
    padding-top: 0;
}

.profile-data > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.profile-data dt {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 780;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-data dd {
    overflow-wrap: anywhere;
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
}

.profile-data dd small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 500;
}

@media (max-width: 1050px) {
    .member-map-card,
    .member-home-feature {
        grid-template-columns: 1fr;
    }

    .member-map-visual,
    .member-home-visual {
        min-height: auto;
        aspect-ratio: 3 / 2;
    }

    .student-profile-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .map-metrics,
    .student-metrics,
    .student-profile-grid {
        grid-template-columns: 1fr;
    }

    .member-map-copy,
    .member-home-feature > div:last-child {
        padding: 25px;
    }
}

/* Portal app shell refresh */
:root {
    --mobile-nav-height: 70px;
    --app-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-app-nav,
.topbar-brand-mark,
.map-mobile-save-dock {
    display: none;
}

.sidebar {
    isolation: isolate;
}

.sidebar::after {
    position: absolute;
    right: -1px;
    bottom: 8%;
    z-index: -1;
    width: 172px;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 204, 0, 0.12);
    border-radius: 50%;
    content: "";
    transform: translateX(58%);
}

.sidebar-brand {
    flex: 0 0 auto;
}

.sidebar-close {
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    text-decoration: none;
}

.sidebar-close svg {
    width: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.sidebar-nav {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.sidebar-nav a {
    gap: 12px;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.sidebar-nav a svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.55;
}

.sidebar-nav a:hover {
    transform: translateX(2px);
}

.topbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    transition: box-shadow 220ms ease, background-color 220ms ease;
}

.topbar.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 9px 28px rgba(17, 19, 21, 0.07);
}

.menu-button {
    gap: 9px;
    align-items: center;
}

.menu-button-icon {
    display: grid;
    width: 19px;
    gap: 4px;
}

.menu-button-icon i {
    display: block;
    width: 100%;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transform-origin: center;
    transition: transform 220ms var(--app-ease), opacity 160ms ease;
}

.menu-button[aria-expanded="true"] .menu-button-icon i:first-child {
    transform: translateY(5.5px) rotate(45deg);
}

.menu-button[aria-expanded="true"] .menu-button-icon i:nth-child(2) {
    opacity: 0;
}

.menu-button[aria-expanded="true"] .menu-button-icon i:last-child {
    transform: translateY(-5.5px) rotate(-45deg);
}

.account-chevron {
    width: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: transform 180ms ease;
}

.account-button[aria-expanded="true"] .account-chevron {
    transform: rotate(180deg);
}

.route-enter {
    transform-origin: 50% 0;
}

.data-table th {
    padding-block: 14px;
    background: #f2f3f4;
    letter-spacing: 0.065em;
}

.data-table td {
    padding-block: 16px;
}

.data-table tbody tr {
    transition: background-color 150ms ease;
}

.data-table td:not(:first-child) {
    font-variant-numeric: tabular-nums;
}

.member-library-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 10px 0 18px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.member-library-heading h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.member-library-heading > span {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.member-map-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.member-map-card {
    grid-template-columns: 1fr;
    border-radius: var(--radius-md);
}

.member-map-card.featured {
    grid-column: 1 / -1;
    grid-template-columns: minmax(320px, 1.14fr) minmax(300px, 0.86fr);
    border-top: 4px solid var(--brand-yellow);
}

.member-map-card.compact .member-map-visual {
    min-height: 0;
    aspect-ratio: 16 / 10;
}

.member-map-card.compact .member-map-copy {
    justify-content: flex-start;
    padding: 26px;
}

.member-map-card.compact .member-map-copy h2 {
    font-size: clamp(1.45rem, 2.6vw, 2.1rem);
    line-height: 1.03;
}

.member-map-card.compact .member-map-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.member-map-card.compact .map-download-button {
    margin-top: auto;
}

.member-map-number {
    position: absolute;
    right: 16px;
    bottom: 13px;
    color: rgba(255, 255, 255, 0.86);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

.map-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.map-download-button svg,
.map-manage-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: transform 160ms ease;
}

.map-download-button:hover svg {
    transform: translateY(2px);
}

.maps-toolbar {
    align-items: flex-end;
}

.maps-toolbar-count {
    flex: 0 0 auto;
    margin: 0 0 10px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 750;
    white-space: nowrap;
}

.map-resource-cell {
    min-width: 330px;
}

.map-resource-thumb {
    position: relative;
    width: 92px;
    height: 64px;
    border-radius: 4px;
}

.map-thumb-featured {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 3px 5px;
    background: var(--brand-yellow);
    color: var(--brand-ink);
    font-size: 0.52rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
}

.resource-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--warning);
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.map-resource-cell .resource-copy small {
    display: -webkit-box;
    overflow: hidden;
    max-width: 330px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    color: var(--text-muted);
}

.map-download-stat {
    display: grid;
    min-width: 90px;
}

.map-download-stat strong {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 880;
    letter-spacing: -0.035em;
    line-height: 1;
}

.map-download-stat span,
.map-download-stat small {
    color: var(--text-muted);
    font-size: 0.65rem;
}

.map-download-stat small {
    margin-top: 3px;
}

.map-manage-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
}

.map-manage-button:hover svg {
    transform: translateX(2px);
}

.compact-empty-state {
    min-height: 240px;
}

.map-editor-preview-shell {
    display: grid;
    gap: 8px;
    margin: 0 0 24px;
}

.map-editor-preview-shell .map-editor-preview {
    margin: 0;
}

.map-editor-preview-shell figcaption {
    color: var(--text-faint);
    font-size: 0.7rem;
}

.map-publication-panel {
    border-top: 4px solid var(--brand-yellow);
}

.map-publication-panel .form-section-header {
    margin-bottom: 18px;
}

.map-file-field {
    padding: 16px;
    border: 1px dashed var(--border-strong);
    background: var(--surface-subtle);
}

.map-file-field input[type="file"] {
    padding: 8px;
    background: var(--surface);
}

.map-file-field input[type="file"]::file-selector-button {
    min-height: 34px;
    margin-right: 10px;
    padding: 6px 10px;
    border: 0;
    border-radius: 4px;
    background: var(--brand-ink);
    color: #fff;
    font-weight: 750;
}

@media (prefers-reduced-motion: no-preference) {
    .route-enter {
        animation: route-enter 360ms var(--app-ease) both;
    }

    .sidebar.open .sidebar-nav a {
        animation: drawer-item-enter 360ms var(--app-ease) both;
    }

    .sidebar.open .sidebar-nav a:nth-child(2) { animation-delay: 25ms; }
    .sidebar.open .sidebar-nav a:nth-child(3) { animation-delay: 50ms; }
    .sidebar.open .sidebar-nav a:nth-child(4) { animation-delay: 75ms; }
    .sidebar.open .sidebar-nav a:nth-child(5) { animation-delay: 100ms; }
    .sidebar.open .sidebar-nav a:nth-child(6) { animation-delay: 125ms; }
    .sidebar.open .sidebar-nav a:nth-child(7) { animation-delay: 150ms; }
    .sidebar.open .sidebar-nav a:nth-child(8) { animation-delay: 175ms; }
}

@keyframes route-enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes drawer-item-enter {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1050px) {
    .member-map-card.featured {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    body.sidebar-is-open {
        overflow: hidden;
        touch-action: none;
    }

    .sidebar {
        z-index: 70;
        transform: translateX(calc(-100% - 20px));
        transition: transform 360ms var(--app-ease), box-shadow 360ms ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
    }

    .menu-button {
        display: inline-flex;
    }

    .sidebar-backdrop {
        z-index: 69;
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 280ms ease, visibility 280ms ease;
    }

    .sidebar-backdrop.open {
        display: block;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .map-editor-layout .map-editor-sidebar {
        order: initial;
    }
}

@media (max-width: 760px) {
    body {
        background: #f1f2f3;
    }

    .topbar {
        min-height: 66px;
        gap: 8px;
        padding: 7px 12px;
    }

    .topbar-start {
        gap: 9px;
    }

    .menu-button {
        width: 40px;
        min-height: 40px;
        justify-content: center;
        padding: 8px;
        border-color: transparent;
        background: var(--surface-subtle);
    }

    .menu-button-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .topbar-brand-mark {
        display: block;
        width: 34px;
        flex: 0 0 auto;
    }

    .topbar-brand-mark img {
        width: 100%;
        aspect-ratio: 1;
        object-fit: contain;
    }

    .topbar h2 {
        max-width: min(42vw, 250px);
        font-size: 0.98rem;
    }

    .breadcrumb-label {
        font-size: 0.56rem;
    }

    .account-button {
        min-height: 42px;
    }

    .account-copy {
        display: none;
    }

    .account-initials {
        width: 34px;
        height: 34px;
    }

    .account-chevron {
        display: none;
    }

    .account-popover {
        position: fixed;
        top: 64px;
        right: 10px;
        width: min(280px, calc(100vw - 20px));
    }

    .admin-main {
        padding: 22px 14px calc(var(--mobile-nav-height) + 42px + env(safe-area-inset-bottom));
    }

    .page-header {
        margin-bottom: 22px;
    }

    .page-header h1 {
        font-size: clamp(2rem, 11vw, 3rem);
        line-height: 0.98;
    }

    .page-header p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .mobile-app-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 50;
        display: flex;
        min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
        align-items: flex-start;
        justify-content: space-around;
        padding: 7px 6px calc(5px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(185, 192, 199, 0.8);
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 -9px 30px rgba(17, 19, 21, 0.08);
        backdrop-filter: blur(20px) saturate(160%);
        -webkit-backdrop-filter: blur(20px) saturate(160%);
    }

    .mobile-app-nav a,
    .mobile-app-nav button {
        position: relative;
        display: grid;
        min-width: 54px;
        min-height: 54px;
        flex: 1 1 0;
        place-items: center;
        align-content: center;
        gap: 2px;
        padding: 2px 4px;
        border: 0;
        background: transparent;
        color: #697077;
        font-size: 0.61rem;
        font-weight: 760;
        line-height: 1;
        text-decoration: none;
        transition: color 170ms ease, transform 170ms var(--app-ease);
    }

    .mobile-app-nav svg {
        width: 22px;
        height: 22px;
        padding: 2px;
        overflow: visible;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.55;
        transition: transform 220ms var(--app-ease);
    }

    .mobile-app-nav a.active,
    .mobile-app-nav button[aria-expanded="true"],
    .mobile-app-nav button.active {
        color: var(--brand-ink);
    }

    .mobile-app-nav a.active::before,
    .mobile-app-nav button[aria-expanded="true"]::before,
    .mobile-app-nav button.active::before {
        position: absolute;
        top: -7px;
        width: 30px;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--brand-yellow-hover);
        content: "";
    }

    .mobile-app-nav a.active svg,
    .mobile-app-nav button[aria-expanded="true"] svg,
    .mobile-app-nav button.active svg {
        transform: translateY(-1px) scale(1.08);
        stroke-width: 1.9;
    }

    .metric-grid,
    .map-metrics,
    .student-metrics {
        display: flex;
        width: calc(100% + 28px);
        grid-template-columns: none;
        gap: 10px;
        margin-right: -14px;
        margin-left: -14px;
        padding: 0 14px 8px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-padding-inline: 14px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .metric-grid::-webkit-scrollbar,
    .map-metrics::-webkit-scrollbar,
    .student-metrics::-webkit-scrollbar {
        display: none;
    }

    .metric-card {
        width: min(76vw, 255px);
        min-width: min(76vw, 255px);
        min-height: 132px;
        scroll-snap-align: start;
    }

    .member-library-heading {
        align-items: start;
        margin-top: 4px;
    }

    .member-library-heading > span {
        max-width: 90px;
        text-align: right;
    }

    .member-map-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .member-map-card.featured {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .member-map-visual,
    .member-map-card.compact .member-map-visual {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .member-map-copy,
    .member-map-card.compact .member-map-copy {
        padding: 23px 20px 21px;
    }

    .member-map-copy h2,
    .member-map-card.compact .member-map-copy h2 {
        font-size: clamp(1.65rem, 8vw, 2.35rem);
    }

    .member-map-copy > p:not(.section-label) {
        margin-bottom: 17px;
    }

    .map-download-button {
        width: 100%;
        min-height: 48px;
    }

    .resource-toolbar {
        padding: 14px;
        border-radius: var(--radius-sm);
    }

    .maps-toolbar-count {
        margin: 0;
    }

    .table-shell {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .table-responsive {
        overflow: visible;
    }

    .data-table.responsive-table-ready {
        display: block;
        min-width: 0;
    }

    .data-table.responsive-table-ready thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .data-table.responsive-table-ready tbody {
        display: grid;
        gap: 12px;
    }

    .data-table.responsive-table-ready tr {
        display: block;
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
    }

    .data-table.responsive-table-ready td {
        display: grid;
        min-height: 47px;
        grid-template-columns: minmax(92px, 0.38fr) minmax(0, 0.62fr);
        align-items: center;
        gap: 12px;
        padding: 11px 14px;
        border-bottom: 1px solid var(--border);
        font-size: 0.8rem;
        text-align: right;
    }

    .data-table.responsive-table-ready td::before {
        color: var(--text-faint);
        content: attr(data-label);
        font-size: 0.61rem;
        font-weight: 820;
        letter-spacing: 0.055em;
        text-align: left;
        text-transform: uppercase;
    }

    .data-table.responsive-table-ready td:last-child {
        border-bottom: 0;
    }

    .data-table.responsive-table-ready .resource-cell,
    .data-table.responsive-table-ready .row-actions,
    .data-table.responsive-table-ready .activity-time,
    .data-table.responsive-table-ready .map-download-stat {
        justify-content: flex-end;
        text-align: left;
    }

    .data-table.responsive-table-ready .row-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .maps-table.responsive-table-ready tr {
        border-radius: var(--radius-md);
    }

    .maps-table.responsive-table-ready td:first-child {
        display: block;
        padding: 0;
        text-align: left;
    }

    .maps-table.responsive-table-ready td:first-child::before {
        display: none;
    }

    .maps-table.responsive-table-ready .map-resource-cell {
        display: grid;
        min-width: 0;
        gap: 0;
    }

    .maps-table.responsive-table-ready .map-resource-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border: 0;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }

    .maps-table.responsive-table-ready .resource-copy {
        padding: 16px 14px;
    }

    .maps-table.responsive-table-ready .resource-copy strong {
        max-width: none;
        white-space: normal;
    }

    .maps-table.responsive-table-ready .resource-copy small {
        max-width: none;
        -webkit-line-clamp: 2;
    }

    .maps-table.responsive-table-ready .map-download-stat,
    .maps-table.responsive-table-ready .activity-time {
        justify-self: end;
    }

    .map-editor-form {
        padding-bottom: 68px;
    }

    .map-editor-layout {
        gap: 14px;
    }

    .map-editor-layout .form-section {
        border-radius: var(--radius-sm);
    }

    .map-files-section .form-grid {
        gap: 12px;
    }

    .map-file-field {
        padding: 13px;
    }

    .map-publication-panel .editor-action-stack {
        display: none;
    }

    .map-mobile-save-dock {
        position: fixed;
        right: 0;
        bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
        left: 0;
        z-index: 28;
        display: flex;
        min-height: 66px;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 9px 14px;
        border-top: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 -8px 24px rgba(17, 19, 21, 0.08);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .map-mobile-save-dock span {
        overflow: hidden;
        color: var(--text-muted);
        font-size: 0.72rem;
        font-weight: 750;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .map-mobile-save-dock .btn {
        min-width: 132px;
    }

    .toast-region {
        right: 12px;
        bottom: calc(var(--mobile-nav-height) + 12px + env(safe-area-inset-bottom));
    }

    .admin-shell:has(.map-mobile-save-dock) .toast-region {
        bottom: calc(var(--mobile-nav-height) + 78px + env(safe-area-inset-bottom));
    }

    .app-dialog {
        inset: auto 0 0;
        width: 100%;
        max-width: none;
        max-height: 88dvh;
        margin: auto 0 0;
        border-radius: 18px 18px 0 0;
    }

    .dialog-shell {
        max-height: 88dvh;
    }

    .dialog-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 470px) {
    .topbar h2 {
        max-width: 34vw;
    }

    .topbar-brand-mark {
        width: 31px;
    }

    .mobile-app-nav a,
    .mobile-app-nav button {
        min-width: 46px;
        font-size: 0.56rem;
    }

    .mobile-app-nav svg {
        width: 21px;
        height: 21px;
    }

    .page-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .member-library-heading {
        display: grid;
        gap: 6px;
    }

    .member-library-heading > span {
        max-width: none;
        text-align: left;
    }

    .data-table.responsive-table-ready td {
        grid-template-columns: minmax(82px, 0.42fr) minmax(0, 0.58fr);
        padding-inline: 12px;
    }

    .map-mobile-save-dock span {
        display: none;
    }

    .map-mobile-save-dock .btn {
        width: 100%;
    }
}

@media print {
    .mobile-app-nav,
    .map-mobile-save-dock {
        display: none !important;
    }
}

/* Mobile sign-in: branded, compact and viewport-safe */
@media (max-width: 960px) {
    .auth-loading-screen {
        height: 100dvh;
        min-height: 0;
        grid-template-columns: 1fr;
        background:
            radial-gradient(circle at 12% 12%, rgba(255, 204, 0, 0.12), transparent 28%),
            var(--brand-ink);
    }

    .auth-loading-screen::before {
        position: absolute;
        right: -32vw;
        bottom: -24vw;
        width: min(92vw, 640px);
        aspect-ratio: 1;
        border: 1px solid rgba(255, 204, 0, 0.25);
        border-radius: 50%;
        content: "";
        pointer-events: none;
    }

    .auth-loading-screen::after {
        position: absolute;
        top: 0;
        left: clamp(22px, 8vw, 64px);
        width: 5px;
        height: clamp(58px, 12vh, 94px);
        background: var(--brand-yellow);
        content: "";
        pointer-events: none;
    }

    .auth-loading-brand {
        display: none;
    }

    .auth-loading-panel {
        position: relative;
        z-index: 1;
        height: 100dvh;
        min-height: 0;
        place-items: center;
        padding: clamp(18px, 4vw, 34px);
    }

    .auth-loading-card {
        width: min(100%, 450px);
        padding: clamp(24px, 5vw, 34px);
        border-top: 5px solid var(--brand-yellow);
        border-radius: var(--radius-lg);
        background: var(--surface);
        box-shadow: 0 24px 72px rgba(0, 0, 0, 0.32);
    }

    .login-screen {
        position: relative;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        background:
            radial-gradient(circle at 12% 12%, rgba(255, 204, 0, 0.12), transparent 28%),
            var(--brand-ink);
    }

    .login-screen::before {
        position: absolute;
        right: -32vw;
        bottom: -24vw;
        width: min(92vw, 640px);
        aspect-ratio: 1;
        border: 1px solid rgba(255, 204, 0, 0.25);
        border-radius: 50%;
        content: "";
        pointer-events: none;
    }

    .login-screen::after {
        position: absolute;
        top: 0;
        left: clamp(22px, 8vw, 64px);
        width: 5px;
        height: clamp(58px, 12vh, 94px);
        background: var(--brand-yellow);
        content: "";
        pointer-events: none;
    }

    .login-panel {
        position: relative;
        z-index: 1;
        height: 100dvh;
        min-height: 0;
        place-items: safe center;
        padding: clamp(18px, 4vw, 34px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }

    .login-panel::-webkit-scrollbar {
        display: none;
    }

    .login-form {
        position: relative;
        width: min(100%, 450px);
        padding: clamp(24px, 5vw, 34px);
        border-top: 5px solid var(--brand-yellow);
        border-radius: var(--radius-lg);
        background: var(--surface);
        box-shadow: 0 24px 72px rgba(0, 0, 0, 0.32);
    }

    .login-logo-small {
        display: flex;
        width: auto;
        align-items: center;
        gap: 11px;
        margin-bottom: 28px;
    }

    .login-logo-small img {
        width: 45px;
        height: 45px;
        object-fit: contain;
    }

    .login-logo-small span {
        color: var(--brand-ink);
        font-family: var(--font-display);
        font-size: 0.92rem;
        font-weight: 900;
        letter-spacing: -0.035em;
        line-height: 0.94;
        text-transform: uppercase;
    }
}

@media (max-width: 720px) {
    .auth-loading-panel {
        padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
    }

    .auth-loading-card {
        padding: 22px 20px 20px;
        border-top-width: 4px;
        border-radius: 10px;
    }

    .auth-loading-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 14px;
        border-radius: 13px;
    }

    .auth-loading-message {
        margin-bottom: 22px;
        font-size: 0.72rem;
    }

    .auth-loading-form-skeleton {
        gap: 11px;
    }

    .auth-skeleton-title {
        height: 34px;
    }

    .auth-skeleton-field,
    .auth-skeleton-button {
        height: 47px;
    }

    .pwa-install-dialog {
        width: min(100% - 20px, 480px);
        max-height: calc(100dvh - 20px);
        border-top-width: 4px;
        border-radius: 11px;
    }

    .pwa-install-card {
        max-height: calc(100dvh - 24px);
        padding: 24px 20px 21px;
    }

    .pwa-install-close {
        top: 13px;
        right: 13px;
        width: 36px;
        height: 36px;
    }

    .pwa-install-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 19px;
        border-radius: 18px;
    }

    .pwa-install-dialog h2 {
        max-width: 13ch;
        margin-bottom: 11px;
        font-size: clamp(1.65rem, 8.5vw, 2rem);
    }

    .pwa-install-dialog #pwa-install-description {
        font-size: 0.82rem;
        line-height: 1.5;
    }

    .pwa-install-benefits {
        gap: 11px;
        margin: 19px 0 20px;
        padding: 16px 0;
    }

    .pwa-install-benefits li {
        font-size: 0.75rem;
    }

    .pwa-install-benefits strong {
        font-size: 0.78rem;
    }

    .pwa-install-dialog #pwa-install-button {
        min-height: 48px;
    }

    .pwa-install-later {
        margin-top: 13px;
    }

    .login-panel {
        align-items: safe center;
        padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
    }

    .login-form {
        padding: 20px 19px 18px;
        border-top-width: 4px;
        border-radius: 10px;
    }

    .login-logo-small {
        gap: 9px;
        margin-bottom: 18px;
    }

    .login-logo-small img {
        width: 38px;
        height: 38px;
    }

    .login-logo-small span {
        font-size: 0.8rem;
    }

    .login-form > .section-label {
        margin-bottom: 3px;
        font-size: 0.61rem;
    }

    .login-form h1 {
        margin-bottom: 7px;
        font-size: clamp(1.78rem, 9vw, 2.15rem);
        line-height: 1;
    }

    .login-intro {
        margin-bottom: 18px;
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .login-form .form-field {
        gap: 4px;
        margin-bottom: 12px;
    }

    .login-form .form-field label {
        font-size: 0.78rem;
    }

    .login-form .form-control {
        min-height: 48px;
    }

    #login-email-help {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    #login-submit {
        min-height: 48px;
        margin-top: 2px;
        font-size: 0.92rem;
    }

    .signup-invitation {
        gap: 5px;
        margin-top: 14px;
        padding: 14px;
        border-color: rgba(255, 255, 255, 0.11);
        border-left-color: var(--brand-yellow);
        background: var(--brand-ink);
        color: #ffffff;
    }

    .signup-invitation-label {
        color: var(--brand-yellow);
        font-size: 0.59rem;
    }

    .signup-invitation strong {
        color: #ffffff;
        font-size: 0.9rem;
    }

    .signup-invitation p {
        display: none;
    }

    .signup-invitation .btn {
        min-height: 42px;
        margin-top: 5px;
        border-color: var(--brand-yellow);
        background: var(--brand-yellow);
        color: var(--brand-ink);
        font-size: 0.8rem;
    }

    .login-security-note {
        display: none;
    }
}

@media (max-width: 380px) {
    .login-panel {
        padding-inline: 10px;
    }

    .login-form {
        padding-inline: 16px;
    }

    .signup-invitation .btn {
        font-size: 0.75rem;
    }
}

@media (max-width: 720px) and (max-height: 680px) {
    .login-form {
        padding-block: 16px;
    }

    .login-logo-small {
        margin-bottom: 12px;
    }

    .login-intro {
        margin-bottom: 13px;
    }

    .login-form .form-field {
        margin-bottom: 9px;
    }

    .signup-invitation {
        margin-top: 10px;
        padding-block: 11px;
    }
}

/* Mobile shell refinements: branded header, account menu and map editor clearance */
.account-popover {
    gap: 0;
    padding: 8px;
    border-top: 3px solid var(--brand-yellow);
}

.account-popover-label {
    display: block;
    padding: 7px 9px 2px;
    color: var(--warning);
    font-size: 0.6rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-popover p {
    overflow: hidden;
    padding: 2px 9px 11px;
    border-bottom: 1px solid var(--border);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-popover .button-text {
    display: flex;
    width: 100%;
    min-height: 43px;
    align-items: center;
    justify-self: stretch;
    gap: 10px;
    padding: 9px;
    border-radius: 5px;
    color: var(--text);
    font-size: 0.78rem;
    text-align: left;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease;
}

.account-popover .button-text:hover,
.account-popover .button-text:focus-visible {
    background: var(--surface-subtle);
    color: var(--text);
}

.account-popover .button-text svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.65;
}

.account-popover .account-logout-action {
    color: var(--danger);
}

@media (prefers-reduced-motion: no-preference) {
    .account-popover:not([hidden]) {
        animation: account-menu-enter 220ms var(--app-ease) both;
        transform-origin: 90% 0;
    }
}

@keyframes account-menu-enter {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 960px) {
    .topbar,
    .topbar.is-scrolled {
        min-height: 68px;
        border-bottom-color: rgba(255, 255, 255, 0.1);
        background: rgba(17, 19, 21, 0.97);
        color: #ffffff;
        box-shadow: 0 10px 28px rgba(7, 9, 10, 0.18);
    }

    .topbar-start {
        flex: 1 1 auto;
        overflow: hidden;
    }

    .topbar-start > div {
        min-width: 0;
    }

    .topbar h2 {
        color: #ffffff;
    }

    .topbar .breadcrumb-label {
        color: #aeb4b8;
    }

    .topbar .menu-button {
        border-color: rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    .topbar .menu-button:hover,
    .topbar .menu-button:focus-visible {
        background: rgba(255, 255, 255, 0.14);
    }

    .topbar-brand-mark {
        display: block;
        width: clamp(108px, 14vw, 132px);
        height: 34px;
        flex: 0 0 auto;
    }

    .topbar-brand-mark img {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        object-fit: contain;
        object-position: left center;
    }

    .topbar .account-button {
        border-color: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    .topbar .account-button:hover,
    .topbar .account-button[aria-expanded="true"] {
        border-color: rgba(255, 204, 0, 0.48);
        background: rgba(255, 255, 255, 0.08);
    }

    .topbar .account-copy small {
        color: #b7bdc1;
    }

    .account-popover {
        position: fixed;
        top: 70px;
        right: 12px;
        width: min(272px, calc(100vw - 24px));
        padding: 7px;
        border-right-color: var(--border);
        border-bottom-color: var(--border);
        border-left-color: var(--border);
        border-radius: 0 0 10px 10px;
        box-shadow: 0 20px 54px rgba(7, 9, 10, 0.24);
    }
}

@media (max-width: 760px) {
    .topbar {
        padding-inline: 10px;
    }

    .topbar-start {
        gap: 10px;
    }

    .topbar-brand-mark {
        width: 116px;
        height: 32px;
    }

    .account-popover-label {
        padding-top: 6px;
    }

    .account-popover p {
        padding-bottom: 9px;
        font-size: 0.74rem;
    }

    .account-popover .button-text {
        min-height: 42px;
        font-size: 0.76rem;
    }

    .map-editor-form:has(.map-mobile-save-dock) {
        padding-bottom: 156px;
    }

    .map-editor-sidebar {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .map-current-file-panel {
        order: -1;
        scroll-margin-bottom: 160px;
    }

    .map-current-file-panel .form-section-header {
        margin-bottom: 10px;
    }

    .map-current-file-panel .editor-meta {
        gap: 0;
    }

    .map-current-file-panel .editor-meta div {
        display: grid;
        grid-template-columns: minmax(72px, 0.36fr) minmax(0, 0.64fr);
        align-items: start;
        gap: 14px;
        padding: 11px 0;
    }

    .map-current-file-panel .editor-meta dt,
    .map-current-file-panel .editor-meta dd {
        font-size: 0.72rem;
        line-height: 1.45;
    }

    .map-current-file-panel .editor-meta dd {
        min-width: 0;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .map-mobile-save-dock {
        right: 12px;
        bottom: calc(var(--mobile-nav-height) + 10px + env(safe-area-inset-bottom));
        left: 12px;
        min-height: 58px;
        padding: 7px 8px 7px 13px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        background: rgba(17, 19, 21, 0.96);
        box-shadow: 0 16px 38px rgba(7, 9, 10, 0.28);
    }

    .map-mobile-save-dock span {
        color: #c3c8cb;
    }

    .map-mobile-save-dock .btn {
        min-width: 126px;
        min-height: 42px;
    }

    .admin-shell:has(.map-mobile-save-dock) .toast-region {
        bottom: calc(var(--mobile-nav-height) + 84px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 520px) {
    .topbar-start > div {
        display: none;
    }

    .topbar-brand-mark {
        width: 122px;
    }
}

@media (max-width: 360px) {
    .topbar-brand-mark {
        width: 106px;
    }

    .map-mobile-save-dock {
        right: 8px;
        left: 8px;
    }
}

/* Courses, premium access and student learning experience */
.content-access-badge,
.content-access-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.055em;
    line-height: 1;
    text-transform: uppercase;
}

.content-access-badge {
    position: absolute;
    z-index: 3;
    top: 16px;
    right: 16px;
    padding: 9px 11px;
    box-shadow: 0 8px 26px rgba(7, 9, 10, 0.18);
}

.member-map-visual .content-access-badge {
    top: auto;
    right: 18px;
    bottom: 18px;
}

.content-access-badge.free,
.content-access-tag.free {
    border-color: rgba(23, 107, 58, 0.22);
    background: #eef8f1;
    color: #176b3a;
}

.content-access-badge.premium,
.content-access-tag.premium {
    border-color: rgba(255, 204, 0, 0.42);
    background: var(--brand-ink);
    color: var(--brand-yellow);
}

.content-access-tag {
    padding: 7px 9px;
}

.library-filter-bar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 6px 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.library-filter-bar > span {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 720;
}

.library-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
}

.library-tabs button {
    min-height: 34px;
    padding: 6px 13px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 780;
    transition: background-color 160ms ease, color 160ms ease;
}

.library-tabs button:hover,
.library-tabs button:focus-visible {
    color: var(--text);
}

.library-tabs button.active {
    background: var(--brand-ink);
    color: #ffffff;
}

.courses-member-header {
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    padding: clamp(30px, 5vw, 56px);
    border: 0;
    border-radius: 16px;
    background: var(--brand-ink);
    color: #ffffff;
}

.courses-member-header::after {
    position: absolute;
    right: -90px;
    bottom: -190px;
    width: 390px;
    height: 390px;
    border: 1px solid rgba(255, 204, 0, 0.28);
    border-radius: 50%;
    content: "";
}

.courses-member-header > div {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.courses-member-header .section-label {
    color: var(--brand-yellow);
}

.courses-member-header h1 {
    color: #ffffff;
}

.courses-member-header p:not(.section-label) {
    color: #c6cbce;
}

.member-home-course {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    margin-top: 22px;
    padding: 28px 30px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--brand-yellow);
    border-radius: 12px;
    background: var(--surface);
}

.member-home-course h2 {
    margin: 2px 0 8px;
    font-size: clamp(1.25rem, 2.5vw, 1.85rem);
    font-weight: 860;
    letter-spacing: -0.035em;
}

.member-home-course p:not(.section-label) {
    margin: 0;
    color: var(--text-muted);
}

.member-home-course > div:last-child {
    display: grid;
    min-width: 180px;
    gap: 3px;
    justify-items: end;
}

.member-home-course > div:last-child span {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 720;
}

.member-home-course > div:last-child strong {
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 850;
}

.member-home-course.empty-course > a {
    justify-self: end;
}

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

.course-library-card {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    transition: border-color 180ms ease, transform 180ms ease;
}

.course-library-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.course-library-visual {
    position: relative;
    min-height: 290px;
    overflow: hidden;
    background: var(--brand-ink);
}

.course-library-visual > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 420ms ease;
}

.course-library-card:hover .course-library-visual > img {
    transform: scale(1.025);
}

.course-visual-fallback {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    min-height: inherit;
    place-items: center;
    overflow: hidden;
    background: var(--brand-ink);
    color: rgba(255, 255, 255, 0.1);
}

.course-visual-fallback::before,
.course-visual-fallback::after {
    position: absolute;
    border: 1px solid rgba(255, 204, 0, 0.24);
    border-radius: 50%;
    content: "";
}

.course-visual-fallback::before {
    width: 310px;
    height: 310px;
    transform: translate(42%, 34%);
}

.course-visual-fallback::after {
    width: 180px;
    height: 180px;
    transform: translate(-55%, -46%);
}

.course-visual-fallback > span {
    position: absolute;
    left: 22px;
    bottom: 18px;
    color: rgba(255, 255, 255, 0.14);
    font-family: var(--font-display);
    font-size: 3.7rem;
    font-weight: 900;
    letter-spacing: -0.08em;
}

.course-visual-fallback svg {
    width: 82px;
    height: 82px;
    fill: none;
    stroke: rgba(255, 204, 0, 0.72);
    stroke-width: 1.3;
}

.course-play-mark {
    position: absolute;
    left: 18px;
    top: 18px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: rgba(17, 19, 21, 0.8);
    color: #ffffff;
}

.course-play-mark svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.course-library-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 28px;
}

.course-library-copy .section-label {
    color: var(--warning);
}

.course-library-copy h2 {
    margin: 4px 0 10px;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.13;
}

.course-library-copy h2 a {
    text-decoration: none;
}

.course-library-copy > p:not(.section-label) {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.course-card-progress {
    display: grid;
    gap: 7px;
    margin-top: auto;
    padding-top: 24px;
}

.course-card-progress > div,
.course-hero-progress > div {
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--surface-muted);
}

.course-card-progress > div span,
.course-hero-progress > div span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand-yellow-hover);
}

.course-card-progress small {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.course-card-action {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 820;
    text-decoration: none;
}

.course-card-action svg,
.course-back-link svg,
.course-main-material svg,
.module-actions .btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
}

.course-classroom-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 740;
}

.course-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
}

.course-classroom-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(390px, 0.78fr);
    overflow: hidden;
    margin-bottom: 32px;
    border-radius: 16px;
    background: var(--brand-ink);
    color: #ffffff;
}

.course-classroom-media {
    min-width: 0;
    min-height: 500px;
    background: #050606;
}

.course-classroom-media > img,
.course-classroom-media > .course-visual-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-video-frame,
.module-video-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #050606;
}

.course-video-frame {
    height: 100%;
    min-height: 500px;
}

.module-video-frame {
    aspect-ratio: 16 / 9;
    margin-bottom: 24px;
    border-radius: 10px;
}

.course-video-frame iframe,
.module-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.course-classroom-intro {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 3.2vw, 44px);
}

.course-classroom-intro .section-label {
    color: var(--brand-yellow);
}

.course-classroom-intro h1 {
    margin: 7px 0 15px;
    color: #ffffff;
    font-size: clamp(2rem, 3.1vw, 3.35rem);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 0.98;
    overflow-wrap: break-word;
}

.course-lead {
    margin: 0;
    color: #c5cace;
    font-size: 0.98rem;
}

.course-overview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 24px 0 0;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 760;
}

.course-overview-meta span + span::before {
    margin-right: 18px;
    color: var(--brand-yellow);
    content: "•";
}

.course-hero-progress {
    display: grid;
    gap: 8px;
    margin-top: 28px;
}

.course-hero-progress > div {
    background: rgba(255, 255, 255, 0.16);
}

.course-hero-progress p {
    margin: 0;
    color: #bfc5c8;
    font-size: 0.72rem;
}

.course-hero-progress strong {
    color: #ffffff;
}

.course-main-material {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    border-color: rgba(255, 255, 255, 0.28);
    background: transparent;
    color: #ffffff;
}

.course-main-material:hover,
.course-main-material:focus-visible {
    border-color: var(--brand-yellow);
    background: var(--brand-yellow);
    color: var(--brand-ink);
}

.course-classroom-layout {
    max-width: 1080px;
    margin-inline: auto;
}

.course-description-block {
    display: grid;
    grid-template-columns: minmax(180px, 0.36fr) minmax(0, 0.64fr);
    column-gap: 46px;
    padding: 22px 0 48px;
    border-bottom: 1px solid var(--border);
}

.course-description-block .section-label,
.course-description-block h2 {
    grid-column: 1;
}

.course-description-block h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.5rem);
    font-weight: 880;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.course-description-block .course-reading {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.course-reading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.75;
}

.course-reading p + p {
    margin-top: 14px;
}

.course-modules-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding: 48px 0 20px;
}

.course-modules-heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    font-weight: 880;
    letter-spacing: -0.045em;
}

.course-modules-heading > span {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 740;
}

.learning-module-list {
    border-top: 1px solid var(--border-strong);
}

.learning-module {
    border-bottom: 1px solid var(--border);
}

.learning-module-heading {
    display: grid;
    width: 100%;
    grid-template-columns: 46px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 16px;
    padding: 22px 4px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.learning-module-heading:hover strong {
    text-decoration: underline;
    text-decoration-color: var(--brand-yellow-hover);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.module-status-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 820;
}

.learning-module.completed .module-status-mark {
    border-color: var(--success);
    background: var(--success-soft);
    color: var(--success);
}

.module-status-mark svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.learning-module-heading small,
.learning-module-heading strong {
    display: block;
}

.learning-module-heading small {
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 760;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.learning-module-heading strong {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
}

.module-chevron,
.course-module-editor > summary > svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    transition: transform 180ms ease;
}

.learning-module-heading[aria-expanded="true"] .module-chevron {
    transform: rotate(180deg);
}

.learning-module-body {
    padding: 6px 4px 28px 66px;
}

.module-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.module-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.course-admin-metrics .metric-card:nth-child(2) {
    background: #fff8dc;
}

.course-admin-metrics .metric-card:nth-child(3) {
    background: var(--brand-ink);
    color: #ffffff;
}

.course-admin-metrics .metric-card:nth-child(3) .metric-label,
.course-admin-metrics .metric-card:nth-child(3) .metric-detail {
    color: #c1c6c9;
}

.course-resource-cell {
    min-width: 340px;
}

.course-resource-thumb {
    display: grid;
    width: 86px;
    height: 58px;
    place-items: center;
    overflow: hidden;
    border-radius: 7px;
    background: var(--brand-ink);
    color: var(--brand-yellow);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 900;
}

.course-resource-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-editor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 0.33fr);
}

.course-admin-cover {
    width: min(100%, 760px);
    margin: 0 0 24px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--brand-ink);
}

.course-admin-cover img {
    width: 100%;
    max-height: 390px;
    object-fit: cover;
}

.course-publication-panel {
    border-top: 4px solid var(--brand-yellow);
}

.course-builder-section {
    margin-top: 34px;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f0f2f3;
}

.course-builder-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.course-builder-header h2 {
    margin: 0 0 6px;
    font-size: clamp(1.6rem, 3vw, 2.65rem);
    font-weight: 880;
    letter-spacing: -0.045em;
}

.course-builder-header p:not(.section-label) {
    margin: 0;
    color: var(--text-muted);
}

.course-builder-header > span {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 760;
}

.course-module-stack {
    display: grid;
    gap: 10px;
}

.course-module-editor {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.course-module-editor > summary {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 14px;
    padding: 17px 20px;
    cursor: pointer;
    list-style: none;
}

.course-module-editor > summary::-webkit-details-marker {
    display: none;
}

.course-module-editor[open] > summary {
    border-bottom: 1px solid var(--border);
    background: #fafafa;
}

.course-module-editor[open] > summary > svg {
    transform: rotate(180deg);
}

.course-module-editor summary small,
.course-module-editor summary strong {
    display: block;
}

.course-module-editor summary small {
    color: var(--text-faint);
    font-size: 0.62rem;
    font-weight: 760;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.course-module-editor summary strong {
    margin-top: 1px;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 800;
}

.module-order {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 820;
}

.course-module-editor:first-child .module-order {
    border-color: var(--brand-yellow-hover);
    background: var(--brand-yellow);
    color: var(--brand-ink);
    font-size: 1rem;
}

.module-editor-form {
    padding: 24px;
}

.module-editor-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.module-editor-actions > span {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.course-access-panel,
.student-access-section {
    margin-top: 34px;
    border-top: 4px solid var(--brand-yellow);
}

.course-grant-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.4fr) auto;
    align-items: end;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-subtle);
}

.course-grant-form .form-field {
    margin: 0;
}

.course-grant-form .btn {
    min-height: 46px;
}

.course-access-add {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand-yellow);
    border-radius: 9px;
    background: var(--surface-subtle);
}

.course-access-add strong,
.course-access-add span {
    display: block;
}

.course-access-add strong {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 840;
}

.course-access-add span {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.74rem;
}

.course-access-add .btn {
    min-width: 164px;
    min-height: 46px;
    white-space: nowrap;
}

.access-grant-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-top: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-strong);
}

.access-grant-heading h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 840;
}

.access-grant-heading span {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.69rem;
}

.access-grant-heading label {
    width: min(320px, 42%);
}

.access-grant-heading .form-control {
    min-height: 40px;
}

.access-grant-no-results {
    padding: 22px 4px;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.app-dialog:has(.course-access-picker) {
    width: min(1020px, calc(100% - 28px));
}

.course-access-picker-intro {
    max-width: 76ch;
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.course-access-picker-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(140px, 0.7fr));
    gap: 11px;
}

.course-access-picker-filters .form-field,
.access-picker-settings .form-field,
.access-picker-identifiers .form-field {
    margin: 0;
}

.access-picker-identifiers {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
}

.access-picker-identifiers summary {
    padding: 11px 13px;
    color: var(--text);
    cursor: pointer;
    font-size: 0.73rem;
    font-weight: 780;
}

.access-picker-identifiers > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 11px;
    padding: 0 13px 13px;
}

.access-picker-identifiers .btn {
    min-height: 42px;
    white-space: nowrap;
}

.access-picker-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
}

.access-picker-toolbar p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 740;
}

.access-picker-toolbar > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 13px;
}

.access-picker-toolbar .button-text {
    color: var(--text);
    font-size: 0.71rem;
    font-weight: 780;
}

.access-picker-toolbar .button-text:disabled {
    color: var(--text-faint);
    cursor: not-allowed;
    text-decoration: none;
}

.access-picker-table-wrap {
    max-height: min(390px, 43dvh);
    margin-top: 10px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.access-picker-table {
    min-width: 760px;
}

.access-picker-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.access-picker-table th,
.access-picker-table td {
    padding: 10px 12px;
}

.access-picker-table th:first-child,
.access-picker-table td:first-child {
    width: 42px;
    padding-right: 2px;
    text-align: center;
}

.access-picker-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-yellow-hover);
    cursor: pointer;
}

.access-picker-table tbody tr.is-selected {
    background: var(--warning-soft);
    box-shadow: inset 3px 0 0 var(--brand-yellow-hover);
}

.access-picker-person {
    display: flex;
    min-width: 250px;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.access-picker-person .account-initials {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    font-size: 0.66rem;
}

.access-picker-person strong,
.access-picker-person small,
.access-picker-table td > strong,
.access-picker-table td > small {
    display: block;
}

.access-picker-person strong,
.access-picker-table td > strong {
    font-size: 0.76rem;
}

.access-picker-person small,
.access-picker-table td > small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.65rem;
}

.access-picker-empty {
    padding: 36px 22px;
    color: var(--text-muted);
    text-align: center;
}

.access-picker-empty strong {
    color: var(--text);
    font-size: 0.84rem;
}

.access-picker-empty p {
    margin: 4px 0 0;
    font-size: 0.74rem;
}

.access-picker-feedback {
    min-height: 20px;
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 0.69rem;
}

.access-picker-settings {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
}

.access-picker-settings > div:first-child strong,
.access-picker-settings > div:first-child small {
    display: block;
}

.access-picker-settings > div:first-child strong {
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 840;
}

.access-picker-settings > div:first-child small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.access-picker-settings .form-field {
    width: 220px;
    flex: 0 0 auto;
}

.access-grant-list,
.student-entitlement-list {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.access-grant-list li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 4px;
    border-bottom: 1px solid var(--border);
}

.access-grant-list li:last-child {
    border-bottom: 0;
}

.access-grant-list strong,
.access-grant-list small {
    display: block;
}

.access-grant-list strong {
    font-size: 0.82rem;
}

.access-grant-list small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.access-grant-list small span {
    display: block;
}

.access-grant-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.access-empty {
    margin-top: 18px;
    padding: 20px;
    border: 1px dashed var(--border-strong);
    border-radius: 9px;
    color: var(--text-muted);
}

.access-empty strong {
    color: var(--text);
    font-size: 0.82rem;
}

.access-empty p {
    margin: 4px 0 0;
    font-size: 0.76rem;
}

.student-entitlement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.student-entitlement-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-strong);
}

.student-entitlement-heading h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 820;
}

.student-entitlement-heading span {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 740;
}

.student-entitlement-list {
    margin-top: 0;
}

.student-entitlement-list li {
    border-bottom: 1px solid var(--border);
}

.student-entitlement-list label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 3px;
    cursor: pointer;
}

.student-entitlement-list input {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    accent-color: var(--brand-yellow-hover);
}

.student-entitlement-list strong,
.student-entitlement-list small {
    display: block;
}

.student-entitlement-list strong {
    font-size: 0.8rem;
}

.student-entitlement-list small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.permission-choice.is-disabled {
    opacity: 0.52;
}

@media (prefers-reduced-motion: no-preference) {
    .course-library-card,
    .learning-module,
    .course-module-editor {
        animation: course-content-enter 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .course-library-card:nth-child(2n),
    .learning-module:nth-child(2n),
    .course-module-editor:nth-child(2n) {
        animation-delay: 45ms;
    }
}

@keyframes course-content-enter {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1320px) {
    .course-library-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .course-library-card {
        grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    }
}

@media (max-width: 1100px) {
    .course-classroom-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .course-classroom-media,
    .course-video-frame {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .course-classroom-intro {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 8px 28px;
    }

    .course-classroom-intro > * {
        grid-column: 1;
    }

    .course-hero-progress,
    .course-main-material {
        grid-column: 2;
    }

    .course-hero-progress {
        grid-row: 2 / span 2;
        width: 220px;
        margin-top: 0;
    }

    .course-main-material {
        grid-row: 4 / span 2;
        align-self: start;
    }
}

@media (max-width: 960px) {
    .course-editor-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .course-editor-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-grant-form {
        grid-template-columns: minmax(0, 1fr) minmax(170px, 0.45fr);
    }

    .course-grant-form .btn {
        grid-column: 1 / -1;
    }

    .course-access-picker-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .courses-member-header {
        margin: -4px -4px 22px;
        padding: 28px 22px 34px;
        border-radius: 11px;
    }

    .courses-member-header h1 {
        max-width: 9ch;
        font-size: clamp(2.15rem, 11vw, 3.3rem);
        line-height: 0.96;
    }

    .library-filter-bar,
    .member-library-heading.library-filter-bar {
        display: grid;
        align-items: start;
        gap: 12px;
    }

    .library-tabs {
        width: 100%;
    }

    .library-tabs button {
        flex: 1 1 0;
        min-width: 0;
        padding-inline: 7px;
    }

    .course-library-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .member-home-course {
        grid-template-columns: minmax(0, 1fr);
        padding: 23px 20px;
    }

    .member-home-course > div:last-child {
        justify-items: start;
    }

    .member-home-course > div:last-child .btn,
    .member-home-course.empty-course > a {
        width: 100%;
        justify-self: stretch;
    }

    .course-library-visual {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .course-library-copy {
        min-height: 260px;
        padding: 24px 22px;
    }

    .course-classroom-hero {
        margin-inline: -4px;
        border-radius: 11px;
    }

    .course-classroom-intro {
        display: flex;
        align-items: stretch;
        padding: 27px 22px 30px;
    }

    .course-classroom-intro h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .course-hero-progress {
        width: auto;
        margin-top: 25px;
    }

    .course-main-material {
        width: 100%;
        justify-content: center;
    }

    .course-description-block {
        display: block;
        padding-bottom: 34px;
    }

    .course-description-block h2 {
        margin-bottom: 20px;
    }

    .course-modules-heading {
        align-items: start;
        padding-top: 34px;
    }

    .learning-module-heading {
        grid-template-columns: 40px minmax(0, 1fr) 20px;
        gap: 11px;
        padding-block: 18px;
    }

    .learning-module-body {
        padding: 4px 0 24px;
    }

    .module-actions {
        display: grid;
    }

    .module-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .course-editor-sidebar,
    .student-entitlement-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .course-builder-section {
        margin-inline: -4px;
        padding: 22px 14px;
        border-radius: 10px;
    }

    .course-builder-header {
        display: block;
    }

    .course-builder-header > span {
        display: block;
        margin-top: 9px;
    }

    .course-module-editor > summary {
        grid-template-columns: 36px minmax(0, 1fr) 20px;
        gap: 10px;
        padding: 15px 13px;
    }

    .module-editor-form {
        padding: 18px 13px;
    }

    .module-editor-actions {
        display: grid;
    }

    .module-editor-actions .btn {
        width: 100%;
    }

    .course-access-panel,
    .student-access-section {
        margin-top: 24px;
    }

    .course-grant-form {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px;
    }

    .course-grant-form .btn {
        grid-column: auto;
    }

    .course-access-add,
    .access-grant-heading,
    .access-picker-toolbar,
    .access-picker-settings {
        display: grid;
        align-items: stretch;
    }

    .course-access-add .btn,
    .access-grant-heading label,
    .access-picker-settings .form-field {
        width: 100%;
    }

    .app-dialog:has(.course-access-picker) {
        width: 100%;
    }

    .course-access-picker-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .access-picker-search,
    .access-picker-period {
        grid-column: 1 / -1;
    }

    .access-picker-identifiers > div {
        grid-template-columns: minmax(0, 1fr);
    }

    .access-picker-identifiers .btn {
        width: 100%;
    }

    .access-picker-toolbar > div {
        justify-content: flex-start;
    }

    .access-picker-table-wrap {
        max-height: none;
        overflow: visible;
    }

    .access-picker-table {
        display: block;
        min-width: 0;
    }

    .access-picker-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .access-picker-table tbody {
        display: block;
    }

    .access-picker-table tr {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        padding: 12px 11px;
        border-bottom: 1px solid var(--border);
    }

    .access-picker-table tr:last-child {
        border-bottom: 0;
    }

    .access-picker-table td,
    .access-picker-table td:first-child {
        display: block;
        width: auto;
        padding: 2px 0;
        border: 0;
        text-align: left;
    }

    .access-picker-table td:first-child {
        grid-row: 1 / span 3;
        align-self: start;
        padding-top: 8px;
    }

    .access-picker-table td:not(:first-child) {
        grid-column: 2;
    }

    .access-picker-table td:nth-child(n + 3)::before {
        color: var(--text-faint);
        content: attr(data-label) ": ";
        font-size: 0.61rem;
        font-weight: 780;
    }

    .access-picker-table td:nth-child(n + 3) > strong,
    .access-picker-table td:nth-child(n + 3) > small {
        display: inline;
        font-size: 0.65rem;
    }

    .access-picker-table td:nth-child(n + 3) > small::before {
        content: " / ";
    }

    .access-picker-person {
        min-width: 0;
    }

    .access-picker-person .account-initials {
        display: none;
    }

    .access-grant-list li {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .access-grant-list li .btn {
        width: max-content;
    }

    .access-grant-actions {
        grid-column: 2;
        justify-content: flex-start;
    }

    .member-map-visual .content-access-badge {
        right: 12px;
        bottom: 12px;
    }

    .content-access-badge {
        top: 12px;
        right: 12px;
        padding: 7px 9px;
        font-size: 0.58rem;
    }
}

@media (max-width: 470px) {
    .course-modules-heading {
        display: block;
    }

    .course-modules-heading > span {
        display: block;
        margin-top: 8px;
    }

    .course-library-copy {
        min-height: 245px;
    }

    .course-classroom-top > span {
        display: none;
    }

    .learning-module-heading strong {
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .course-library-card,
    .course-library-visual > img,
    .module-chevron,
    .course-module-editor > summary > svg {
        transition: none;
        animation: none;
    }
}

/* Quizzes do curso */
.module-quiz-callout,
.module-quiz-admin-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 17px 18px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand-yellow);
    border-radius: 10px;
    background: #fafafa;
}

.module-quiz-callout.is-ready,
.module-quiz-admin-card.has-quiz {
    background: #fffaf0;
}

.module-quiz-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-ink);
    color: var(--brand-yellow);
}

.module-quiz-icon svg,
.quiz-member-symbol svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.module-quiz-callout small,
.module-quiz-callout h3,
.module-quiz-callout p,
.module-quiz-admin-card small,
.module-quiz-admin-card strong,
.module-quiz-admin-card p {
    display: block;
    margin: 0;
}

.module-quiz-callout small,
.module-quiz-admin-card small {
    color: var(--text-faint);
    font-size: 0.62rem;
    font-weight: 790;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.module-quiz-callout h3,
.module-quiz-admin-card strong {
    margin-top: 2px;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 830;
}

.module-quiz-callout p,
.module-quiz-admin-card p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.45;
}

.module-quiz-callout .btn,
.module-quiz-admin-card .btn {
    white-space: nowrap;
}

.module-quiz-blocked {
    margin: 10px 0 0;
    color: var(--warning);
    font-size: 0.72rem;
    font-weight: 730;
}

.quiz-breadcrumb nav {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.quiz-breadcrumb nav a:not(.course-back-link),
.quiz-breadcrumb nav span {
    overflow: hidden;
    color: var(--text-muted);
    text-overflow: ellipsis;
    text-decoration: none;
    white-space: nowrap;
}

.quiz-breadcrumb nav a:hover,
.quiz-breadcrumb nav a:focus-visible {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--brand-yellow-hover);
    text-underline-offset: 3px;
}

.quiz-member-hero {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 170px;
    align-items: start;
    gap: 24px;
    margin-bottom: 24px;
    padding: clamp(26px, 4vw, 44px);
    border-radius: 16px;
    background: var(--brand-ink);
    color: #ffffff;
}

.quiz-member-hero.is-complete {
    box-shadow: inset 0 4px 0 var(--brand-yellow);
}

.quiz-member-symbol {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid rgba(255, 204, 0, 0.44);
    border-radius: 50%;
    color: var(--brand-yellow);
}

.quiz-member-hero .section-label {
    color: var(--brand-yellow);
}

.quiz-member-hero h1 {
    margin: 6px 0 11px;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.quiz-member-hero > div:nth-child(2) > p:not(.section-label) {
    max-width: 68ch;
    margin: 0;
    color: #c8cdd0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.quiz-rule-banner {
    display: grid;
    gap: 2px;
    margin-top: 20px;
    padding: 13px 15px;
    border-left: 3px solid var(--brand-yellow);
    background: rgba(255, 255, 255, 0.07);
}

.quiz-rule-banner strong {
    color: #ffffff;
    font-size: 0.76rem;
}

.quiz-rule-banner span {
    color: #c8cdd0;
    font-size: 0.72rem;
    line-height: 1.45;
}

.quiz-member-hero > aside {
    display: grid;
    min-height: 126px;
    align-content: center;
    padding-left: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.quiz-member-hero > aside small,
.quiz-member-hero > aside strong,
.quiz-member-hero > aside span {
    display: block;
}

.quiz-member-hero > aside small,
.quiz-member-hero > aside span {
    color: #bfc5c8;
    font-size: 0.68rem;
    font-weight: 700;
}

.quiz-member-hero > aside strong {
    margin: 4px 0 1px;
    color: var(--brand-yellow);
    font-family: var(--font-display);
    font-size: 2.35rem;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.quiz-member-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
    align-items: start;
    gap: 22px;
}

.quiz-member-main,
.quiz-member-sidebar {
    display: grid;
    gap: 18px;
}

.quiz-member-sidebar {
    position: sticky;
    top: calc(var(--topbar-height) + 20px);
}

.member-quiz-form,
.quiz-progress-card,
.quiz-history-card,
.quiz-metrics-section,
.quiz-question-builder {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.member-quiz-form > header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px;
    border-bottom: 1px solid var(--border);
}

.member-quiz-form > header h2,
.quiz-progress-card h2,
.quiz-history-card h2 {
    margin: 2px 0 0;
    font-size: 1.2rem;
    font-weight: 850;
    letter-spacing: -0.025em;
}

.member-quiz-form > header > p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.member-quiz-questions {
    display: grid;
}

.member-quiz-question {
    min-width: 0;
    margin: 0;
    padding: 26px;
    border: 0;
    border-bottom: 1px solid var(--border);
}

.member-quiz-question legend {
    display: grid;
    width: 100%;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 810;
    line-height: 1.4;
}

.member-quiz-question legend > span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-ink);
    color: var(--brand-yellow);
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 820;
}

.member-quiz-options {
    display: grid;
    gap: 9px;
    margin-top: 18px;
    padding-left: 46px;
}

.member-quiz-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfbfb;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.member-quiz-option:hover {
    border-color: var(--border-strong);
    background: #ffffff;
}

.member-quiz-option:active {
    transform: translateY(1px);
}

.member-quiz-option:has(input:checked) {
    border-color: var(--brand-yellow-hover);
    background: #fff8dc;
}

.member-quiz-option.was-selected {
    box-shadow: inset 3px 0 0 var(--brand-yellow-hover);
}

.member-quiz-option.was-correct {
    border-color: #95c5aa;
    background: var(--success-soft);
}

.member-quiz-option input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--brand-yellow-hover);
}

.member-quiz-option > span {
    font-size: 0.82rem;
    font-weight: 680;
    line-height: 1.4;
}

.member-quiz-option > small {
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 760;
}

.member-quiz-submit {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 26px;
}

.member-quiz-submit > span {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.quiz-progress-card,
.quiz-history-card {
    padding: 22px;
}

.quiz-progress-card {
    border-top: 4px solid var(--brand-yellow);
}

.quiz-progress-card > p:not(.section-label),
.quiz-history-card.empty > p:not(.section-label) {
    margin: 9px 0 18px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.quiz-history-card > header {
    margin-bottom: 14px;
}

.quiz-attempt-card,
.quiz-admin-attempt {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #ffffff;
}

.quiz-attempt-card + .quiz-attempt-card,
.quiz-admin-attempt + .quiz-admin-attempt {
    margin-top: 9px;
}

.quiz-attempt-card > summary,
.quiz-admin-attempt > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    cursor: pointer;
    list-style: none;
}

.quiz-attempt-card > summary::-webkit-details-marker,
.quiz-admin-attempt > summary::-webkit-details-marker {
    display: none;
}

.quiz-attempt-card > summary span,
.quiz-attempt-card > summary small,
.quiz-attempt-card > summary strong,
.quiz-admin-attempt > summary span,
.quiz-admin-attempt > summary small,
.quiz-admin-attempt > summary strong {
    display: block;
}

.quiz-attempt-card > summary small,
.quiz-admin-attempt > summary small {
    color: var(--text-muted);
    font-size: 0.62rem;
}

.quiz-attempt-card > summary strong,
.quiz-admin-attempt > summary strong {
    margin-top: 2px;
    font-size: 0.76rem;
}

.quiz-attempt-status {
    color: var(--success);
    font-size: 0.66rem;
    font-weight: 800;
    text-align: right;
}

.quiz-attempt-card.is-review .quiz-attempt-status {
    color: var(--warning);
}

.quiz-attempt-answers,
.quiz-admin-attempt-answers {
    border-top: 1px solid var(--border);
}

.quiz-attempt-answer,
.quiz-admin-attempt-answers > article {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 9px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
}

.quiz-attempt-answer:last-child,
.quiz-admin-attempt-answers > article:last-child {
    border-bottom: 0;
}

.quiz-attempt-answer > span,
.quiz-admin-attempt-answers > article > span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 0.65rem;
    font-weight: 900;
}

.quiz-attempt-answer.is-correct > span,
.quiz-admin-attempt-answers > article.is-correct > span {
    background: var(--success-soft);
    color: var(--success);
}

.quiz-attempt-answer small,
.quiz-attempt-answer h3,
.quiz-attempt-answer h4,
.quiz-attempt-answer p,
.quiz-admin-attempt-answers h4,
.quiz-admin-attempt-answers p {
    margin: 0;
}

.quiz-attempt-answer small {
    color: var(--text-muted);
    font-size: 0.58rem;
    font-weight: 780;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.quiz-attempt-answer h3,
.quiz-attempt-answer h4,
.quiz-admin-attempt-answers h4 {
    margin: 2px 0 5px;
    font-size: 0.74rem;
    line-height: 1.4;
}

.quiz-attempt-answer p,
.quiz-admin-attempt-answers p {
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.45;
}

.quiz-answer-explanation {
    margin-top: 5px !important;
    padding-top: 5px;
    border-top: 1px dashed var(--border);
}

.quiz-admin-header {
    align-items: flex-end;
}

.quiz-admin-header > div:first-child > p:not(.section-label) {
    max-width: 62ch;
}

.quiz-editor-layout {
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.3fr);
}

.quiz-question-builder {
    padding: clamp(20px, 3vw, 30px);
}

.quiz-question-stack {
    display: grid;
    gap: 14px;
}

.quiz-question-editor {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
}

.quiz-question-editor.has-validation-error {
    border-color: #cc7d74;
    box-shadow: inset 4px 0 0 var(--danger);
}

.quiz-question-editor > header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: #f7f7f7;
}

.quiz-question-editor > header > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-ink);
    color: var(--brand-yellow);
    font-size: 0.65rem;
    font-weight: 830;
}

.quiz-question-editor > header strong,
.quiz-question-editor > header small {
    display: block;
}

.quiz-question-editor > header strong {
    font-size: 0.8rem;
}

.quiz-question-editor > header small {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 0.62rem;
}

.quiz-question-editor > .form-field {
    padding: 18px 18px 8px;
}

.quiz-options-editor {
    display: grid;
    gap: 9px;
    padding: 8px 18px 4px;
}

.quiz-option-editor {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.quiz-correct-choice {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 760;
    cursor: pointer;
}

.quiz-correct-choice input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--brand-yellow-hover);
}

.quiz-add-option {
    margin: 8px 18px 18px;
}

.quiz-builder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
}

.quiz-question-validation {
    min-height: 18px;
    margin: 0;
    padding: 4px 18px 12px;
    color: var(--danger);
    font-size: 0.67rem;
    font-weight: 700;
}

.quiz-history-safety {
    border-top: 4px solid var(--brand-yellow);
}

.quiz-history-safety h2 {
    margin: 4px 0 8px;
    font-size: 1rem;
}

.quiz-history-safety > p:last-child {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.55;
}

.quiz-metrics-section {
    margin-top: 28px;
    padding: clamp(22px, 3.5vw, 34px);
}

.quiz-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.quiz-metric-grid .metric-card:nth-child(2) {
    background: #fff8dc;
}

.quiz-metric-grid .metric-card:nth-child(4) {
    background: var(--brand-ink);
    color: #ffffff;
}

.quiz-metric-grid .metric-card:nth-child(4) .metric-label,
.quiz-metric-grid .metric-card:nth-child(4) .metric-detail {
    color: #c1c6c9;
}

.quiz-metrics-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.7fr) minmax(570px, 1.3fr);
    gap: 18px;
}

.quiz-distribution-panel,
.quiz-user-metrics,
.quiz-attempt-log {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
}

.quiz-distribution-panel > header,
.quiz-user-metrics > header,
.quiz-attempt-log > header {
    margin-bottom: 17px;
}

.quiz-distribution-panel h3,
.quiz-user-metrics h3,
.quiz-attempt-log h3 {
    margin: 2px 0 0;
    font-size: 1.05rem;
    font-weight: 840;
}

.quiz-attempt-log > header p:not(.section-label) {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.74rem;
}

.quiz-distribution-question + .quiz-distribution-question {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.quiz-distribution-question > small {
    display: block;
    color: var(--text-muted);
    font-size: 0.61rem;
    font-weight: 780;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.quiz-distribution-question h4 {
    margin: 4px 0 12px;
    font-size: 0.78rem;
    line-height: 1.4;
}

.quiz-distribution-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
}

.quiz-distribution-row > span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.quiz-distribution-row strong {
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quiz-distribution-row small {
    color: var(--text-muted);
    font-size: 0.61rem;
    font-weight: 740;
}

.quiz-distribution-row > div {
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--surface-muted);
}

.quiz-distribution-row > div > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand-yellow-hover);
}

.quiz-user-metrics .data-table th,
.quiz-user-metrics .data-table td {
    padding-inline: 10px;
}

.quiz-user-metrics .data-table {
    min-width: 560px;
}

.quiz-attempt-log {
    margin-top: 18px;
}

.quiz-admin-attempt > summary {
    padding: 14px 16px;
}

.quiz-admin-attempt > summary > span:last-child {
    text-align: right;
}

.quiz-admin-attempt-answers > article {
    padding: 14px 16px;
}

@media (max-width: 1100px) {
    .quiz-member-layout,
    .quiz-editor-layout,
    .quiz-metrics-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .quiz-member-sidebar,
    .quiz-editor-sidebar {
        position: static;
    }

    .quiz-member-sidebar,
    .quiz-editor-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quiz-user-metrics {
        min-width: 0;
    }
}

@media (max-width: 820px) {
    .quiz-member-hero {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 18px;
    }

    .quiz-member-symbol {
        width: 48px;
        height: 48px;
    }

    .quiz-member-hero > aside {
        grid-column: 2;
        min-height: 0;
        grid-template-columns: auto auto;
        align-items: end;
        gap: 2px 12px;
        padding: 15px 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        border-left: 0;
    }

    .quiz-member-hero > aside strong {
        grid-row: 1 / span 2;
        margin: 0;
    }

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

@media (max-width: 760px) {
    .module-quiz-callout,
    .module-quiz-admin-card {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 15px;
    }

    .module-quiz-callout .module-quiz-icon,
    .module-quiz-admin-card .module-quiz-icon {
        width: 38px;
        height: 38px;
    }

    .module-quiz-callout .btn,
    .module-quiz-admin-card .btn {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }

    .quiz-breadcrumb {
        align-items: flex-start;
    }

    .quiz-breadcrumb > span {
        display: none;
    }

    .quiz-breadcrumb nav {
        max-width: 100%;
    }

    .quiz-member-hero {
        margin-inline: -4px;
        padding: 24px 20px;
        border-radius: 11px;
    }

    .quiz-member-hero h1 {
        font-size: clamp(1.8rem, 10vw, 2.75rem);
    }

    .quiz-member-sidebar,
    .quiz-editor-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .member-quiz-form > header {
        display: block;
        padding: 20px;
    }

    .member-quiz-form > header > p {
        margin-top: 6px;
    }

    .member-quiz-question {
        padding: 21px 18px;
    }

    .member-quiz-options {
        padding-left: 0;
    }

    .member-quiz-submit {
        display: grid;
        padding: 18px;
    }

    .member-quiz-submit .btn {
        width: 100%;
    }

    .quiz-question-builder,
    .quiz-metrics-section {
        margin-inline: -4px;
        padding: 20px 14px;
        border-radius: 10px;
    }

    .quiz-question-editor > header {
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 13px;
    }

    .quiz-question-editor > header .button-text {
        grid-column: 2;
        width: auto;
        justify-self: start;
    }

    .quiz-question-editor > .form-field,
    .quiz-options-editor {
        padding-inline: 13px;
    }

    .quiz-add-option {
        margin-inline: 13px;
    }

    .quiz-question-validation {
        padding-inline: 13px;
    }

    .quiz-option-editor {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .quiz-option-editor .button-text {
        grid-column: 2;
        justify-self: start;
    }

    .quiz-builder-actions {
        display: grid;
    }

    .quiz-builder-actions .btn {
        width: 100%;
    }

    .quiz-distribution-panel,
    .quiz-user-metrics,
    .quiz-attempt-log {
        padding: 17px 14px;
    }

    .quiz-user-metrics .data-table.responsive-table-ready {
        width: 100%;
        min-width: 0;
    }

    .quiz-admin-attempt > summary {
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .quiz-member-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .quiz-member-symbol {
        width: 44px;
        height: 44px;
    }

    .quiz-member-hero > aside {
        grid-column: 1;
    }

    .quiz-metric-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .quiz-distribution-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
    }

    .quiz-attempt-card > summary,
    .quiz-admin-attempt > summary {
        display: grid;
    }

    .quiz-admin-attempt > summary > span:last-child,
    .quiz-attempt-status {
        text-align: left;
    }
}
