:root {
  color-scheme: dark;
  --bg: #161914;
  --sidebar: #1b201a;
  --panel: #222820;
  --panel-hover: #293128;
  --surface: #2a3128;
  --cream: #f6eedc;
  --text: #e4dcc8;
  --muted: #bbb8a6;
  --brass: #e6bc7e;
  --brass-dark: #211a12;
  --line: #444737;
  --line-soft: #383d31;
  --serif: Georgia, "Times New Roman", serif;
  font: 16px/1.53 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 290px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #ffd99c; outline-offset: 3px; }
main:focus { outline: none; }
h1, h2, h3, p, dl, dd, dt { margin: 0; }
h1, h2, h3 { color: var(--cream); }
h1, h2 { font: 400 2rem/1.12 var(--serif); letter-spacing: -.025em; }
h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); }
h3 { font-size: 1.02rem; font-weight: 630; line-height: 1.3; }
img { max-width: 100%; }
small, .meta { font-size: .88rem; color: var(--muted); line-height: 1.45; }
.lead { color: var(--muted); font-size: 1rem; margin-top: .75rem; }
.muted { color: var(--muted); }
.eyebrow {
  color: var(--brass); font-weight: 660; font-size: .76rem; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: .65rem;
}
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 20; top: .5rem; left: .5rem; color: var(--brass-dark); background: var(--brass); padding: .5rem 1rem; }
.loading { margin: 2rem; }
.btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  color: var(--cream); background: transparent; border: 1px solid var(--line); font-weight: 660;
  border-radius: 8px; min-height: 43px; padding: .62rem 1rem; line-height: 1.16; font-size: .92rem;
  text-align: center; transition: background .16s, color .16s, border-color .16s;
}
.btn.primary { background: var(--brass); color: var(--brass-dark); border-color: var(--brass); }
.btn.primary:hover { background: #f6d69d; border-color: #f6d69d; }
.btn.ghost:hover, .icon-btn:hover { background: #34372a; border-color: #8b7654; }
.btn.small { min-height: 37px; font-size: .84rem; padding: .53rem .73rem; }
.icon-btn { min-height: 36px; width: 36px; padding: 0; flex: 0 0 auto; border-color: transparent; }
.badge {
  display: inline-block; flex: 0 0 auto; padding: .22rem .58rem; border-radius: 5px;
  background: #30362c; border: 1px solid #4a4b3b; color: var(--muted); font-size: .79rem; white-space: nowrap;
}
.badge.warm { background: #392f21; border-color: #665239; color: #ebc88e; }
.badge.good { background: #2a3c2c; border-color: #466548; color: #c5ddbd; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--sidebar); padding: 23px 15px 17px; border-right: 1px solid var(--line-soft); z-index: 3;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); font: 400 1.47rem/1.17 var(--serif); }
.brand img { flex: 0 0 auto; }
.brand small { display: block; font: 400 .73rem/1.4 system-ui, sans-serif; color: var(--muted); margin-top: .15rem; }
.sidebar .brand { margin: 0 7px 40px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 11px; min-height: 45px; border: 1px solid transparent;
  border-radius: 8px; color: var(--muted); font-size: .92rem; font-weight: 560; padding: 8px 11px;
}
.sidebar nav a svg { flex: 0 0 auto; }
.sidebar nav a:hover { color: var(--cream); background: var(--panel); }
.sidebar nav a[aria-current] { color: var(--brass); background: #303329; border-color: #494a38; }
.sidebar-foot { display: flex; align-items: center; gap: .6rem; padding: 16px 3px 0; margin-top: auto; border-top: 1px solid var(--line-soft); }
.sidebar-foot div { min-width: 0; flex: 1; }
.sidebar-foot strong, .sidebar-foot small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot strong { color: var(--cream); font-size: .88rem; }
.avatar {
  width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid #716042; background: #383224; color: #f4cf97; font-size: .84rem; font-weight: 720; letter-spacing: .025em;
}
.topbar {
  display: flex; justify-content: space-between; gap: .8rem; align-items: center; min-height: 67px; padding: .65rem 33px;
  border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: .89rem;
}
.topbar > div, .top-actions { display: flex; align-items: center; gap: 12px; }
.content-shell { min-width: 0; }
.board, .landing-main { width: min(100%, 1290px); margin-inline: auto; padding: 37px 38px 55px; }
.page-head { margin-bottom: 27px; }
.columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(248px, 1fr); gap: 19px; align-items: start; }
.stack { min-width: 0; display: grid; gap: 18px; }
.feature {
  display: grid; grid-template-columns: 1.05fr .95fr; min-width: 0; min-height: 272px; overflow: hidden;
  background: radial-gradient(ellipse at 82% 32%,#344b38 0%,transparent 60%),linear-gradient(112deg,#302b20,#263326);
  border: 1px solid #6b5c3f; border-radius: 15px;
}
.feature-content { position: relative; z-index: 1; padding: 27px 0 28px 29px; }
.feature-content h2 { font-size: clamp(2.4rem,4.1vw,3.8rem); line-height: .98; }
.feature-content > p:not(.eyebrow) { color: #e2d7bd; margin-top: .68rem; }
.feature-content > .btn { margin-top: 16px; }
.feature-figure {
  position: relative; display: grid; align-content: end; padding: 16px 13px 15px 0; margin-left: -10px;
  opacity: .88; background-image: linear-gradient(90deg,transparent 95%,#a7a58812 96%), linear-gradient(transparent 95%,#a7a58812 96%);
  background-size: 26px 26px; mask-image: linear-gradient(90deg, transparent, black 12%);
}
.motion-plot { width: 100%; height: auto; display: block; color: var(--brass); }
.motion-plot.segments { max-width: 570px; padding: 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: #1b221a; margin: 1rem 0; }
.plot-grid { stroke: #b7b29230; stroke-width: 1; }
.plot-axis { fill: none; stroke: #ded8bb80; stroke-width: 1; }
.plot-line { fill: none; stroke: #e6bc7e; stroke-width: 2.45; stroke-linejoin: round; }
.motion-plot circle { fill: #e6bc7e; stroke: #f8d59b; stroke-width: .8; }
.plot-text { fill: #e1dbc6; font: 11px system-ui, sans-serif; }
.progress-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 15px; font-size: .84rem; max-width: 260px; color: var(--muted); }
.progress-label strong { color: var(--cream); }
progress { display: block; width: 100%; height: 6px; border: 0; appearance: none; overflow: hidden; border-radius: 9px; color: var(--brass); background: #4a4a39; }
progress::-webkit-progress-bar { background-color: #4a4a39; border-radius: 9px; }
progress::-webkit-progress-value { background: var(--brass); border-radius: 9px; }
progress::-moz-progress-bar { background: var(--brass); }
.feature progress { margin-top: .32rem; max-width: 260px; }
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 13px; min-width: 0; }
main > .card { margin-bottom: 17px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: 20px 21px 14px; }
.panel-head h2, .side-card h2 { font-size: 1.56rem; }
.side-card { padding: 21px; }
.side-card .eyebrow { margin-top: .7rem; }
.side-card > p:not(.eyebrow) { color: var(--muted); margin-top: .6rem; }
.side-card .btn { margin-top: 14px; }
.side-card > .panel-head { padding: 0 0 14px; }
.square-icon, .row-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 9px;
  color: var(--brass); background: #363729; border: 1px solid #50513b;
}
.square-icon { margin-bottom: 12px; }
.notice-row { display: flex; gap: 13px; align-items: start; border-top: 1px solid var(--line-soft); margin: 0 20px; padding: 13px 0 14px; }
.notice-row h3 { margin-top: .12rem; }
.notice-row p { font-size: .9rem; color: var(--muted); margin-top: .27rem; }
.notice-row:last-child { padding-bottom: 18px; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0, 1fr)); gap: 10px; }
.stats article { display: grid; gap: .35rem; padding: 11px 13px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 9px; }
.stats span { font-size: .82rem; color: var(--muted); }
.stats strong { font: 400 1.5rem/1.05 var(--serif); color: var(--cream); }
.task-row, .person-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 17px 20px; }
.task-row + .task-row, .person-row + .person-row { border-top: 1px solid var(--line-soft); }
.task-row > div, .person-row > div { flex: 1 1 165px; min-width: 0; overflow-wrap: anywhere; }
.task-row h2 { font-size: 1.57rem; }
.task-row p:not(.meta) { font-size: .92rem; color: var(--muted); }
.task-row .teacher-comment { margin-top: .3rem; color: #d3cbaf; }
.person-row dl { display: flex; gap: .9rem; margin-left: auto; text-align: center; }
.person-row dt { font-size: .78rem; color: var(--muted); }
.person-row dd { color: var(--cream); }
.empty { padding: 21px; color: var(--muted); }
.big-number { font: 400 2.9rem/1.1 var(--serif); color: var(--brass); margin: 8px 0; }
.item-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.item-card { display: flex; flex-direction: column; align-items: flex-start; padding: 20px; gap: .65rem; }
.item-card h2 { font-size: 1.58rem; }
.item-card p { color: var(--muted); }
.item-card .btn { margin-top: auto; }
.chips, .actions, .tabs, .filters { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.tabs, .filters { margin-bottom: 17px; }
.tab[aria-pressed=true] { border-color: #977848; color: var(--brass); background: #383124; }
.journal-scroll { overflow: auto; max-height: 65vh; }
.journal-group-filter { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: 0 0 14px; padding: 10px 13px; }
.journal-group-filter > strong { margin-right: .25rem; font-size: .9rem; }
.journal-group { display: inline-flex; gap: .4rem; align-items: center; min-height: 36px; padding: 4px 10px; border: 1px solid var(--line-soft); border-radius: 6px; cursor: pointer; }
.journal-group:has(input:checked) { background: #373124; color: var(--brass); border-color: var(--brass); }
.journal-group input { margin: 0; width: 15px; height: 15px; accent-color: var(--brass); }
.journal-table { border-spacing: 0; width: 100%; text-align: left; font-size: .92rem; }
.journal-table th, .journal-table td { min-width: 62px; padding: 11px 13px; border-bottom: 1px solid var(--line-soft); }
.journal-table tr > :first-child { position: sticky; left: 0; min-width: 195px; background: var(--panel); border-right: 1px solid var(--line-soft); }
.journal-table thead th { position: sticky; top: 0; z-index: 1; background: #313329; color: var(--brass); white-space: nowrap; font-size: .84rem; }
.journal-table thead th:first-child { z-index: 2; background: #313329; }
.journal-table tbody th { color: var(--cream); }
.journal-table tbody th span, .journal-note { display: block; color: var(--muted); font-weight: 400; margin-top: .2rem; }
.journal-table tr:last-child > * { border-bottom: 0; }
.journal-note { min-width: 135px; overflow-wrap: anywhere; }
.journal-num { text-align: center; white-space: nowrap; }
.journal-dash { color: var(--muted); }
.journal-mark { display: inline-flex; min-width: 28px; justify-content: center; padding: .18rem .3rem; border-radius: 4px; font-size: .82rem; font-weight: 650; }
.journal-mark.earned { background: #2a3c2c; color: #c5ddbd; }
.journal-mark.partial { background: #3c3323; color: #f0c98e; }
.journal-mark.tried { background: #3b2e2a; color: #f0bbac; }
.journal-mark.review { background: #323646; color: #d3d9ee; }
.journal-legend { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: baseline; margin-top: 12px; color: var(--muted); font-size: .84rem; }
.gradebook-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.gradebook-filter { min-width: 0; width: min(100%, 290px); display: grid; gap: 5px; color: var(--muted); font-size: .875rem; }
.gradebook-filter > :is(input, select) { width: 100%; min-width: 0; font-size: 1rem; }
.gradebook-grids { display: grid; gap: 26px; min-width: 0; }
.gradebook-class { min-width: 0; }
.gradebook-class h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.gradebook-scroll { max-height: 67vh; scrollbar-color: #75654a var(--panel); }
.gradebook-table { --work-header-height: 78px; --work-section-height: 29px; border-spacing: 0; width: 100%; font-size: .875rem; text-align: center; }
.gradebook-table th, .gradebook-table td { min-width: 38px; padding: 8px; border-bottom: 1px solid var(--line-soft); }
.gradebook-table thead th { position: sticky; top: 0; z-index: 2; background: #303128; color: var(--cream); }
.gradebook-table thead tr:nth-child(2) th { top: var(--work-header-height); height: var(--work-section-height); padding-block: 3px; white-space: nowrap; }
.gradebook-table thead tr:nth-child(3) th { top: calc(var(--work-header-height) + var(--work-section-height)); padding-block: 6px; white-space: nowrap; }
.gradebook-table .gradebook-work-header { height: var(--work-header-height); min-width: 168px; text-align: left; vertical-align: middle; padding: 6px 12px; }
.gradebook-work-header strong { display: block; white-space: nowrap; }
.gradebook-date, .gradebook-topic { display: block; white-space: nowrap; color: var(--muted); font-size: .82rem; font-weight: 500; }
.gradebook-date { color: var(--brass); }
.gradebook-table .gradebook-name, .gradebook-table tbody th { position: sticky; left: 0; min-width: 172px; text-align: left; padding-inline: 12px; border-right: 1px solid var(--line-soft); }
.gradebook-table .gradebook-name { z-index: 3; }
.gradebook-table tbody th { z-index: 1; background: var(--panel); }
.gradebook-table tbody tr:nth-child(odd):not(.gradebook-band) > * { background: #262722; }
.gradebook-table tbody tr:not(.gradebook-band):hover > * { background: #333126; }
.gradebook-table th.gradebook-gap, .gradebook-table td.gradebook-gap { width: 10px; min-width: 10px; padding: 0; background: #171913; border-bottom: 0; }
.gradebook-table .gradebook-theory { background: #2a2935; color: #d7d1ef; }
.gradebook-table .gradebook-total { background: #323024; color: #efdbb0; white-space: nowrap; }
.gradebook-table .gradebook-band > * { background: #3a3223; color: var(--brass); padding-block: 6px; }
.gradebook-band th span { margin-inline-start: .45rem; color: var(--muted); font-weight: 400; font-size: .8rem; }
.gradebook-table tbody + tbody .gradebook-band > * { border-top: 10px solid var(--panel); }
.gradebook-table .gradebook-unassigned, .gradebook-status { color: var(--muted); }
.gradebook-table .journal-mark { min-width: 24px; }
.gradebook-table .btn.small { padding-inline: 8px; min-height: 31px; white-space: nowrap; }
.gradebook-mark-button { border: 0; background: transparent; padding: 3px; cursor: pointer; }
.gradebook-pending { color: var(--brass); white-space: nowrap; font-size: .79rem; }
.overview-scroll .gradebook-table { --work-header-height: 43px; }
.overview-scroll .gradebook-table thead tr:first-child th { height: var(--work-header-height); }
.overview-scroll .gradebook-table th { white-space: nowrap; }
.teacher-day-events { padding: 0; margin: 0; min-width: 154px; list-style: none; text-align: left; }
.teacher-day-events li + li { margin-top: 6px; border-top: 1px solid var(--line-soft); padding-top: 6px; }
.teacher-day-events small { display: block; color: var(--muted); }
.teacher-day-events strong { display: block; margin-top: 4px; }
.gradebook-toolbar > .btn { align-self: end; }
.profile-actions { margin-bottom: 12px; }
.olympiad-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.olympiad-toolbar .tabs { margin-bottom: 0; }
.olympiad-card-section h2, .olympiad-results-list > h2 { font-size: 1.15rem; margin: 0 0 .4rem; }
.olympiad-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill,minmax(min(210px,100%),1fr)); grid-auto-rows: 7.4rem; gap: .6rem; }
.olympiad-card { position: relative; }
.olympiad-card-open {
  display: grid; grid-template-rows: 2.45em 1.45rem 1.75rem; align-content: center; gap: .18rem;
  width: 100%; height: 100%; padding: .45rem .7rem; border: 0; border-radius: inherit;
  background: transparent; color: var(--cream); text-align: left; font-size: .92rem;
}
.olympiad-card-open:hover { background: #2b3026; }
.olympiad-card-open:hover .olympiad-card-title { color: var(--brass); }
.olympiad-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: .55rem; }
.olympiad-card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; line-height: 1.22; }
.olympiad-card-chevron { flex: 0 0 .42rem; height: .42rem; margin: .38rem .15rem 0 0; border-right: 1px solid var(--brass); border-top: 1px solid var(--brass); transform: rotate(45deg); }
.olympiad-card-meta { display: flex; align-items: center; justify-content: space-between; gap: .35rem; min-width: 0; }
.olympiad-card-meta .badge { padding: .09rem .38rem; font-size: .74rem; }
.olympiad-card-subtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .81rem; }
.olympiad-card-result {
  display: flex; align-items: center; min-width: 0; gap: .38rem; padding: .1rem .37rem; border-left: 2px solid #6f906d;
  background: #28332a; border-radius: 0 5px 5px 0; font-size: .79rem; white-space: nowrap;
}
.olympiad-card-result > strong, .olympiad-card-result > .olympiad-outcome { overflow: hidden; text-overflow: ellipsis; }
.olympiad-card-result > strong { flex-shrink: 0; max-width: 55%; }
.olympiad-card-more { margin-left: auto; color: var(--muted); }
.olympiad-card-join { position: absolute; inset-block-end: .55rem; inset-inline-start: .7rem; }
.olympiad-card-join .btn { min-height: 30px; padding: .3rem .6rem; }
.olympiad-dialog { display: grid; gap: .9rem; }
.olympiad-dialog h3 { margin-bottom: .28rem; }
.olympiad-dialog .olympiad-schedule { overflow-wrap: anywhere; }
.dialog-head:has(+ .olympiad-dialog) h2 { overflow-wrap: anywhere; }
.olympiad-inline-results { list-style: none; margin: 0; padding: 0 .48rem; border-left: 2px solid #6f906d; background: #28332a; border-radius: 0 5px 5px 0; }
.olympiad-result-line { display: flex; flex-wrap: wrap; gap: .1rem .42rem; padding: .28rem 0; font-size: .81rem; overflow-wrap: anywhere; }
.olympiad-result-line + .olympiad-result-line { border-top: 1px solid var(--line-soft); }
.olympiad-outcome { color: #cbe8bc; }
.olympiad-schedule { color: var(--muted); font-size: .84rem; }
.olympiad-schedule p { margin: .35rem 0; }
.olympiad-stage-list { list-style: none; padding: 0; margin: 0 0 .35rem; }
.olympiad-stage-list > li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .18rem .35rem; padding: .22rem 0; }
.olympiad-date { display: inline-flex; padding: .13rem .38rem; border-radius: 5px; background: #302f2a; color: #b6b3aa; }
.olympiad-date.past { color: #c3c0b9; background: #393a37; }
.olympiad-date.next, .olympiad-date.open { color: #cbe8bc; background: #263d2b; }
#score-stage:empty { display: none; }
#score-save:disabled { opacity: .55; cursor: default; }
.olympiad-queue summary { cursor: pointer; color: var(--brass); font-weight: 600; }
.olympiad-queue[open] summary { margin-bottom: .6rem; }
.activity-tag { display: inline-flex; align-items: center; gap: .34rem; min-width: 0; border-radius: 6px; padding: 3px 7px; color: var(--cream); font-size: .79rem;
  border: 1px solid color-mix(in srgb,var(--activity-color) 48%,#50544a); background: color-mix(in srgb,var(--activity-color) 20%,#252720); }
.activity-tag > span, .calendar-activity-dots > span { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: var(--activity-color); box-shadow: inset 0 0 0 1px #ffffff42; }
.activity-legend { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; }
.activity-request-card { padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.activity-request-card h2 { margin: .4rem 0 0; font-size: 1.08rem; overflow-wrap: anywhere; }
.activity-request-card p { margin: .2rem 0; color: var(--muted); overflow-wrap: anywhere; }
.activity-request-card > div { min-width: 0; }
.activity-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); gap: 12px; }
.activity-fields input { min-width: 0; width: 100%; }
#activity-club-venue[hidden] { display: none; }
.profile-name-link { color: var(--cream); text-underline-offset: .2em; }
.profile-name-link:hover { color: var(--brass); }
.profile-picker-filter { margin-bottom: 16px; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); gap: 12px; margin-bottom: 16px; }
.profile-stack { display: grid; gap: 14px; min-width: 0; }
.profile-stack .profile-stats { margin-bottom: 0; }
.profile-stat { display: grid; align-content: space-between; gap: .55rem; padding: 14px 16px; }
.profile-stat span { color: var(--muted); }
.profile-stat strong { color: var(--brass); font-size: 1.65rem; }
.profile-card { padding: 16px; }
.profile-card h2 { font-size: 1.15rem; margin: 0 0 12px; }
.profile-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: 10px; }
.profile-card-head h2 { margin: 0; }
.profile-scroll { overflow: auto; }
.profile-table { width: 100%; border-collapse: collapse; text-align: left; }
.profile-table th, .profile-table td { min-width: 72px; padding: .5rem .65rem; border-bottom: 1px solid var(--line-soft); }
.profile-table thead th { color: var(--brass); white-space: nowrap; font-size: .86rem; }
.profile-table tbody th { min-width: 145px; font-weight: 550; }
.profile-list, .profile-day ul { margin: 0; padding: 0; list-style: none; }
.profile-list li, .profile-day li { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding: .56rem 0; border-top: 1px solid var(--line-soft); }
.profile-list li span:not(.badge), .profile-day li div span { color: var(--muted); display: block; overflow-wrap: anywhere; }
.profile-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; margin-bottom: 14px; }
.profile-controls > div { display: grid; gap: 4px; min-width: 0; }
.profile-controls label { color: var(--muted); font-size: .85rem; }
.profile-controls select { max-width: 100%; }
.profile-calendar { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); max-width: 550px; gap: 5px; margin-bottom: 19px; text-align: center; }
.profile-calendar > span { color: var(--muted); font-size: .82rem; }
.profile-calendar .calendar-day { min-height: 42px; padding: 3px; border-color: var(--line-soft); display: grid; gap: 2px; align-content: center; justify-items: center; }
.profile-calendar .has-events { color: var(--cream); background: #303228; }
.calendar-activity-dots { display: flex; align-items: center; gap: 2px; min-height: 7px; line-height: 1; }
.calendar-activity-dots > b { font-size: .65rem; font-weight: 400; }
.profile-calendar [aria-pressed=true] { border-color: var(--brass); background: #4a3b25; color: var(--cream); }
.profile-timeline { display: grid; gap: 14px; }
.profile-day h3 { margin: 0 0 4px; font-size: 1rem; color: var(--brass); }
.profile-day h3 small { font-weight: 400; color: var(--muted); margin-left: .35rem; }
.profile-day li { justify-content: flex-start; }
.profile-day li > .activity-tag { flex: 0 0 auto; max-width: 55%; }
.profile-day li div { min-width: 0; }
.profile-trap { border-top: 1px solid var(--line-soft); padding: .6rem 0; }
.profile-trap summary { color: var(--brass); cursor: pointer; }
.profile-trap p { margin: .35rem 0; }
@media (max-width: 480px) {
  .profile-day li { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .profile-day li > .activity-tag { max-width: 100%; }
  .calendar-activity-dots > span { width: 5px; height: 5px; }
  .profile-controls > div { width: calc(50% - .35rem); }
  .profile-controls > div > select { width: 100%; }
}
.journal-history-title { margin: 20px 0 8px; }
.journal-history { list-style: none; padding: 0; margin: 0; }
.journal-history li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--line-soft); padding-block: .62rem; }
.journal-history small { display: block; color: var(--muted); }
.journal-balance { margin-bottom: 14px; }
.bonus-delta { color: var(--brass); font-weight: 650; }
.submission-gallery { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); gap: 12px; margin-bottom: 14px; }
.submission-gallery:not(.upload-preview) { grid-template-columns: minmax(0,1fr); }
.submission-gallery:empty { display: none; }
.submission-gallery figure { min-width: 0; margin: 0; }
.submission-gallery figcaption { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; margin: 4px 0; }
.photo-frame { aspect-ratio: 1; background: #161914; padding: 6px; border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; }
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.photo-actions .btn { padding-inline: 7px; }
@media (max-width: 660px) {
  .journal-table tr > :first-child { min-width: 148px; }
  .journal-table th, .journal-table td { padding-inline: 8px; }
  .gradebook-table .gradebook-name, .gradebook-table tbody th { min-width: 128px; max-width: 146px; padding-inline: 8px; }
  .gradebook-table th, .gradebook-table td { padding-inline: 6px; }
}
.filters input { width: min(100%,290px); min-width: 180px; }
.quiz { padding: clamp(17px,3vw,30px); max-width: 875px; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quiz-top .eyebrow { margin-bottom: 0; }
.quiz progress { margin: 17px 0 22px; }
.quiz h2 { font-size: clamp(1.62rem,2.7vw,2.2rem); margin-bottom: 17px; }
.choices { display: grid; gap: 9px; margin: 0 0 17px; padding: 0; border: 0; }
.choice {
  position: relative; display: flex; align-items: center; min-height: 53px; padding: .7rem .75rem; gap: .7rem;
  background: #2a3128; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.choice:has(input:checked) { background: #3b3426; border-color: var(--brass); }
.choice:has(input:focus-visible) { outline: 2px solid var(--brass); outline-offset: 2px; }
.choice input { position: absolute; opacity: 0; }
.letter { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; color: var(--brass); border: 1px solid #61563e; }
.feedback { padding: 1rem; margin-bottom: 15px; border: 1px solid #766347; border-radius: 8px; background: #373023; }
.feedback.right { background: #2c3b2b; border-color: #506a4d; }
.feedback p { margin-top: .45rem; }
.result-list { margin-top: 17px; display: grid; gap: 8px; }
.result-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .72rem; color: var(--cream); border: 1px solid var(--line); background: var(--surface); border-radius: 8px; text-align: left; }
.result-row:hover { border-color: var(--brass); }
input:not([type=radio]), select, textarea {
  color: var(--cream); background: #191f19; border: 1px solid var(--line); padding: .63rem .7rem;
  border-radius: 7px; min-height: 43px; transition: border-color .15s;
}
input:hover, select:hover, textarea:hover { border-color: #897650; }
textarea { resize: vertical; }
select { padding-right: 2rem; }
.form, .form label { display: grid; gap: 7px; min-width: 0; }
.form { gap: 13px; }
.form .btn { justify-self: start; }
.form label { color: var(--cream); font-size: .94rem; }
.form input[type=file] { max-width: 100%; }
dialog {
  width: min(100% - 24px, 660px); color: var(--text); background: #242a22; margin: auto;
  border: 1px solid #796a4d; border-radius: 13px; max-height: 88vh; overflow-y: auto; padding: 22px;
}
dialog::backdrop { background: #0c100dd9; backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 13px; margin-bottom: .8rem; }
.dialog-head h2 { font-size: 1.82rem; }
.dialog-intro { margin-bottom: 15px; }
.profile-picker { display: grid; gap: 7px; }
.profile-option {
  display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; text-align: left;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--cream);
}
.profile-option:hover { border-color: #b99a66; }
.profile-option > span:nth-child(2) { flex: 1; }
.profile-option small { display: block; }
.profile-option svg { color: var(--brass); }
.reading { display: grid; gap: .75rem; }
.reading .btn { justify-self: start; }
.answer { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.answer summary { cursor: pointer; font-weight: 650; color: var(--brass); }
.answer p { padding-top: .6rem; }
.kit-fields { margin: 1rem 0 0; display: grid; gap: .65rem; padding: .9rem; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.kit-fields legend { color: var(--brass); padding: 0 .45rem; font-weight: 650; }
.compare { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); gap: .55rem; }
.compare-part { background: #1d241d; border: 1px solid var(--line-soft); border-radius: 7px; padding: .65rem; }
.compare-part h3 { margin-bottom: .5rem; }
.compare-part p + p { margin-top: .5rem; }
.saved-check { display: block; color: var(--muted); }
.submission-photo { display: block; max-width: 100%; max-height: 55vh; object-fit: contain; margin: 0 auto 13px; border-radius: 8px; }
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 5; visibility: hidden; max-width: min(420px,calc(100% - 40px));
  padding: .8rem 1rem; border: 1px solid #8a7451; border-radius: 8px; color: var(--cream); background: #303727; opacity: 0; transition: opacity .16s;
}
.toast.visible { visibility: visible; opacity: 1; }
.landing-nav { border-bottom: 1px solid var(--line-soft); background: var(--sidebar); }
.landing-inner { width: min(100%,1290px); margin: auto; display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 15px 38px; }
.landing-main { padding-top: 55px; }
.landing-columns { margin-bottom: 19px; }
.landing-main .feature { min-height: 304px; }
.landing-main .feature-content { padding: 31px 0 31px 30px; }
.landing-main .feature-content > .btn { margin-top: 20px; }
.login-card { min-height: 255px; }
.mobile-menu { display: none; }
@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 206px minmax(0,1fr); }
  .sidebar { padding-inline: 10px; }
  .board { padding-inline: 25px; }
  .columns { grid-template-columns: minmax(0, 1.65fr) minmax(208px,1fr); gap: 12px; }
  .topbar { padding-inline: 22px; }
  .feature-content { padding: 21px 0 24px 21px; }
}
@media (max-width: 850px) {
  .columns { grid-template-columns: minmax(0,1fr); }
  .landing-columns { grid-template-columns: minmax(0,1.65fr) minmax(208px,1fr); }
  .columns > aside.stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 660px) {
  .app-shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: fixed; top: 57px; left: 0; height: calc(100dvh - 57px); width: min(286px,88vw); visibility: hidden; transform: translateX(-102%); transition: transform .18s, visibility .18s; }
  .sidebar.open { visibility: visible; transform: translateX(0); }
  .sidebar .brand { margin-bottom: 20px; }
  .mobile-menu { display: inline-flex; }
  .topbar { min-height: 57px; padding: .42rem .65rem; position: sticky; top: 0; z-index: 2; background: var(--bg); }
  .topbar > div, .top-actions { gap: .3rem; }
  .top-actions .badge { display: none; }
  .board, .landing-main { padding: 22px 14px 40px; }
  .landing-inner { padding: 13px 14px; }
  .landing-columns { grid-template-columns: minmax(0,1fr); }
  .landing-main .feature { min-height: 250px; }
  .landing-main .feature-content { padding: 23px 0 23px 18px; }
  .login-card { min-height: 0; }
  .card, .feature { border-radius: 10px; }
}
@media (max-width: 430px) {
  .item-grid, .columns > aside.stack { grid-template-columns: minmax(0,1fr); }
  .feature { grid-template-columns: 1.2fr .8fr; min-height: 247px; }
  .feature-content { padding: 20px 0 20px 16px; }
  .feature-content h2 { font-size: 2.3rem; }
  .feature-figure { padding: 11px 0; }
  .feature-content > p:not(.eyebrow) { font-size: .91rem; }
  .notice-row { margin-inline: 13px; gap: 8px; }
  .panel-head, .task-row, .person-row { padding-inline: 13px; }
  .stats { gap: 5px; }
  .stats article { padding-inline: 8px; }
  .stats span { font-size: .75rem; }
  .dialog-head h2 { font-size: 1.53rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.board-stack { display: grid; gap: 1.4rem; min-width: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .55rem; margin-bottom: .6rem; }
.section-head h2 { font-size: 1.4rem; }
.board-calendar, .board-posts, .progress-list, .goal-metrics, .reward-list, .hint-list {
  margin: 0; padding: 0; list-style: none;
}
.board-calendar { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(185px,100%),1fr)); gap: .55rem; }
.board-date {
  --event: var(--brass); display: grid; align-content: start; gap: .3rem; padding: .8rem; border-top: 2px solid var(--event);
  overflow-wrap: anywhere;
}
.board-date.club { --event: #9ac27f; }
.board-date.test, .board-date.control { --event: #e99f85; }
.board-date.worksheet { --event: #8bd1c4; }
.board-date.olympiad { --event: #bfb0ec; }
.board-date time { color: var(--event); font-weight: 680; }
.board-date time small { margin-left: .4rem; }
.board-date p:not(.meta) { color: var(--muted); font-size: .9rem; }
.board-date .btn { justify-self: start; margin-top: .2rem; }
.board-posts { display: grid; gap: .65rem; }
.board-post { padding: .9rem 1rem; overflow-wrap: anywhere; }
.board-post h3 { margin: .25rem 0 .28rem; font-size: 1.05rem; }
.board-post p { color: var(--muted); white-space: pre-wrap; }
.post-meta { display: flex; gap: .5rem; color: var(--brass); font-size: .86rem; }
.sheet-journal { padding: clamp(.75rem,2cqw,1.35rem); display: grid; gap: 1rem; }
.sheet-journal-head { display: grid; justify-items: center; gap: .15rem; text-align: center; padding-bottom: .85rem; border-bottom: 1px solid var(--line-soft); }
.sheet-title-select { position: relative; max-width: 100%; padding-inline: 1.5rem; border-radius: 6px; }
.sheet-title-select h2 { font-size: clamp(1.45rem,3cqw,1.9rem); overflow-wrap: anywhere; }
.sheet-title-select::after { content: ''; position: absolute; right: .4rem; top: 42%; width: .45rem; height: .45rem; border: solid var(--brass); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.sheet-title-select select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.sheet-title-select:focus-within { outline: 2px solid var(--brass); outline-offset: 3px; }
.sheet-title-select:hover h2 { color: var(--brass); }
.sheet-journal-head time { color: var(--muted); font-size: .88rem; }
.sheet-groups { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .85rem 1.25rem; }
.sheet-group { max-width: 100%; min-width: 0; }
.sheet-group h3, .sheet-totals h3 { margin: 0 0 .45rem; font-size: .95rem; }
.sheet-numbers { display: flex; flex-wrap: wrap; gap: .32rem; margin: 0; padding: 0; list-style: none; }
.sheet-numbers li { width: 4.65rem; }
.sheet-numbers .journal-cell-button, .detail-tasks .journal-cell-button { height: 100%; display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center; text-align: center; min-height: 5rem; padding: .23rem; border: 1px solid var(--line); background: #282d25; }
.sheet-numbers .journal-cell-button:hover, .detail-tasks .journal-cell-button:hover { border-color: var(--brass); }
.theory .sheet-numbers button { background: #2a2933; }
.sheet-number { align-self: start; font-size: .88rem; font-weight: 600; }
.sheet-mark-slot, .sheet-mark-slot > span { display: grid; place-items: center; }
.sheet-mark-slot > span { width: 1.85rem; height: 1.85rem; padding: 0; border-radius: 5px; }
.sheet-mark-slot .journal-dash { border: 1px solid var(--line-soft); }
.sheet-pending { color: var(--brass); background: #3c3323; }
.sheet-cell-notes { align-self: start; overflow-wrap: anywhere; }
.sheet-totals { border-top: 1px solid var(--line-soft); padding-top: .8rem; }
.sheet-totals .journal-cell-button { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); max-width: 38rem; padding: 0; border: 1px solid var(--line); overflow: hidden; background: var(--sidebar); }
.sheet-total { text-align: center; min-width: 0; }
.sheet-total + .sheet-total { border-left: 1px solid var(--line); }
.sheet-total > span { display: block; padding: .24rem .05rem; font-size: .85rem; font-weight: 650; color: var(--brass); background: #332f24; }
.sheet-total > strong { display: block; padding: .35rem .05rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sheet-total-details { display: grid; gap: .3rem; margin-bottom: .8rem; }
.sheet-total-details div { display: flex; justify-content: space-between; gap: .6rem; padding-bottom: .25rem; border-bottom: 1px solid var(--line-soft); }
.sheet-total-details dd { font-variant-numeric: tabular-nums; }
.profile-shortcuts { display: flex; flex-wrap: wrap; gap: .5rem; }
.task-detail { display: grid; gap: .85rem; overflow-wrap: anywhere; }
.task-attempt, .hint-card { padding: .6rem .7rem; border: 1px solid var(--line-soft); border-radius: 8px; }
.task-attempt p { margin-top: .6rem; white-space: pre-wrap; }
.task-history summary { padding: .35rem 0; color: var(--brass); cursor: pointer; }
.hint-card { background: #2c3026; }
.hint-card p { margin-block: .2rem; white-space: pre-wrap; }
.hint-list li, .reward-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .55rem; padding: .65rem 0; border-top: 1px solid var(--line-soft); }
.hint-list p { margin: .25rem 0; overflow-wrap: anywhere; }
.reward-list { margin-top: .65rem; }
.reward-list li .meta { display: block; }
.reward-wheel { width: 92px; aspect-ratio: 1; display: grid; place-items: center; margin-inline: auto; border-radius: 50%; border: 3px solid #d5af71;
  background: conic-gradient(#a97d42 0deg 120deg,#43644d 120deg 240deg,#615379 240deg); }
.reward-wheel span { display: grid; place-items: center; width: 46%; aspect-ratio: 1; border-radius: 50%; background: var(--panel); color: var(--brass); font-size: 1.35rem; font-weight: 750; }
.reward-wheel.turn { animation: reward-turn .65s ease-out; }
@keyframes reward-turn { from { transform: rotate(-1turn); } to { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .reward-wheel.turn { animation: none; } }
.profile-shortcuts { margin: 0 0 .8rem; }
.progress-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(320px,100%),1fr)); gap: .7rem; }
.progress-list { display: grid; gap: .65rem; margin-bottom: .4rem; }
.progress-entry > div { display: flex; justify-content: space-between; gap: .5rem; text-transform: capitalize; }
.progress-entry span { color: var(--brass); white-space: nowrap; }
.progress-entry progress { width: 100%; height: .6rem; }
.progress-entry.reference-meter progress::-webkit-progress-value { background: #88a89d; }
.progress-entry.reference-meter progress::-moz-progress-bar { background: #88a89d; }
.progress-entry.topic-meter progress::-webkit-progress-value { background: #9bb883; }
.progress-entry.topic-meter progress::-moz-progress-bar { background: #9bb883; }
.goal-metrics { display: grid; margin: .55rem 0; }
.goal-metric { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .3rem .6rem; padding: .5rem 0; border-top: 1px solid var(--line-soft); }
.goal-metric .badge { justify-self: start; grid-column: 1 / -1; }
.access-card { max-width: 640px; }
.access-card > * + * { margin-top: .6rem; }
.bank-access-queue { margin-bottom: .9rem; }
.bank-access-queue .task-row p { overflow-wrap: anywhere; }
.compact-resource { display: grid; grid-template-rows: auto 1fr auto; justify-items: start; gap: .5rem; min-width: 0; padding: .8rem; }
.compact-resource h2 { font-size: 1.15rem; overflow-wrap: anywhere; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(134px,100%),1fr)); gap: .6rem; }
.form-row[hidden], #board-key[hidden] { display: none; }
.form-row input { width: 100%; min-width: 0; }
.editor-code { display: block; width: 100%; margin-top: .35rem; }
.wheel-catalog { display:grid; grid-template-columns: minmax(150px,1fr) minmax(220px,2fr); align-items:center; gap:1.4rem; }
.wheel-frame { position:relative; width:min(190px,85%); aspect-ratio:1; margin:.8rem auto; }
.wheel-frame::after { content:''; position:absolute; top:-5px; left:calc(50% - 8px); border-inline:8px solid transparent; border-top:16px solid #fff1ca; }
.prize-wheel { position:absolute; inset:0; border-radius:50%; border:4px solid #b89a64; transform:rotate(var(--stop)); }
.wheel-frame > span { position:absolute; inset:35%; display:grid; place-items:center; border-radius:50%; color:var(--brass); background:var(--panel); font-size:1.6rem; }
.prize-wheel.spinning { animation:prize-spin 1.4s cubic-bezier(.15,.75,.22,1); }
@keyframes prize-spin { from { transform:rotate(-720deg); } to { transform:rotate(var(--stop)); } }
.wheel-legend { padding:0; margin:0; list-style:none; }
.wheel-legend li { display:grid; grid-template-columns:.75rem 1fr auto; align-items:center; gap:.5rem; border-bottom:1px solid var(--line-soft); padding:.36rem 0; }
.wheel-legend i { width:.65rem; height:.65rem; border-radius:50%; }
.wheel-legend strong { color:var(--brass); font-variant-numeric:tabular-nums; }
@media(max-width:600px) { .wheel-catalog { grid-template-columns:1fr; gap:.5rem; } }
@media(prefers-reduced-motion:reduce) { .prize-wheel.spinning { animation:none; } }

.folder-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:12px}
.submission-folder {display:flex;align-items:center;gap:14px;min-height:84px;padding:14px 18px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:inherit;text-decoration:none}
.submission-folder:hover,.submission-folder:focus-visible {background:var(--panel-hover);border-color:var(--brass)}
.submission-folder svg,.folder-crumbs a {color:var(--brass)}
.submission-folder>span:last-child {margin-left:auto;color:var(--muted)}
.submission-folder small,.cycle-assignment small {display:block;margin-top:4px;color:var(--muted)}
.folder-crumbs {display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:.88rem;color:var(--muted)}
.cycle-assignment {display:grid;grid-template-columns:1fr minmax(110px,auto) auto;align-items:center;gap:12px;padding:14px 0;border-top:1px solid var(--line)}
.cycle-assignment select {width:100%}
@media(max-width:580px){.cycle-assignment {grid-template-columns:1fr auto}.cycle-assignment>div {grid-column:1/-1}}

.assessment-review {padding:0 1.25rem 1.25rem}
.review-list {list-style:none;padding:0;display:grid;gap:14px}
.review-item {border:1px solid var(--line);border-radius:10px;padding:14px;background:var(--bg);overflow-wrap:anywhere}
.review-item-head {display:flex;align-items:center;justify-content:space-between;gap:10px}
.review-item-head strong,.review-item dt {color:var(--brass)}
.review-prompt {font-weight:600;white-space:pre-line}
.review-item dl {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(175px,100%),1fr));gap:10px;margin-bottom:8px}
.review-item dt {font-size:.82rem}.review-item dd {margin:3px 0;white-space:pre-line}
.review-explanation {margin-bottom:0;color:var(--muted)}

.tab[aria-current="page"]{border-color:#977848;color:var(--brass);background:#383124}
.queue-filters,.queue-advance{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.queue-filters label{display:grid;gap:4px;color:var(--muted);max-width:100%}
.queue-filters select{max-width:100%}
.queue-tasks{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr));gap:10px}
.queue-task{width:100%;text-align:left;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:12px 14px;cursor:pointer}
.queue-task:hover,.queue-task:focus-visible{border-color:var(--brass)}
.queue-task span{display:block;color:var(--muted);font-size:.85rem}
.queue-advance{border:0;padding:0;margin:0}
.queue-advance legend{margin-bottom:8px;color:var(--brass)}

.school-clubs {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:12px}
.school-slots {list-style:none;padding:0;margin:0}
.school-slots li {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:10px 0;border-top:1px solid var(--line-soft)}
.school-slots span {display:block;color:var(--muted);font-size:.87rem}

.journal-cell-button,.btn.journal-cell-button{font:inherit;color:inherit;text-align:inherit;background:transparent;border:1px solid transparent;border-radius:5px;width:100%;min-width:24px;padding:4px;cursor:pointer}
.journal-cell-button:hover,.journal-cell-button:focus-visible{background:var(--panel-hover);border-color:var(--brass)}
.cell-photo-count,.detail-tasks small{display:block;color:var(--muted);font-size:.75rem}
.detail-tasks{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr));gap:6px}


.record-detail>div{padding:8px 0;border-bottom:1px solid var(--line-soft)}.record-detail dd{margin:0}.record-detail dt{color:var(--muted)}

.worksheet-workspace { container-type: inline-size; }
.worksheet-layout { display: grid; align-items: start; gap: 1rem; grid-template-columns: minmax(0,1fr); }
.worksheet-overview { min-width: 0; }
.worksheet-overview .journal-cell-button[aria-current="true"] {
  background: #433a2b; color: var(--cream); box-shadow: inset 0 0 0 2px var(--brass); border-radius: 6px;
}
.sheet-panel { min-width: 0; overflow: hidden; scroll-margin-top: .75rem; }
.sheet-panel[hidden] { display: none; }
.sheet-panel-head { padding: .8rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.sheet-panel-top, .sheet-steppers, .sheet-stepper { display: flex; align-items: center; gap: .45rem; }
.sheet-panel-top { justify-content: space-between; color: var(--brass); font-weight: 650; font-size: .88rem; }
.sheet-panel-head h2 { font-size: 1.65rem; margin-bottom: .2rem; }
.sheet-panel-head, .sheet-panel-body { overflow-wrap: anywhere; }
.sheet-steppers { flex-wrap: wrap; margin-top: .65rem; gap: .8rem; }
.sheet-stepper { color: var(--muted); font-size: .86rem; gap: .2rem; }
.sheet-stepper span { margin-right: .25rem; }
.step-button { display: grid; place-content: center; background: var(--panel); color: var(--cream); border: 1px solid var(--line); border-radius: 6px; min-width: 32px; min-height: 32px; font-size: 1.25rem; line-height: 1; }
.step-button:disabled { cursor: default; opacity: .35; }
.sheet-panel-body { padding: 1rem; min-height: 0; }
.sheet-panel-body > h3 { margin: 1rem 0 .45rem; }
.sheet-panel-body .submission-gallery { margin-top: .65rem; }
.sheet-panel-body .task-attempt .profile-card-head { flex-wrap: wrap; }
@container (min-width: 680px) {
  .worksheet-layout:has(.sheet-panel:not([hidden])) { grid-template-columns: minmax(0,1fr) clamp(280px,35cqw,385px); }
  .sheet-panel { position: sticky; top: .75rem; display: flex; flex-direction: column; max-height: calc(100dvh - 1.5rem); }
  .sheet-panel-head { flex: none; }
  .sheet-panel-body { overflow: auto; overscroll-behavior: contain; }
}

.sheet-panel-return { margin-top: 1rem; }
@container (min-width: 680px) { .sheet-panel-return { display: none; } }

.prep-goals { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(13rem,100%),1fr)); gap: .75rem; margin: .8rem 0 1.15rem; }
.prep-goals > div { padding: .65rem .85rem; border-inline-start: 2px solid #8e754e; background: var(--surface); }
.prep-goals dt { color: var(--brass); font-weight: 650; font-size: .9rem; }
.prep-goals dd { margin-top: .2rem; }
.goal-form select, .day-entry select, .day-entry input { width: 100%; min-width: 0; }
.calendar-workspace { container-type: inline-size; }
.calendar-split { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: .7rem; }
.calendar-day-panel { border-top: 1px solid var(--line); padding-top: .85rem; min-width: 0; }
.calendar-day-panel h2 { font-size: 1.45rem; margin: 0 0 .65rem; }
.calendar-day-panel h3 { font-size: 1rem; margin: .8rem 0 .35rem; }
.day-records { padding: 0; margin: 0; list-style: none; }
.day-records li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .65rem; padding: .5rem 0; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.day-records li div { flex: 1 1 10rem; min-width: 0; }
.day-records li div span { color: var(--muted); display: block; }
.day-entry { border-top: 1px solid var(--line); margin-top: .7rem; padding-top: .6rem; }
.day-entry summary { cursor: pointer; color: var(--brass); font-weight: 600; }
.day-entry .form { padding: .75rem 0 .2rem; }
@container (min-width: 640px) {
  .calendar-split { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(1rem,3cqw,2rem); }
  .calendar-day-panel { border-top: 0; border-inline-start: 1px solid var(--line); padding: 0 0 .3rem 1rem; }
  .calendar-day-panel .profile-timeline { max-height: 28rem; overflow: auto; }
}

.activity-wizard { gap: .85rem; }
.activity-wizard fieldset { margin: 0; min-width: 0; padding: 0; border: 0; }
.activity-wizard legend { margin-bottom: .45rem; color: var(--cream); font-weight: 650; }
.activity-modes { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(8rem,100%),1fr)); gap: .4rem; }
.activity-modes label { position: relative; cursor: pointer; }
.activity-modes input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.activity-modes span { height: 100%; padding: .6rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--panel); }
.activity-modes small { display: block; margin-top: .2rem; }
.activity-modes input:checked + span { border-color: var(--brass); background: #383124; }
.activity-modes input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 1px; }
.activity-wizard [hidden] { display: none !important; }
.activity-wizard [data-branch] { display: grid; gap: .8rem; }
.activity-wizard [data-step] > :is(input, select, textarea) { width: 100%; min-width: 0; }
.activity-wizard [data-organizer] { margin-top: .5rem; }
.camp-days { display: grid; grid-template-columns: repeat(auto-fit,minmax(7rem,1fr)); gap: .5rem; margin-top: .55rem; }
.camp-days input { width: 100%; min-width: 0; }
.camp-review div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-soft); padding: .3rem; }
.calendar-pr { font-size: .73rem; color: var(--brass); }

.training-frame{width:100%;height:650px;display:block;border:0;margin-bottom:16px}

.kit-stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:14px}.kit-stat-grid>div{display:grid;gap:4px}.kit-stat-grid strong{font:600 1.65rem Georgia,serif;color:var(--brass,#e7ba77)}.kit-stat-grid span,.peer-self small{color:var(--muted,#bebba9)}.kit-leaders,.peer-results{display:grid;gap:12px;margin:18px 0}.kit-leaders h2,.peer-results h2{margin:0}.kit-history-form,.peer-picker{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.kit-history-form label{display:grid;gap:3px}.kit-history-form input{width:7ch}.peer-picker select{max-width:100%}.peer-self>*{background:#32382a}.peer-self small{font-weight:400}.peer-results .panel-head{flex-wrap:wrap}.peer-results .journal-table th,.kit-leaders .journal-table th{white-space:nowrap}.peer-results abbr{text-decoration-style:dotted}

.kits-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 2vw, 26px);
}
.kits-layout > .kit-leaders { margin: 0; }
.kits-layout > .card { padding: clamp(14px, 2vw, 22px); }
.kit-summary { display: grid; gap: 14px; }
@media (max-width: 640px) {
  .kit-summary .kit-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
