/* ============================================================
   OpenGrading — Admin UI
   Light theme (white background), mobile first.
   ============================================================ */

:root {
    --og-ink: #1b2036;
    --og-bg: #ffffff;
    --og-bg-gradient: linear-gradient(165deg, #ffffff 0%, #ffffff 42%, rgba(27, 32, 54, .055) 78%, rgba(27, 32, 54, .1) 100%);
    --og-surface: #ffffff;
    --og-surface-soft: #f6f7fa;
    --og-border: #e7e9f0;
    --og-border-strong: #dcdfe9;
    --og-text: #1b2036;
    --og-text-soft: #4d5470;
    --og-muted: #868ca3;
    --og-primary: #6c5ce7;
    --og-primary-dark: #5a4bd6;
    --og-primary-soft: #f0edff;
    --og-green: #2fbf6a;
    --og-green-soft: #e6f8ee;
    --og-blue: #3b82f6;
    --og-blue-soft: #e9f1ff;
    --og-amber: rgba(232, 42, 42, 0.6);
    --og-amber-soft: #fdf3dd;
    --og-amber-border: #f0c775;
    --og-danger: #e04a4f;
    --og-danger-soft: #fdeded;
    --og-radius: 18px;
    --og-radius-sm: 12px;
    --og-shadow: 0 1px 2px rgba(27, 32, 54, .04), 0 10px 28px -20px rgba(27, 32, 54, .3);
    --og-gutter: 16px;
    --og-rail-width: 84px;
    --og-panel-width: 330px;
    --og-bottom-nav-height: 70px;
    --og-appbar-height: 73px;
    --og-gradient: linear-gradient(90deg, #6c5ce7 0%, #3b82f6 100%);
    --og-lock: #e3a232;
}

/* ---------- Base ---------- */
/* Our own reset: the layout must not depend on Bootstrap's reboot being there,
   or a full-width button overflows its container the moment the CDN is slow. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body.og-body {
    margin: 0;
    min-height: 100vh;
    background: var(--og-bg);
    background-image: var(--og-bg-gradient);
    background-attachment: fixed;
    color: var(--og-text);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.og-body a {
    text-decoration: none;
    color: inherit;
}

.og-shell {
    display: flex;
    min-height: 100vh;
}

.og-main {
    flex: 1;
    min-width: 0;
    padding-bottom: calc(var(--og-bottom-nav-height) + 24px);
}

.og-content {
    padding: 0 var(--og-gutter) 28px;
}

.og-page-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 4px 0 4px;
}

.og-page-subtitle {
    font-size: 14px;
    color: var(--og-muted);
    margin: 0 0 20px;
}

.og-section-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0 0 14px;
}

.og-text-muted {
    color: var(--og-muted);
}

/* ---------- Mobile top bar ---------- */
.og-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px var(--og-gutter);
    margin: 0 calc(-1 * var(--og-gutter)) 10px;
    border-bottom: 1px solid var(--og-border);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.og-bell {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--og-border);
    background: var(--og-surface);
    color: var(--og-text-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex: none;
}

.og-bell .og-bell-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--og-danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Desktop icon rail ---------- */
.og-rail {
    display: none;
    width: var(--og-rail-width);
    flex: none;
    border-right: 1px solid var(--og-border);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
}

.og-rail-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
}

.og-rail-item {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--og-muted);
    transition: background .18s ease, color .18s ease;
}

.og-rail-item:hover {
    background: var(--og-surface-soft);
    color: var(--og-text-soft);
}

.og-rail-item.active {
    background: var(--og-amber-soft);
    color: var(--og-amber);
}

/* ---------- Mobile bottom nav ---------- */
.og-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--og-bottom-nav-height);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--og-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 40;
    padding-bottom: env(safe-area-inset-bottom);
}

.og-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--og-muted);
    flex: 1;
    min-width: 0;
}

.og-bottom-nav-item i {
    font-size: 19px;
}

.og-bottom-nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.og-bottom-nav-item.active {
    color: var(--og-primary);
}

/* ---------- Cards ---------- */
.og-card {
    background: var(--og-surface);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    box-shadow: var(--og-shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.og-card-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0 0 2px;
}

.og-card-subtitle {
    font-size: 13px;
    color: var(--og-muted);
    margin: 0 0 18px;
}

/* ---------- Stat cards ---------- */
.og-stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.og-stat {
    background: var(--og-surface);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    box-shadow: var(--og-shadow);
    padding: 20px;
    display: block;
}

.og-stat-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.og-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    flex: none;
}

.og-stat-icon.purple {
    background: var(--og-primary-soft);
    color: var(--og-primary);
}

.og-stat-icon.green {
    background: var(--og-green-soft);
    color: var(--og-green);
}

.og-stat-icon.blue {
    background: var(--og-blue-soft);
    color: var(--og-blue);
}

.og-stat-label {
    font-size: 14px;
    color: var(--og-text-soft);
    margin: 0;
}

.og-stat-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 2px 0 0;
}

.og-stat-hint {
    font-size: 12px;
    color: var(--og-muted);
    margin: 16px 0 0;
}

/* ---------- Distribution bars ---------- */
.og-bar-row {
    margin-bottom: 18px;
}

.og-bar-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.og-bar-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--og-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.og-bar-value {
    font-size: 15px;
    font-weight: 800;
    flex: none;
}

.og-bar {
    height: 8px;
    border-radius: 99px;
    background: rgba(27, 32, 54, .08);
    overflow: hidden;
}

.og-bar-fill {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: var(--og-primary);
}

.og-bar-fill.green {
    background: var(--og-green);
}

.og-card-footer {
    border-top: 1px solid var(--og-border);
    padding-top: 14px;
    margin-top: 20px;
    font-size: 13px;
    color: var(--og-muted);
}

.og-card-footer strong {
    color: var(--og-text);
}

/* ---------- Search ---------- */
.og-search {
    position: relative;
    margin-bottom: 6px;
}

.og-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--og-muted);
    font-size: 15px;
    pointer-events: none;
}

.og-search input {
    width: 100%;
    height: 46px;
    border-radius: var(--og-radius-sm);
    border: 1px solid var(--og-border-strong);
    background: var(--og-surface-soft);
    padding: 0 16px 0 42px;
    font-size: 14px;
    color: var(--og-text);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.og-search input::placeholder {
    color: var(--og-muted);
}

.og-search input:focus {
    background: var(--og-surface);
    border-color: var(--og-primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, .12);
}

/* ---------- Lists ---------- */
.og-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.og-list-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 10px;
    border-bottom: 1px solid var(--og-border);
    border-radius: 12px;
    transition: background .18s ease;
}

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

.og-list-item:hover {
    background: var(--og-surface-soft);
}

.og-list-item.active {
    background: var(--og-primary-soft);
    border-bottom-color: transparent;
}

.og-list-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--og-primary);
}

.og-list-item.active .og-list-title {
    color: var(--og-primary);
}

.og-list-item.active .og-list-date {
    color: #8f83c9;
}

.og-list-body {
    flex: 1;
    min-width: 0;
}

.og-list-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.og-list-meta {
    font-size: 13px;
    color: var(--og-muted);
    margin: 2px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.og-list-date {
    font-size: 11.5px;
    color: var(--og-muted);
    flex: none;
}

.og-empty {
    padding: 28px 4px;
    color: var(--og-muted);
    font-size: 14px;
    text-align: center;
}

/* ---------- Avatars ---------- */
.og-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    background: linear-gradient(145deg, #fcdd93, #f6c25c);
    color: #7a5312;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

.og-avatar.sm {
    width: 38px;
    height: 38px;
    font-size: 13px;
}

.og-avatar.lg {
    width: 96px;
    height: 96px;
    font-size: 30px;
}

/* ---------- Buttons ---------- */
.og-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    border-radius: var(--og-radius-sm);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: none;
    transition: filter .18s ease, background .18s ease;
}

.og-btn-gradient {
    background: linear-gradient(90deg, #6c5ce7 0%, #3b82f6 100%);
    color: #fff;
    width: 100%;
}

.og-btn-gradient:hover {
    filter: brightness(1.05);
    color: #fff;
}

.og-btn-gradient.auto {
    width: auto;
}

.og-btn-danger-soft {
    background: var(--og-surface);
    border-color: #842029;
    color: #dc3545;
    box-shadow: 0 1px 2px rgba(232, 165, 42, .12);
}

.og-btn-danger-soft:hover {
    background: var(--og-amber-soft);
    color: var(--og-amber);
}

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

.og-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--og-radius-sm);
    border: 1px solid var(--og-border-strong);
    background: var(--og-surface);
    color: var(--og-text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex: none;
}

.og-icon-btn:hover {
    background: var(--og-surface-soft);
}

.og-body a.og-link,
.og-link {
    color: var(--og-blue);
    font-size: 14px;
    font-weight: 600;
}

.og-body a.og-link:hover,
.og-link:hover {
    color: var(--og-primary);
}

/* ---------- Detail header ---------- */
.og-detail-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px var(--og-gutter);
    margin: 0 calc(-1 * var(--og-gutter)) 10px;
    border-bottom: 1px solid var(--og-border);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.og-detail-head .og-detail-title {
    flex: 1;
    min-width: 0;
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.og-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 0 6px;
}

.og-identity-name {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.og-meta-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--og-text-soft);
    margin-bottom: 6px;
}

.og-meta-line i {
    color: var(--og-muted);
}

.og-submission {
    padding: 14px 0;
    border-bottom: 1px solid var(--og-border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.og-submission:last-of-type {
    border-bottom: none;
}

.og-submission-body {
    /* A link: the row opens the grade sheet it describes. */
    display: block;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.og-submission-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.og-submission-meta {
    font-size: 13px;
    color: var(--og-muted);
    margin: 3px 0 0;
}

.og-badge-blocked {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 99px;
    background: var(--og-danger-soft);
    color: var(--og-danger);
    font-size: 12px;
    font-weight: 700;
}

/* ---------- Side panel (desktop master / detail) ---------- */
.og-panel {
    display: none;
    width: var(--og-panel-width);
    flex: none;
    border-right: 1px solid var(--og-border);
    padding: 22px 18px;
    background: rgba(255, 255, 255, .75);
}

.og-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* ---------- Toasts ---------- */
.og-toast {
    border-radius: var(--og-radius-sm) !important;
}

/* ---------- Responsive ---------- */
@media (min-width: 992px) {
    :root {
        --og-gutter: 28px;
    }

    .og-rail {
        display: block;
    }

    .og-bottom-nav {
        display: none;
    }

    .og-topbar,
    .og-detail-head {
        display: none;
    }

    .og-shell {
        padding-left: var(--og-rail-width);
    }

    /* The header runs above the panel and the content, which sit side by side. */
    .og-main {
        padding-bottom: 40px;
        display: flex;
        flex-direction: column;
    }

    .og-main-body {
        flex: 1;
        display: flex;
        min-width: 0;
    }

    .og-panel {
        display: block;
        min-height: calc(100vh - var(--og-appbar-height));
    }

    .og-content {
        flex: 1;
        min-width: 0;
        padding: 30px clamp(28px, 3.5vw, 56px) 56px;
        max-width: 1560px;
        margin-inline: auto;
    }

    .og-page-title {
        font-size: 34px;
    }

    .og-stat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-bottom: 22px;
    }

    .og-split {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .og-card,
    .og-stat {
        padding: 24px;
        margin-bottom: 0;
    }
}

@media (max-width: 991.98px) {
    .og-desktop-only {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .og-mobile-only {
        display: none !important;
    }
}

/* Pages without navigation (sign-in): they empty the sidebar and
   bottom_nav blocks, so no room is kept for the rail or the bottom bar. */
.og-shell.og-shell-bare {
    padding-left: 0;
}

.og-shell-bare .og-main {
    padding-bottom: 24px;
}

/* ---------- Page specific pieces ---------- */
.og-detail-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
}

.og-identity-center {
    text-align: center;
    padding: 26px 0 6px;
}

.og-identity-center .og-avatar {
    margin: 0 auto;
}

/* The teacher's number, under the name: a badge, so it reads at a glance */
.og-body a.og-teacher-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 8px;
    padding: 6px 14px;
    border: 1px solid rgba(108, 92, 231, .22);
    border-radius: 99px;
    background: var(--og-primary-soft);
    color: var(--og-primary-dark);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.og-body a.og-teacher-phone:hover {
    border-color: var(--og-primary);
}

.og-identity-center .og-teacher-phone {
    margin-top: 12px;
}

/* Mobile: no room for a pill beside the photo. The number is a plain line,
   and "See all teachers" goes under it. */
.og-body .og-identity a.og-teacher-phone {
    display: flex;
    width: fit-content;
    margin: 2px 0 4px;
    padding: 0;
    border: none;
    background: none;
    color: var(--og-text-soft);
    font-size: 13px;
    font-weight: 600;
}

.og-identity-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 18px 0 0;
}

.og-placeholder {
    text-align: center;
    padding: 90px 20px;
}

.og-placeholder-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: var(--og-primary-soft);
    color: var(--og-primary);
    font-size: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

/* ---------- Submission rows: reveal the action on hover (desktop) ---------- */
@media (min-width: 992px) {
    .og-submission {
        margin: 0 -14px;
        padding: 14px;
        border-radius: 14px;
        transition: background .18s ease;
    }

    .og-submission:hover,
    .og-submission:focus-within {
        background: rgba(27, 32, 54, .05);
    }

    .og-submission-action {
        opacity: 0;
        transform: translateX(8px);
        pointer-events: none;
        transition: opacity .18s ease, transform .18s ease;
    }

    .og-submission:hover .og-submission-action,
    .og-submission:focus-within .og-submission-action {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
}

/* ---------- Grade sheet ---------- */
.og-grade-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.og-grade-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.og-grade-title-row .og-page-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.og-grade-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: var(--og-text-soft);
    margin: 22px 0 10px;
}

.og-grade-meta .og-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--og-primary);
    flex: none;
}

.og-grade-meta i {
    color: var(--og-muted);
}

.og-grade-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.og-grade-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--og-border);
}

.og-grade-row-extra {
    display: none;
}

.og-grade-list.is-expanded .og-grade-row-extra {
    display: flex;
}

.og-grade-rank {
    width: 20px;
    flex: none;
    font-size: 15px;
    font-weight: 700;
    color: var(--og-muted);
    text-align: center;
}

.og-grade-name {
    flex: 1;
    min-width: 0;
}

.og-grade-fullname {
    margin: 0;
    font-size: 14px;
    color: var(--og-text-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.og-grade-fullname strong {
    font-weight: 600;
    color: var(--og-text);
    text-transform: uppercase;
}

.og-grade-reg {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--og-muted);
}

.og-grade-badge {
    flex: none;
    font-size: 14px;
    font-weight: 700;
    color: var(--og-green);
    background: var(--og-green-soft);
    padding: 5px 12px;
    border-radius: 99px;
}

.og-more-students {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 14px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--og-muted);
    cursor: pointer;
}

.og-more-students:hover {
    color: var(--og-text-soft);
}

.og-export-bar {
    margin-top: 18px;
}

.og-export-count {
    font-size: 13px;
    color: var(--og-muted);
    flex: none;
}

.og-export-text {
    font-size: 13px;
    color: var(--og-muted);
    margin: 0 0 14px;
}

/* Number of students on the sheet, under the list */
.og-grade-total {
    margin: 12px 0 0;
    font-size: 17px;
    color: var(--og-muted);
}

.og-export-icon {
    width: 26px;
    height: 26px;
    flex: none;
}

/* ---------- API teaser ---------- */
.og-api-card {
    margin-top: 32px;
    padding: 20px;
    background: var(--og-surface);
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius);
    box-shadow: var(--og-shadow);
}

.og-api-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.og-api-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--og-primary-soft);
    color: var(--og-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    flex: none;
}

.og-api-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0;
}

.og-api-text {
    font-size: 13px;
    color: var(--og-muted);
    margin: 12px 0 16px;
    line-height: 1.55;
}

@media (min-width: 992px) {
    .og-grade-meta {
        margin: 30px 0 6px;
    }

    .og-grade-row {
        padding: 14px 0;
    }

    .og-grade-row-extra {
        display: flex;
    }

    .og-grade-rank {
        width: 26px;
        font-size: 17px;
        color: var(--og-text);
    }

    .og-grade-name {
        flex: none;
        width: 340px;
    }

    .og-grade-fullname {
        font-size: 15px;
    }

    .og-grade-badge {
        background: none;
        padding: 0;
        min-width: 46px;
        font-weight: 700;
        color: var(--og-text);
    }

    /* Same colour code as the mobile pills, without the pill */
    .og-grade-badge.low {
        color: var(--og-danger);
    }

    .og-grade-badge.mid {
        color: #9a6a0a;
    }

    .og-grade-badge.high {
        color: #1d8f4e;
    }

    /* Every row is already on screen, so there is nothing left to unfold. */
    .og-more-students {
        display: none;
    }

    .og-export-bar {
        display: flex;
        align-items: center;
        gap: 24px;
        margin-top: 22px;
    }

    .og-export-bar .og-btn-gradient {
        width: auto;
        min-width: 190px;
    }

    /* The sentence explains the button: it sits right next to it */
    .og-export-text {
        flex: 1;
        text-align: right;
        margin: 0;
    }

    .og-api-card {
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 24px;
        margin-top: 46px;
    }

    .og-api-body {
        flex: 1;
        min-width: 0;
    }

    .og-api-text {
        margin: 8px 0 0;
    }
}

.og-avatar.xs {
    width: 45px;
    height: 45px;
    font-size: 15px;
}

/* ---------- Decorative background ----------
   One SVG: soft light fields + a constellation that fades out towards the
   content. Blur and fade are baked into the file, so no CSS filter runs here. */
.og-bg-decor {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url('../images/bg-illustration.svg'), url('../images/bg-fields.svg');
    background-repeat: no-repeat, no-repeat;
    background-position: right -30px bottom -30px, center;
    background-size: 300px auto, cover;
}

.og-shell {
    position: relative;
    z-index: 1;
}

/* Nothing may stick out sideways: a phone browser would zoom the whole page
   out to show it. `clip`, not `hidden`, so the sticky top bar keeps working. */
.og-main {
    overflow-x: clip;
}

@media (min-width: 992px) {
    .og-bg-decor {
        background-position: right -20px bottom -10px, center;
        background-size: 430px auto, cover;
    }
}

/* On a phone the illustration lands straight behind the reading column, so the
   decor becomes a coloured wash at the very top that fades into plain white:
   the page keeps its identity, the text keeps a pure white sheet to sit on. */
@media (max-width: 991.98px) {
    .og-bg-decor {
        background-image: url('../images/bg-fields.svg');
        background-position: center top;
        background-size: 160% auto;
        opacity: .85;
        -webkit-mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .55) 210px, rgba(0, 0, 0, 0) 360px);
        mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .55) 210px, rgba(0, 0, 0, 0) 360px);
    }
}

/* ---------- Readability over the pattern ----------
   The wave layer itself is blurred (see .og-bg-decor), so nothing needs a panel
   here: only the rules are drawn a touch stronger so the table reads as a table. */
.og-grade-row,
.og-submission {
    border-bottom-color: rgba(27, 32, 54, .16);
}

.og-grade-row:last-child,
.og-submission:last-of-type {
    border-bottom: none;
}

.og-grade-reg,
.og-submission-meta {
    color: #6b7288;
}

/* ---------- Section title with its icon tile ---------- */
.og-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.og-section-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--og-primary-soft);
    color: var(--og-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex: none;
}

.og-link .bi-chevron-right {
    font-size: 11px;
    vertical-align: baseline;
    margin-left: 2px;
}

.og-step {
    position: relative;
    display: flex;
    gap: 16px;
    padding: 24px 0 26px;
}

.og-step::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 66px;
    bottom: -8px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, #ded8ff 0, rgba(222, 216, 255, 0) 100%);
}

.og-step:last-of-type::before {
    display: none;
}

.og-step-icon {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex: none;
    background: linear-gradient(145deg, #8172f2, #6c5ce7);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 5px rgba(108, 92, 231, .1);
}

.og-step-body {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.og-step-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--og-primary);
    margin: 0 0 6px;
}

.og-step-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.015em;
    line-height: 1.3;
    margin: 0 0 7px;
}

.og-step-sub {
    font-size: 14px;
    color: var(--og-text-soft);
    line-height: 1.6;
    margin: 0 0 18px;
}

.og-step-sub strong {
    color: var(--og-text);
    font-weight: 700;
}

.og-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #6b7288;
    line-height: 1.55;
    margin: 18px 0 22px;
}

.og-note i {
    color: var(--og-primary);
    font-size: 14px;
    flex: none;
    margin-top: 1px;
}

/* ---------- Page intro ---------- */
.og-page-lead {
    font-size: 14px;
    line-height: 1.6;
    color: var(--og-text-soft);
    margin: 6px 0 0;
    max-width: 620px;
}

.og-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 2px;
}

.og-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: var(--og-surface-soft);
    color: var(--og-text-soft);
}

.og-chip i {
    font-size: 12px;
}

.og-chip-ok {
    background: var(--og-green-soft);
    color: #1d8f4e;
}

.og-chip-key {
    background: var(--og-primary-soft);
    color: var(--og-primary);
}

/* ---------- Flow: three connected beats ---------- */
.og-flow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 20px 0 2px;
}

.og-flow-item {
    position: relative;
    padding: 22px 16px 0 0;
    min-width: 0;
}

.og-flow-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--og-primary);
    box-shadow: 0 0 0 4px var(--og-primary-soft);
}

.og-flow-item::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 0;
    top: 7.5px;
    height: 2px;
    background: #d9d2fb;
}

.og-flow-item:last-child::after {
    display: none;
}

.og-flow-item strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.og-flow-item span {
    display: block;
    font-size: 12.5px;
    color: #6b7288;
    margin-top: 2px;
}

/* ---------- Fields ---------- */
.og-field {
    max-width: 520px;
}

.og-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 8px;
}

.og-input {
    width: 100%;
    height: 46px;
    border-radius: 8px;
    border: 1px solid var(--og-border-strong);
    background: var(--og-surface);
    padding: 0 14px;
    font-size: 14px;
    color: var(--og-text);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

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

.og-input:focus {
    border-color: var(--og-primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, .12);
}

.og-select {
    width: auto;
    min-width: 170px;
    padding-right: 34px;
}

.og-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .02em;
}

.og-help {
    font-size: 12.5px;
    color: #6b7288;
    line-height: 1.5;
    margin: 8px 0 0;
}

/* ---------- Auth checklist ---------- */
.og-check-list {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
}

.og-check-item {
    display: flex;
    gap: 10px;
    margin-bottom: 13px;
}

.og-check-item i {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--og-green-soft);
    color: #1d8f4e;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    margin-top: 1px;
}

.og-check-item p {
    margin: 0;
    font-size: 14px;
    color: var(--og-text-soft);
    line-height: 1.55;
}

.og-check-item strong {
    color: var(--og-text);
    font-weight: 700;
}

/* ---------- Key row ---------- */
.og-key-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    max-width: 640px;
}

.og-key-field {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.og-key-field .og-input {
    padding-right: 44px;
}

.og-key-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: none;
    color: var(--og-muted);
    cursor: pointer;
}

.og-key-toggle:hover {
    background: var(--og-surface-soft);
    color: var(--og-text-soft);
}

/* ---------- Code block ---------- */
.og-code {
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius-sm);
    overflow: hidden;
    background: var(--og-surface-soft);
    max-width: 720px;
}

.og-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border-bottom: 1px solid var(--og-border);
    background: var(--og-surface);
    font-size: 11px;
    font-weight: 800;
    color: var(--og-muted);
    letter-spacing: .08em;
}

.og-code-copy {
    border: none;
    background: none;
    color: var(--og-text-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
}

.og-code-copy:hover {
    color: var(--og-primary);
}

.og-code-body {
    margin: 0;
    padding: 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.7;
    color: #343a56;
    overflow-x: auto;
}

/* ---------- Ordered list ---------- */
.og-ol {
    list-style: none;
    counter-reset: og-ol;
    margin: 0;
    padding: 0;
}

.og-ol li {
    counter-increment: og-ol;
    position: relative;
    padding-left: 30px;
    margin-bottom: 11px;
    font-size: 14px;
    color: var(--og-text-soft);
    line-height: 1.6;
}

.og-ol li::before {
    content: counter(og-ol);
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 7px;
    background: var(--og-primary-soft);
    color: var(--og-primary);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.og-ol li:last-child {
    margin-bottom: 0;
}

.og-ol strong {
    color: var(--og-text);
    font-weight: 700;
}

@media (min-width: 992px) {
    .og-step {
        gap: 20px;
        padding: 30px 0 32px;
    }

    .og-step-title {
        font-size: 21px;
    }

    .og-page-lead {
        font-size: 15px;
        max-width: 700px;
    }
}

/* ---------- Phone: tighter rhythm, vertical flow, full-width controls ---------- */
@media (max-width: 991.98px) {
    .og-step {
        gap: 14px;
        padding: 22px 0 24px;
    }

    .og-step::before {
        left: 15px;
        top: 58px;
    }

    .og-step-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
        box-shadow: 0 0 0 4px rgba(108, 92, 231, .1);
    }

    .og-step-title {
        font-size: 17px;
    }

    .og-step-sub,
    .og-check-item p,
    .og-ol li {
        font-size: 13.5px;
    }

    .og-flow {
        grid-template-columns: 1fr;
        margin: 18px 0 4px;
    }

    .og-flow-item {
        padding: 0 0 16px 24px;
    }

    .og-flow-item:last-child {
        padding-bottom: 0;
    }

    .og-flow-item::before {
        top: 4px;
    }

    .og-flow-item::after {
        left: 4px;
        right: auto;
        top: 18px;
        bottom: 0;
        width: 2px;
        height: auto;
    }

    .og-field,
    .og-key-row {
        max-width: none;
    }

    .og-select {
        width: 100%;
        flex: 1 1 100%;
        min-width: 0;
    }

    .og-key-field {
        flex: 1 1 0;
        min-width: 0;
    }

    .og-code-body {
        font-size: 11.5px;
        padding: 14px;
    }
}

@media (max-width: 420px) {
    .og-step-eyebrow {
        font-size: 10px;
        letter-spacing: .05em;
    }
}

.og-anim .og-content > .og-page-title,
.og-anim .og-content > .og-page-subtitle,
.og-anim .og-page-lead,
.og-anim .og-chip-row,
.og-anim .og-grade-topline,
.og-anim .og-grade-title-row,
.og-anim .og-detail-topline,
.og-anim .og-section-title,
.og-anim .og-identity,
.og-anim .og-step,
.og-anim .og-flow-head,
.og-anim .og-stat,
.og-anim .og-card,
.og-anim .og-list-item,
.og-anim .og-submission,
.og-anim .og-placeholder,
.og-anim .og-empty {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s cubic-bezier(.22, .61, .36, 1),
                transform .6s cubic-bezier(.22, .61, .36, 1);
}

/* Doubled class: it has to outrank `.og-anim .og-content > .og-page-title`. */
.og-anim .is-in.is-in {
    opacity: 1;
    transform: none;
}

/* The timeline connector draws itself once its step is in. */
.og-anim .og-step::before {
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .85s cubic-bezier(.22, .61, .36, 1) .12s;
}

.og-anim .og-step.is-in::before {
    transform: scaleY(1);
}

/* The three beats of the flow land one after the other. */
.og-anim .og-flow-item::before {
    opacity: 0;
    transform: scale(.3);
    transition: opacity .3s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1);
}

.og-anim .og-flow-item::after {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .55s cubic-bezier(.22, .61, .36, 1);
}

.og-anim .og-step.is-in .og-flow-item::before,
.og-anim .og-step.is-in .og-flow-item::after,
.og-anim .og-flow-head.is-in .og-flow-item::before,
.og-anim .og-flow-head.is-in .og-flow-item::after {
    opacity: 1;
    transform: none;
}

.og-anim .og-step.is-in .og-flow-item:nth-child(1)::before,
.og-anim .og-flow-head.is-in .og-flow-item:nth-child(1)::before { transition-delay: .25s }
.og-anim .og-step.is-in .og-flow-item:nth-child(1)::after ,
.og-anim .og-flow-head.is-in .og-flow-item:nth-child(1)::after  { transition-delay: .35s }
.og-anim .og-step.is-in .og-flow-item:nth-child(2)::before,
.og-anim .og-flow-head.is-in .og-flow-item:nth-child(2)::before { transition-delay: .5s }
.og-anim .og-step.is-in .og-flow-item:nth-child(2)::after ,
.og-anim .og-flow-head.is-in .og-flow-item:nth-child(2)::after  { transition-delay: .6s }
.og-anim .og-step.is-in .og-flow-item:nth-child(3)::before,
.og-anim .og-flow-head.is-in .og-flow-item:nth-child(3)::before { transition-delay: .75s }

@media (max-width: 991.98px) {
    .og-anim .og-flow-item::after {
        transform: scaleY(0);
    }
}

/* Distribution bars grow from their left edge. */
.og-anim .og-bar-fill {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .9s cubic-bezier(.22, .61, .36, 1) .18s;
}

.og-anim .og-card.is-in .og-bar-fill {
    transform: none;
}

/* Anchor jumps glide instead of teleporting. */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (max-width: 991.98px) {
    .og-grade-rank {
        display: none;
    }

    .og-grade-badge.low {
        background: var(--og-danger-soft);
        color: var(--og-danger);
    }

    .og-grade-badge.mid {
        background: var(--og-amber-soft);
        color: #9a6a0a;
    }

    .og-grade-badge.high {
        background: var(--og-green-soft);
        color: #1d8f4e;
    }
}

@media (max-width: 991.98px) {
    .og-api-card {
        margin-top: 26px;
        padding: 0;
        background: none;
        border: none;
        box-shadow: none;
    }

    .og-api-card .og-btn {
        width: 100%;
    }

    .og-api-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 20px;
    }

    .og-api-title {
        font-size: 15px;
    }

    .og-identity {
        padding: 18px 0 4px;
    }

    .og-grade-meta {
        margin: 20px 0 6px;
    }
}

/* ============================================================
   Wide screens: give each page the measure that suits it
   The dashboard spreads over the whole column because its cards carry the
   layout; the grade sheet and the settings guide are documents, so they keep
   a reading width and sit centred rather than hugging the left edge.
   ============================================================ */
@media (min-width: 992px) {
    /* The mark sits in the middle of the row, where the eye finds it, not at
       the far right edge. The name takes half the row, less what comes before
       the mark: rank 26 + avatar 45 + three 12px gaps + half the mark (23). */
    .og-grade-name {
        flex: 0 0 calc(50% - 130px);
        width: auto;
    }

    .og-grade-badge {
        text-align: center;
    }

    /* The settings page carries forms and code, not prose columns: its blocks
       widen with the page so the right half does not sit empty. */
    .og-page-lead {
        max-width: 900px;
    }

    .og-field {
        max-width: 680px;
    }

    .og-key-row {
        max-width: 820px;
    }

    .og-code {
        max-width: 1000px;
    }
}

/* ---------- Language switch, at the foot of the rail ---------- */
.og-lang {
    margin-top: auto;
    display: flex;
    border: 1px solid;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    border-radius: 14px;
    /* Tinted rather than near-white: on a white rail the switch has to read as
       a control, not as empty space. */
    background: var(--og-primary-soft);
}

.og-lang-item {
    width: 38px;
    height: 30px;
    border: none;
    background: none;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--og-muted);
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.og-lang-item:hover {
    background: rgba(255, 255, 255, .7);
    color: var(--og-primary-dark);
}

.og-lang-item.active:hover {
    background: var(--og-primary);
    color: #fff;
}

.og-lang-item.active {
    background: var(--og-primary);
    color: #fff;
    box-shadow: 0 2px 6px -2px rgba(108, 92, 231, .6);
}

/* ============================================================
   Settings — integration page
   Each step is named by one label beside its numbered dot, as on the
   mock-up; the console underneath logs every test request live.
   ============================================================ */
.og-step-body {
    padding-top: 9px;
}

h2.og-step-eyebrow {
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 8px;
}

.og-field-spaced {
    margin-top: 26px;
}

/* ---------- Authentication row ---------- */
.og-auth-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    max-width: 860px;
}

.og-auth-type {
    flex: 0 0 220px;
}

.og-auth-type .og-select {
    width: 100%;
    min-width: 0;
}

.og-auth-value {
    flex: 1 1 280px;
    min-width: 0;
}

.og-auth-save {
    flex: none;
    height: 46px;
}

.og-input:disabled {
    background: var(--og-surface-soft);
    color: var(--og-muted);
    cursor: not-allowed;
}

.og-key-toggle:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.og-auth-value.is-locked .og-label {
    color: var(--og-muted);
}

/* ---------- Code blocks and test ---------- */
.og-code-spaced {
    margin-top: 16px;
}

.og-test-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    margin: 22px 0 16px;
}

.og-test-hint {
    margin: 0;
    font-size: 14px;
    color: #6b7288;
}

.og-btn:disabled {
    opacity: .6;
    cursor: progress;
}

/* ---------- Console ---------- */
.og-console {
    max-width: 1000px;
    border: 1px solid var(--og-border);
    border-radius: var(--og-radius-sm);
    overflow: hidden;
}

.og-console-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 9px 14px;
    background: var(--og-surface);
    border-bottom: 1px solid var(--og-border);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--og-muted);
}

.og-console-title {
    text-transform: uppercase;
}

.og-console-status {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    letter-spacing: 0;
}

.og-console-status.is-ok {
    color: #1d8f4e;
}

.og-console-status.is-err {
    color: var(--og-danger);
}

.og-console-status.is-wait {
    color: #b7791f;
}

.og-console-clear {
    margin-left: auto;
    border: none;
    background: none;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--og-text-soft);
    cursor: pointer;
}

.og-console-clear:hover {
    color: var(--og-primary);
}

/* A terminal reads as a terminal: dark whatever the page theme. */
.og-console-body {
    background: #12152b;
    color: rgba(255, 255, 255, .85);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.75;
    padding: 14px 16px;
    min-height: 170px;
    max-height: 380px;
    overflow: auto;
}

.og-console-line {
    white-space: pre-wrap;
    word-break: break-all;
}

.og-console-line.is-muted {
    color: rgba(255, 255, 255, .45);
}

.og-console-line.is-req {
    color: #b3a6ff;
}

.og-console-line.is-ok {
    color: #7fd6a4;
}

.og-console-line.is-err {
    color: #ff8a8f;
}

.og-console-line.is-wait {
    color: #ffc978;
}

.og-console-line.is-gap {
    height: 10px;
}

/* ---------- Field reference ---------- */
.og-details {
    margin-top: 24px;
    max-width: 1000px;
    overflow-x: auto;
}

.og-details summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

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

.og-details summary::before {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .2s ease;
}

.og-details[open] summary::before {
    transform: rotate(45deg);
}

.og-fields-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    font-size: 13.5px;
}

.og-fields-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--og-muted);
    padding: 8px 14px 8px 0;
    border-bottom: 1px solid var(--og-border-strong);
}

.og-fields-table td {
    padding: 10px 14px 10px 0;
    border-bottom: 1px solid var(--og-border);
    color: var(--og-text-soft);
    vertical-align: top;
}

.og-fields-table td:first-child {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: var(--og-text);
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .og-auth-type,
    .og-auth-value {
        flex: 1 1 100%;
    }

    /* Doubled: it has to outrank `.og-btn-gradient.auto`. */
    .og-auth-row .og-auth-save {
        width: 100%;
    }

    .og-step-body {
        padding-top: 7px;
    }
}

/* ---------- Settings: tighter corners on the action buttons ---------- */
.og-btn-sharp {
    border-radius: 8px;
}

.og-test-btn {
    min-width: 136px;
    gap: 12px;
}

.og-btn-icon {
    flex: none;
}

/* ---------- Settings: one centred column ----------
   The page used to stretch over the whole content column while its blocks
   stopped at 680 to 1000px, which left it hugging the left edge. It now has
   a column of its own, centred like the other pages, and every block runs
   to that column's right edge. */
@media (min-width: 992px) {
    .og-settings {
        max-width: 1080px;
        margin-inline: auto;
    }

    .og-settings .og-code,
    .og-settings .og-console,
    .og-settings .og-details,
    .og-settings .og-page-lead {
        max-width: none;
    }

    .og-settings .og-auth-row {
        max-width: none;
    }
}

/* The flow opens the page, as on the Figma, before step 1. */
.og-flow-head {
    margin: 26px 0 6px;
}

/* ============================================================
   Platform header — as on the Figma frame: brand, school switcher,
   then the grade quota and the account (member) or the two sign-in
   buttons (visitor).
   ============================================================ */
.og-appbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 32px 0;
    min-height: var(--og-appbar-height);
    position: relative;
    z-index: 35;
}

.og-appbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: none;
}

/* Same mark as the landing page: gradient tile and the name in a script face. */
.og-appbar-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, #8172f2, #6c5ce7);
    box-shadow: 0 8px 18px -10px rgba(108, 92, 231, .9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex: none;
}

.og-appbar-name {
    font-family: 'Parisienne', cursive;
    font-size: 29px;
    font-weight: 400;
    line-height: 1;
    padding-top: 4px;
    color: var(--og-ink);
    white-space: nowrap;
}

.og-appbar-divider {
    width: 1px;
    height: 28px;
    background: var(--og-border-strong);
    flex: none;
}

.og-flag {
    width: 20px;
    height: 14px;
    border-radius: 3px;
    overflow: hidden;
    flex: none;
    display: block;
    box-shadow: 0 0 0 .5px rgba(27, 32, 54, .12);
}

/* ---------- School switcher ---------- */
.og-dropdown {
    position: relative;
}

.og-school-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 45px;
    padding: 0 14px 0 12px;
    border: 1px solid var(--og-border);
    border-radius: 12px;
    background: var(--og-surface);
    box-shadow: 0 1px 2px rgba(27, 32, 54, .04), 0 8px 18px -14px rgba(27, 32, 54, .25);
    color: var(--og-ink);
    font: inherit;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.og-school-pill:hover {
    border-color: var(--og-border-strong);
}

.og-dropdown.is-open .og-school-pill,
.og-school-pill:focus-visible {
    outline: none;
    border-color: var(--og-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .14);
}

/* A visitor cannot switch school: the pill is a plain label. */
.og-school-pill.is-static {
    min-width: 292px;
    cursor: default;
}

.og-school-pill-flag {
    display: inline-flex;
}

.og-school-pill-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.005em;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.og-school-pill-caret {
    margin-left: 4px;
    font-size: 12px;
    color: var(--og-muted);
    transition: transform .18s ease;
}

.og-dropdown.is-open .og-school-pill-caret,
.og-dropdown.is-open .og-account-caret {
    transform: rotate(180deg);
}

.og-menu {
    position: absolute;
    top: calc(100% + 10px);
    z-index: 50;
    background: var(--og-surface);
    border: 1px solid var(--og-border);
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(27, 32, 54, .05), 0 28px 56px -24px rgba(27, 32, 54, .32);
}

.og-menu[hidden] {
    display: none;
}

.og-school-menu {
    left: 0;
    width: 400px;
    padding: 10px;
}

.og-menu-search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 12px;
    margin: 0;
    border: 1px solid var(--og-border-strong);
    border-radius: 8px;
    color: var(--og-muted);
    font-size: 14px;
    cursor: text;
}

.og-menu-search:focus-within {
    border-color: var(--og-primary);
}

.og-menu-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    color: var(--og-text);
    font: inherit;
}

.og-menu-search input::placeholder {
    color: var(--og-muted);
}

.og-school-groups {
    max-height: min(52vh, 380px);
    overflow-y: auto;
}

.og-school-group-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 8px 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--og-muted);
}

.og-school-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 10px;
    background: none;
    text-align: left;
    font: inherit;
    color: var(--og-text);
    cursor: pointer;
    transition: background .15s ease;
}

.og-school-option:hover,
.og-school-option:focus-visible {
    outline: none;
    background: var(--og-surface-soft);
}

.og-school-option.is-current {
    background: var(--og-primary-soft);
}

.og-school-option[aria-disabled="true"] {
    cursor: not-allowed;
}

.og-school-option[hidden] {
    display: none;
}

.og-school-option-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid var(--og-border);
    background: var(--og-surface-soft);
    color: var(--og-muted);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.og-school-option.is-current .og-school-option-icon {
    border-color: transparent;
    background: transparent;
    color: var(--og-primary);
}

.og-school-option-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.og-school-option-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--og-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.og-school-option-meta {
    font-size: 12.5px;
    color: var(--og-muted);
}

.og-school-option-check {
    font-size: 18px;
    color: var(--og-primary);
    visibility: hidden;
}

.og-school-option.is-current .og-school-option-check {
    visibility: visible;
}

.og-school-empty {
    margin: 18px 8px;
    font-size: 13px;
    color: var(--og-muted);
}

.og-school-menu-foot {
    margin-top: 10px;
    padding-top: 24px;
    border-top: 1px solid var(--og-border);
}

.og-btn-gradient {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 6px;
    background: var(--og-gradient);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .18s ease;
}

.og-body a.og-btn-gradient {
    color: #fff;
}

.og-btn-gradient:hover {
    filter: brightness(1.06);
}

/* ---------- Right side ---------- */
.og-appbar-end {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.og-appbar-end.is-visitor {
    gap: 6px;
}

.og-quota {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    height: 45px;
    padding: 0 26px;
    border: 1px solid var(--og-border);
    border-radius: 999px;
    background: var(--og-surface);
    box-shadow: 0 8px 18px -14px rgba(27, 32, 54, .25);
}

.og-quota-label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--og-ink);
    white-space: nowrap;
}

.og-quota-track {
    display: block;
    height: 5px;
    border-radius: 99px;
    background: #ebecf2;
    overflow: hidden;
}

.og-quota-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--og-gradient);
}

.og-account-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 45px;
    padding: 0 14px 0 6px;
    border: 1px solid var(--og-border);
    border-radius: 999px;
    background: var(--og-surface);
    box-shadow: 0 8px 18px -14px rgba(27, 32, 54, .25);
    font: inherit;
    color: var(--og-ink);
    cursor: pointer;
    transition: border-color .18s ease;
}

.og-account-pill:hover,
.og-dropdown.is-open .og-account-pill {
    border-color: var(--og-border-strong);
}

.og-account-avatar {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbd97f 0%, #f2c14e 100%);
    color: #8a6420;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.og-account-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.og-account-caret {
    margin-left: 4px;
    font-size: 12px;
    color: var(--og-muted);
    transition: transform .18s ease;
}

.og-account-menu {
    right: 0;
    min-width: 220px;
    padding: 6px;
}

.og-menu .og-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--og-text-soft);
    transition: background .15s ease, color .15s ease;
}

.og-menu .og-menu-item:hover {
    background: var(--og-surface-soft);
    color: var(--og-ink);
}

.og-appbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 45px;
    padding: 0 18px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .18s ease, border-color .18s ease, filter .18s ease;
}

.og-appbar-btn i {
    font-size: 16px;
}

.og-appbar-btn-outline {
    border: 1px solid var(--og-border-strong);
    background: var(--og-surface);
    color: var(--og-ink);
}

.og-appbar-btn-outline:hover {
    border-color: var(--og-muted);
}

.og-body a.og-appbar-btn-solid {
    border: none;
    background: var(--og-gradient);
    color: #fff;
    font-weight: 600;
}

.og-appbar-btn-solid:hover {
    filter: brightness(1.06);
}

/* Below 1200px the quota no longer fits beside the switcher: the account stays. */
@media (max-width: 1199.98px) {
    .og-quota {
        display: none;
    }
}

/* ---------- Mobile top bar, same brand as the header ---------- */
.og-topbar .og-appbar-logo {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 18px;
}

.og-topbar .og-appbar-name {
    flex: 1;
    min-width: 0;
    font-size: 25px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.og-topbar .og-appbar-btn {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

/* ---------- Padlock on the sections a visitor cannot open ---------- */
.og-rail-item,
.og-bottom-nav-icon {
    position: relative;
}

.og-lock {
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--og-border);
    background: var(--og-surface);
    color: var(--og-lock);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.og-lock i,
.og-bottom-nav-item .og-lock i {
    font-size: 9px;
}

.og-bottom-nav-item .og-bottom-nav-icon,
.og-bottom-nav-item .og-lock {
    overflow: visible;
    max-width: none;
}

.og-bottom-nav-icon {
    display: inline-flex;
}

.og-bottom-nav-item .og-lock {
    right: -9px;
    bottom: -3px;
}

/* ---------- Visitor gate ----------
   The tint covers the whole screen as on the mock-up, but lets clicks through
   so the rail and the header stay usable; only the card takes the pointer. */
.og-is-gated .og-main-body {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

.og-gate {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(27, 32, 54, .22);
    pointer-events: none;
}

.og-gate[hidden] {
    display: none;
}

/* Opened from a locked tab: the backdrop takes clicks, to close it */
.og-gate.is-dismissible {
    pointer-events: auto;
}

.og-gate-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--og-muted);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.og-gate-close:hover {
    background: var(--og-surface-soft);
    color: var(--og-ink);
}

.og-gate-card {
    position: relative;
    pointer-events: auto;
    width: 100%;
    max-width: 540px;
    max-height: 100%;
    overflow-y: auto;
    padding: 32px;
    border-radius: 8px;
    background: var(--og-surface);
    box-shadow: 0 0 0 1px rgba(27, 32, 54, .04), 0 40px 80px -30px rgba(27, 32, 54, .45);
}

.og-gate-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--og-amber-soft);
    color: var(--og-lock);
    font-size: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.og-gate-title {
    margin: 0 0 8px;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.02em;
    color: var(--og-ink);
}

.og-gate-text {
    margin: 0 0 18px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--og-text-soft);
}

.og-gate-text strong {
    color: var(--og-ink);
    font-weight: 700;
}

.og-gate-table {
    width: 100%;
    margin-bottom: 22px;
    border-collapse: collapse;
    font-size: 14px;
}

.og-gate-table th {
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--og-muted);
    text-align: center;
    border-bottom: 1px solid var(--og-border);
}

.og-gate-table th:not(:first-child) {
    width: 92px;
}

.og-gate-table td {
    height: 40px;
    padding: 0 12px;
    color: var(--og-text);
    text-align: center;
    border-bottom: 1px solid var(--og-border);
}

.og-gate-table tr:last-child td {
    border-bottom: none;
}

.og-gate-table th:first-child,
.og-gate-table td:first-child {
    text-align: left;
}

.og-gate-yes {
    color: var(--og-green);
    font-size: 17px;
}

.og-gate-no {
    color: #b6bac8;
    font-size: 12px;
}

.og-gate-primary {
    border-radius: 5px;
    font-size: 15px;
    box-shadow: 0 12px 24px -14px rgba(108, 92, 231, .75);
    margin-bottom: 12px;
}

.og-body a.og-gate-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    border: 1px solid var(--og-border-strong);
    border-radius: 5px;
    background: var(--og-surface);
    color: var(--og-ink);
    font-size: 14.5px;
    font-weight: 700;
    transition: border-color .18s ease;
}

.og-body a.og-gate-secondary:hover {
    border-color: var(--og-muted);
}

.og-gate-note {
    margin: 16px 0 0;
    font-size: 12px;
    text-align: center;
    color: var(--og-muted);
}

@media (max-width: 991.98px) {
    .og-gate {
        padding-bottom: calc(var(--og-bottom-nav-height) + 16px);
    }

    .og-gate-card {
        padding: 24px 20px;
    }

    .og-gate-title {
        font-size: 21px;
    }

    .og-gate-table th:not(:first-child) {
        width: 70px;
    }

    .og-gate-table th,
    .og-gate-table td {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ---------- Account pill: name over the role ---------- */
.og-account-id {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
}

.og-account-role {
    font-size: 12px;
    font-weight: 500;
    color: var(--og-muted);
    white-space: nowrap;
}

.og-quota:hover {
    border-color: var(--og-border-strong);
}

/* ============================================================
   Billing — shared pieces
   ============================================================ */
.og-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid var(--og-border-strong);
    border-radius: 6px;
    background: var(--og-surface);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .18s ease;
}

.og-btn-outline,
.og-body a.og-btn-outline {
    color: var(--og-ink);
}

.og-btn-outline:hover {
    border-color: var(--og-muted);
}

.og-btn-sm {
    height: 36px;
    padding: 0 14px;
    font-size: 13.5px;
}

.og-btn-gradient.og-btn-auto {
    width: auto;
    height: 42px;
    padding: 0 20px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 10px 22px -12px rgba(108, 92, 231, .8);
}

.og-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 10px;
    border-radius: 99px;
    background: var(--og-green-soft);
    color: #1d8f4e;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.og-soft-chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 99px;
    background: var(--og-primary-soft);
    color: var(--og-primary);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.og-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.og-card-head .og-card-title {
    margin: 0;
}

.og-card-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 35px;
    border-radius: 5px;
    border: 1px solid var(--og-border);
    background: #fff;
    flex: none;
}

.og-card-brand.visa {
    font-size: 10.5px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: .02em;
    color: #1a1f71;
}

.og-card-brand.mastercard svg {
    width: 22px;
    height: 15px;
}

/* ---------- Billing page ---------- */
.og-billing .og-stat,
.og-billing .og-card {
    border-radius: 6px;
}

.og-checkout .og-card {
    border-radius: 5px;
}

.og-billing-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 24px;
}

.og-billing-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.og-plan-pill {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 12px;
    border-radius: 99px;
    border: 1px solid var(--og-border);
    background: #f1f2f6;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--og-text-soft);
    white-space: nowrap;
}

.og-billing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.og-stat-body {
    min-width: 0;
}

.og-stat-head .og-status-chip {
    margin-left: auto;
    align-self: flex-start;
}

.og-stat-value small {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--og-muted);
    margin-left: 2px;
}

.og-usage-track {
    display: block;
    height: 8px;
    margin-top: 18px;
    border-radius: 99px;
    background: #ebecf2;
    overflow: hidden;
}

.og-usage-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--og-gradient);
}

.og-usage-track + .og-stat-hint {
    margin-top: 12px;
}

.og-overflow-question {
    font-size: 14.5px;
    color: var(--og-text-soft);
    margin-top: 6px;
}

.og-option-list {
    display: grid;
    gap: 12px;
}

.og-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0;
    padding: 16px 18px;
    border: 1px solid var(--og-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

.og-option:has(input:checked) {
    border-color: var(--og-primary);
    background: #f8f7ff;
}

.og-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    border: 1.5px solid var(--og-border-strong);
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-content: center;
    flex: none;
    cursor: pointer;
}

.og-option input[type="radio"]::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--og-primary);
    transform: scale(0);
    transition: transform .15s ease;
}

.og-option input[type="radio"]:checked {
    border: 2px solid var(--og-primary);
    box-shadow: 0 0 0 3px var(--og-primary-soft);
}

.og-option input[type="radio"]:checked::before {
    transform: scale(1);
}

.og-option input[type="radio"]:focus-visible {
    outline: 2px solid var(--og-primary);
    outline-offset: 2px;
}

.og-option-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.og-option-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--og-ink);
}

.og-option-text {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--og-text-soft);
}

.og-toggle-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--og-border);
}

.og-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 14.5px;
    color: var(--og-text);
    cursor: pointer;
}

.og-toggle-row i {
    font-size: 16px;
    color: var(--og-text-soft);
}

.og-toggle-row span {
    flex: 1;
}

.og-switch {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 36px;
    height: 20px;
    margin: 0;
    border-radius: 99px;
    background: var(--og-border-strong);
    flex: none;
    cursor: pointer;
    transition: background .18s ease;
}

.og-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(27, 32, 54, .25);
    transition: transform .18s ease;
}

.og-switch:checked {
    background: #5b6be8;
}

.og-switch:checked::before {
    transform: translateX(16px);
}

.og-switch:focus-visible {
    outline: 2px solid var(--og-primary);
    outline-offset: 2px;
}

.og-overflow {
    margin-top: 20px;
    margin-bottom: 20px;
}

.og-invoices {
    padding: 0;
    overflow: hidden;
}

.og-invoices .og-card-head {
    margin: 0;
    padding: 22px 24px 18px;
}

.og-table-scroll {
    overflow-x: auto;
}

.og-invoice-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 14.5px;
}

.og-invoice-table th {
    padding: 12px 20px;
    background: #f8f9fb;
    border-top: 1px solid var(--og-border);
    border-bottom: 1px solid var(--og-border);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--og-muted);
    text-align: left;
    white-space: nowrap;
}

.og-invoice-table td {
    padding: 13px 20px;
    border-bottom: 1px solid var(--og-border);
    color: var(--og-text);
    white-space: nowrap;
    vertical-align: middle;
}

.og-invoice-table tr:last-child td {
    border-bottom: none;
}

.og-invoice-table .is-num,
.og-invoice-table .is-end {
    text-align: right;
}

.og-invoice-number {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--og-ink);
}

.og-invoice-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--og-border);
    background: var(--og-surface-soft);
    color: var(--og-muted);
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Phones: each invoice becomes a small card, "label: value" per line,
   instead of a 760px table */
@media (max-width: 767.98px) {
    .og-invoice-table,
    .og-invoice-table tbody,
    .og-invoice-table tr,
    .og-invoice-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .og-invoice-table thead {
        display: none;
    }

    .og-invoice-table tr {
        padding: 12px 20px;
        border-top: 1px solid var(--og-border);
    }

    .og-invoice-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 5px 0;
        border: none;
        white-space: normal;
        text-align: right;
    }

    .og-invoice-table td[data-label]::before {
        content: attr(data-label);
        font-size: 12.5px;
        color: var(--og-muted);
        text-align: left;
        flex: none;
    }

    .og-invoice-table td:first-child {
        padding-bottom: 8px;
    }

    .og-invoice-table td.is-end {
        justify-content: flex-start;
        padding-top: 8px;
    }

    .og-invoice-table td.og-invoice-empty {
        display: block;
        text-align: center;
    }
}

.og-invoice-table td.og-invoice-empty {
    padding: 28px 20px;
    text-align: center;
    white-space: normal;
    color: var(--og-muted);
}

/* ---------- Checkout ---------- */
.og-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 13.5px;
    color: var(--og-ink);
}

.og-body .og-breadcrumb a {
    color: var(--og-muted);
}

.og-body .og-breadcrumb a:hover {
    color: var(--og-ink);
}

.og-breadcrumb i {
    font-size: 10px;
    color: var(--og-muted);
}

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

.og-checkout-main {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.og-checkout .og-card {
    margin: 0;
    padding: 24px;
}

.og-checkout-step {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--og-ink);
}

.og-cycle-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--og-border);
    border-radius: 10px;
    background: var(--og-surface-soft);
}

.og-cycle-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 32px;
    padding: 0 14px;
    border: none;
    border-radius: 7px;
    background: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--og-text-soft);
    cursor: pointer;
}

.og-cycle-option.is-active {
    background: var(--og-gradient);
    color: #fff;
    box-shadow: 0 6px 14px -8px rgba(108, 92, 231, .9);
}

.og-discount-chip {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 99px;
    background: var(--og-green-soft);
    color: #1d8f4e;
    font-size: 13px;
    font-weight: 700;
}

.og-plan-options {
    display: grid;
    gap: 16px;
}

.og-plan-option {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--og-border);
    border-radius: 4px;
    background: var(--og-surface);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

.og-plan-option:hover {
    border-color: var(--og-border-strong);
}

.og-plan-option.is-selected {
    padding: 17px;
    border: 2px solid var(--og-primary);
    background: #f8f7ff;
}

.og-plan-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.og-plan-option:has(input:focus-visible) {
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .2);
}

.og-plan-radio {
    width: 20px;
    height: 20px;
    margin-bottom: 18px;
    border: 1.5px solid var(--og-border-strong);
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-content: center;
}

.og-plan-radio::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--og-primary);
    transform: scale(0);
    transition: transform .15s ease;
}

.og-plan-option.is-selected .og-plan-radio {
    border: 2px solid var(--og-primary);
    box-shadow: 0 0 0 3px var(--og-primary-soft);
}

.og-plan-option.is-selected .og-plan-radio::before {
    transform: scale(1);
}

.og-plan-popular {
    position: absolute;
    top: 14px;
    right: 14px;
}

.og-plan-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--og-ink);
}

.og-plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 4px 0 16px;
    color: var(--og-muted);
    font-size: 14px;
}

.og-plan-price strong {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--og-ink);
}

.og-plan-quota {
    font-size: 14px;
    font-weight: 600;
    color: var(--og-ink);
}

.og-plan-summary {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--og-muted);
}

.og-checkout-note {
    margin: 18px 0 0;
    font-size: 13px;
    color: var(--og-muted);
}

.og-body .og-checkout-note a {
    color: var(--og-primary);
    font-weight: 700;
}

.og-card-brands {
    display: flex;
    gap: 8px;
}

.og-pay-field {
    min-width: 0;
    margin-bottom: 16px;
}

.og-pay-label {
    display: block;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--og-ink);
}

.og-pay-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--og-border-strong);
    border-radius: 4px;
    background: var(--og-surface);
    font: inherit;
    font-size: 15px;
    color: var(--og-ink);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.og-pay-input:focus {
    border-color: var(--og-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .12);
}

.og-pay-input-wrap {
    position: relative;
}

.og-pay-input-wrap .og-pay-input {
    padding-right: 62px;
}

.og-pay-input-end,
.og-pay-input-start {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    color: var(--og-muted);
    pointer-events: none;
}

.og-pay-input-end {
    right: 12px;
}

.og-pay-input-start {
    left: 14px;
}

.og-pay-select .og-pay-input {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    cursor: pointer;
}

.og-pay-input-start + .og-pay-input {
    padding-left: 46px;
}

.og-pay-row {
    display: grid;
    gap: 0 12px;
}

.og-pay-billing {
    margin-top: 2px;
    padding-top: 18px;
    border-top: 1px solid var(--og-border);
}

.og-pay-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    color: var(--og-text-soft);
    cursor: pointer;
}

.og-pay-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--og-primary);
}

.og-summary .og-checkout-step {
    margin-bottom: 18px;
}

.og-summary-plan {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid var(--og-border);
    border-radius: 4px;
    background: var(--og-surface-soft);
}

.og-summary-plan-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--og-primary-soft);
    color: var(--og-primary);
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.og-summary-plan-name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--og-ink);
}

.og-summary-plan-meta {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--og-muted);
}

.og-summary-lines {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px 12px;
    margin: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--og-border);
    font-size: 14.5px;
}

.og-summary-lines dt {
    font-weight: 400;
    color: var(--og-text-soft);
}

.og-summary-lines dd {
    margin: 0;
    text-align: right;
    color: var(--og-ink);
}

.og-summary-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    font-size: 15px;
    font-weight: 700;
    color: var(--og-ink);
}

.og-summary-total strong {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.og-summary-renewal {
    margin: 10px 0 20px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--og-muted);
}

.og-summary-pay {
    height: 46px;
    border-radius: 4px;
    font-size: 15px;
    box-shadow: 0 12px 24px -14px rgba(108, 92, 231, .75);
}

.og-summary-gift {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0 0;
    padding: 14px 16px;
    border: 1px solid #c3ead2;
    border-radius: 4px;
    background: #eefaf3;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--og-text);
}

.og-summary-gift i {
    font-size: 17px;
    color: var(--og-green);
}

.og-summary-gift strong {
    color: var(--og-ink);
}

.og-summary-secure {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--og-muted);
}

@media (min-width: 768px) {
    .og-plan-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

@media (min-width: 1200px) {
    .og-checkout {
        grid-template-columns: minmax(0, 1fr) 360px;
        gap: 24px;
    }

    .og-summary {
        position: sticky;
        top: 24px;
    }
}

/* ---------- Payment confirmation ---------- */
.og-success {
    max-width: 1020px;
    margin: 0 auto;
    text-align: center;
}

.og-success-mark {
    width: 58px;
    height: 58px;
    margin: 30px 0 42px;
    border-radius: 50%;
    background: #13906b;
    color: #fff;
    font-size: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 16px #e6f7f0, 0 0 0 26px rgba(230, 247, 240, .55);
}

.og-success-title {
    margin: 0 0 12px;
    font-family: 'Lora', Georgia, serif;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #1b2559;
}

.og-success-title em {
    font-style: normal;
    color: #0f8f6b;
}

.og-success-text {
    max-width: 560px;
    margin: 0 auto 28px;
    font-size: 15.5px;
    line-height: 1.5;
    color: var(--og-text-soft);
}

.og-success-grid {
    display: grid;
    gap: 20px;
    text-align: left;
}

.og-success-card {
    display: flex;
    flex-direction: column;
    padding: 26px 28px;
    border-radius: 4px;
    background: var(--og-surface);
    box-shadow: 0 1px 2px rgba(27, 32, 54, .04), 0 10px 30px -18px rgba(27, 32, 54, .25);
}

.og-success-card.is-highlighted {
    border: 2px solid #5468e8;
}

.og-success-card h2 {
    margin: 0;
    font-size: 16.5px;
    font-weight: 700;
    color: #1b2559;
}

.og-success-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.og-receipt {
    display: grid;
    grid-template-columns: auto 1fr;
    margin: 0;
    font-size: 13.5px;
}

.og-receipt dt,
.og-receipt dd {
    margin: 0;
    padding: 11px 0;
    border-bottom: 1px solid var(--og-border);
}

.og-receipt dt {
    font-weight: 400;
    color: var(--og-text-soft);
}

.og-receipt dd {
    text-align: right;
    font-weight: 700;
    color: #1b2559;
}

.og-receipt-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0 16px;
    font-size: 19px;
    font-weight: 800;
    color: #1b2559;
}

.og-receipt-total strong {
    color: #5468e8;
}

.og-success-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    border: 1px solid #5468e8;
    border-radius: 8px;
    background: var(--og-surface);
    color: #5468e8;
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
}

.og-success-access {
    display: grid;
    gap: 12px;
    margin: 18px 0 28px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--og-text-soft);
}

.og-success-access li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.og-success-access i {
    color: #1b2559;
}

.og-success-access strong {
    color: #1b2559;
}

.og-body a.og-success-go {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 52px;
    margin-top: auto;
    border-radius: 8px;
    background: #5468e8;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 14px 28px -16px rgba(84, 104, 232, .9);
    transition: filter .18s ease;
}

.og-body a.og-success-go:hover {
    filter: brightness(1.06);
}

.og-body a.og-success-link {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    color: #5468e8;
}

@media (min-width: 992px) {
    .og-success-grid {
        grid-template-columns: 56fr 44fr;
    }
}

@media (max-width: 991.98px) {
    .og-success-title {
        font-size: 32px;
    }

    .og-success-card {
        padding: 22px 20px;
    }
}

/* ---------- Pricing ---------- */
.og-pricing {
    --og-indigo: #586ced;
}

.og-pricing-head {
    text-align: center;
    margin-bottom: 36px;
}

.og-pricing-eyebrow {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 14px;
    margin-bottom: 26px;
    border: 1px solid var(--og-border);
    border-radius: 99px;
    background: #f3f4f8;
    font-size: 12px;
    font-weight: 700;
    color: var(--og-muted);
}

.og-pricing-title {
    margin: 0 0 22px;
    font-family: 'Lora', Georgia, serif;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: #1b2559;
}

.og-pricing-title em {
    font-style: normal;
    color: var(--og-indigo);
}

.og-pricing-lead {
    margin: 0 0 24px;
    font-size: 16.5px;
    color: var(--og-text-soft);
}

.og-pricing-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 99px;
    background: var(--og-surface);
    box-shadow: 0 0 0 1px rgba(27, 32, 54, .04), 0 8px 24px -12px rgba(27, 32, 54, .25);
}

.og-pricing-switch button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 28px;
    border: none;
    border-radius: 99px;
    background: none;
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    color: #1b2559;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.og-pricing-switch button.is-active {
    background: var(--og-indigo);
    color: #fff;
}

.og-pricing-switch button span {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 99px;
    background: var(--og-indigo);
    color: #fff;
    font-size: 11.5px;
}

.og-pricing-switch button.is-active span {
    background: rgba(255, 255, 255, .25);
}

.og-pricing-grid {
    display: grid;
    gap: 20px;
}

.og-price-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e3e7f3;
    border-radius: 16px;
    background: var(--og-surface);
    box-shadow: 0 1px 2px rgba(27, 32, 54, .04);
}

.og-price-card-top {
    padding: 20px 20px 0;
}

.og-price-card-icons {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 18px;
}

.og-price-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: #e6f0ff;
    color: var(--og-indigo);
    font-size: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.og-price-popular {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    border-radius: 99px;
    background: #dfe8ff;
    color: #1a4fd8;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.og-price-name {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--og-indigo);
}

/* Room for three lines, so every price starts on the same line */
.og-price-tagline {
    min-height: 4.5em;
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--og-text-soft);
}

.og-price-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 26px 20px 22px;
}

.og-price-amount {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 18px;
    color: #1b2559;
}

.og-price-amount strong {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.og-price-amount > span {
    font-size: 17px;
    font-weight: 600;
    color: var(--og-indigo);
}

.og-price-amount .og-price-quote {
    font-size: 30px;
}

.og-price-features {
    display: grid;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
    color: var(--og-text-soft);
}

.og-price-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.og-price-features i {
    margin-top: 1px;
    font-size: 15px;
    color: #1960e9;
}

.og-price-features strong {
    font-weight: 700;
    color: #1b2559;
}

.og-body a.og-price-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin-top: auto;
    padding: 0 8px;
    border: 1px solid var(--og-indigo);
    border-radius: 8px;
    color: var(--og-indigo);
    font-size: 13.5px;
    text-align: center;
    font-weight: 700;
    transition: background .18s ease, filter .18s ease;
}

.og-body a.og-price-cta:hover {
    background: #f3f5ff;
}

.og-body a.og-price-cta.is-solid {
    background: var(--og-indigo);
    color: #fff;
}

.og-body a.og-price-cta.is-solid:hover {
    filter: brightness(1.06);
}

.og-price-card.is-popular {
    border: 2px solid var(--og-indigo);
    background: var(--og-indigo);
    box-shadow: 0 24px 48px -24px rgba(88, 108, 237, .7);
}

.og-price-card.is-popular .og-price-card-top {
    padding: 19px 19px 18px;
}

.og-price-icon svg {
    width: 22px;
    height: 22px;
}

.og-price-card.is-popular .og-price-icon {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.og-price-card.is-popular .og-price-name {
    color: #fff;
}

.og-price-card.is-popular .og-price-tagline {
    color: rgba(255, 255, 255, .85);
}

.og-price-card.is-popular .og-price-card-body {
    padding: 26px 19px 21px;
    border-radius: 16px 16px 14px 14px;
    background: var(--og-surface);
}

.og-pricing-perks {
    display: grid;
    gap: 18px;
    margin: 48px 0 0;
    padding: 0;
    list-style: none;
}

.og-pricing-perks li {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
}

.og-pricing-perks i {
    font-size: 22px;
    color: var(--og-indigo);
}

.og-pricing-perks span {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: var(--og-muted);
}

.og-pricing-perks strong {
    margin-bottom: 4px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--og-indigo);
}

@media (min-width: 768px) {
    .og-pricing-grid,
    .og-pricing-perks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .og-pricing-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .og-pricing-perks {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .og-pricing-title {
        font-size: 32px;
    }
}
