/* ElimuKit Stitch-inspired foundation styles. */

:root {
    --canvas: #faf8ff;
    --surface: #ffffff;
    --surface-soft: #f2f3ff;
    --ink: #131b2e;
    --muted: #444651;
    --outline: #c5c5d3;
    --primary: #1e3a8a;
    --primary-deep: #00236f;
    --teal: #0d9488;
    --teal-soft: #ccfbf1;
    --amber: #f59e0b;
    --amber-soft: #fef3c7;
    --success: #10b981;
    --shadow: 0 1px 3px rgb(15 23 42 / 5%), 0 1px 2px rgb(15 23 42 / 3%);
    --radius-md: 16px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: Inter, system-ui, sans-serif;
    line-height: 1.5;
    /* Asynchronous content (resource pages, schemes, notifications) settles at different times. When
       the browser is allowed to pick its own scroll anchor, a late-arriving block above the viewport
       makes it silently re-scroll the page, which the user experiences as the screen moving under
       them. ElimuKit keeps its own, explicit scroll bookkeeping in render(), so the browser's
       heuristic is disabled here. */
    overflow-anchor: none;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button,
.primary-button,
.secondary-button,
.outline-button {
    min-height: 48px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -4rem;
    z-index: 10;
    background: var(--primary);
    color: #fff;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    align-items: center;
    background: rgb(255 255 255 / 90%);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    padding: .9rem clamp(1rem, 4vw, 3rem);
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(12px);
}

.brand {
    align-items: center;
    display: inline-flex;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    gap: .6rem;
}

.brand-mark {
    align-items: center;
    background: var(--primary);
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    font-size: .72rem;
    height: 34px;
    justify-content: center;
    letter-spacing: -.04em;
    width: 34px;
}

.desktop-nav {
    display: flex;
    gap: 1.5rem;
    margin-left: auto;
}

.desktop-nav a {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 600;
}

.desktop-nav a:hover {
    color: var(--primary);
}

.outline-button,
.secondary-button {
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius-sm);
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    font: inherit;
    font-weight: 600;
}

.shell {
    margin: 0 auto;
    max-width: 1280px;
    padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 4vw, 3rem) 7rem;
}

.hero {
    align-items: center;
    display: grid;
    gap: clamp(2rem, 6vw, 5rem);
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    min-height: 440px;
}

.eyebrow {
    color: var(--teal);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    margin: 0 0 .7rem;
    text-transform: uppercase;
}

h1,
h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.2;
    margin: 0;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -.045em;
    max-width: 680px;
}

h2 {
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.hero-copy {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 1.4rem 0 1.8rem;
    max-width: 610px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.primary-button,
.secondary-button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    padding: 0 1.1rem;
}

.primary-button {
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 700;
}

.primary-button:hover {
    background: #1e40af;
}

.secondary-button:hover,
.outline-button:hover {
    border-color: var(--teal);
    background: #f8fafc;
}

.verification-card,
.tool-card,
.info-card {
    background: var(--surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.verification-card {
    padding: clamp(1.25rem, 4vw, 2rem);
}

.verification-card h2 {
    font-size: 1.25rem;
    margin: 1.3rem 0 .7rem;
}

.verification-card p,
.info-card p,
.split-section>div>p:last-child {
    color: var(--muted);
}

.verification-card a {
    color: var(--primary);
    font-size: .9rem;
    font-weight: 700;
}

.status-badge {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    color: #065f46;
    display: inline-flex;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: .45rem .7rem;
    text-transform: uppercase;
}

.section {
    margin-top: clamp(3.5rem, 8vw, 7rem);
}

.section-heading {
    margin-bottom: 1.5rem;
}

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

.tool-card {
    align-items: center;
    display: grid;
    gap: .85rem;
    grid-template-columns: auto 1fr auto;
    min-height: 138px;
    padding: 1.15rem;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

.tool-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 20px rgb(30 58 138 / 9%);
}

.tool-card strong,
.tool-card small {
    display: block;
}

.tool-card strong {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .95rem;
}

.tool-card small {
    color: var(--muted);
    font-size: .78rem;
    margin-top: .35rem;
}

.icon-tile {
    align-items: center;
    border-radius: 12px;
    display: inline-flex;
    font-size: 1.25rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.icon-tile.blue {
    background: #eff6ff;
    color: var(--primary);
}

.icon-tile.teal {
    background: var(--teal-soft);
    color: #006a61;
}

.icon-tile.amber {
    background: var(--amber-soft);
    color: #92400e;
}

.icon-tile.slate {
    background: #f1f5f9;
    color: #475569;
}

.split-section {
    align-items: center;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1.15fr .85fr;
}

.split-section>div>p:last-child {
    line-height: 1.7;
    max-width: 680px;
}

.info-card {
    padding: 1.4rem;
}

.info-line {
    align-items: center;
    display: flex;
    gap: .65rem;
}

.dot {
    border-radius: 50%;
    display: inline-block;
    height: 10px;
    width: 10px;
}

.dot.amber {
    background: var(--amber);
}

.mobile-dock {
    display: none;
}

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

    .hero {
        grid-template-columns: 1fr .85fr;
    }
}

@media (max-width: 700px) {
    .site-header {
        padding: .75rem 1rem;
    }

    .desktop-nav {
        display: none;
    }

    .site-header .outline-button {
        min-height: 42px;
    }

    .shell {
        padding-top: 2.5rem;
    }

    .hero,
    .split-section {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 0;
    }

    .hero-copy {
        font-size: .98rem;
    }

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

    .tool-card {
        min-height: 92px;
    }

    .mobile-dock {
        align-items: stretch;
        background: rgb(255 255 255 / 96%);
        border-top: 1px solid #e2e8f0;
        bottom: 0;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        left: 0;
        padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
        position: fixed;
        right: 0;
        z-index: 6;
    }

    .mobile-dock a {
        align-items: center;
        color: #64748b;
        display: flex;
        flex-direction: column;
        font-size: 1.1rem;
        gap: .05rem;
        justify-content: center;
        min-height: 56px;
    }

    .mobile-dock span {
        font-size: .68rem;
        font-weight: 600;
    }

    .mobile-dock .active {
        color: var(--primary);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* Phase 4 Stitch system */
:root {
    --canvas: #faf8ff;
    --surface: #fff;
    --surface-low: #f2f3ff;
    --surface-high: #e2e7ff;
    --ink: #131b2e;
    --muted: #444651;
    --outline: #c5c5d3;
    --primary: #00236f;
    --primary-container: #1e3a8a;
    --teal: #006a61;
    --teal-container: #86f2e4;
    --amber: #ef9900;
    --amber-bg: #ffddb8;
    --danger: #ba1a1a;
    --shadow: 0 1px 8px rgb(15 23 42/.06);
    --radius: 12px
}

.legacy-shell {
    display: none
}

.legacy-material-icon {
    font-size: 20px;
    line-height: 1;
    vertical-align: middle
}

.container {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1
}

.logo small {
    display: block;
    color: #64748b;
    font: 600 8px Inter, sans-serif;
    letter-spacing: .12em;
    margin-top: 6px
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #1e3a8a, #0d9488);
    font-size: 11px
}

.logo-accent {
    color: #0d9488
}

.public-header {
    height: 72px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #e5e7f1;
    position: sticky;
    top: 0;
    z-index: 10
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 30px
}

.public-nav {
    display: flex;
    gap: 24px;
    margin: auto;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600
}

.public-nav a:hover,
.text-link {
    color: var(--primary)
}

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

.menu-toggle,
.mobile-menu {
    display: none;
    background: none;
    border: 0
}

.button {
    border: 1px solid transparent;
    border-radius: 8px;
    min-height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: 600 13px Inter, sans-serif;
    cursor: pointer;
    text-decoration: none
}

.button-primary {
    background: var(--primary-container);
    color: #fff
}

.button-primary:hover {
    background: var(--primary)
}

.button-secondary {
    background: #fff;
    color: var(--ink);
    border-color: var(--outline)
}

.button-ghost {
    background: transparent;
    color: var(--primary)
}

.button-large {
    min-height: 50px;
    padding-inline: 20px
}

.button-full {
    width: 100%
}

.small-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px
}

.public-page {
    background: var(--canvas);
    min-height: 100vh
}

.hero-public {
    background: linear-gradient(180deg, var(--surface-low), var(--canvas));
    padding: 88px 0 110px
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 70px
}

.trust-chip,
.hero-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase
}

.trust-chip {
    background: #d9faf3;
    border-radius: 999px;
    padding: 8px 12px
}

.hero-public h1 {
    font: 700 clamp(42px, 6vw, 68px)/1.08 'Plus Jakarta Sans';
    letter-spacing: -.05em;
    margin: 20px 0
}

.hero-public h1 em {
    font-style: normal;
    color: var(--primary-container);
    text-decoration: underline;
    text-decoration-color: var(--teal-container);
    text-decoration-thickness: 5px;
    text-underline-offset: 9px
}

.hero-public p {
    max-width: 590px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 28px 0
}

.hero-note {
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0
}

.hero-art {
    min-height: 410px;
    position: relative
}

.art-card {
    position: absolute;
    inset: 35px 25px 20px 25px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 60px #00236f20;
    padding: 26px;
    transform: rotate(2deg)
}

.art-top {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid #eef0ff;
    padding-bottom: 18px
}

.window-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c5c5d3
}

.window-dot:first-child {
    background: #ef9900
}

.art-line {
    height: 12px;
    background: #e2e7ff;
    border-radius: 5px;
    width: 62%;
    margin-top: 35px
}

.art-line.wide {
    width: 85%;
    height: 20px;
    background: #1e3a8a;
    margin-top: 28px
}

.art-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 30px
}

.art-grid span {
    height: 72px;
    border-radius: 10px;
    background: #f2f3ff;
    border-left: 5px solid #0d9488
}

.art-badge {
    position: absolute;
    bottom: 25px;
    left: 26px;
    color: var(--teal);
    font-weight: 700;
    font-size: 12px
}

.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 13px;
    border-radius: 12px;
    box-shadow: 0 12px 24px #00236f18;
    font-size: 12px
}

.float-card .legacy-material-icon {
    color: var(--primary);
    background: #e2e7ff;
    padding: 9px;
    border-radius: 9px
}

.float-card b,
.float-card small {
    display: block
}

.float-card small {
    color: var(--muted);
    margin-top: 4px
}

.float-one {
    top: 36px;
    right: -5px
}

.float-two {
    bottom: 20px;
    left: -12px
}

.section {
    padding: 90px 0
}

.workflow {
    background: var(--surface-low)
}

.center-heading {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 35px
}

.eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .13em;
    font-weight: 700;
    color: var(--teal);
    margin: 0 0 9px
}

.center-heading h2,
.feature-band h2,
.page h1 {
    font: 700 30px/1.25 'Plus Jakarta Sans';
    margin: 0;
    color: var(--ink)
}

.center-heading p:not(.eyebrow),
.feature-band p {
    color: var(--muted)
}

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

.workflow-grid>div,
.feature-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow)
}

.workflow-grid .legacy-material-icon,
.feature-card .icon-tile {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--surface-high);
    color: var(--primary);
    margin-bottom: 18px
}

.workflow-grid b,
.workflow-grid span {
    display: block
}

.workflow-grid span {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px
}

.feature-band {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 80px;
    align-items: center
}

.feature-list {
    display: grid;
    gap: 13px
}

.feature-list>div {
    display: flex;
    gap: 13px;
    background: #fff;
    padding: 18px;
    border-radius: 11px;
    box-shadow: var(--shadow)
}

.feature-list .legacy-material-icon {
    color: var(--teal);
    background: #d9faf3;
    padding: 10px;
    border-radius: 9px
}

.feature-list b,
.feature-list small {
    display: block
}

.feature-list small {
    color: var(--muted);
    margin-top: 5px
}

.cta-section {
    background: var(--primary-container);
    color: #fff;
    padding: 70px 0
}

.cta-section .eyebrow {
    color: var(--teal-container)
}

.cta-section h2 {
    color: #fff
}

.cta-section p {
    color: #dce1ff
}

.public-footer {
    padding: 28px 0;
    background: #fff
}

.public-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px
}

.public-content {
    padding-block: 60px 90px
}

.page-intro {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 25px;
    margin: 34px 0
}

.page-intro h1 {
    font-size: 32px
}

.intro-copy {
    color: var(--muted);
    max-width: 620px;
    margin: 10px 0 0
}

.intro-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0
}

.public-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 40px 0
}

.feature-card h2 {
    font: 600 18px 'Plus Jakarta Sans'
}

.feature-card p {
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px
}

.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.blue {
    background: #e2e7ff !important;
    color: var(--primary) !important
}

.teal {
    background: #d9faf3 !important;
    color: var(--teal) !important
}

.amber {
    background: #fff0d9 !important;
    color: #8a5200 !important
}

.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--surface-low), #fff);
    display: grid;
    place-items: center;
    padding: 30px
}

.auth-brand {
    position: absolute;
    top: 30px;
    left: 30px
}

.auth-card {
    width: min(430px, 100%);
    background: #fff;
    padding: 38px;
    border-radius: 16px;
    box-shadow: 0 15px 50px #00236f12
}

.auth-card h1 {
    font: 700 27px 'Plus Jakarta Sans';
    margin: 8px 0
}

.muted {
    color: var(--muted);
    font-size: 13px
}

.stack-form {
    display: grid;
    gap: 17px
}

.stack-form label,
.filter-bar label,
.upload-layout>label,
.profile-panel label {
    display: grid;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted)
}

input,
select,
textarea {
    font: 400 14px Inter, sans-serif;
    border: 1px solid var(--outline);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 11px 12px;
    min-height: 43px;
    width: 100%
}

textarea {
    resize: vertical
}

.check-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center
}

.check-row input {
    width: auto;
    min-height: auto
}

.auth-switch {
    text-align: center;
    font-size: 13px
}

.auth-switch a {
    color: var(--primary);
    font-weight: 700
}

.auth-note {
    font-size: 11px;
    color: var(--muted);
    background: var(--surface-low);
    border-radius: 8px;
    padding: 11px;
    display: flex;
    gap: 8px
}

.auth-tabs {
    display: flex;
    gap: 4px;
    margin: 16px 0 12px;
    background: var(--surface-low);
    border-radius: 9px;
    padding: 4px
}

.auth-tabs .tab {
    flex: 1;
    text-align: center
}

.google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700
}

.google-button .google-mark {
    flex: 0 0 auto
}

.google-button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px
}

.app-shell {
    min-height: 100vh;
    background: var(--canvas)
}

.sidebar {
    width: 255px;
    height: 100vh;
    background: #fff;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 15;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 22px 14px;
    box-shadow: var(--shadow);
    scrollbar-gutter: stable;
}

.side-top>.logo {
    padding: 0 10px 30px
}

.nav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #757682;
    font-weight: 700;
    padding: 0 12px;
    margin: 0 0 7px
}

.nav-gap {
    margin-top: 25px
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    margin: 2px 0
}

.nav-item:hover {
    background: var(--surface-low);
    color: var(--ink)
}

.nav-item.active {
    background: var(--primary-container);
    color: #fff
}

.side-footer {
    padding: 12px;
    font-size: 11px;
    color: var(--muted)
}

.side-footer p {
    line-height: 1.5
}

.profile-link {
    display: block;
    font-weight: 700;
    color: var(--primary);
    padding-top: 10px
}

.side-signout {
    display: flex;
    width: 100%;
    margin-top: 12px;
    justify-content: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap
}

.badge-neutral {
    background: #eef0f7;
    color: var(--muted)
}

.badge-blue {
    background: #e2e7ff;
    color: var(--primary)
}

.badge-teal {
    background: #d9faf3;
    color: var(--teal)
}

.badge-amber {
    background: #fff0d9;
    color: #8a5200
}

.badge-error {
    background: #fde8e8;
    color: #b91c1c;
}

.button-error {
    background: #b91c1c;
    color: #fff;
    border: 1px solid transparent;
}

.button-error:hover {
    background: #991b1b;
}

.confirm-box {
    margin-top: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.moderation-review-panel {
    margin-top: 24px;
}

.app-main {
    margin-left: 255px;
    padding-top: 72px
}

.app-header {
    position: fixed;
    top: 0;
    left: 255px;
    right: 0;
    height: 72px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #e5e7f1;
}

.search-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #757682
}

.search-mini input {
    border: 0;
    background: transparent;
    min-height: 35px;
    width: 230px
}

.avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    width: 35px;
    height: 35px
}

.avatar.small {
    width: 25px;
    height: 25px;
    font-size: 9px
}

.avatar.large {
    width: 64px;
    height: 64px;
    font-size: 18px
}

.icon-button {
    color: var(--muted);
    padding: 8px
}

.page {
    padding-block: 24px 80px
}

.state-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-radius: 10px;
    padding: 15px;
    margin: 18px 0;
    font-size: 13px
}

.state-card>.legacy-material-icon {
    flex-shrink: 0
}

.state-card strong {
    display: block
}

.state-card p {
    margin: 4px 0 0;
    color: inherit;
    opacity: .85;
    line-height: 1.5
}

.state-card.warning {
    background: #fff5df;
    color: #795000
}

.state-card.info {
    background: #e8f0ff;
    color: #17366e
}

.state-card.success {
    background: #dff9f1;
    color: #075e56
}

.state-card.error {
    background: #ffe9e6;
    color: #8e1c1c
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 25px 0
}

.stat-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff;
    padding: 18px;
    border-radius: 11px;
    box-shadow: var(--shadow)
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border-radius: 9px;
    background: var(--surface-high);
    color: var(--primary)
}

.stat-icon.teal {
    background: #d9faf3;
    color: var(--teal)
}

.stat-icon.amber {
    background: #fff0d9;
    color: #8a5200
}

.stat-card strong,
.stat-card small {
    display: block
}

.stat-card strong {
    font: 700 22px 'Plus Jakarta Sans';
    margin: 3px 0
}

.stat-card small {
    font-size: 11px;
    color: var(--muted)
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px
}

.panel {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: var(--shadow)
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px
}

.panel h2 {
    font: 600 19px 'Plus Jakarta Sans';
    margin: 0
}

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

.list-item,
.notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #eef0f7
}

.list-item>span:nth-child(2),
.notification>span {
    flex: 1
}

.list-item b,
.list-item small,
.notification b,
.notification small {
    display: block
}

.list-item small,
.notification small {
    color: var(--muted);
    font-size: 11px;
    margin-top: 4px
}

.quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.quick-action {
    min-height: 75px;
    background: var(--surface-low);
    color: var(--primary);
    border: 0;
    display: flex;
    flex-direction: column
}

.quick-action .legacy-material-icon {
    font-size: 25px
}

.tabs {
    display: flex;
    gap: 4px
}

.tab {
    border: 0;
    background: transparent;
    padding: 8px 12px;
    border-radius: 7px;
    color: var(--muted);
    font: 600 12px Inter;
    cursor: pointer
}

.tab.active {
    background: var(--surface-high);
    color: var(--primary)
}

.empty-state {
    text-align: center;
    padding: 55px 20px;
    color: var(--muted)
}

.empty-state .legacy-material-icon {
    font-size: 40px;
    color: #9aa2bc
}

.empty-state h3 {
    color: var(--ink);
    font: 600 18px 'Plus Jakarta Sans';
    margin: 12px 0 5px
}

.empty-state p {
    font-size: 13px;
    margin: 0 auto 18px
}

.empty-state.compact {
    padding: 35px
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1.5fr;
    gap: 12px;
    background: #fff;
    padding: 16px;
    border-radius: 11px;
    box-shadow: var(--shadow)
}

.resource-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px
}

.filter-panel {
    background: #fff;
    border-radius: 11px;
    padding: 18px;
    box-shadow: var(--shadow);
    align-self: start
}

.filter-panel h3 {
    font: 600 17px 'Plus Jakarta Sans';
    margin: 0 0 18px
}

.filter-panel label {
    display: grid;
    gap: 7px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 13px
}

.low-bandwidth {
    background: var(--surface-low);
    padding: 12px;
    border-radius: 8px;
    color: var(--teal);
    font-size: 11px
}

.low-bandwidth b,
.low-bandwidth small {
    display: block
}

.low-bandwidth small {
    color: var(--muted);
    margin-top: 5px
}

.results-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 12px
}

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

.resource-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden
}

.resource-thumb {
    height: 130px;
    background: #e2e7ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative
}

.resource-thumb .legacy-material-icon {
    font-size: 48px
}

.resource-thumb span {
    position: absolute;
    bottom: 10px;
    left: 12px;
    background: #fff;
    padding: 4px 7px;
    border-radius: 5px;
    font-size: 10px
}

.teal-bg {
    background: #d9faf3;
    color: var(--teal)
}

.amber-bg {
    background: #fff0d9;
    color: #8a5200
}

.resource-body {
    padding: 16px
}

.resource-body h3 {
    font: 600 16px/1.35 'Plus Jakarta Sans';
    margin: 11px 0 7px
}

.resource-body p {
    font-size: 12px;
    line-height: 1.5
}

.resource-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    border-top: 1px solid #eef0f7;
    padding-top: 12px;
    margin-top: 15px
}

.card-actions {
    display: flex;
    gap: 7px;
    margin-top: 13px
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    border-radius: 10px;
    padding: 6px 8px 6px 14px;
    box-shadow: var(--shadow);
    margin-bottom: 20px
}

.search-bar input {
    border: 0
}

.search-bar.large {
    max-width: 800px;
    margin: 30px 0
}

.upload-layout {
    max-width: 700px;
    display: grid;
    gap: 16px
}

.dropzone {
    border: 2px dashed #b7bfdc;
    border-radius: 12px;
    text-align: center;
    padding: 38px 20px;
    color: var(--muted)
}

.dropzone .legacy-material-icon {
    font-size: 40px;
    color: var(--primary)
}

.dropzone h2 {
    font: 600 18px 'Plus Jakarta Sans';
    color: var(--ink)
}

.dropzone input {
    border: 0;
    margin-top: 10px
}

.wizard {
    max-width: 700px
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    color: #757682;
    font-size: 12px
}

.wizard-steps span {
    display: flex;
    align-items: center;
    gap: 8px
}

.wizard-steps span:before {
    content: '';
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e2e7ff;
    color: var(--primary);
    font-weight: 700
}

.wizard-steps .active {
    color: var(--primary)
}

.wizard-steps .active:before {
    background: var(--primary);
    color: #fff
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px
}

.editor-layout {
    display: grid;
    grid-template-columns: 1.5fr .7fr;
    gap: 18px
}

.editor-canvas {
    display: grid;
    gap: 16px
}

.editor-toolbar {
    display: flex;
    justify-content: space-between
}

.editor-layout aside {
    align-self: start
}

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

.provenance-list>div {
    border: 1px solid #e5e7f1;
    border-radius: 8px;
    padding: 14px
}

.provenance-list b,
.provenance-list span {
    display: block
}

.provenance-list span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 5px
}

.connection-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: #d9faf3;
    color: var(--teal);
    margin-bottom: 18px
}

.timeline {
    display: grid;
    gap: 20px
}

.timeline>div {
    display: grid;
    grid-template-columns: 30px 1fr;
    column-gap: 10px
}

.timeline .legacy-material-icon {
    grid-row: span 2;
    color: var(--teal)
}

.timeline small {
    color: var(--muted);
    font-size: 11px
}

.table-wrap {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

th,
td {
    text-align: left;
    padding: 13px;
    border-bottom: 1px solid #eef0f7
}

th {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em
}

.profile-panel {
    max-width: 650px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center
}

.profile-panel hr {
    grid-column: 1/-1;
    width: 100%;
    border: 0;
    border-top: 1px solid #eef0f7
}

.profile-panel label {
    grid-column: 1/-1
}

.profile-panel button {
    justify-self: start
}

.mobile-dock {
    display: none
}

@media(max-width:1000px) {
    .public-nav {
        display: none
    }

    .menu-toggle,
    .mobile-menu {
        display: block
    }

    .hero-grid,
    .feature-band {
        grid-template-columns: 1fr;
        gap: 35px
    }

    .hero-art {
        max-width: 600px;
        width: 100%;
        margin: auto
    }

    .workflow-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .sidebar {
        width: 220px;
        overflow-y: auto;
    }

    .app-main {
        margin-left: 220px
    }

    .app-header {
        left: 220px
    }

    .container {
        width: min(100% - 32px, 1180px)
    }
}

@media(max-width:700px) {
    .container {
        width: calc(100% - 32px)
    }

    .public-header {
        height: 64px
    }

    .header-actions .button-primary {
        display: none
    }

    .hero-public {
        padding: 55px 0 70px
    }

    .hero-public h1 {
        font-size: 43px
    }

    .hero-public p {
        font-size: 15px
    }

    .hero-art {
        min-height: 300px
    }

    .art-card {
        inset: 15px 10px
    }

    .float-one {
        right: -8px;
        top: 5px
    }

    .float-two {
        left: -7px;
        bottom: 4px
    }

    .section {
        padding: 60px 0
    }

    .workflow-grid,
    .public-cards,
    .stat-grid,
    .two-col,
    .resource-layout,
    .editor-layout {
        grid-template-columns: 1fr
    }

    .feature-band {
        gap: 25px
    }

    .public-footer .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px
    }

    .auth-brand {
        top: 18px;
        left: 18px
    }

    .auth-page {
        padding: 85px 16px 25px
    }

    .auth-card {
        padding: 25px 20px
    }

    .sidebar {
        display: none
    }

    .app-main {
        margin-left: 0;
        padding-top: 64px
    }

    .app-header {
        left: 0;
        height: 64px;
        padding: 0 16px
    }

    .mobile-menu {
        margin-right: 7px
    }

    .search-mini input {
        width: 150px
    }

    .page {
        padding-top: 10px;
        padding-bottom: 90px
    }

    .page-intro {
        display: block;
        margin: 28px 0 20px
    }

    .page-intro h1 {
        font-size: 27px
    }

    .intro-actions {
        margin-top: 15px
    }

    .intro-actions .button {
        width: 100%
    }

    .filter-bar {
        grid-template-columns: 1fr
    }

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

    .panel {
        padding: 17px
    }

    .mobile-dock {
        display: grid;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 66px;
        background: #fff;
        z-index: 20;
        border-top: 1px solid #e5e7f1;
        grid-template-columns: repeat(5, 1fr);
        padding-bottom: env(safe-area-inset-bottom)
    }

    .mobile-dock a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #757682;
        font-size: 10px
    }

    .mobile-dock a .legacy-material-icon {
        font-size: 21px
    }

    .mobile-dock a:hover {
        color: var(--primary)
    }

    .profile-panel {
        grid-template-columns: auto 1fr
    }

    .profile-panel>.badge {
        grid-column: 1/-1
    }

    .table-wrap {
        margin-inline: -17px
    }

    .table-wrap table {
        min-width: 570px
    }

    .wizard-steps b {
        display: none
    }

    .search-bar {
        padding-left: 10px
    }

    .search-bar .button {
        padding-inline: 10px
    }

    .quick-grid {
        grid-template-columns: 1fr 1fr
    }
}

@media(prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important
    }
}

/* Phase 4A fidelity correction: landing page follows Stitch landing composition */
.stitch-landing {
    background: var(--canvas)
}

.stitch-landing .public-header {
    height: 64px;
    background: rgba(250, 248, 255, .82)
}

.stitch-landing .header-inner {
    max-width: 1180px
}

.stitch-landing .public-nav {
    gap: 8px
}

.stitch-landing .public-nav a {
    padding: 7px 10px;
    border-radius: 8px
}

.stitch-landing .public-nav a:first-child {
    background: var(--primary-container);
    color: #fff
}

.stitch-landing .header-actions .button-primary {
    display: none
}

.stitch-hero {
    padding: 32px 0 82px;
    background: linear-gradient(180deg, var(--surface-low), var(--canvas), var(--surface));
    overflow: hidden
}

.stitch-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 52px
}

.stitch-hero-copy h1 {
    font: 700 clamp(38px, 4.4vw, 52px)/1.15 'Plus Jakarta Sans';
    letter-spacing: -.04em;
    margin: 18px 0 16px
}

.stitch-hero-copy h1 em {
    font-style: normal;
    color: var(--primary-container);
    text-decoration: underline;
    text-decoration-color: var(--teal);
    text-decoration-thickness: 4px;
    text-underline-offset: 8px
}

.stitch-hero-copy>p {
    font: 400 16px/26px Inter;
    color: var(--muted);
    max-width: 560px
}

.stitch-hero-copy .trust-chip {
    background: rgba(134, 242, 228, .5);
    color: var(--teal);
    font-size: 11px;
    padding: 7px 12px
}

.stitch-hero-visual {
    height: 420px;
    position: relative
}

.stitch-hero-visual>img {
    height: 420px;
    width: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block
}

.visual-shade {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 35, 111, .8))
}

.stitch-proof {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px
}

.proof-avatars {
    display: flex
}

.proof-avatars i {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-left: -6px;
    border: 2px solid var(--canvas);
    border-radius: 50%;
    background: var(--primary-container);
    color: #fff;
    font: 700 10px Inter;
    font-style: normal
}

.proof-avatars i:first-child {
    margin-left: 0;
    background: var(--teal)
}

.proof-avatars i:last-child {
    background: var(--amber)
}

.stitch-proof b,
.stitch-proof small {
    display: block
}

.stitch-proof b {
    font-size: 12px
}

.stitch-proof small {
    color: var(--muted);
    font-size: 11px;
    margin-top: 3px
}

.hero-float {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(255, 255, 255, .95);
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .16);
    font-size: 11px
}

.hero-float .legacy-material-icon {
    color: #fff;
    background: var(--primary-container);
    padding: 8px;
    border-radius: 8px
}

.hero-float b,
.hero-float small {
    display: block
}

.hero-float small {
    color: var(--muted);
    font-size: 10px;
    margin-top: 3px
}

.hero-float-one {
    left: -18px;
    bottom: 24px
}

.hero-float-two {
    right: -14px;
    top: 24px;
    color: var(--ink)
}

.hero-float-two .legacy-material-icon {
    background: var(--teal)
}

.stitch-workflow {
    padding: 34px 0 40px;
    background: var(--surface-low)
}

.section-kicker {
    display: block;
    color: var(--primary);
    font: 700 11px/14px Inter;
    letter-spacing: .13em;
    text-transform: uppercase
}

.center-heading h2,
.section-row-heading h2,
.stitch-integrity h2,
.stitch-whatsapp h2 {
    font-family: 'Plus Jakarta Sans';
    font-weight: 700
}

.center-heading h2 {
    font-size: 30px;
    line-height: 38px
}

.stitch-step-grid {
    display: grid;
    grid-template-columns: 1fr 42px 1fr 42px 1fr;
    gap: 12px;
    align-items: center
}

.stitch-step-grid>div {
    padding: 18px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center
}

.stitch-step-grid>div>.legacy-material-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--surface-high);
    color: var(--primary)
}

.stitch-step-grid>div:nth-of-type(2)>.legacy-material-icon {
    background: var(--teal-container);
    color: var(--teal)
}

.stitch-step-grid b,
.stitch-step-grid span {
    display: block
}

.stitch-step-grid b {
    font-size: 12px
}

.stitch-step-grid span {
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px
}

.step-arrow {
    text-align: center;
    color: #9aa2bc
}

.stitch-features {
    padding: 56px 0 64px;
    background: var(--surface)
}

.section-row-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 28px
}

.section-row-heading>p {
    max-width: 400px;
    color: var(--muted);
    font-size: 13px;
    line-height: 20px;
    margin: 0
}

.teal-kicker {
    color: var(--teal)
}

.stitch-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px
}

.stitch-feature-grid article {
    display: flex;
    flex-direction: column;
    min-height: 290px;
    padding: 22px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow)
}

.stitch-feature-grid article>.legacy-material-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 9px;
    background: var(--surface-high);
    color: var(--primary);
    font-size: 27px;
    margin-bottom: 18px
}

.stitch-feature-grid article:nth-child(3)>.legacy-material-icon {
    background: rgba(134, 242, 228, .55);
    color: var(--teal)
}

.stitch-feature-grid h3 {
    font: 700 18px/26px 'Plus Jakarta Sans';
    margin: 0 0 7px
}

.stitch-feature-grid p {
    font-size: 13px;
    line-height: 20px;
    color: var(--muted);
    margin: 0
}

.stitch-feature-grid a {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 20px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700
}

.stitch-feature-grid a .legacy-material-icon {
    font-size: 16px
}

.stitch-integrity {
    padding: 40px 0;
    background: var(--primary-container);
    color: #fff
}

.integrity-inner {
    display: flex;
    align-items: center;
    gap: 18px
}

.integrity-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    flex: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, .12);
    color: var(--teal-container)
}

.integrity-inner h2 {
    font-size: 24px;
    line-height: 32px;
    margin: 3px 0 5px
}

.integrity-inner p {
    font-size: 13px;
    line-height: 20px;
    color: var(--primary-fixed);
    margin: 0;
    max-width: 650px
}

.integrity-inner .button {
    margin-left: auto;
    white-space: nowrap
}

.light-kicker {
    color: var(--primary-fixed)
}

.stitch-resources {
    padding: 54px 0;
    background: var(--surface-low)
}

.landing-resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px
}

.landing-resource-grid article {
    padding: 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow);
    position: relative
}

.landing-resource-grid article>.legacy-material-icon {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    margin-bottom: 17px;
    border-radius: 9px;
    background: var(--surface-high);
    color: var(--primary)
}

.landing-resource-grid article:nth-child(2)>.legacy-material-icon {
    background: var(--teal-container);
    color: var(--teal)
}

.landing-resource-grid article:nth-child(3)>.legacy-material-icon {
    background: var(--amber-bg);
    color: #8a5200
}

.resource-chip {
    display: inline-block;
    padding: 4px 7px;
    background: var(--surface-high);
    color: var(--primary);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700
}

.teal-chip {
    background: var(--teal-container);
    color: var(--teal)
}

.amber-chip {
    background: var(--amber-bg);
    color: #8a5200
}

.landing-resource-grid h3 {
    font: 700 16px/22px 'Plus Jakarta Sans';
    margin: 11px 0 5px
}

.landing-resource-grid p {
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 15px
}

.landing-resource-grid article>div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #eef0f7;
    padding-top: 12px
}

.landing-resource-grid article>div:last-child a {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700
}

.landing-resource-grid article>div:last-child a .legacy-material-icon {
    font-size: 15px
}

.stitch-whatsapp {
    padding: 55px 0;
    background: var(--surface)
}

.whatsapp-grid {
    display: grid;
    grid-template-columns: 1fr .8fr;
    gap: 70px;
    align-items: center
}

.stitch-whatsapp h2 {
    font-size: 30px;
    line-height: 38px;
    margin: 7px 0 10px
}

.stitch-whatsapp p {
    color: var(--muted);
    font-size: 14px;
    line-height: 22px;
    max-width: 600px
}

.wa-steps {
    display: grid;
    gap: 14px;
    margin-top: 24px
}

.wa-steps>div {
    display: flex;
    gap: 11px;
    align-items: flex-start
}

.wa-steps .legacy-material-icon {
    color: var(--teal);
    font-size: 22px
}

.wa-steps b,
.wa-steps small {
    display: block
}

.wa-steps small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px
}

.wa-card {
    padding: 20px;
    background: var(--surface-low);
    border-radius: 14px;
    box-shadow: var(--shadow)
}

.wa-card-head {
    display: flex;
    align-items: center;
    gap: 10px
}

.wa-avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--teal-container);
    color: var(--teal);
    font-size: 11px;
    font-weight: 700
}

.wa-card-head b,
.wa-card-head small {
    display: block
}

.wa-card-head small {
    color: var(--teal);
    font-size: 10px;
    margin-top: 3px
}

.wa-bubble {
    margin: 22px 0 12px;
    padding: 12px;
    background: #fff;
    border-radius: 9px;
    color: var(--muted);
    font-size: 12px
}

.wa-status {
    padding: 9px;
    background: rgba(134, 242, 228, .3);
    border-radius: 8px;
    color: var(--teal);
    font-size: 11px;
    display: flex;
    gap: 6px
}

.stitch-stats {
    padding: 38px 0;
    border-block: 1px solid #e2e7ff;
    background: #fff
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center
}

.stats-grid>div {
    padding: 8px 20px;
    border-right: 1px solid #e2e7ff
}

.stats-grid>div:last-child {
    border: 0
}

.stats-grid strong {
    display: block;
    font: 700 36px/44px 'Plus Jakarta Sans';
    color: var(--primary)
}

.stats-grid>div:nth-child(2) strong {
    color: var(--primary-container)
}

.stats-grid>div:nth-child(3) strong {
    color: var(--teal)
}

.stats-grid b {
    display: block;
    font: 600 18px/26px 'Plus Jakarta Sans';
    margin-top: 4px
}

.stats-grid p {
    font-size: 12px;
    color: var(--muted);
    margin: 5px 0 0
}

.stitch-final-cta {
    padding: 62px 0;
    background: var(--surface)
}

.stitch-final-cta h2 {
    font: 700 36px/44px 'Plus Jakarta Sans';
    margin: 0
}

.stitch-final-cta .hero-actions {
    justify-content: center
}

.public-footer,
.stitch-footer {
    background-color: #f8fafc !important;
    color: #0b2246 !important;
    border-top: 1px solid #e2e8f0 !important;
    color-scheme: light !important;
    padding: 32px 0 !important;
    position: relative;
    z-index: 10;
}

.public-footer .container,
.stitch-footer .container {
    color: #0b2246 !important;
}

.public-footer .container>div,
.stitch-footer .container>div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.public-footer .container>div>span,
.stitch-footer .container>div>span {
    font-size: 13px !important;
    color: #0b2246 !important;
}

.public-footer p,
.stitch-footer p {
    font-size: 12px !important;
    color: #64748b !important;
    margin: 8px 0 0 !important;
}

.footer-contact-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.footer-contact-section span {
    color: #0b2246 !important;
}

.footer-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0b2246 !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-contact-link:hover {
    color: #00236f !important;
    text-decoration: underline;
}

.footer-contact-link.wa-link {
    color: #059669 !important;
}

.footer-contact-link.wa-link:hover {
    color: #047857 !important;
}

@media(max-width:1000px) {
    .stitch-landing .public-nav a:nth-child(n+5) {
        display: none
    }

    .stitch-hero-grid {
        gap: 30px
    }

    .stitch-feature-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .integrity-inner {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .integrity-inner .button {
        margin-left: 74px
    }

    .whatsapp-grid {
        gap: 30px
    }
}

@media(max-width:700px) {
    .stitch-landing .public-header {
        height: 64px
    }

    .stitch-landing .public-nav {
        display: none
    }

    .stitch-landing .header-actions .button-ghost {
        display: inline-flex
    }

    .stitch-hero {
        padding: 28px 0 54px
    }

    .stitch-hero-grid {
        grid-template-columns: 1fr;
        gap: 28px
    }

    .stitch-hero-copy h1 {
        font-size: 36px;
        line-height: 44px
    }

    .stitch-hero-copy>p {
        font-size: 14px;
        line-height: 22px
    }

    .stitch-hero-visual,
    .stitch-hero-visual>img {
        height: 280px
    }

    .hero-float-one {
        left: 8px;
        bottom: 10px
    }

    .hero-float-two {
        right: 8px;
        top: 10px
    }

    .stitch-workflow {
        padding: 40px 0
    }

    .center-heading h2 {
        font-size: 24px;
        line-height: 32px
    }

    .stitch-step-grid {
        grid-template-columns: 1fr;
        gap: 10px
    }

    .step-arrow {
        display: none
    }

    .stitch-step-grid>div {
        text-align: left;
        display: grid;
        grid-template-columns: 48px 1fr;
        column-gap: 12px;
        align-items: center
    }

    .stitch-step-grid>div>.legacy-material-icon {
        grid-row: span 2;
        margin: 0
    }

    .stitch-features {
        padding: 44px 0
    }

    .section-row-heading {
        display: block
    }

    .section-row-heading>p {
        margin-top: 10px
    }

    .stitch-feature-grid,
    .landing-resource-grid {
        grid-template-columns: 1fr
    }

    .stitch-feature-grid article {
        min-height: 0;
        min-height: 220px
    }

    .stitch-integrity {
        padding: 32px 0
    }

    .integrity-inner {
        display: grid;
        grid-template-columns: 56px 1fr;
        gap: 12px
    }

    .integrity-inner .button {
        grid-column: 1/-1;
        margin: 8px 0 0;
        width: 100%
    }

    .integrity-inner h2 {
        font-size: 22px;
        line-height: 30px
    }

    .stitch-resources,
    .stitch-whatsapp {
        padding: 44px 0
    }

    .whatsapp-grid {
        grid-template-columns: 1fr
    }

    .stitch-whatsapp h2 {
        font-size: 24px;
        line-height: 32px
    }

    .stats-grid {
        grid-template-columns: 1fr
    }

    .stats-grid>div {
        border-right: 0;
        border-bottom: 1px solid #e2e7ff;
        padding: 18px
    }

    .stitch-final-cta h2 {
        font-size: 28px;
        line-height: 36px
    }

    .stitch-footer .container>div {
        display: block
    }

    .stitch-footer .container>div>span {
        display: block;
        margin-top: 12px
    }
}

/* legacy icon font are loaded locally through the Stitch-compatible fallback treatment. Prevent raw ligature names when the font is unavailable. */
.legacy-material-icon {
    font-family: Inter, system-ui, sans-serif;
    font-weight: 600;
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.legacy-material-icon::after {
    content: '•';
    font-size: inherit;
    color: currentColor
}

.stitch-landing .legacy-material-icon {
    font-size: 0
}

.stitch-landing .legacy-material-icon::after {
    font-size: 18px
}

.stitch-landing .hero-float .legacy-material-icon::after {
    font-size: 17px
}

.stitch-landing .stitch-step-grid .legacy-material-icon::after {
    font-size: 21px
}

.stitch-landing .stitch-feature-grid article>.legacy-material-icon::after {
    font-size: 25px
}

.stitch-landing .landing-resource-grid article>.legacy-material-icon::after {
    font-size: 22px
}

.stitch-landing .wa-steps .legacy-material-icon::after {
    font-size: 20px
}

.stitch-landing .stats-grid .legacy-material-icon::after {
    font-size: 18px
}

.stitch-landing .button .legacy-material-icon::after,
.stitch-landing a .legacy-material-icon::after {
    font-size: 15px
}

.app-shell .legacy-material-icon {
    font-size: 0
}

.app-shell .legacy-material-icon::after {
    font-size: 18px
}


.legacy-material-icon,
.stitch-landing .legacy-material-icon,
.app-shell .legacy-material-icon {
    font-family: Inter, system-ui, sans-serif;
    font-size: 20px;
    font-weight: 400;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased
}

.legacy-material-icon::after {
    content: none !important
}

.stitch-landing .hero-float .legacy-material-icon {
    font-size: 20px
}

.stitch-landing .stitch-feature-grid article>.legacy-material-icon {
    font-size: 27px
}

.stitch-landing .landing-resource-grid article>.legacy-material-icon {
    font-size: 24px
}

/* Phase 4A icon correction: icons are inline SVGs, never ligature text. */
.ek-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    aspect-ratio: 1 / 1;
    vertical-align: middle;
    color: currentColor;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    contain: layout size;
    box-sizing: border-box;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.button .ek-icon,
.button svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
    box-sizing: border-box;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    contain: layout size;
    border: 1px solid transparent;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.icon-button,
button > svg,
.nav-icon {
    box-sizing: border-box;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.icon-button:hover,
.icon-button:active,
.icon-button.active,
.nav-icon:hover,
.nav-icon:active,
.nav-icon.active {
    border-color: transparent;
    box-shadow: inset 0 0 0 2px rgba(30, 58, 138, 0.2);
}

.icon-button .ek-icon,
.icon-button svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
    box-sizing: border-box;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.button,
.icon-button,
.nav-item,
.side-signout-icon-btn,
.btn-refresh-digest,
.staffroom-nav-prev,
.staffroom-nav-next,
.staffroom-nav-toggle-pause,
.scheme-week-pill,
.badge-pill,
.kicd-icon,
.stat-icon,
.icon-tile,
.doc-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transform: translateZ(0);
    backface-visibility: hidden;
}


.nav-item .ek-icon,
.nav-item svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
}

.mobile-dock .ek-icon,
.mobile-dock svg {
    width: 21px;
    height: 21px;
    min-width: 21px;
    min-height: 21px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
}

.stat-icon .ek-icon,
.stat-icon svg {
    width: 19px;
    height: 19px;
    min-width: 19px;
    min-height: 19px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
}

.state-card>.ek-icon,
.state-card>svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
}

.icon-tile .ek-icon,
.icon-tile svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
}

.stitch-landing .ek-icon,
.stitch-landing svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
}

.stitch-feature-grid article>.ek-icon,
.stitch-feature-grid article>svg {
    width: 27px;
    height: 27px;
    min-width: 27px;
    min-height: 27px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
}

.stitch-step-grid>div>.ek-icon,
.stitch-step-grid>div>svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
}

.landing-resource-grid article>.ek-icon,
.landing-resource-grid article>svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
}

.hero-float>.ek-icon,
.hero-float>svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
}

.search-bar>.ek-icon,
.search-bar>svg,
.search-mini>.ek-icon,
.search-mini>svg {
    width: 19px;
    height: 19px;
    min-width: 19px;
    min-height: 19px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    contain: layout size;
}

.legacy-material-icon {
    display: none !important
}/* ---------------------------------------------------------------------------
   Phase 6 resource library additions.
   Only additive rules: the Stitch visual language (radius, shadow, colour
   tokens, spacing) is reused, so nothing existing is restyled.
   --------------------------------------------------------------------------- */

.field-error {
    color: #b3261e;
    font-size: 11px;
    font-weight: 600
}

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

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

.filter-panel .small-button {
    margin-bottom: 14px
}

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

.detail-list>div {
    background: var(--surface-low);
    border-radius: 9px;
    padding: 12px
}

.detail-list dt {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em
}

.detail-list dd {
    margin: 5px 0 0;
    font-size: 13px;
    color: var(--ink);
    overflow-wrap: anywhere
}

.resource-body h3 {
    overflow-wrap: anywhere
}

@media(max-width:700px) {
    .form-row,
    .detail-list {
        grid-template-columns: 1fr
    }
}
/* ==========================================================================
   Redesigned Sign-In Page (Part 3)
   ========================================================================== */
.auth-page-v2 {
  min-height: 100vh;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-layout-container {
  width: min(1040px, 100%);
  min-height: 640px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 35, 111, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  overflow: hidden;
}

/* Left: Branding Panel */
.auth-brand-panel {
  background: linear-gradient(155deg, #0b2246 0%, #16366f 55%, #0f3f6e 100%);
  color: #ffffff;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -100px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.brand-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-panel-header .logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
}

.brand-panel-header .logo-badge {
  background: #0d9488;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 15px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
}

.brand-panel-header .logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.brand-panel-header .logo-teal {
  color: #2dd4bf;
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.brand-tag svg {
  width: 14px;
  height: 14px;
  color: #2dd4bf;
}

/* Brand Panel Hero Image */
.brand-panel-card {
  margin: 28px 0 20px;
}

.brand-img-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #091a33;
}

.brand-teacher-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.brand-img-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 26, 51, 0.95) 0%, rgba(9, 26, 51, 0.4) 45%, transparent 100%);
}

.brand-img-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 18px;
}

.brand-img-caption strong {
  display: block;
  font-size: 14px;
  color: #ffffff;
  font-weight: 700;
}

.brand-img-caption span {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Value Props */
.brand-panel-points {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.point-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.point-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(45, 212, 191, 0.2);
  color: #2dd4bf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.point-item strong {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.point-item p {
  font-size: 12px;
  color: #94a3b8;
  margin: 2px 0 0;
  line-height: 1.4;
}

.brand-panel-footer {
  font-size: 11px;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 14px;
}

/* Right: Form Panel */
.auth-form-panel {
  padding: 44px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.auth-form-card {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.mobile-brand-banner {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.mobile-brand-banner .logo-badge {
  background: #0d9488;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 13px;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-brand-banner .logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #0f172a;
}

.mobile-brand-banner .logo-teal {
  color: #0d9488;
}

.auth-form-header h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 0 0 22px;
  line-height: 1.45;
}

/* Alert Box */
.auth-alert {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #991b1b;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.auth-alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Form inputs & controls */
.auth-form {
  display: grid;
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 6px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label-row label {
  margin: 0;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .input-icon-wrap {
  position: absolute;
  left: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #94a3b8;
  z-index: 2;
}

.input-wrap .input-icon-wrap svg {
  width: 17px;
  height: 17px;
}

.input-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 38px !important;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.input-wrap input::placeholder {
  color: #94a3b8;
}

.toggle-password-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  z-index: 2;
}

.toggle-password-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.toggle-password-btn svg {
  width: 18px;
  height: 18px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #0d9488;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.link-btn:hover {
  color: #0f766e;
  text-decoration: underline;
}

.link-btn.bold {
  font-weight: 700;
}

/* Primary and Google Buttons */
.auth-form .button-primary {
  height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  background: #1e3a8a;
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
  transition: background-color 0.15s, transform 0.05s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.auth-form .button-primary:hover:not(:disabled) {
  background: #172554;
}

.auth-form .button-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.auth-form .button-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 12px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Google OAuth Button */
.button-google {
  height: 44px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.button-google:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.button-google:focus-visible {
  outline: none;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

.button-google .google-mark {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.button-google:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Footer Prompt */
.auth-footer-prompt {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Responsive layout adjustments */
@media (max-width: 880px) {
  .auth-layout-container {
    grid-template-columns: 1fr;
    max-width: 440px;
    min-height: auto;
  }
  .auth-brand-panel {
    display: none;
  }
  .mobile-brand-banner {
    display: flex;
  }
  .auth-form-panel {
    padding: 36px 28px;
  }
}

@media (max-width: 480px) {
  .auth-page-v2 {
    padding: 16px;
  }
  .auth-form-panel {
    padding: 28px 20px;
  }
  .auth-form-header h1 {
    font-size: 22px;
  }
}

/* ==========================================================================
   Resource Deletion Modal & Danger Button (Issue 2)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  width: min(480px, 100%);
  padding: 24px;
  animation: modalEnter 0.15s ease-out;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.button-danger {
  background: #dc2626 !important;
  color: #ffffff !important;
  border: 1px solid #b91c1c !important;
  font-weight: 700 !important;
}

.button-danger:hover:not(:disabled) {
  background: #b91c1c !important;
}

.button-danger:focus-visible {
  outline: 3px solid #dc2626 !important;
  outline-offset: 2px !important;
}

/* ==========================================================================
   Multi-Resource Upload & Download Styles (Priority 3)
   ========================================================================== */
.dropzone.drag-active {
  border-color: #0d9488 !important;
  background: #f0fdfa !important;
}

.upload-queue-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin: 14px 0;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: #334155;
}

.queue-list {
  display: grid;
  gap: 8px;
}

.queue-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.15s;
}

.queue-item.uploading {
  border-color: #f59e0b;
  background: #fffbeb;
}

.queue-item.success {
  border-color: #10b981;
  background: #f0fdf4;
}

.queue-item.failed {
  border-color: #ef4444;
  background: #fef2f2;
}

.queue-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.queue-item-name {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.queue-item-name strong {
  font-size: 13px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.queue-item-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Floating Batch Bar for Multi-Download */
.batch-bar {
  position: sticky;
  bottom: 20px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 14px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  z-index: 100;
  margin-top: 16px;
  animation: slideUpBar 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpBar {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.batch-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}

.batch-bar-left svg {
  width: 18px;
  height: 18px;
  color: #2dd4bf;
}

.batch-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-bar .button-ghost {
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.batch-bar .button-ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.resource-select-box {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.resource-card {
  position: relative;
  transition: box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s ease;
}

.resource-card:hover {
  box-shadow: 0 12px 30px rgba(0, 35, 111, 0.08);
  border-color: #cbd5e1;
}

.resource-card.selected {
  border-color: #0d9488 !important;
  background: #f0fdfa;
}

.resource-checkbox {
  width: 18px !important;
  height: 18px !important;
  min-height: auto !important;
  cursor: pointer;
}

/* ==========================================================================
   Smooth Animations & Reduced Motion (Priority 5)
   ========================================================================== */
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* Page-entry fades are limited to routes that genuinely mount once.
   A CSS animation restarts whenever its element is re-created, so anything animated on a container
   that the workspace re-renders (the dashboard shell, cards, panels) becomes an infinite fade loop
   rather than a one-shot entry effect. Entry animations are therefore opt-in per public page and
   never applied to `.app-main` / `.stitch-dashboard-container`. The keyframes are kept because the
   landing and auth screens legitimately use them. */
.public-page, .stitch-hero, .auth-layout-container {
  animation: pageFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageFade {
  from { opacity: 0.85; }
  to { opacity: 1; }
}

button, a {
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

button:active:not(:disabled) {
  filter: brightness(0.96);
}

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

/* Mobile Dock and Batch Bar Clearance Fix */
@media (max-width: 768px) {
  .page.container {
    padding-bottom: 84px !important;
  }
  .batch-bar {
    bottom: 76px !important;
    padding: 10px 14px !important;
    font-size: 12px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .batch-bar-left {
    font-size: 12px !important;
  }
  .batch-bar-actions {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
}

/* ==========================================================================
   Stitch Design: Teachers' Resource Library (Full Fidelity)
   ========================================================================== */
.stitch-library-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Library Hero Header */
.library-hero {
  background: linear-gradient(135deg, #f2f3ff 0%, #eaedff 100%);
  border-radius: 20px;
  padding: 32px 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid #dae2fd;
}

.library-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.repository-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #006a61;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.repository-badge svg {
  width: 18px;
  height: 18px;
}

.library-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: #131b2e;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.library-subtitle {
  font-size: 14.5px;
  color: #444651;
  margin: 0;
  line-height: 1.5;
  max-width: 600px;
}

.library-stats-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.05);
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.stat-col {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #757682;
  text-transform: uppercase;
}

.stat-val {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.font-indigo {
  color: #00236f;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: #e2e8f0;
}

/* Search Box Container */
.library-search-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 6px 20px rgba(0, 35, 111, 0.04);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 4px 10px 4px 16px;
  border: 1px solid #cbd5e1;
}

.search-input-row svg {
  width: 22px;
  height: 22px;
  color: #757682;
  flex-shrink: 0;
}

.search-input-row input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  height: 44px;
  padding: 0 !important;
  font-size: 14.5px;
  color: #131b2e;
  box-shadow: none !important;
}

.search-input-row input:focus {
  outline: none;
}

.voice-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #444651;
  cursor: pointer;
  height: 34px;
}

.voice-btn:hover {
  background: #f1f5f9;
  color: #00236f;
}

.search-submit-btn {
  height: 36px !important;
  padding: 0 18px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  background: #00236f !important;
}

/* Search Tags Row */
.search-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px;
}

.hot-strands-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hot-label {
  font-size: 12px;
  font-weight: 700;
  color: #757682;
  margin-right: 4px;
}

.strand-chip {
  background: #eaedff;
  color: #1e3a8a;
  border: none;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.strand-chip:hover {
  background: #00236f;
  color: #ffffff;
}

.kicd-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f2f3ff;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #006a61;
  cursor: pointer;
}

.kicd-toggle-wrap input {
  width: 16px !important;
  height: 16px !important;
  min-height: auto !important;
  accent-color: #006a61;
}

/* Category Pills Bar */
.library-category-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: none;
}

.library-category-bar::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 7px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: #eaedff;
  color: #444651;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.category-pill:hover {
  color: #131b2e;
  background: #e2e7ff;
}

.category-pill.active {
  background: #00236f;
  color: #ffffff;
  font-weight: 700;
}

/* Two-Column Grid Layout */
.library-grid-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* Left Facets Sidebar */
.curriculum-facets-panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.04);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.facets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eaedff;
  padding-bottom: 10px;
}

.facets-header h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #131b2e;
  margin: 0;
}

.reset-link {
  background: none;
  border: none;
  padding: 0;
  color: #006a61;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.reset-link:hover {
  text-decoration: underline;
}

.facet-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.facet-label {
  font-size: 11px;
  font-weight: 700;
  color: #757682;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.facet-checkbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #444651;
  cursor: pointer;
  transition: background 0.15s;
}

.facet-checkbox-row:hover {
  background: #f2f3ff;
  color: #131b2e;
}

.facet-checkbox-row.selected {
  background: #f2f3ff;
  color: #00236f;
  font-weight: 700;
}

.facet-checkbox-row input {
  width: 16px !important;
  height: 16px !important;
  min-height: auto !important;
  accent-color: #00236f;
  margin-right: 8px;
}

.facet-count {
  font-size: 11px;
  font-weight: 600;
  color: #757682;
}

.facet-count.teal {
  color: #006a61;
}

.grade-pill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.grade-facet-pill {
  padding: 6px 0;
  text-align: center;
  border-radius: 8px;
  background: #eaedff;
  color: #444651;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.grade-facet-pill:hover {
  background: #00236f;
  color: #ffffff;
}

.grade-facet-pill.active {
  background: #00236f;
  color: #ffffff;
  font-weight: 700;
}

.subjects-scroll-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.low-bandwidth-card {
  background: #e2e7ff;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.low-bw-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #00236f;
  font-size: 12.5px;
}

.low-bw-title svg {
  width: 16px;
  height: 16px;
}

.low-bandwidth-card p {
  font-size: 11.5px;
  color: #444651;
  margin: 0;
  line-height: 1.4;
}

/* Right Main Content */
.resources-main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.results-toolbar {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
}

.results-text {
  font-size: 13.5px;
  color: #444651;
  display: flex;
  align-items: center;
  gap: 6px;
}

.results-text strong {
  color: #131b2e;
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 12px;
  font-weight: 700;
  color: #757682;
}

.sort-select {
  background: #f2f3ff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  color: #131b2e;
  cursor: pointer;
  min-height: auto;
  width: auto;
}

/* Stitch Resource Cards */
.stitch-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.stitch-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stitch-card:hover {
  box-shadow: 0 12px 32px rgba(0, 35, 111, 0.08);
  border-color: #cbd5e1;
}

.stitch-card.selected {
  border-color: #00236f !important;
  background: #faf8ff;
}

/* Thumbnail Visual Area */
.stitch-thumb-wrap {
  position: relative;
  height: 160px;
  background: linear-gradient(135deg, #1e3a8a 0%, #0b2246 100%);
  overflow: hidden;
}

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

.stitch-thumb-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(19, 27, 46, 0.85) 0%, transparent 60%);
}

.thumb-overlay-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  z-index: 2;
}

.thumb-badges-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-pill {
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.badge-pill.bg-primary {
  background: #00236f;
}

.badge-pill.bg-error {
  background: #ba1a1a;
}

.badge-pill.bg-secondary {
  background: #006a61;
}

.badge-pill.bg-blue {
  background: #2563eb;
}

.badge-pill.bg-amber {
  background: #d97706;
}

.thumb-badges-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-pill.bg-teal {
  background: #006a61;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.badge-pill.bg-teal svg {
  width: 12px;
  height: 12px;
}

.thumb-select-box {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-select-box input {
  width: 16px !important;
  height: 16px !important;
  min-height: auto !important;
  cursor: pointer;
  margin: 0 !important;
}

.thumb-overlay-bottom {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.topic-badge {
  background: rgba(40, 48, 68, 0.75);
  backdrop-filter: blur(4px);
  color: #eef0ff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rating-badge {
  color: #ffb95f;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Card Body */
.stitch-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 12px;
}

.stitch-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #131b2e;
  margin: 0 0 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}

.stitch-card:hover .stitch-card-title {
  color: #00236f;
}

.stitch-card-desc {
  font-size: 12.5px;
  color: #444651;
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stitch-card-footer {
  border-top: 1px solid #eaedff;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stitch-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #444651;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dce1ff;
  color: #00236f;
  font-size: 9.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.download-count {
  font-size: 11.5px;
  color: #757682;
  display: flex;
  align-items: center;
  gap: 3px;
}

.download-count svg {
  width: 14px;
  height: 14px;
}

.stitch-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.stitch-card-actions .button {
  padding: 6px 4px !important;
  font-size: 12px !important;
  height: 32px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 6px !important;
}

.stitch-card-actions .button svg {
  width: 14px;
  height: 14px;
}

.action-preview {
  background: #eaedff !important;
  color: #131b2e !important;
  border: none !important;
}

.action-preview:hover {
  background: #dae2fd !important;
}

.action-download {
  background: #00236f !important;
  color: #ffffff !important;
  border: none !important;
}

.action-download:hover {
  background: #1e3a8a !important;
}

.action-save {
  background: #eaedff !important;
  color: #131b2e !important;
  border: none !important;
}

.action-save:hover {
  background: #dae2fd !important;
}

/* Bottom Floating Upload Banner */
.upload-cta-banner {
  background: #00236f;
  border-radius: 16px;
  padding: 18px 24px;
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 12px 30px rgba(0, 35, 111, 0.15);
  margin-top: 14px;
  position: relative;
  overflow: hidden;
}

.upload-cta-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.upload-cta-left {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
}

.upload-cta-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86f2e4;
  flex-shrink: 0;
}

.upload-cta-icon-box svg {
  width: 24px;
  height: 24px;
}

.upload-cta-text h4 {
  margin: 0 0 3px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.upload-cta-text p {
  margin: 0;
  font-size: 12.5px;
  color: #dce1ff;
  line-height: 1.4;
}

.button-white {
  background: #ffffff !important;
  color: #00236f !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 10px 20px !important;
  font-size: 13.5px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  z-index: 2;
  white-space: nowrap;
}

.button-white:hover {
  background: #f8fafc !important;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .library-grid-layout {
    grid-template-columns: 1fr;
  }
  .curriculum-facets-panel {
    display: none; /* Collapses on mobile/tablet or opens in drawer */
  }
  .stitch-cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .library-hero {
    padding: 24px 20px;
  }
  .library-title {
    font-size: 24px;
  }
  .library-stats-card {
    width: 100%;
  }
}

/* ==========================================================================
   Stitch Design: AppShell, Top Header & Sidebar Navigation
   ========================================================================== */
.sidebar .nav-item {
  border-radius: 9999px !important;
  transition: all 0.15s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  padding: 10px 16px !important;
  margin: 3px 0 !important;
}

.sidebar .nav-item.active {
  background: #00236f !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(0, 35, 111, 0.18);
}

.sidebar .nav-item.active svg {
  color: #ffffff !important;
}

.sidebar .nav-item:hover:not(.active) {
  background: #eaedff !important;
  color: #00236f !important;
}

.kicd-integrity-badge {
  background: #e2e7ff;
  border: 1px solid #dae2fd;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.kicd-integrity-badge .kicd-icon svg {
  width: 22px;
  height: 22px;
  color: #006a61;
}

.kicd-integrity-badge strong {
  display: block;
  font-size: 11.5px;
  color: #00236f;
  font-weight: 700;
  line-height: 1.2;
}

.kicd-integrity-badge small {
  display: block;
  font-size: 10px;
  color: #444651;
  line-height: 1.3;
}

.side-user-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.side-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #131b2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-user-school {
  font-size: 10.5px;
  color: #757682;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-signout-icon-btn {
  background: transparent;
  border: none;
  color: #757682;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.side-signout-icon-btn:hover {
  background: #fee2e2;
  color: #ba1a1a;
}

.side-signout-icon-btn svg {
  width: 18px;
  height: 18px;
}

/* App Header Top Bar */
.search-mini {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9999px !important;
  padding: 4px 14px !important;
  width: 380px !important;
  max-width: 45vw !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-mini input {
  width: 100% !important;
  font-size: 13px !important;
  color: #131b2e !important;
  border: none !important;
  background: transparent !important;
  min-height: 32px !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.search-mini input:focus {
  outline: none !important;
}

.search-kbd {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.header-badge-kicd {
  background: #86f2e4;
  color: #00201d;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.header-badge-kicd svg {
  width: 14px;
  height: 14px;
  color: #006a61;
}

.notification-btn {
  position: relative;
  background: #f1f5f9;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444651;
  transition: all 0.15s;
}

.notification-btn:hover {
  background: #eaedff;
  color: #00236f;
}

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ba1a1a;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.header-profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 3px 12px 3px 4px;
  text-decoration: none;
  transition: all 0.15s;
}

.header-profile-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.header-profile-text {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 12px;
  font-weight: 700;
  color: #131b2e;
  line-height: 1.2;
}

.profile-school {
  font-size: 10px;
  color: #757682;
  line-height: 1.2;
}

/* ==========================================================================
   Stitch Design: Teacher Dashboard (Full Fidelity)
   ========================================================================== */
.stitch-dashboard-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  /* The dashboard's widest content (the harness table, the split grid) must be allowed to shrink
     rather than force a page-wide horizontal scrollbar on a phone. Without this a narrow viewport
     gained a horizontal scrollbar that also shifted every card as it appeared. */
  min-width: 0;
}

.stitch-dashboard-container > * {
  min-width: 0;
}

/* 1. Dashboard Hero Banner */
.dashboard-hero-banner {
  background: linear-gradient(135deg, #eaedff 0%, #f2f3ff 60%, #ffffff 100%);
  border-radius: 20px;
  padding: 28px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid #dae2fd;
  box-shadow: 0 4px 20px rgba(0, 35, 111, 0.04);
}

.dashboard-hero-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(0, 35, 111, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-hero-banner::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: 180px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.calendar-pill {
  background: #86f2e4;
  color: #00201d;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-sync-pill {
  background: #e2e7ff;
  color: #00236f;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Connection indicator.
   This was `pulseDot`: an infinite scale + opacity loop. `transform: scale()` on a non-composited
   inline element forces the browser to re-rasterise the containing stacking context on every frame,
   and the dot sits inside the dashboard hero banner — so the pulse visibly vibrated the hero and any
   neighbouring card. It is now a STATIC status dot: the colour alone carries the meaning (green =
   connected, amber = offline), which is both calmer to read and the correct semantics for what is a
   state indicator rather than a progress spinner. The only transition left is on `background-color`,
   which never triggers layout. */
.sync-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  min-height: 6px;
  flex-shrink: 0;
  background: #10b981;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.sync-dot.offline {
  background: #f59e0b;
}

@media (prefers-reduced-motion: reduce) {
  .sync-dot {
    transition: none !important;
  }
}

.dashboard-hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #131b2e;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.hero-school-meta {
  font-size: 13.5px;
  color: #444651;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.hero-school-meta svg {
  width: 16px;
  height: 16px;
  color: #757682;
}

.hero-term-highlight {
  color: #00236f;
  font-weight: 700;
}

.dashboard-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.btn-white-card {
  background: #ffffff !important;
  color: #131b2e !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 10px 18px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-white-card svg {
  width: 16px;
  height: 16px;
  color: #006a61;
}

/* 2. WhatsApp Ingestion Alert */
.whatsapp-alert-banner {
  background: linear-gradient(90deg, rgba(134, 242, 228, 0.35) 0%, #f2f3ff 100%);
  border: 1px solid #86f2e4;
  border-radius: 16px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(0, 35, 111, 0.03);
}

.whatsapp-alert-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.whatsapp-alert-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #86f2e4;
  color: #006f66;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.whatsapp-alert-icon svg {
  width: 22px;
  height: 22px;
}

.whatsapp-alert-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #006f66;
}

.whatsapp-alert-text {
  font-size: 13.5px;
  color: #131b2e;
  margin: 2px 0 0;
}

.whatsapp-alert-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-teal-action {
  background: #006a61 !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 7px 14px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 3. Primary Action Toolkit */
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #757682;
  display: block;
  margin-bottom: 2px;
}

.section-main-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #131b2e;
  margin: 0;
}

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

.toolkit-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.04);
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  cursor: pointer;
}

.toolkit-card:hover {
  box-shadow: 0 10px 28px rgba(0, 35, 111, 0.08);
  border-color: #cbd5e1;
}

.toolkit-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.toolkit-icon-box.bg-indigo {
  background: #00236f;
  color: #ffffff;
}

.toolkit-icon-box.bg-teal {
  background: #86f2e4;
  color: #006f66;
}

.toolkit-icon-box.bg-amber {
  background: #5c3800;
  color: #ffddb8;
}

.toolkit-icon-box.bg-blue {
  background: #eaedff;
  color: #00236f;
}

.toolkit-icon-box svg {
  width: 24px;
  height: 24px;
}

.toolkit-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: block;
  margin-bottom: 4px;
}

.text-teal { color: #006a61; }
.text-amber { color: #5c3800; }
.text-outline { color: #757682; }

.toolkit-card h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #131b2e;
  margin: 0 0 6px;
  line-height: 1.3;
}

.toolkit-card p {
  font-size: 12.5px;
  color: #444651;
  margin: 0;
  line-height: 1.45;
}

.toolkit-card-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: #00236f;
}

.toolkit-card-footer svg {
  width: 14px;
  height: 14px;
  transition: color 0.15s;
}

.toolkit-card:hover .toolkit-card-footer svg {
  color: #00236f;
}

/* 4. Planning Progress & Staff Room Digest */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px;
  /* Every child is allowed to shrink. A grid track whose content cannot shrink below its intrinsic
     width makes the browser recompute (and visually "jitter") the track sizes whenever the content
     inside changes — for example when a long digest headline is swapped for a short one. */
  align-items: stretch;
}

.dashboard-split-grid > * {
  min-width: 0;
  min-height: 0;
}

.planning-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.progress-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(0, 35, 111, 0.03);
}

.progress-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.progress-card-top span {
  font-size: 11px;
  font-weight: 700;
  color: #757682;
  text-transform: uppercase;
}

.progress-card-top h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #131b2e;
  margin: 2px 0 0;
}

.grade-badge-chip {
  background: #eaedff;
  color: #00236f;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
}

.grade-badge-chip.teal {
  background: #86f2e4;
  color: #00201d;
}

.progress-card-mid {
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-circle-wrap {
  width: 52px;
  height: 52px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.progress-circle-wrap svg {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.progress-circle-wrap .circle-bg {
  stroke: #e2e7ff;
}

.progress-circle-wrap .circle-fill {
  stroke: #00236f;
}

.progress-circle-wrap .circle-fill.teal {
  stroke: #006a61;
}

.progress-circle-wrap .circle-fill.amber {
  stroke: #ef9900;
}

.progress-num {
  position: absolute;
  font-size: 13px;
  font-weight: 800;
  color: #131b2e;
}

.progress-card-info strong {
  display: block;
  font-size: 13.5px;
  color: #131b2e;
}

.progress-card-info small {
  display: block;
  font-size: 11.5px;
  color: #757682;
}

.progress-next-tag {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #006a61;
  margin-top: 2px;
}

.progress-bar-track {
  width: 100%;
  height: 5px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: #00236f;
}

.progress-bar-fill.teal { background: #006a61; }
.progress-bar-fill.amber { background: #ef9900; }

/* Staff Room Digest — High-Contrast Deep Indigo Treatment (WCAG AAA) */
.staffroom-digest-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #001f54 !important;
  border: 1px solid #1e3a8a !important;
  box-shadow: 0 8px 24px rgba(0, 31, 84, 0.22) !important;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.staffroom-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
  justify-content: flex-end;
  background: linear-gradient(175deg, #07193b 0%, #001f54 50%, #001133 100%) !important;
  border-radius: 16px;
}

.staffroom-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}

.staffroom-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 25, 59, 0.85) 0%, rgba(0, 31, 84, 0.96) 100%);
  border-radius: 16px;
}

.staffroom-content {
  position: relative;
  z-index: 2;
  padding: 22px;
  color: #ffffff !important;
  /* Reserved vertical budget for the tallest realistic digest item (headline wrapping to two lines,
     summary to three, plus the tag row and the nav row). Without a floor, a long summary pushed the
     card past the height of the adjacent Planning Progress column, so the whole
     `.dashboard-split-grid` row grew and shrank as the carousel rotated — a layout shift the user
     perceives as the digest "shaking". */
  /* Fixed floor for the whole card. `box-sizing: border-box` is global, so this constrains the
     content box, not the padding box. The tallest KICD advisory headline wraps to three lines; without
     this floor a longer headline made the digest taller than the Planning Progress column beside it,
     so the `.dashboard-split-grid` row resized on every rotation — measured as ~120px of growth. */
  min-height: 440px;
  display: flex;
  flex-direction: column;
  /* The card is `height: 100%` inside a grid row, so its height is decided by the TALLEST column.
     `overflow: hidden` guarantees that whatever a publisher puts in a headline or summary, the card
     reports one fixed height back to the grid and can never resize the row it sits in. */
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

/* On a narrow viewport the three-line headline and four-line summary are wider than they are on a
   desktop, so the mobile card needs a shorter text budget rather than a taller card. */
@media (max-width: 640px) {
  .staffroom-content h4 {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .staffroom-content p {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .staffroom-content {
    min-height: 380px;
    padding: 18px 16px;
  }
}

.staffroom-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.notice-pill {
  background: #006a61 !important;
  color: #ffffff !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  letter-spacing: 0.5px;
}

.notice-pill.official {
  background: #006a61 !important;
  color: #ffffff !important;
}

.notice-pill.reporting {
  background: #ba1a1a !important;
  color: #ffffff !important;
}

.advisory-text {
  font-size: 12px !important;
  color: #67e8f9 !important;
  font-weight: 700 !important;
}

.staffroom-content h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px !important;
  font-weight: 800 !important;
  margin: 0 0 8px !important;
  line-height: 1.4 !important;
  color: #ffffff !important;
  /* Hard ceiling of three lines. Combined with the server-side excerpt extractor and the JS clamp,
     this guarantees a single digest item can never grow the card and therefore can never resize the
     dashboard row it sits in. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.staffroom-content p {
  font-size: 13px !important;
  color: #e2e8f0 !important;
  margin: 0 0 12px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  /* Four lines of summary is the reserved budget; anything longer is elided rather than allowed to
     push the nav row and the card border down. */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 5. Recent Work & Lesson Documents */
.recent-documents-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-row-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* These rows wrap on narrow viewports, so every child must be shrinkable. Without `min-width: 0`
     the flex items keep their intrinsic width, and on a 390px phone the row forced a 45px page-wide
     horizontal scrollbar. */
  min-width: 0;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 35, 111, 0.03);
  transition: all 0.15s;
}

.doc-row-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 35, 111, 0.06);
}

.doc-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  /* `flex: 0 1 auto` (the default) resolves its base size from content, and the `nowrap` title inside
     resolves to 344px — so the parent never shrank and the row overflowed a phone viewport by 45px.
     A zero basis plus `min-width: 0` is what actually lets the chain shrink to the available width;
     the ellipsis on `.doc-title-text` then handles the overflow. */
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}

.doc-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #eaedff;
  color: #00236f;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-icon-box svg {
  width: 22px;
  height: 22px;
}

.doc-row-info {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  /* `min-width: 0` here is not enough on its own: the flex-basis still resolves from content, and the
     `nowrap` title inside gives that content an intrinsic width of 344px, which pushed the row 45px
     past a 390px viewport. An explicit `flex: 1 1 0` makes the basis ignore content size so the row
     can actually shrink, and the ellipsis on `.doc-title-text` then does its job. */
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}

.doc-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  /* The status pill keeps the row from shrinking unless it is allowed to shrink too: the pill is
     wider than the title's remaining space on a phone, and a flex item never shrinks below its
     intrinsic width without `min-width: 0`. The pill's own text stays on one line; only its padding
     yields, so it stays legible. */
  min-width: 0;
  flex-wrap: wrap;
}

/* A document title is `nowrap` with an ellipsis, so the flex item MUST be allowed to shrink below its
   intrinsic width. Without `min-width: 0` the row keeps the full title width and pushes a 45px
   horizontal scrollbar onto a 390px phone — which in turn shifted every card on the dashboard. */
.doc-title-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #131b2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.doc-badges-row .badge-pill {
  flex-shrink: 0;
}

.doc-meta-line {
  font-size: 12px;
  color: #757682;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.doc-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.doc-action-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #131b2e;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.doc-action-btn:hover {
  background: #eaedff;
  color: #00236f;
}

.doc-action-btn svg {
  width: 14px;
  height: 14px;
}

/* 6. Offline-Ready Architecture Banner */
.offline-architecture-banner {
  background: #f2f3ff;
  border: 1px solid #dae2fd;
  border-radius: 14px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #444651;
  font-size: 12.5px;
}

.offline-arch-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.offline-arch-left svg {
  width: 18px;
  height: 18px;
  color: #006a61;
}

.offline-storage-pill {
  background: #e2e7ff;
  color: #00236f;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Responsive Dashboard Breakpoints */
@media (max-width: 1024px) {
  .toolkit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .toolkit-grid {
    grid-template-columns: 1fr;
  }
  .planning-progress-grid {
    grid-template-columns: 1fr;
  }
  .section-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .staffroom-nav-row {
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: space-between !important;
  }
  .staffroom-dots {
    display: none !important;
  }
  .header-profile-text {
    display: none !important;
  }
  .whatsapp-alert-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .doc-row-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .doc-actions-row {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   Stitch Design: WhatsApp Sync & Scheme of Work Editor
   ========================================================================== */
/* WhatsApp Ingestion Page */
.whatsapp-page-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.whatsapp-hero-banner {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.04);
}

.whatsapp-hero-left h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #131b2e;
  margin: 0 0 6px;
}

.whatsapp-hero-left p {
  font-size: 13.5px;
  color: #444651;
  margin: 0;
  line-height: 1.5;
  max-width: 700px;
}

.security-strip {
  background: #f2f3ff;
  border: 1px solid #dae2fd;
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.security-strip-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.security-strip-left svg {
  width: 22px;
  height: 22px;
  color: #006a61;
}

.security-strip-text strong {
  display: block;
  font-size: 12px;
  color: #00236f;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.security-strip-text p {
  margin: 0;
  font-size: 12px;
  color: #444651;
}

.whatsapp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.whatsapp-stat-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0, 35, 111, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.whatsapp-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #757682;
  text-transform: uppercase;
}

.whatsapp-stat-val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #131b2e;
  margin: 10px 0 2px;
}

.whatsapp-stat-foot {
  font-size: 11.5px;
  color: #444651;
  display: flex;
  align-items: center;
  gap: 4px;
}

.whatsapp-content-grid {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 20px;
}

.inbound-queue-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.queue-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

.queue-tab-btn {
  background: #eaedff;
  border: none;
  border-radius: 9999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #444651;
  cursor: pointer;
  transition: all 0.15s;
}

.queue-tab-btn.active {
  background: #00236f;
  color: #ffffff;
}

.inbound-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.15s;
}

.inbound-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.06);
}

.inbound-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inbound-file-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #131b2e;
  margin: 0 0 4px;
}

.inbound-meta-tag {
  font-size: 11.5px;
  color: #757682;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inbound-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.inbound-bottom-row {
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inbound-sender-chip {
  font-size: 12px;
  color: #444651;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inbound-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-index {
  background: #006a61 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-spam {
  background: #fee2e2 !important;
  color: #ba1a1a !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  border: none !important;
}

/* Side Info Cards */
.whatsapp-side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bot-health-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.04);
}

.bot-health-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bot-status-pill {
  background: #86f2e4;
  color: #00201d;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.teacher-circles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.circle-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 12px;
}

.circle-item-row strong {
  color: #131b2e;
}

.circle-members-count {
  color: #757682;
  font-size: 11px;
}

/* ==========================================================================
   Scheme of Work Editor (Full Fidelity)
   ========================================================================== */
.scheme-editor-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.scheme-filter-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) minmax(220px, 1.5fr) auto;
  gap: 12px;
  align-items: end;
  box-shadow: 0 2px 8px rgba(0, 35, 111, 0.03);
}

.scheme-10col-table-wrap {
  overflow-x: auto;
  min-height: 440px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.04);
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
}

.scheme-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 1150px;
}

.scheme-top-toolbar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.04);
}

.scheme-title-col h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #131b2e;
  margin: 0 0 4px;
}

.scheme-top-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}

.scheme-weeks-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 6px;
  scrollbar-width: none;
}

.scheme-week-pill {
  padding: 8px 16px;
  border-radius: 9999px;
  background: #eaedff;
  color: #444651;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.scheme-week-pill:hover {
  background: #dae2fd;
  color: #00236f;
}

.scheme-week-pill.active {
  background: #00236f;
  color: #ffffff;
}

.scheme-week-pill.locked {
  background: #f1f5f9;
  color: #64748b;
  border: 1px dashed #cbd5e1;
}

.scheme-week-pill.locked:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.scheme-week-pill.locked.active {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

.scheme-split-layout {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 20px;
  align-items: start;
}

.scheme-planner-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.04);
  display: flex;
  flex-direction: column;
  gap: 18px;
  contain: layout;
}

#btn-generate-scheme-submit {
  min-width: 260px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.planner-field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.planner-field-label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #00236f;
}

.planner-field-value {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: #131b2e;
  line-height: 1.5;
}

.kicd-drawer-card {
  background: #f2f3ff;
  border: 1px solid #dae2fd;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kicd-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #00236f;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}

.kicd-criteria-box {
  background: #ffffff;
  border: 1px solid #dae2fd;
  border-radius: 12px;
  padding: 14px;
  font-size: 12.5px;
  color: #131b2e;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .whatsapp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .whatsapp-content-grid {
    grid-template-columns: 1fr;
  }
  .scheme-split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .whatsapp-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Real Data, Teacher Profile, Notifications & Staffroom Digest Styles
   ========================================================================== */

/* Notification Bell Badge & Dropdown Panel */
.header-notif-container {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ba1a1a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  min-width: 16px;
  text-align: center;
}

.notification-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border: 1px solid #dae2fd;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 35, 111, 0.12);
  z-index: 1000;
  overflow: hidden;
  animation: notifFadeIn 0.15s ease-out;
}

@keyframes notifFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-panel-header {
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-panel-header h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #131b2e;
  margin: 0;
}

.btn-mark-all-read {
  background: none;
  border: none;
  color: #00236f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.btn-mark-all-read:hover {
  background: #eaedff;
}

.notif-items-list {
  max-height: 380px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
  position: relative;
}

.notif-item:hover {
  background: #f8fafc;
}

.notif-item.unread {
  background: #f2f5ff;
  border-left: 3px solid #00236f;
}

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-item-icon.success { background: #d1fae5; color: #047857; }
.notif-item-icon.error { background: #fee2e2; color: #b91c1c; }
.notif-item-icon.warning { background: #fef3c7; color: #b45309; }
.notif-item-icon.info { background: #e0e7ff; color: #3730a3; }
.notif-item-icon.system { background: #f1f5f9; color: #475569; }

.notif-item-icon svg {
  width: 18px;
  height: 18px;
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.notif-item-header strong {
  font-size: 13px;
  color: #131b2e;
}

.notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ba1a1a;
  flex-shrink: 0;
}

.notif-item-msg {
  font-size: 12px;
  color: #444651;
  margin: 0 0 6px;
  line-height: 1.4;
  word-break: break-word;
}

.notif-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #757682;
}

.notif-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-link {
  color: #00236f;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.notif-link:hover {
  text-decoration: underline;
}

.notif-link svg {
  width: 12px;
  height: 12px;
}

.notif-mark-read-btn {
  background: none;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 4px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.notif-mark-read-btn:hover {
  background: #e2e8f0;
  color: #00236f;
}

.notif-mark-read-btn svg {
  width: 14px;
  height: 14px;
}

.notif-panel-footer {
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.view-all-notifs-link {
  font-size: 12px;
  font-weight: 700;
  color: #00236f;
  text-decoration: none;
}

.view-all-notifs-link:hover {
  text-decoration: underline;
}

.notif-empty-state {
  padding: 36px 20px;
  text-align: center;
}

.notif-empty-state svg {
  width: 32px;
  height: 32px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.notif-empty-state h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
}

.notif-empty-state p {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

/* Full Notifications Page View */
.notif-page-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Profile Redesign Styles */
.stitch-profile-container {
  max-width: 1040px;
  margin: 0 auto;
}

.stitch-profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  margin-top: 20px;
}

.profile-preview-card {
  background: #ffffff;
  border: 1px solid #dae2fd;
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 35, 111, 0.04);
  height: fit-content;
}

.profile-preview-card .avatar.large {
  width: 72px;
  height: 72px;
  font-size: 26px;
  margin-bottom: 14px;
}

.profile-preview-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #131b2e;
  margin: 0 0 4px;
}

.profile-preview-school {
  font-size: 13px;
  color: #555866;
  margin: 0 0 12px;
}

.profile-role-badge {
  margin-bottom: 12px;
}

.profile-email-meta {
  font-size: 12.5px;
  color: #757682;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  word-break: break-all;
}

.profile-email-meta svg {
  width: 15px;
  height: 15px;
}

.profile-privacy-tag {
  margin-bottom: 16px;
}

.profile-note-box {
  background: #f2f3ff;
  border-radius: 10px;
  padding: 12px;
  font-size: 11.5px;
  color: #00236f;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
}

.profile-note-box svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.profile-edit-card {
  background: #ffffff;
  border: 1px solid #dae2fd;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 12px rgba(0, 35, 111, 0.04);
}

.profile-form .form-group {
  margin-bottom: 18px;
}

.profile-form label strong {
  display: block;
  font-size: 13.5px;
  color: #131b2e;
}

.profile-form input,
.profile-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-top: 6px;
  box-sizing: border-box;
}

.profile-form input:focus,
.profile-form textarea:focus {
  outline: none;
  border-color: #00236f;
  box-shadow: 0 0 0 3px rgba(0, 35, 111, 0.1);
}

/* Staff Room Digest Enhancements — WCAG AAA Verified High Contrast */
.staffroom-headline-link {
  color: #ffffff !important;
  text-decoration: none !important;
  display: block;
  transition: opacity 0.15s;
}

.staffroom-headline-link:hover {
  text-decoration: underline !important;
  color: #5eead4 !important;
}

.notice-pill.official {
  background: #006a61 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  letter-spacing: 0.5px;
}

.notice-pill.reporting {
  background: #ba1a1a !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  letter-spacing: 0.5px;
}

.staffroom-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  font-size: 12px;
  color: #cbd5e1;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.staffroom-date {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #cbd5e1 !important;
  font-size: 11.5px;
}

.staffroom-date svg {
  width: 14px;
  height: 14px;
  color: #2dd4bf;
}

.staffroom-source-link {
  color: #2dd4bf !important;
  text-decoration: none !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px;
  font-size: 12px !important;
}

.staffroom-source-link:hover {
  text-decoration: underline !important;
  color: #5eead4 !important;
}

.staffroom-source-link svg {
  width: 13px;
  height: 13px;
}

.staffroom-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.staffroom-nav-index {
  font-size: 11.5px !important;
  color: #cbd5e1 !important;
  font-weight: 700 !important;
}

.staffroom-nav-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.staffroom-nav-prev,
.staffroom-nav-next,
.staffroom-nav-toggle-pause {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  flex: 0 0 28px !important;
  transition: all 0.15s !important;
}

.staffroom-nav-prev:hover,
.staffroom-nav-next:hover,
.staffroom-nav-toggle-pause:hover {
  background: rgba(255, 255, 255, 0.38) !important;
  border-color: #ffffff !important;
}

.staffroom-nav-prev .ek-icon,
.staffroom-nav-next .ek-icon,
.staffroom-nav-toggle-pause .ek-icon {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  display: block !important;
}

.btn-refresh-digest {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444651;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
  contain: layout size;
}

.btn-refresh-digest:hover {
  background: #eaedff;
  color: #00236f;
  box-shadow: inset 0 0 0 1px #00236f;
}

.btn-refresh-digest svg,
.btn-refresh-digest .ek-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  contain: layout size;
}

/* Verified Badge in Resource Cards */
.rating-badge-verified {
  background: rgba(0, 106, 97, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating-badge-verified svg {
  width: 13px;
  height: 13px;
}

@media (max-width: 768px) {
  .stitch-profile-grid {
    grid-template-columns: 1fr;
  }
  .notification-dropdown-panel {
    width: 320px;
    right: -60px;
  }
}

/* Staffroom Digest Dots, Smooth Transition & Rotation Controls */
.staffroom-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 12px;
}

.staffroom-dot {
  width: 10px !important;
  height: 10px !important;
  min-width: 10px !important;
  min-height: 10px !important;
  max-width: 10px !important;
  max-height: 10px !important;
  flex-shrink: 0;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.4) !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  contain: layout size;
}

.staffroom-dot.active {
  background: #2dd4bf !important;
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.5) !important;
  width: 10px !important;
  min-width: 10px !important;
  max-width: 10px !important;
  border-radius: 50% !important;
}

/* The digest content is intentionally NOT animated.
   An opacity wipe on `.staffroom-content` restarted every time the element was re-created, and because
   the workspace re-rendered on every unrelated state change (library page, notification read, scheme
   refresh) that meant a permanent fade-in/out loop on the dashboard — the reported flicker. Any
   rotation transition that is kept must be a transform/opacity change on a stable element, never a
   re-entrant animation on a re-created one. */
.staffroom-content {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .staffroom-content {
    animation: none !important;
  }
  .staffroom-dot {
    transition: none !important;
  }
  /* Global reduced-motion guarantee for the dashboard: no element anywhere animates in a way that
     can move, pulse or rescale content the user is trying to read. Colour/opacity transitions are
     left intact because they never change layout. */
  .sync-dot,
  .stitch-card,
  .toolkit-card,
  .resource-card {
    animation: none !important;
  }
  .stitch-card:hover,
  .resource-card:hover,
  .toolkit-card:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   ElimuKit UX, Previews, Watermarking & Gated Content Styles
   ========================================================================== */

/* Auth Alert Success State */
.auth-alert.auth-alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.auth-alert.auth-alert-success svg {
  fill: #16a34a;
}

/* Mobile Nav Toggle Support */
@media (max-width: 860px) {
  .public-header {
    position: relative;
  }

  .public-header.mobile-nav-open .public-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 16px 32px rgba(0, 35, 111, 0.1);
    gap: 14px;
    z-index: 1000;
  }

  .public-header.mobile-nav-open .header-actions {
    display: flex;
    position: absolute;
    top: calc(100% + 235px);
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 0 20px 20px;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 20px 32px rgba(0, 35, 111, 0.12);
    z-index: 1000;
    gap: 10px;
  }

  .public-header.mobile-nav-open .header-actions .button {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

/* Public Previews & Watermarking System */
.preview-page-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.preview-top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  padding: 18px 24px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.04);
  margin-bottom: 24px;
}

.preview-title-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-title-col h1 {
  font-size: 22px;
  font-weight: 800;
  color: #0b2246;
  margin: 0;
}

.preview-meta-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.preview-chip.chip-teal {
  background: #e6fffa;
  color: #047481;
  border: 1px solid #b2f5ea;
}

.preview-chip.chip-amber {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.preview-chip.chip-blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.preview-document-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 35, 111, 0.08);
  overflow: hidden;
}

.preview-doc-header {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  padding: 24px 28px;
  text-align: center;
}

.preview-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #123f6b;
  margin-bottom: 6px;
}

.preview-doc-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px;
}

.preview-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  text-align: left;
}

.preview-doc-grid dt {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.preview-doc-grid dd {
  margin: 0;
  font-weight: 600;
  color: #1e293b;
}

/* Watermark Overlay */
.preview-watermark-wrap {
  position: relative;
  overflow-x: auto;
}

.preview-watermark-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 140px,
    rgba(18, 63, 107, 0.025) 140px,
    rgba(18, 63, 107, 0.025) 280px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-watermark-banner {
  position: sticky;
  top: 40%;
  transform: rotate(-18deg);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 5px;
  color: rgba(18, 63, 107, 0.12);
  white-space: nowrap;
  user-select: none;
  text-transform: uppercase;
  border: 3px dashed rgba(18, 63, 107, 0.14);
  padding: 10px 32px;
  border-radius: 8px;
}

/* Gated Paywall / Registration Section */
.preview-blurred-content {
  filter: blur(5px);
  -webkit-filter: blur(5px);
  opacity: 0.5;
  user-select: none;
  pointer-events: none;
  transition: filter 0.3s ease;
}

.preview-unlocked-content {
  filter: none !important;
  -webkit-filter: none !important;
  opacity: 1 !important;
  user-select: auto !important;
  pointer-events: auto !important;
  transition: opacity 0.3s ease;
}

.preview-gate-overlay {
  position: relative;
  margin-top: -160px;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 24px 20px 48px;
}

.preview-gate-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 35, 111, 0.18), 0 0 0 1px rgba(0, 35, 111, 0.08);
  padding: 36px 40px;
  max-width: 660px;
  width: 100%;
  text-align: center;
  border-top: 5px solid #123f6b;
}

.gate-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #eff6ff;
  color: #123f6b;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 26px;
  box-shadow: 0 4px 12px rgba(18, 63, 107, 0.1);
}

.preview-gate-card h3 {
  font-size: 22px;
  font-weight: 800;
  color: #0b2246;
  margin: 0 0 10px;
}

.preview-gate-card p {
  font-size: 14.5px;
  color: #475569;
  line-height: 1.55;
  margin: 0 0 20px;
}

.gate-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 16px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.gate-checklist div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.gate-checklist div svg {
  color: #047481;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.gate-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.gate-subtext {
  display: block;
  font-size: 12.5px;
  color: #64748b;
}

/* Public Curriculum & Resource Showcase Cards */
.public-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 32px 0 48px;
}

.public-scheme-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 35, 111, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.public-scheme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 35, 111, 0.1);
  border-color: #cbd5e1;
}

.public-scheme-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.public-scheme-card h3 {
  font-size: 17px;
  font-weight: 800;
  color: #0b2246;
  margin: 0 0 6px;
}

.public-scheme-card p {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 18px;
  flex: 1;
}

.public-scheme-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.sample-exam-paper {
  padding: 32px 36px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
  line-height: 1.6;
}

.sample-exam-header {
  text-align: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.sample-exam-header h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px;
  color: #0f172a;
  text-transform: uppercase;
}

.sample-exam-header p {
  margin: 2px 0;
  font-size: 13px;
  color: #475569;
}

.sample-question {
  margin-bottom: 20px;
  font-size: 13.5px;
}

.sample-question strong {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
}

.sample-options {
  list-style: none;
  padding-left: 20px;
  margin: 6px 0;
}

.sample-options li {
  margin-bottom: 4px;
  color: #334155;
}

/* ==========================================================================
   Mobile-First Zero-Bloat Educational Image Carousel
   Hardware-accelerated CSS-only opacity fades (5.5s cycle per slide, 16.5s total)
   ========================================================================== */
.landing-carousel-wrapper {
  position: relative;
  width: 100%;
  height: 420px;
  max-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  background-color: #7b4a24; /* Warm ochre/brown fallback for slow mobile networks */
  box-shadow: 0 12px 36px -8px rgba(11, 34, 70, 0.28);
  contain: layout paint;
}

@media (max-width: 900px) {
  .landing-carousel-wrapper {
    height: 320px;
    max-height: 320px;
  }
}

@media (max-width: 600px) {
  .landing-carousel-wrapper {
    height: 260px;
    max-height: 260px;
    border-radius: 12px;
  }
}

.landing-carousel-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: #7b4a24; /* Warm ochre/brown fallback */
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  background-color: #7b4a24;
  animation-duration: 16.5s;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide.slide-0 {
  opacity: 1;
  pointer-events: auto;
  animation-name: carouselSlide0;
}

.carousel-slide.slide-1 {
  animation-name: carouselSlide1;
}

.carousel-slide.slide-2 {
  animation-name: carouselSlide2;
}

/* CSS-only auto-fading timing (5.5s cycle per slide, 16.5s total) */
@keyframes carouselSlide0 {
  0%, 28% {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
  }
  33.33%, 94.66% {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
  }
  100% {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
  }
}

@keyframes carouselSlide1 {
  0%, 28% {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
  }
  33.33%, 61.33% {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
  }
  66.66%, 100% {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
  }
}

@keyframes carouselSlide2 {
  0%, 61.33% {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
  }
  66.66%, 94.66% {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
  }
  100% {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
  }
}

.carousel-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.carousel-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Accessible, contrasting textual overlay banners */
.carousel-banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px 20px 20px;
  background: linear-gradient(180deg, rgba(11, 34, 70, 0) 0%, rgba(11, 34, 70, 0.75) 35%, rgba(11, 34, 70, 0.95) 100%);
  color: #ffffff;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.carousel-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  width: fit-content;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.carousel-tier-pill.chip-teal {
  background: #00a496;
  color: #ffffff;
}

.carousel-tier-pill.chip-blue {
  background: #1d4ed8;
  color: #ffffff;
}

.carousel-tier-pill.chip-amber {
  background: #b45309;
  color: #ffffff;
}

.carousel-tier-caption h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.carousel-tier-caption p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@media (max-width: 600px) {
  .carousel-banner-overlay {
    padding: 24px 12px 12px;
  }
  .carousel-tier-caption h3 {
    font-size: 13.5px;
  }
  .carousel-tier-caption p {
    font-size: 11px;
    line-height: 1.3;
  }
}

/* Dots / Indicators synchronized with 16.5s keyframes */
.carousel-nav-dots {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 5;
  background: rgba(11, 34, 70, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 5px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  animation-duration: 16.5s;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot.dot-0 {
  animation-name: carouselDot0;
}

.carousel-dot.dot-1 {
  animation-name: carouselDot1;
}

.carousel-dot.dot-2 {
  animation-name: carouselDot2;
}

@keyframes carouselDot0 {
  0%, 28% { background: #00e5cc; transform: scale(1.25); }
  33.33%, 94.66% { background: rgba(255, 255, 255, 0.4); transform: scale(1); }
  100% { background: #00e5cc; transform: scale(1.25); }
}

@keyframes carouselDot1 {
  0%, 28% { background: rgba(255, 255, 255, 0.4); transform: scale(1); }
  33.33%, 61.33% { background: #38bdf8; transform: scale(1.25); }
  66.66%, 100% { background: rgba(255, 255, 255, 0.4); transform: scale(1); }
}

@keyframes carouselDot2 {
  0%, 61.33% { background: rgba(255, 255, 255, 0.4); transform: scale(1); }
  66.66%, 94.66% { background: #fbbf24; transform: scale(1.25); }
  100% { background: rgba(255, 255, 255, 0.4); transform: scale(1); }
}

/* Floating overlay badges on hero */
.stitch-hero-visual .hero-float {
  z-index: 10;
}

/* Dashboard Carousel Integration */
.dashboard-carousel-card {
  flex: 0 0 340px;
  max-width: 340px;
  width: 100%;
}

.dashboard-carousel-wrapper {
  position: relative;
  width: 100%;
  height: 165px;
  max-height: 165px;
  border-radius: 14px;
  overflow: hidden;
  background-color: #7b4a24; /* Warm ochre/brown fallback for slow mobile networks */
  box-shadow: 0 4px 16px rgba(0, 35, 111, 0.12);
  contain: layout paint;
}

@media (max-width: 900px) {
  .dashboard-carousel-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .dashboard-carousel-wrapper {
    height: 140px;
    max-height: 140px;
  }
}

@media (max-width: 600px) {
  .dashboard-carousel-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .dashboard-carousel-wrapper {
    height: 125px;
    max-height: 125px;
    border-radius: 10px;
  }
}

.dashboard-carousel-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: #7b4a24;
}

.dashboard-carousel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 12px 10px;
  background: linear-gradient(180deg, rgba(11, 34, 70, 0) 0%, rgba(11, 34, 70, 0.72) 40%, rgba(11, 34, 70, 0.92) 100%);
  color: #ffffff;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dashboard-carousel-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  width: fit-content;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.dashboard-carousel-pill.chip-teal {
  background: #00a496;
  color: #ffffff;
}

.dashboard-carousel-pill.chip-blue {
  background: #1d4ed8;
  color: #ffffff;
}

.dashboard-carousel-pill.chip-amber {
  background: #b45309;
  color: #ffffff;
}

.dashboard-carousel-sub {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-carousel-dots {
  top: 10px;
  right: 10px;
  padding: 3px 8px;
}

/* Kenyan MoE / CBC / KICD Lesson Plan Document Styling */
.lesson-document-sheet {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 35, 111, 0.04);
  margin-bottom: 24px;
  contain: layout;
}

.lp-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-bottom: 8px;
}

.lp-grid-table td,
.lp-grid-table th {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  vertical-align: top;
}

.lp-grid-table th {
  background-color: #00236f;
  color: #ffffff;
  font-weight: 700;
  text-align: left;
}

.lp-editable-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #1e293b;
  background: #f8fafc;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lp-editable-input:focus,
.lp-editable-textarea:focus,
.lp-table-textarea:focus {
  border-color: #00236f;
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 35, 111, 0.12);
}

.lp-editable-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
  background: #f8fafc;
  box-sizing: border-box;
  resize: vertical;
}

.lp-table-textarea {
  width: 100%;
  min-height: 70px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: #1e293b;
  background: #ffffff;
  box-sizing: border-box;
  resize: vertical;
}

/* Statutory sign-off inspection block */
.scheme-signoff-block {
  display: block;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 2px solid #00236f;
}

/* Print / PDF Export Styling */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }

  .public-nav,
  .stitch-nav,
  .scheme-weeks-nav,
  .scheme-top-toolbar div:last-child,
  .scheme-top-toolbar button,
  .scheme-top-toolbar a,
  .btn-export-scheme-docx,
  #btn-export-lesson-docx,
  #btn-export-lesson-pdf,
  #btn-save-lesson-plan,
  #plan-lesson-modal-backdrop,
  .doc-action-btn,
  .offline-architecture-banner,
  .scheme-reflection-input,
  [data-save-entry-reflection],
  [data-create-lesson-from-entry],
  .carousel-nav-dots,
  .dashboard-carousel-card,
  .btn-refresh-digest {
    display: none !important;
  }

  .scheme-editor-container,
  .scheme-split-layout,
  .scheme-10col-table-wrap,
  .lesson-document-sheet {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .scheme-table {
    width: 100% !important;
    border-collapse: collapse !important;
    page-break-inside: auto;
  }

  .scheme-table tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  .scheme-table th,
  .scheme-table td {
    border: 1px solid #666666 !important;
    color: #000000 !important;
    padding: 6px 4px !important;
  }

  .scheme-table th {
    background-color: #f1f5f9 !important;
    color: #000000 !important;
  }

  .scheme-admin-header {
    border: 1px solid #999999 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .scheme-signoff-block {
    display: block !important;
    page-break-inside: avoid;
    margin-top: 24px !important;
    border-top: 2px solid #000000 !important;
  }

  .scheme-signoff-block div {
    border-color: #666666 !important;
  }
}

/* ==========================================================================
   Phase 5: Monetization, Paywall & Checkout Modal Animations
   ========================================================================== */

/* Hardware-accelerated, composite-only animations with translateZ(0) */
@keyframes spin {
  from { transform: rotate(0deg) translateZ(0); }
  to { transform: rotate(360deg) translateZ(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1) translateZ(0); }
  50% { opacity: 0.75; transform: scale(0.96) translateZ(0); }
}

@keyframes checkoutSpin {
  from { transform: rotate(0deg) translateZ(0); }
  to { transform: rotate(360deg) translateZ(0); }
}

@keyframes checkoutPulse {
  0%, 100% { opacity: 1; transform: scale(1) translateZ(0); }
  50% { opacity: 0.75; transform: scale(0.96) translateZ(0); }
}

@keyframes checkoutDotPulse {
  0%, 100% { opacity: 1; transform: scale(1) translateZ(0); }
  50% { opacity: 0.35; transform: scale(0.85) translateZ(0); }
}

/* Paywall Cards */
.paywall-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.paywall-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 35, 111, 0.1);
}

/* Checkout Modal Dialog & Layout Stability */
.checkout-modal-dialog {
  max-width: 480px;
  width: 100%;
  box-sizing: border-box;
  animation: none !important; /* Prevent repeated entrance animation on state updates */
  transform: translateZ(0);
}

/* Dedicated Loading Container: Fixed dimensions prevent layout shifts / thrashing */
.checkout-loading-container {
  min-height: 280px;
  min-width: 320px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  box-sizing: border-box;
  contain: layout style;
  transform: translateZ(0);
}

/* Hardware-accelerated STK Push spinner */
.checkout-spinner {
  display: inline-block;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 4px solid #cbd5e1;
  border-top-color: #00236f;
  border-radius: 50%;
  animation: checkoutSpin 0.9s linear infinite;
  margin-bottom: 16px;
  box-sizing: border-box;
  will-change: transform;
  transform: translateZ(0);
}

/* Hardware-accelerated pulse icon for STK push */
.checkout-pulse-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
  animation: checkoutPulse 2s ease-in-out infinite;
  box-sizing: border-box;
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Fixed-width polling pill: prevents horizontal shifting as elapsed seconds increment */
.checkout-polling-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f1f5f9;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12.5px;
  color: #475569;
  margin-bottom: 20px;
  min-width: 260px;
  box-sizing: border-box;
}

.checkout-polling-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  background: #0284c7;
  animation: checkoutDotPulse 1.2s ease-in-out infinite;
  box-sizing: border-box;
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Official M-Pesa Brand Logo */
.mpesa-logo {
  height: 32px;
  object-fit: contain;
  margin-right: 8px;
  vertical-align: middle;
  display: inline-block;
}



