:root {
  --wine: #571017;
  --wine-deep: #31070c;
  --wine-soft: #7a2430;
  --gold: #e0ac45;
  --cream: #fbf6ed;
  --paper: #fffdf9;
  --ink: #261d1e;
  --muted: #76696a;
  --line: #e8ded5;
  --green: #287352;
  --red: #aa3342;
  --shadow: 0 18px 45px rgba(61, 16, 22, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--cream); }
a { color: var(--wine); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 20px; display: flex; flex-direction: column; color: #fff; background: radial-gradient(circle at 20% 0, #7a2430, var(--wine) 38%, var(--wine-deep)); }
.brand { display: flex; gap: 12px; align-items: center; color: #fff; margin-bottom: 38px; }
.brand img { width: 48px; height: 48px; object-fit: cover; border-radius: 15px; border: 1px solid rgba(255,255,255,.3); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.15rem; letter-spacing: .02em; }
.brand small { color: rgba(255,255,255,.68); margin-top: 2px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a { color: rgba(255,255,255,.8); padding: 11px 13px; border-radius: 11px; font-weight: 650; }
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-user { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(255,255,255,.07); }
.sidebar-user span, .sidebar-user small { display: block; }
.sidebar-user small { color: rgba(255,255,255,.6); margin: 3px 0 12px; }
.sidebar-user a, .link-button { color: #fff; font-size: .84rem; }
.link-button { border: 0; padding: 7px 0 0; background: transparent; }
.account-navigation { display: flex; flex-direction: column; flex: 1; }
.mobile-menu-toggle { display: none; }
@media (min-width: 981px) {
  .account-navigation::details-content { content-visibility: visible; display: flex; flex-direction: column; flex: 1; }
  .account-navigation:not([open]) > nav { display: grid; }
  .account-navigation:not([open]) > .sidebar-user { display: block; }
}
.content { min-width: 0; padding: 40px clamp(24px, 4vw, 64px) 70px; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 12px 0 30px; }
.page-header h1 { margin: 4px 0 7px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; color: var(--wine-deep); }
.page-header p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--wine-soft); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; }
.back { display: block; margin-bottom: 18px; font-weight: 700; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.panel.narrow { max-width: 720px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h2, .panel h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; color: var(--wine-deep); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 21px; min-height: 145px; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.stat span, .stat small { color: var(--muted); }
.stat strong { margin: auto 0 2px; font: 700 2.5rem Georgia, serif; color: var(--wine); }
.stat.accent { color: #fff; border: 0; background: linear-gradient(145deg, var(--wine-soft), var(--wine-deep)); }
.stat.accent strong, .stat.accent span, .stat.accent small { color: #fff; }
.stat-link { color: inherit; transition: transform .16s ease, box-shadow .16s ease; }
.stat-link:hover { transform: translateY(-2px); box-shadow: 0 22px 52px rgba(61, 16, 22, .22); }
.pending-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pending-counts a { display: grid; gap: 5px; min-height: 110px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fbf2f3; color: var(--ink); }
.pending-counts a:hover { border-color: var(--gold); }
.pending-counts strong { font: 700 1.8rem Georgia, serif; color: var(--wine-deep); }
.pending-counts span { color: var(--muted); font-size: .88rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 15px; }
.subject-card { display: block; padding: 20px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 17px; transition: transform .16s ease, border-color .16s ease; }
.subject-card:not(.static):hover { transform: translateY(-2px); border-color: var(--gold); }
.subject-card h3 { margin: 14px 0 5px; font-family: Georgia, serif; font-size: 1.25rem; color: var(--wine-deep); }
.subject-card p { margin: 0; color: var(--muted); }
.session-line { display: grid; gap: 4px; margin-top: 17px; color: var(--muted); font-size: .82rem; }
.badge, .status { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 999px; color: var(--wine); background: #f5e8e6; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.status.published { color: var(--green); background: #e6f3ec; }
.status.paid { color: var(--green); background: #e6f3ec; }
.status.pending { color: #75540e; background: #fff0c9; }
.status.submitted { color: #75540e; background: #fff0c9; }
.status.approved { color: var(--green); background: #e6f3ec; }
.status.overdue, .status.rejected, .status.failed { color: var(--red); background: #f9e4e7; }
.status.waived { color: #555; background: #eee; }
.status.planned { color: #6f5618; background: #fff0c9; }
.status.cancelled { color: #666; background: #ece8e5; }
.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.split-layout > *, .two-columns > * { min-width: 0; }
.side-form { position: sticky; top: 24px; }
.form-stack { display: grid; gap: 16px; margin-top: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .wide { grid-column: 1 / -1; }
label { display: grid; gap: 7px; font-weight: 700; color: var(--wine-deep); }
label small { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; border: 1px solid #d8cac4; border-radius: 11px; padding: 11px 12px; color: var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(224,172,69,.25); border-color: var(--gold); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid transparent; border-radius: 11px; padding: 10px 15px; font-weight: 800; }
.button.primary { color: #fff; background: var(--wine); }
.button.secondary { color: var(--wine); border-color: var(--wine); background: #fff; }
.button.ghost { color: var(--wine); border-color: var(--line); background: transparent; }
.button.danger { color: #fff; background: var(--red); }
.button.compact { min-height: 34px; padding: 7px 11px; font-size: .82rem; }
.button.full { width: 100%; }
.notice { padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; }
.notice.warning { color: #6e4d08; background: #fff0c9; border: 1px solid #f1d287; }
.notice.success { color: #165a3e; background: #e4f3eb; border: 1px solid #a8d2bd; }
.notice.danger { color: #82212e; background: #f9e5e8; border: 1px solid #e8aab2; }
.notice.neutral { color: #4d4542; background: #f4eee8; border: 1px solid #e2d6cd; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
td select { min-width: 170px; }
.block { display: block; color: var(--muted); margin-top: 3px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 3px; color: var(--ink); border-bottom: 1px solid var(--line); }
.list-row div { min-width: 0; }
.list-row strong, .list-row span { display: block; }
.list-row div span { color: var(--muted); margin-top: 4px; font-size: .86rem; }
.stack-list { display: grid; }
.inset { padding-top: 14px; border-top: 1px solid var(--line); }
.creator { margin-top: 20px; padding: 15px; border-radius: 14px; border: 1px dashed #cab6aa; }
.creator summary { cursor: pointer; color: var(--wine); font-weight: 800; }
.creator form { margin-top: 18px; }
.question-list { display: grid; gap: 14px; padding-left: 22px; }
.question-list li { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.question-list h3 { margin: 10px 0 4px; }
.question-list p { margin: 0; color: var(--muted); }
.form-actions { display: flex; align-items: center; gap: 16px; justify-content: flex-end; margin-top: 22px; }
.form-actions p { color: var(--muted); font-size: .85rem; }
.empty { grid-column: 1 / -1; padding: 34px; text-align: center; color: var(--muted); }
.empty h2, .empty h3 { color: var(--wine-deep); }
.empty.compact { padding: 12px; }
.auth-shell { display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 15%, #8d3140, transparent 31%), linear-gradient(145deg, var(--wine), var(--wine-deep)); }
.login-card { width: min(100%, 460px); padding: 36px; border-radius: 26px; background: var(--paper); box-shadow: 0 30px 80px rgba(28,0,4,.32); }
.login-brand { display: flex; align-items: center; gap: 15px; }
.login-brand img { width: 72px; height: 72px; object-fit: cover; border-radius: 20px; }
.login-brand span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.login-brand h1 { margin: 2px 0 0; font: 700 2rem Georgia, serif; color: var(--wine-deep); }
.lead { color: var(--muted); line-height: 1.6; }
.microcopy { text-align: center; color: var(--wine-soft); font: italic 1rem Georgia, serif; margin: 24px 0 0; }
.student-hero { padding: 24px; color: #fff; border-radius: 24px; background: linear-gradient(135deg, var(--wine-soft), var(--wine-deep)); }
.student-hero h1, .student-hero p, .student-hero .eyebrow { color: #fff; }
.student-subjects { display: grid; gap: 24px; }
.student-card { padding: clamp(20px, 3vw, 32px); background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.student-card:nth-child(even), .split-layout .card-grid .subject-card:nth-child(even) { background: #fbf2f3; }
.student-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none; }
.student-card > summary::-webkit-details-marker { display: none; }
.student-card-toggle { width: 12px; height: 12px; flex: 0 0 auto; border-right: 2px solid var(--wine); border-bottom: 2px solid var(--wine); transform: rotate(45deg) translateY(-3px); transition: transform .16s ease; }
.student-card[open] .student-card-toggle { transform: rotate(225deg) translate(-3px, 0); }
.student-card h2 { margin: 8px 0 4px; font: 700 1.7rem Georgia, serif; color: var(--wine-deep); }
.student-card p { margin: 0; color: var(--muted); }
.proof-preview-trigger { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.proof-preview { width: min(96vw, 1040px); height: min(90vh, 820px); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 24px 80px rgba(36, 0, 7, .35); background: var(--paper); }
.proof-preview::backdrop { background: rgba(30, 0, 5, .55); }
.proof-preview-head, .proof-preview-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; }
.proof-preview iframe { display: block; width: 100%; height: calc(100% - 122px); border: 0; background: #fff; }
.proof-preview-actions { border-top: 1px solid var(--line); justify-content: flex-end; }
.progress-block, .student-section, .student-actions { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.progress-block h3, .student-section h3 { margin: 0 0 14px; color: var(--wine-deep); }
.day-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.day-state { padding: 15px; border-radius: 14px; background: #f4eee8; }
.day-state strong, .day-state span, .day-state b { display: block; }
.day-state span { color: var(--muted); margin: 5px 0 11px; font-size: .84rem; }
.day-state b { color: var(--wine); }
.day-state form { margin-top: 12px; }
.day-state.present { background: #e5f3eb; }
.day-state.present b { color: var(--green); }
.day-state.absent { background: #f9e4e7; }
.day-state.absent b { color: var(--red); }
.muted { color: var(--muted); }
.text-link { display: inline-block; margin-top: 16px; font-weight: 750; }
.compact-form { max-width: 620px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.info-grid, .manual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.info-card { display: flex; flex-direction: column; }
.info-card .button { align-self: flex-start; margin-top: auto; }
.big-copy { font: 700 clamp(1.4rem, 3vw, 2.2rem) Georgia, serif; color: var(--wine-deep); }
.clean-list { display: grid; gap: 12px; padding: 0; list-style: none; }
.clean-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.clean-list span { color: var(--muted); text-align: right; }
.manual-copy { line-height: 1.65; }
.manual-copy h2 { margin-bottom: 14px; }
.manual-copy p { max-width: 82ch; }
.manual-copy ul { display: grid; gap: 10px; margin: 16px 0 0; padding-left: 22px; }
.manual-copy li { padding-left: 4px; }
.book-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.book-columns h3 { margin: 0 0 14px; color: var(--wine-deep); }
.book-list { display: grid; gap: 0; margin: 0; padding-left: 28px; }
.book-list li { padding: 11px 4px; border-bottom: 1px solid var(--line); }
.book-list strong, .book-list span { display: block; }
.book-list span { margin-top: 4px; color: var(--muted); font-size: .86rem; }
.book-note { margin: 18px 0 0; padding: 13px 15px; border-radius: 12px; color: var(--wine-deep); background: #f7f1eb; }
.bank-card dl { display: grid; gap: 12px; }
.bank-card dl div { padding: 12px; border-radius: 12px; background: #f7f1eb; }
.bank-card dt { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.bank-card dd { margin: 5px 0 0; overflow-wrap: anywhere; font-weight: 750; }
.assessment-sheet { display: grid; gap: 18px; max-width: 880px; }
.question { margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.question legend { width: 100%; padding: 0 0 17px; font: 700 1.15rem Georgia, serif; color: var(--wine-deep); }
.question legend > span { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 10px; color: #fff; border-radius: 50%; background: var(--wine); font: 700 .9rem system-ui; }
.question legend small { display: block; margin: 7px 0 0 42px; color: var(--muted); font: 500 .78rem system-ui; }
.choice { display: flex; grid-template-columns: none; align-items: center; gap: 10px; padding: 11px; margin: 7px 0; border: 1px solid var(--line); border-radius: 11px; }
.choice input { width: auto; }
.google-form-panel { padding: clamp(12px, 2vw, 22px); }
.google-form-frame { display: block; width: 100%; min-height: 1120px; margin-top: 18px; border: 0; border-radius: 14px; background: #f7f1eb; }
.form-fallback { margin: 14px 4px 0; color: var(--muted); font-size: .9rem; }
.avatar { display: block; flex: 0 0 auto; object-fit: cover; border: 2px solid rgba(224,172,69,.55); border-radius: 50%; background: var(--wine); }
.avatar.small { width: 42px; height: 42px; }
.hero-avatar { width: 96px; height: 96px; border-color: rgba(255,255,255,.65); }
.profile-avatar { width: 76px; height: 76px; }
.person-cell, .profile-summary { display: flex; align-items: center; gap: 12px; }
.person-cell div span { display: block; color: var(--muted); margin-top: 3px; font-size: .82rem; }
.profile-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.profile-summary h2 { margin: 0 0 5px; }
.profile-summary p { margin: 0; color: var(--muted); }
.avatar-form { display: flex; align-items: end; gap: 12px; max-width: 570px; }
.avatar-form label { min-width: 290px; }
.danger-zone { border-color: #e7a4ad; background: #fff8f8; }
.danger-zone p { color: var(--muted); }
.enrollment-entry + .enrollment-entry { margin-top: 10px; }
.enrollment-remove { margin: 8px 0 0; padding: 10px 12px; }
.enrollment-remove form { margin-top: 12px; }
.cohort-card { display: block; }
.cohort-card .creator { margin-top: 14px; }
.check-row { display: flex; grid-template-columns: none; align-items: center; gap: 10px; }
.check-row input { width: auto; }
.delete-confirmation { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: end; gap: 14px; max-width: 780px; }
.score-card { min-width: 130px; padding: 16px 20px; text-align: center; color: #fff; border-radius: 18px; background: var(--wine); }
.score-card strong, .score-card span { display: block; }
.score-card strong { font: 700 2.4rem Georgia, serif; }
.answer-list { display: grid; gap: 16px; padding-left: 22px; }
.answer-list li { padding: 18px; border: 1px solid var(--line); border-radius: 16px; }
.answer-list h3 { margin: 0 0 14px; color: var(--wine-deep); }
.answer-list dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.answer-list dl div { padding: 11px; border-radius: 10px; background: #f7f1eb; }
.answer-list dt { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.answer-list dd { margin: 6px 0 0; overflow-wrap: anywhere; }
.inline-form { display: flex; align-items: end; gap: 10px; }
.inline-form label { max-width: 120px; }
.inline-review { display: grid; grid-template-columns: 130px minmax(150px, 1fr) auto; gap: 7px; margin-top: 8px; }
.inline-review input, .inline-review select { padding: 7px 8px; }
.payment-row { border-bottom: 1px solid var(--line); }
.payment-row summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 3px; cursor: pointer; }
.payment-row summary div span { display: block; margin-top: 4px; color: var(--muted); font-size: .86rem; }
.payment-row form { padding: 16px; margin-bottom: 15px; border-radius: 14px; background: #f7f1eb; }
.payment-summary-status { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.proof-cell { min-width: 280px; }
.proof-cell > * { margin: 4px 5px 4px 0; }
.proof-upload-form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: center; gap: 7px; margin-top: 8px; }
.proof-upload-form input { min-width: 210px; padding: 7px; font-size: .78rem; }
.proof-review-card { display: grid; grid-template-columns: minmax(220px, 1fr) auto minmax(330px, 1.5fr); align-items: center; gap: 16px; margin: 0 16px 15px; padding: 16px; border: 1px solid #e1c879; border-radius: 14px; background: #fff8df; }
.proof-review-card strong, .proof-review-card small { display: block; margin-top: 5px; }
.proof-review-card small { color: var(--muted); }
.payment-row .proof-review-form { margin: 0; padding: 0; background: transparent; }
.proof-review-form .button-row { margin-top: 8px; }
.cost-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cost-category { display: flex; justify-content: space-between; gap: 12px; padding: 15px; border-radius: 13px; background: #f7f1eb; }
.cost-category span { color: var(--muted); }
.expense-row { border-bottom: 1px solid var(--line); }
.expense-row > summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 3px; cursor: pointer; }
.expense-row > summary div span { display: block; margin-top: 4px; color: var(--muted); font-size: .86rem; }
.expense-summary { display: flex; align-items: center; gap: 12px; text-align: right; }
.expense-summary .status { display: inline-flex; margin: 0; }
.expense-form { padding: 18px; margin-bottom: 16px; border-radius: 14px; background: #f7f1eb; }
.stat-grid.four-compact .stat { min-height: 112px; }
.stat-grid.four-compact .stat strong { font-size: 1.65rem; }
.admin-avatar { border-color: var(--gold); }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; padding: 14px 18px; flex-direction: column; align-items: stretch; gap: 0; }
  .sidebar { max-width: 100vw; }
  .brand { margin: 0; flex: 0 0 auto; min-height: 44px; padding-right: 110px; }
  .brand img { width: 40px; height: 40px; }
  .account-navigation { display: block; flex: none; }
  .mobile-menu-toggle { display: flex; position: absolute; top: 14px; right: 18px; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.5); border-radius: 8px; font-weight: 650; cursor: pointer; list-style: none; }
  .mobile-menu-toggle::-webkit-details-marker { display: none; }
  .mobile-menu-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
  .menu-indicator { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; }
  .account-navigation[open] .menu-indicator { transform: rotate(225deg); margin-top: 4px; }
  .sidebar nav { display: grid; grid-template-columns: minmax(0,1fr); gap: 4px; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); }
  .sidebar nav a { white-space: normal; min-height: 48px; padding: 12px; }
  .sidebar-user { display: block; margin-top: 12px; padding: 12px; border: 0; border-top: 1px solid rgba(255,255,255,.2); border-radius: 0; background: transparent; }
  .sidebar-user span { overflow-wrap: anywhere; }
  .sidebar-user small { display: block; margin-bottom: 8px; }
  .sidebar-user a, .sidebar-user .link-button { display: flex; width: 100%; align-items: center; min-height: 48px; padding: 12px 0; font-size: 1rem; text-align: left; }
.sidebar-user form { margin: 0; }
  .content { padding-top: 26px; }
  .stat-grid, .stat-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pending-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-layout, .two-columns { grid-template-columns: 1fr; }
  .info-grid, .manual-grid { grid-template-columns: 1fr; }
  .cost-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-columns { grid-template-columns: 1fr; }
  .side-form { position: static; }
  .profile-panel, .avatar-form { align-items: stretch; flex-direction: column; }
  .inline-review { grid-template-columns: 1fr; }
  .proof-review-card { grid-template-columns: 1fr; }
  .avatar-form label { min-width: 0; }
}
@media (max-width: 620px) {
  .content { padding: 20px 14px 50px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .stat-grid, .stat-grid.three, .day-grid, .form-grid { grid-template-columns: 1fr; }
  .pending-counts { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .panel, .student-card, .question { padding: 18px; border-radius: 17px; }
  .login-card { padding: 25px; }
  .sidebar nav a { white-space: normal; }
  .delete-confirmation, .answer-list dl { grid-template-columns: 1fr; }
  .hero-avatar { width: 78px; height: 78px; }
  .clean-list li { align-items: flex-start; flex-direction: column; }
  .clean-list span { text-align: left; }
  .section-heading:has(.inline-form) { align-items: stretch; flex-direction: column; }
  .cost-category-grid { grid-template-columns: 1fr; }
  .expense-row > summary { align-items: flex-start; flex-direction: column; }
  .expense-summary { width: 100%; justify-content: space-between; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .proof-upload-form { grid-template-columns: 1fr; }
  .inline-form label { max-width: none; }
}

.proof-preview { height: min(90dvh, 820px); }
.proof-preview iframe { min-height: 200px; }
@media (max-width: 620px) { .proof-preview { width: 96vw; max-height: 94dvh; border-radius: 12px; } .proof-preview-head strong { overflow-wrap: anywhere; min-width: 0; } .proof-preview-head { padding: 12px; } .proof-preview-head button { flex-shrink: 0; min-height: 44px; } }

.student-hero{display:block;background:var(--wine-deep)}.student-welcome h1{margin-bottom:0}.daily-psalm{margin-top:24px;border-top:1px solid rgba(255,255,255,.2);padding-top:22px;max-width:850px}.daily-psalm .eyebrow{color:#e3cba5}.daily-psalm blockquote{font-family:Georgia,'Times New Roman',serif;font-size:clamp(22px,2.3vw,30px);line-height:1.5;letter-spacing:-.015em;margin:12px 0 16px;color:#fff;overflow-wrap:anywhere}.student-hero .psalm-reference{font-weight:600;font-size:14px;margin:0 0 7px;color:#eedabd}.daily-psalm small{display:block;color:#e4d1ce;font-size:11px;line-height:1.5}@media(max-width:600px){.student-hero{padding:24px 20px}.daily-psalm{margin-top:20px;padding-top:18px}.daily-psalm blockquote{font-size:23px}}

.student-welcome-with-photo{display:flex;align-items:center;justify-content:space-between;gap:18px}.student-welcome-with-photo>div{min-width:0}.student-welcome-with-photo h1{overflow-wrap:anywhere}.welcome-avatar{width:72px;height:72px;flex-shrink:0;border-color:rgba(255,255,255,.65)}@media(max-width:600px){.welcome-avatar{width:56px;height:56px}.student-welcome-with-photo{gap:12px}}
/* Cohort rosters keep identity and actions readable on narrow phones. */
.cohort-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 680px) {
  .cohort-actions .button { width: 100%; }
  .cohort-roster .list-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .cohort-roster .person-cell { min-width: 0; }
  .cohort-roster .person-cell > div { min-width: 0; overflow-wrap: anywhere; }
  .cohort-roster form .button { width: 100%; }
}
