:root {
    --ink: #1E3E31;
    --ink-soft: #5E786E;
    --paper: #F6F9F7;
    --paper-2: #E8EEEC;
    --sheet: #FFFFFF;
    --spruce: #1E3E31;
    --spruce-mid: #1E3E31;
    --terracotta: #FFAA00;
    --terracotta-deep: #1E3E31;
    --slate: #60A9A2;
    --gold: #FFAA00;
    --line: #DCE5E1;
    --line-strong: #DCE5E1;
    --cool: #5E786E;
    --steady: #60A9A2;
    --strong: #1E3E31;
    --peak: #FFAA00;
    --danger: #EF4444;
    --shadow: none;
    --font-ui: "Inter Tight", "Segoe UI", sans-serif;
    --font-display: "Instrument Serif", Georgia, serif;
    --space: clamp(0.55rem, 0.4rem + 0.35vw, 1.05rem);
    --page-pad: 0.85rem;
    --gap: clamp(0.5rem, 0.4rem + 0.3vw, 0.9rem);
    --radius: 0.8rem;
    --radius-sm: 0.55rem;
    --sidebar: clamp(13.25rem, 15vw, 16.5rem);
    --topbar: 3.35rem;
    --touch: 2.4rem;
    --title: clamp(1.15rem, 1.05rem + 0.4vw, 1.55rem);
    --lead: 0.875rem;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    min-height: 100%;
    font-size: clamp(13px, 0.12vw + 13.4px, 15px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html,
body {
    min-height: 100%;
    min-height: 100dvh;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.45;
    overflow-x: hidden;
}

body.is-dark {
    --ink: #F6F9F7;
    --ink-soft: #A8B8B2;
    --paper: #14261F;
    --paper-2: #1A3229;
    --sheet: #1E3E31;
    --line: #2F4A40;
    --line-strong: #3A5A4E;
    --spruce: #60A9A2;
    --spruce-mid: #60A9A2;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

button {
    cursor: pointer;
    border: 0;
    background: none;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
    overflow-wrap: anywhere;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--terracotta);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    z-index: 80;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: var(--terracotta);
    color: var(--spruce);
    font-weight: 700;
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: none;
}

.app-body {
    min-height: 100dvh;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    min-height: 100dvh;
}

.app-sidebar {
    background: var(--spruce);
    color: #F6F9F7;
    padding: calc(var(--space) + var(--safe-top)) calc(var(--space) + var(--safe-left)) calc(var(--space) + var(--safe-bottom)) var(--space);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow: auto;
    overscroll-behavior: contain;
}

.brand-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.4rem 1.1rem;
    min-width: 0;
}

.sidebar-close {
    display: none;
    width: var(--touch);
    height: var(--touch);
    flex: none;
    place-items: center;
    border-radius: 0.7rem;
    color: #F6F9F7;
}

.brand-mark {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0.15rem;
    border-radius: 0.75rem;
    background: #F6F9F7;
    object-fit: contain;
    display: block;
    flex: none;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    line-height: 1.1;
}

.brand-name small {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-top: 4px;
}

.nav-section {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.55;
    padding: 1rem 0.75rem 0.45rem;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: var(--touch);
    padding: 0.45rem 0.75rem;
    border-radius: 0.75rem;
    color: #F6F9F7;
    opacity: 0.86;
}

.nav-link:hover,
.nav-link.is-active {
    background: #60A9A2;
    opacity: 1;
}

.nav-icon {
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 1.35rem;
}

.sidebar-foot {
    margin-top: auto;
    padding-top: var(--space);
}

.seat-card {
    width: 100%;
    background: #1E3E31;
    border: 0;
    border-radius: 0.9rem;
    padding: 0.7rem;
    display: flex;
    gap: 0.65rem;
    align-items: center;
    min-height: var(--touch);
    color: #F6F9F7;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.seat-card:hover,
.dropdown.is-open .seat-card {
    background: #60A9A2;
    color: #1E3E31;
}

.seat-avatar {
    width: 2.6rem;
    height: 2.6rem;
    padding: 0.15rem;
    border-radius: 999px;
    border: 1px solid #F6F9F7;
    background: #F6F9F7;
    display: inline-flex;
    flex: none;
}

.seat-card:hover .seat-avatar,
.dropdown.is-open .seat-card .seat-avatar {
    border-color: #1E3E31;
}

.seat-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

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

.seat-copy strong {
    display: block;
    font-size: 0.9rem;
}

.seat-email {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-frame {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100dvh;
}

.topbar {
    min-height: var(--topbar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: calc(0.35rem + var(--safe-top)) calc(var(--page-pad) + var(--safe-right)) 0.35rem var(--page-pad);
    border-bottom: 1px solid var(--line);
    background: #FFFFFF;
    position: sticky;
    top: 0;
    z-index: 8;
}

.menu-toggle {
    display: none;
    width: var(--touch);
    height: var(--touch);
    border-radius: 0.7rem;
    border: 1px solid var(--line);
    flex: none;
}

.topbar-title {
    margin: 0;
    min-width: 0;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-search {
    flex: 1;
    max-width: 26rem;
    position: relative;
}

.topbar-search input {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--sheet);
    border-radius: 999px;
    padding: 0.6rem 0.9rem 0.6rem 2.4rem;
}

.topbar-search svg {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    opacity: 0.5;
}

.topbar-meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    margin-left: auto;
}

.exam-chip,
.icon-btn,
.avatar-btn {
    border: 1px solid var(--line);
    background: var(--sheet);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    min-height: var(--touch);
}

.avatar-btn {
    width: var(--touch);
    height: var(--touch);
    padding: 0.2rem;
    justify-content: center;
    flex: none;
}

.exam-chip {
    min-width: 0;
}

.exam-chip strong {
    font-family: var(--font-display);
}

.icon-btn {
    width: var(--touch);
    padding: 0;
    justify-content: center;
    position: relative;
    flex: none;
}

.icon-btn.is-on,
.exam-tools .icon-btn.is-on {
    background: #FFAA00;
    color: var(--spruce);
    border-color: #FFAA00;
}

.icon-btn .dot {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--terracotta);
}

.avatar-btn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown {
    position: relative;
}

.dropdown-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(18rem, 90vw);
    background: var(--sheet);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 0.6rem;
    z-index: 20;
}

.dropdown.is-open .dropdown-panel {
    display: block;
}

.sidebar-foot.dropdown .dropdown-panel {
    top: auto;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
}

.dropdown-panel a,
.dropdown-panel button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.75rem;
    border-radius: 0.65rem;
    color: var(--ink);
}

.dropdown-panel a:hover,
.dropdown-panel button:hover {
    background: var(--paper);
}

.dropdown-panel button[type="submit"] {
    color: var(--danger);
}

.app-content {
    padding: var(--space) var(--page-pad) var(--page-pad);
    padding-right: calc(var(--page-pad) + var(--safe-right));
    flex: 1;
    width: 100%;
}

.site-footer {
    padding: 1rem var(--page-pad) calc(1.25rem + var(--safe-bottom));
    color: var(--ink-soft);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space);
    margin-bottom: var(--space);
}

.page-head .btn,
.page-head .badge,
.page-head .exam-chip {
    flex: none;
}

.page-head .page-lead {
    flex: 1;
}

.page-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 0.4rem;
}

.page-title {
    font-family: var(--font-ui);
    font-weight: 650;
    font-size: var(--title);
    line-height: 1.2;
}

.page-lead {
    color: var(--ink-soft);
    margin: 0;
    max-width: 58ch;
    font-size: var(--lead);
}

.grid {
    display: grid;
    gap: var(--gap);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

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

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr));
}

.stack {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.shortcut-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    gap: var(--gap);
    margin-top: var(--gap);
}

.card {
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.9rem;
}

.card h2,
.card h3 {
    font-family: var(--font-display);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.25;
}

.card.is-lift {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.card-action {
    margin-top: auto;
    align-self: flex-start;
    padding-top: 0.9rem;
}

.pulse-lead {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.pulse-lead-tile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    margin-top: 0.15rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    background: #E8EEEC;
}

.pulse-lead-tile.is-empty {
    background: var(--paper);
    justify-content: center;
}

.pulse-lead-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pulse-lead-head h2 {
    margin: 0;
}

.pulse-lead-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.pulse-lead-score {
    margin: 0;
    font-family: var(--font-ui);
    font-size: clamp(1.7rem, 1.35rem + 1.1vw, 2.2rem);
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.03em;
}

.pulse-lead-tile .progress-row {
    margin: 0.1rem 0 0;
}

.pulse-lead .btn {
    min-height: 2.15rem;
    padding: 0 0.9rem;
    font-size: 0.8125rem;
}

.score-target {
    display: flex;
    flex-direction: column;
}

.score-target-tile,
.score-target-focus {
    margin-top: 0.65rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
}

.score-target-tile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #E8EEEC;
}

.score-target-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.score-target-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.3;
}

.score-target-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.score-target-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    background: var(--sheet);
    font-size: 0.82rem;
}

.score-target-focus {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.65rem 0.75rem;
    align-items: center;
    background: var(--paper);
}

.score-target-copy {
    min-width: 0;
}

.score-target-copy .muted {
    margin: 0.2rem 0 0;
}

.score-target-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.5rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #FFAA00;
    color: #1E3E31;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.score-target .btn,
.score-target-action {
    min-height: 2.15rem;
    padding: 0 0.9rem;
    font-size: 0.8125rem;
}

.score-target-action {
    margin-top: 0.75rem;
    align-self: flex-start;
}

.section-gap {
    margin-top: var(--gap);
}

.mt-2 {
    margin-top: 0.75rem;
}

.empty-copy {
    padding: 0.85rem 0.7rem;
}

.callout {
    background: #E8EEEC;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
}

.callout strong {
    display: block;
    margin-bottom: 0.2rem;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    color: var(--ink-soft);
    font-size: 0.78rem;
    margin-top: 0.3rem;
}

.task-list {
    display: flex;
    flex-direction: column;
}

.task-list .check-card {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.task-list .check-card:last-child {
    border-bottom: 0;
}

.keys {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.45rem 0.85rem;
    align-items: center;
    font-size: 0.85rem;
}

kbd {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding: 0 0.4rem;
    border: 1px solid var(--line);
    border-radius: 0.35rem;
    background: var(--paper);
    font-size: 0.75rem;
    font-family: var(--font-ui);
}

.note-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.notes-desk [data-note-card][hidden],
.notes-desk [data-note-card].is-hidden,
.notes-desk [data-notes-empty][hidden],
.notes-desk [data-notes-empty].is-hidden,
[data-flag-other][hidden],
[data-flag-error][hidden],
[data-flag-submit][hidden],
[data-flag-remove][hidden],
[data-flag-fields][hidden],
[data-flag-locked][hidden] {
    display: none;
}

.side-tools {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.familiarity-ask {
    margin: 0;
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.35;
}

.familiarity-ask strong {
    font-weight: 700;
}

.familiarity,
.confidence {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.welcome .page-title {
    font-size: 1.15rem;
    font-family: var(--font-ui);
    font-weight: 650;
}

.streak-stat {
    border: 0;
    padding: 0.75rem 0 0;
}

.ticket h3 {
    font-size: 0.9rem;
    line-height: 1.3;
}

.ticket:hover {
    border-style: solid;
    border-color: var(--slate);
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.card-head h2,
.card-head h3 {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 650;
}

.muted {
    color: var(--ink-soft);
    font-size: 0.8125rem;
}

.btn,
.nav-link,
.check-card,
.chip,
.tab,
.option,
.icon-btn,
.exam-chip,
.avatar-btn,
.toggle {
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--touch);
    padding: 0 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    white-space: nowrap;
}

.btn-primary {
    background: var(--terracotta);
    color: #1E3E31;
}

.btn-primary:hover {
    background: #1E3E31;
    color: #F6F9F7;
}

.btn-ink {
    background: var(--spruce);
    color: #F6F9F7;
}

.btn-ghost {
    border-color: var(--line-strong);
    background: transparent;
}

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

.btn-wide {
    width: 100%;
}

.stat-tile {
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(0.85rem, 0.65rem + 0.5vw, 1.25rem);
}

.stat-tile span {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.stat-tile strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-top: 0.35rem;
}

.meter {
    height: 0.65rem;
    background: var(--paper-2);
    border-radius: 999px;
    overflow: hidden;
}

.meter span {
    display: block;
    height: 100%;
    background: #60A9A2;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-cool { background: #E8EEEC; color: #5E786E; }
.badge-steady { background: #60A9A2; color: #FFFFFF; }
.badge-strong { background: #1E3E31; color: #F6F9F7; }
.badge-peak { background: #FFAA00; color: #1E3E31; }
.badge-miss { background: #EF4444; color: #FFFFFF; }
.badge-flag { background: #FFAA00; color: #1E3E31; }

.ticket {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px dashed var(--line-strong);
    border-radius: 1rem;
    background: #FFFFFF;
}

.ticket img,
.ticket .ticket-mark {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.5rem;
    object-fit: cover;
}

.ticket-mark {
    display: grid;
    place-items: center;
    background: var(--spruce);
    color: #F6F9F7;
    font-family: var(--font-display);
}

.tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
}

.tabs-action {
    margin-left: auto;
}

.tab {
    display: inline-flex;
    align-items: center;
    min-height: var(--touch);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
}

.tab.is-active {
    background: var(--spruce);
    color: #F6F9F7;
    border-color: var(--spruce);
}

.chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    min-height: var(--touch);
    background: var(--sheet);
}

.chip.is-on,
.check-card.is-on {
    border-color: var(--spruce);
    background: #E8EEEC;
}

.check-card {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: var(--sheet);
    text-align: left;
    width: 100%;
    min-height: var(--touch);
}

a.check-card:hover,
.chip:hover {
    border-color: var(--spruce);
}

.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    width: 100%;
    min-height: var(--touch);
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    background: var(--paper);
}

.toggle-copy {
    min-width: 0;
    font-size: 0.85rem;
    font-weight: 650;
    line-height: 1.3;
}

.toggle {
    display: inline-flex;
    align-items: center;
    flex: none;
    width: 2.8rem;
    height: 1.6rem;
    padding: 0.15rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #E8EEEC;
}

.toggle-knob {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid var(--line);
}

.toggle.is-on {
    justify-content: flex-end;
    background: #60A9A2;
    border-color: #60A9A2;
}

.toggle.is-on .toggle-knob {
    border-color: #60A9A2;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field-label {
    font-size: 0.85rem;
    font-weight: 650;
}

.input,
.select,
textarea.input {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 0.75rem;
    padding: 0.6rem 0.75rem;
    min-height: var(--touch);
    width: 100%;
}

.input[readonly] {
    background: var(--paper-2);
    color: var(--ink-soft);
}

body.is-dark .input,
body.is-dark .select,
body.is-dark textarea.input {
    background: #14261F;
    color: var(--ink);
}

body.is-dark .chip.is-on,
body.is-dark .check-card.is-on {
    background: #14261F;
}

.profile-photo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.profile-photo img {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--paper);
}

.profile-photo-mark {
    width: 4.25rem;
    height: 4.25rem;
    flex: none;
    display: inline-flex;
}

.profile-photo-mark img {
    width: 100%;
    height: 100%;
}

.avatar-letter {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #1E3E31;
    color: #F6F9F7;
    font-weight: 650;
    line-height: 1;
    font-size: 1rem;
}

.avatar-btn .avatar-letter {
    font-size: 0.85rem;
}

.seat-avatar .avatar-letter {
    font-size: 1.05rem;
}

.profile-hero-avatar .avatar-letter,
.profile-photo-mark .avatar-letter {
    font-size: 1.55rem;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
}

.profile-hero-avatar {
    width: 5.4rem;
    height: 5.4rem;
    padding: 0.22rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    display: inline-flex;
    flex: none;
}

.profile-hero-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-hero-copy {
    min-width: 0;
}

.profile-hero-copy h2 {
    margin: 0;
    font-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.65rem);
    line-height: 1.15;
}

.profile-hero-copy .muted {
    margin-top: 0.25rem;
}

.mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.table-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 18rem;
}

.app-table th,
.app-table td {
    text-align: left;
    padding: 0.75rem 0.6rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.app-table th {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.progress-row {
    display: grid;
    grid-template-columns: minmax(0, 9rem) minmax(3rem, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 0.65rem;
    font-size: 0.8125rem;
}

.path-list {
    padding: 0.25rem 0.4rem;
}

.path-row {
    display: grid;
    grid-template-columns: minmax(8.5rem, 13rem) minmax(0, 1fr) auto auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.8rem 0.7rem;
    border-bottom: 1px solid var(--line);
}

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

.path-row h2 {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 650;
    margin: 0;
}

.path-row .page-kicker {
    margin-bottom: 0.2rem;
}

.path-row .progress-row {
    margin-bottom: 0;
}

.path-row .btn {
    min-height: 2.15rem;
    padding: 0 0.85rem;
    font-size: 0.8125rem;
}

.folder-card img {
    width: 100%;
    height: 8.25rem;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
}

.folder-card h3 {
    font-family: var(--font-display);
    margin-bottom: 0.35rem;
}

.hero-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: var(--gap);
    margin-bottom: var(--gap);
}

.welcome {
    background: var(--spruce);
    color: #F6F9F7;
    border: 1px solid var(--spruce);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome .page-kicker,
.welcome .page-title,
.welcome .page-lead {
    color: #F6F9F7;
}

.welcome .page-kicker {
    opacity: 0.72;
}

.welcome .page-lead {
    opacity: 0.86;
}

.welcome-action {
    margin-top: 1rem;
    align-self: flex-start;
}

.streak-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.streak-day {
    min-height: var(--touch);
    border-radius: 0.5rem;
    background: var(--paper-2);
    color: var(--ink-soft);
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 650;
}

.streak-day.is-on {
    background: var(--terracotta);
    color: var(--spruce);
}

.pulse-columns {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    height: clamp(7rem, 12vw, 11rem);
    padding: 0.5rem 0.25rem 0;
}

.pulse-columns b {
    flex: 1;
    border-radius: 0.65rem 0.65rem 0.25rem 0.25rem;
    background: #1E3E31;
    display: block;
    position: relative;
}

.pulse-columns b span {
    position: absolute;
    bottom: -1.35rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--ink-soft);
    font-weight: 500;
}

.calendar,
.month-cal {
    display: grid;
    gap: 0.4rem;
}

.month-cal {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal-dow {
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.cal-cell {
    min-height: 4.8rem;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    padding: 0.45rem;
    background: var(--sheet);
    font-size: 0.75rem;
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.page-head .cluster {
    flex: none;
}

.plan-stats .stat-tile {
    padding: 0.7rem 0.8rem;
}

.plan-stats .stat-tile strong {
    font-family: var(--font-ui);
    font-size: 1.05rem;
}

.plan-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: visible;
}

.plan-pane {
    padding: 0.85rem;
    min-width: 0;
}

.plan-pane:nth-child(odd) {
    border-right: 1px solid var(--line);
}

.plan-pane:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
}

.plan-board .card-head,
.plan-cal .card-head {
    margin-bottom: 0.5rem;
}

.plan-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.plan-mark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 0;
    border-radius: 0.5rem;
    background: #E8EEEC;
    text-align: left;
    color: inherit;
    cursor: pointer;
}

.plan-mark b {
    font-size: 0.82rem;
    font-weight: 650;
}

.plan-mark small {
    color: var(--ink-soft);
    font-size: 0.72rem;
}

.plan-mark:hover,
.plan-cal .cal-cell:hover {
    background: #FFAA00;
}

.plan-mark.is-on {
    background: var(--paper);
    color: var(--ink-soft);
}

.plan-carry {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.65rem 0.75rem;
    align-items: center;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    background: #E8EEEC;
}

.plan-carry.is-empty {
    grid-template-columns: minmax(0, 1fr);
    background: var(--paper);
}

.plan-carry-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.5rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #FFAA00;
    color: #1E3E31;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.plan-carry-copy {
    min-width: 0;
}

.plan-carry-title {
    margin: 0 0 0.2rem;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.25;
}

.plan-carry .muted {
    margin: 0;
}

.plan-carry .btn {
    min-height: 1.85rem;
    padding: 0 0.8rem;
    font-size: 0.78rem;
}

.plan-cal {
    overflow: visible;
}

.plan-cal .month-cal {
    gap: 0.18rem;
}

.plan-cal .cal-dow {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
}

.plan-cal .cal-cell {
    position: relative;
    min-height: 1.85rem;
    padding: 0.15rem;
    border-radius: 0.45rem;
    text-align: center;
    font-size: 0.7rem;
}

.plan-cal .cal-cell strong {
    margin-bottom: 0;
}

.plan-cal .cal-cell.is-planned strong::after {
    content: "";
    display: block;
    width: 0.28rem;
    height: 0.28rem;
    margin: 0.15rem auto 0;
    border-radius: 999px;
    background: #FFAA00;
}

.plan-cal .cal-cell.is-planned:hover strong::after,
.plan-cal .cal-cell.is-full strong::after {
    background: #1E3E31;
}

.plan-cal .cal-tip {
    position: absolute;
    left: 50%;
    top: calc(100% + 0.35rem);
    transform: translateX(-50%);
    z-index: 8;
    display: none;
    width: max-content;
    max-width: 12.5rem;
    padding: 0.4rem 0.55rem;
    border-radius: 0.45rem;
    background: #1E3E31;
    color: #F6F9F7;
    font-size: 0.72rem;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    pointer-events: none;
}

.plan-cal .cal-cell:hover,
.plan-cal .cal-cell:focus-visible {
    z-index: 9;
}

.plan-cal .cal-cell:hover .cal-tip,
.plan-cal .cal-cell:focus-visible .cal-tip {
    display: block;
}

.plan-cal .btn {
    min-height: 1.75rem;
    padding: 0 0.5rem;
    font-size: 0.72rem;
}

.plan-cal .is-full {
    background: #FFAA00;
}

.plan-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem;
    align-items: center;
}

.plan-row .btn {
    min-height: 1.75rem;
    padding: 0 0.55rem;
    font-size: 0.72rem;
}

.cal-cell strong {
    display: block;
    margin-bottom: 0.3rem;
}

.cal-cell em {
    display: block;
    font-style: normal;
    background: #E8EEEC;
    border-radius: 0.4rem;
    padding: 0.2rem 0.35rem;
    margin-top: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-cell.is-planned {
    border-color: var(--spruce);
    background: #E8EEEC;
}

.cal-cell.is-today {
    border-color: var(--terracotta);
}

.cal-cell.is-rest {
    background: var(--paper);
}

.cal-cell.is-full em {
    background: #FFAA00;
    color: #1E3E31;
}

.cal-cell.is-out {
    opacity: 0.4;
}

.check-card small {
    font-weight: 500;
}

.notice-item {
    display: flex;
    gap: 0.65rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
}

.app-body.is-exam .app-shell {
    grid-template-columns: minmax(0, 1fr);
}

.app-body.is-exam .app-sidebar,
.app-body.is-exam .topbar,
.app-body.is-exam .site-footer {
    display: none;
}

.app-body.is-exam .app-content {
    width: 100%;
    padding-bottom: calc(1rem + var(--safe-bottom));
}

.exam-chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: calc(0.7rem + var(--safe-top)) calc(var(--page-pad) + var(--safe-right)) 0.7rem var(--page-pad);
    background: var(--spruce);
    color: #F6F9F7;
}

.exam-chrome .brand-name small {
    color: #FFAA00;
}

.exam-tools {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.exam-tools .exam-chip {
    background: transparent;
    color: #F6F9F7;
    border-color: #60A9A2;
}

.exam-tools .icon-btn,
.exam-tools .btn-ghost {
    width: auto;
    min-width: var(--touch);
    padding: 0 0.75rem;
    background: transparent;
    color: #F6F9F7;
    border-color: #60A9A2;
}

.set-switch {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.7rem;
    max-height: 16rem;
    overflow: auto;
}

.set-switch-link {
    display: block;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    background: var(--sheet);
    color: inherit;
    text-decoration: none;
    font-size: 0.88rem;
}

.set-switch-link.is-current {
    background: var(--spruce);
    color: #fff;
    border-color: var(--spruce);
}

.exam-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: var(--gap);
    padding: var(--space) var(--page-pad);
}

.exam-main {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    min-width: 0;
}

.exam-board {
    position: relative;
    min-width: 0;
}

.exam-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.exam-step .btn {
    min-width: 9rem;
}

@media (min-width: 52rem) {
    .exam-stage:has(.exam-aside) {
        grid-template-columns: minmax(0, 1fr) minmax(13rem, 18rem);
    }
}

.stem {
    font-size: 0.95rem;
    max-width: 72ch;
    margin-bottom: 1rem;
}

.option {
    width: 100%;
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.75rem;
    text-align: left;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: var(--sheet);
    margin-bottom: 0.65rem;
    min-height: 3.25rem;
}

.option.is-picked {
    border-color: var(--slate);
    background: #E8EEEC;
}

.option-text {
    overflow-wrap: anywhere;
}

.option.is-struck .option-text {
    text-decoration: line-through;
    opacity: 0.55;
}

.option-key {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: grid;
    place-items: center;
    background: var(--paper-2);
    font-weight: 700;
}

.option.is-picked .option-key {
    background: var(--slate);
    color: #fff;
}

.option.is-correct {
    border-color: #1E3E31;
    background: #E8EEEC;
}

.option.is-wrong {
    border-color: #EF4444;
    background: #FDECEC;
}

.option.is-correct .option-key {
    background: #1E3E31;
    color: #fff;
}

.option.is-wrong .option-key {
    background: #EF4444;
    color: #fff;
}

.question-slide[hidden] {
    display: none;
}

.question-image {
    display: block;
    max-width: 100%;
    margin: 0 0 1rem;
    border-radius: 0.75rem;
}

.rationale {
    margin: 0.85rem 0 1rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: var(--sheet);
}

.rationale.is-correct {
    background: #E8EEEC;
}

.rationale.is-wrong {
    background: #FDECEC;
}

.rationale-head {
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.quiz-prose > :first-child {
    margin-top: 0;
}

.quiz-prose > :last-child {
    margin-bottom: 0;
}

.quiz-prose p,
.quiz-prose ul,
.quiz-prose ol {
    margin: 0 0 0.75rem;
}

.quiz-prose ul,
.quiz-prose ol {
    padding-left: 1.25rem;
}

.quiz-prose li + li {
    margin-top: 0.25rem;
}

.quiz-prose strong {
    font-weight: 700;
}

.quiz-prose a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.calc-modal-card {
    width: min(22rem, 100%);
}

.exam-aside .card {
    margin-bottom: 0.75rem;
}

.exam-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    margin-top: 0.7rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.exam-nav button,
.exam-nav a {
    flex: 0 0 2.5rem;
    width: 2.5rem;
    min-width: 2.5rem;
    min-height: var(--touch);
    border-radius: 0.5rem;
    border: 1px solid var(--line);
    background: var(--sheet);
    display: grid;
    place-items: center;
    color: inherit;
    scroll-snap-align: center;
}

.exam-nav button.is-current,
.exam-nav a.is-current {
    background: var(--spruce);
    color: #fff;
    border-color: var(--spruce);
}

.exam-nav button.is-flagged,
.exam-nav a.is-flagged {
    background: #FFAA00;
    color: var(--spruce);
}

.exam-nav button.is-right,
.exam-nav a.is-right {
    background: #1E3E31;
    color: #fff;
    border-color: #1E3E31;
}

.exam-nav button.is-wrong,
.exam-nav a.is-wrong {
    background: #EF4444;
    color: #fff;
    border-color: #EF4444;
}

.exam-nav button.is-locked,
.exam-nav a.is-locked {
    opacity: 0.45;
    background: var(--paper-2);
    color: inherit;
}

.exam-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: sticky;
    bottom: 0;
    z-index: 6;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 0.75rem var(--page-pad) calc(1rem + var(--safe-bottom));
}

.drawer {
    display: none;
    position: fixed;
    inset: 0;
    background: #1E3E31;
    z-index: 30;
    place-items: center;
    padding: var(--page-pad);
}

.drawer.is-open {
    display: grid;
}

.drawer-card {
    width: min(32rem, 100%);
    background: var(--sheet);
    border-radius: var(--radius);
    padding: 1.1rem;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 28;
    place-items: center;
    padding: var(--page-pad);
}

.modal::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #1E3E31;
    opacity: 0.35;
}

.modal.is-open {
    display: grid;
}

.modal-card {
    position: relative;
    width: min(36rem, 100%);
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
}

.modal.exam-modal {
    position: absolute;
    inset: 0;
    z-index: 8;
    padding: 1.15rem 1rem;
    place-items: center;
}

.modal.exam-modal::before {
    content: none;
}

.modal.exam-modal .modal-card {
    width: min(26rem, 100%);
    max-width: 100%;
    overflow: visible;
    padding: 1.2rem 1.25rem 1.3rem;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.modal.exam-modal .calc-modal-card {
    width: min(22rem, 100%);
}

@media (min-width: 52rem) {
    #calc-modal.modal.exam-modal {
        position: fixed;
        inset: auto;
        right: calc(1.15rem + var(--safe-right));
        bottom: calc(1.15rem + var(--safe-bottom));
        width: min(22rem, calc(100vw - 2.3rem));
        padding: 0;
        z-index: 32;
        place-items: stretch;
    }

    #calc-modal.modal.exam-modal .calc-modal-card {
        width: 100%;
    }
}

.modal.exam-modal .card-head {
    align-items: center;
    margin-bottom: 0.95rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}

.modal.exam-modal .card-head h2 {
    min-width: 0;
    flex: 1;
    font-size: 1.02rem;
    line-height: 1.3;
}

.modal.exam-modal .card-head [data-drawer-close] {
    min-height: 2rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 650;
}

.modal.exam-modal .card-head [data-drawer-close]:hover {
    background: var(--paper-2);
    color: var(--ink);
}

.modal.exam-modal .flag-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: stretch;
    margin-top: 1.05rem;
}

.modal.exam-modal .flag-actions .btn {
    flex: 1 1 8.5rem;
}

.modal-card .stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.modal-card .stack .field:first-of-type,
.modal-card .stack .btn {
    grid-column: 1 / -1;
}

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

.calc-grid button {
    min-height: var(--touch);
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    background: var(--paper);
}

.calc-screen {
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    padding: 0.65rem;
    text-align: right;
    margin-bottom: 0.65rem;
    min-height: var(--touch);
    background: #fff;
}

.flag-reasons {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.flag-check {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    min-height: var(--touch);
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    background: var(--paper);
    cursor: pointer;
}

.flag-check:has(input:checked) {
    border-color: var(--ink);
    background: var(--sheet);
}

.flag-check input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--ink);
}

.flag-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
}

.stem.highlight-layer.is-on {
    background: #FFAA00;
}

.sidebar-backdrop {
    display: none;
}

.app-body.nav-open {
    overflow: hidden;
}

.app-body.nav-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: #1E3E31;
    border: 0;
    z-index: 35;
}

@media (max-width: 1100px) {
    .page-head {
        align-items: stretch;
        flex-wrap: wrap;
    }
}

@media (max-width: 960px) {
    .app-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-sidebar {
        position: fixed;
        z-index: 40;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        width: min(20rem, calc(100vw - 1.25rem));
    }

    .app-body.nav-open .app-sidebar {
        transform: none;
    }

    .sidebar-close,
    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .topbar-search {
        display: none;
    }
}

@media (max-width: 720px) {
    .modal-card .stack {
        grid-template-columns: 1fr;
    }

    .exam-tools {
        width: 100%;
    }

    .plan-carry {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .plan-carry .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .score-target-focus {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .score-target-focus .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .profile-hero {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .ticket .btn,
    .ticket .btn-ghost,
    .ticket .btn-primary {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .progress-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .progress-row .meter {
        grid-column: 1 / -1;
        order: 3;
    }

    .exam-chrome .brand-name small {
        max-width: 12ch;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .path-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .path-row .path-meter {
        grid-column: 1 / -1;
    }

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

@media (max-width: 420px) {
    .exam-chrome .brand-name {
        display: none;
    }

    .exam-chip {
        font-size: 0.78rem;
        padding-inline: 0.55rem;
    }

    .footer-copy {
        display: none;
    }

    .nav-section {
        padding-top: 0.65rem;
    }

    .app-content {
        width: 100%;
    }

    .plan-board,
    .grid-pair {
        grid-template-columns: 1fr;
    }

    .plan-pane:nth-child(odd) {
        border-right: 0;
    }

    .plan-pane:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }

    .plan-pane:not(:last-child) {
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 280px), (max-height: 280px) {
    .brand-name small,
    .page-lead,
    .site-footer {
        display: none;
    }

    .topbar .exam-chip {
        display: none;
    }

    .stat-tile strong {
        font-size: 1.2rem;
    }

    .pulse-lead-score {
        font-size: 1.35rem;
    }

    .cal-cell {
        min-height: 2.2rem;
        padding: 0.2rem;
    }

    .cal-cell em {
        display: none;
    }

    .welcome {
        padding: 0.8rem;
    }

    .profile-hero-avatar {
        width: 3.4rem;
        height: 3.4rem;
    }
}

@media (min-width: 2400px) {
    html {
        font-size: 15px;
    }
}

.auth-body {
    background: var(--paper);
}

.auth-stage {
    display: grid;
    grid-template-columns: minmax(22rem, 1.08fr) minmax(28rem, 1fr);
    min-height: 100dvh;
}

.auth-exhibit {
    position: relative;
    min-height: 100dvh;
    background: #1E3E31;
    overflow: hidden;
}

.auth-exhibit img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 28%;
}

.auth-exhibit-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.75rem 1.85rem calc(1.75rem + var(--safe-bottom));
    background: #1E3E31;
    color: #F6F9F7;
    border-top: 3px solid #FFAA00;
}

.auth-exhibit-copy .page-kicker {
    color: #FFAA00;
    margin-bottom: 0.55rem;
}

.auth-exhibit-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 2.1vw, 2.55rem);
    line-height: 1.12;
    color: #F6F9F7;
}

.auth-exhibit-lead {
    margin: 0.7rem 0 0;
    max-width: 36ch;
    color: #DCE5E1;
    font-size: 0.95rem;
    line-height: 1.45;
}

.auth-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1.15rem;
    margin: 1.05rem 0 0;
    padding: 0;
    list-style: none;
}

.auth-points li {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: #F6F9F7;
    border-left: 2px solid #FFAA00;
    padding-left: 0.55rem;
}

.auth-board {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    min-height: 100dvh;
    padding: calc(2.2rem + var(--safe-top)) clamp(1.5rem, 5vw, 5.25rem) calc(1.5rem + var(--safe-bottom));
    background: var(--paper);
    overflow: auto;
}

.auth-board .brand {
    flex-shrink: 0;
    padding: 0;
    color: var(--ink);
    width: max-content;
}

.auth-board .brand-name small {
    opacity: 1;
    color: var(--ink-soft);
}

.auth-card {
    width: min(26.5rem, 100%);
    margin-top: auto;
    margin-bottom: auto;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    padding: 1.55rem 1.5rem 1.35rem;
}

.auth-card .page-kicker {
    margin-bottom: 0.45rem;
}

.auth-card h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 2vw, 2.35rem);
    font-weight: 400;
    line-height: 1.12;
    color: var(--ink);
}

.auth-lead {
    margin: 0.65rem 0 1.2rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
    max-width: 34ch;
}

.auth-card .stack {
    gap: 0.85rem;
}

.auth-card .input {
    border-radius: 0.85rem;
}

.auth-card .btn {
    width: 100%;
    margin-top: 0.25rem;
    min-height: 2.7rem;
}

.auth-google {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    font-weight: 600;
}

.auth-google:hover {
    border-color: var(--spruce);
    background: #fff;
    color: var(--ink);
}

.auth-google-note {
    margin: 0.55rem 0 0;
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.4;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.1rem 0 0.85rem;
    color: var(--ink-soft);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.auth-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.auth-methods label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: var(--touch);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.auth-methods input {
    accent-color: #1E3E31;
}

.auth-status {
    margin: 0 0 0.85rem;
    color: var(--spruce);
    font-size: 0.9rem;
}

#password-field[hidden],
#remember-field[hidden] {
    display: none;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: var(--touch);
    color: var(--ink);
    font-size: 0.9rem;
}

.auth-check input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #1E3E31;
}

.auth-error {
    margin: -0.35rem 0 0;
    color: var(--danger);
    font-size: 0.8rem;
}

.auth-foot {
    margin: 1.1rem 0 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.auth-foot a {
    font-weight: 650;
    color: var(--spruce);
}

.auth-legal {
    padding-top: 1.5rem;
    color: var(--ink-soft);
    font-size: 0.78rem;
}

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

    .auth-exhibit {
        min-height: 15.5rem;
        height: 16.5rem;
    }

    .auth-exhibit-copy {
        padding: 1rem 1.15rem calc(1rem + var(--safe-bottom));
    }

    .auth-exhibit-title {
        font-size: 1.35rem;
    }

    .auth-exhibit-lead,
    .auth-points {
        display: none;
    }

    .auth-board {
        gap: 1.75rem;
        min-height: auto;
        justify-content: flex-start;
        padding: 1.35rem var(--page-pad) calc(1.5rem + var(--safe-bottom));
    }

    .auth-board .brand {
        margin-bottom: 0;
    }

    .auth-card {
        margin-top: 0;
        margin-bottom: 1rem;
        padding: 1.25rem 1.1rem 1.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
