/* One visual language for the school: layouts remain responsive and role-specific. */
:root {
  --school-paper: #f5f2e9;
  --school-card: #fffefa;
  --school-ink: #123f42;
  --school-green: #174e49;
  --school-muted: #60736d;
  --school-line: #e2e5da;
  --school-sage: #eaf0e5;
  --school-action: linear-gradient(110deg, #ffb132, #ffc44d);
}
body.account-shell.cabinet-shell:not(.board-editor-page) {
  --text: var(--school-ink);
  --green: var(--school-green);
  --muted: var(--school-muted);
  --line: var(--school-line);
  --paper: var(--school-paper);
  color: var(--school-ink);
  background: var(--school-paper);
}
body.account-shell.cabinet-shell .site-header {
  background: var(--school-card);
  border: 1px solid var(--school-line);
  box-shadow: 0 4px 20px #29433a04;
}
body.account-shell.cabinet-shell .dashboard :is(.card,.balance-card,.material-card,.staff-panel,.staff-form-panel,.student-profile-summary,.homework-lessons-panel,.tutor-students-panel,.subscription-overview,.subscription-shop,.board-settings-card,.board-card,.homework-box,.homework-chat) {
  background: var(--school-card);
  border-color: var(--school-line);
  border-radius: 20px;
  box-shadow: 0 3px 16px #29433a03;
}
body.account-shell.cabinet-shell :is(.cabinet-finance,.cabinet-mobile-lesson,.cabinet-card) {border-color:var(--school-line);box-shadow:none}
body.account-shell.cabinet-shell .dashboard :is(h1,h2,h3) {color:var(--school-ink)}
body.account-shell.cabinet-shell :is(.dashboard,.site-header,.auth-card) .button {
  background: var(--school-action);
  color: var(--school-ink);
  border: 1px solid transparent;
  border-radius: 13px;
  min-height: 44px;
  box-shadow: none;
  font-weight: 600;
}
body.account-shell.cabinet-shell .dashboard :is(.button.secondary,.button.secondary-button,.button.ghost-button,.button.logout-button) {
  background: var(--school-sage);
  color: var(--school-green);
  border-color: var(--school-line);
}
body.account-shell.cabinet-shell .dashboard .button:disabled {background:#ecece2;color:#65736b;border-color:#e2e5da;opacity:1;box-shadow:none}
body.account-shell.cabinet-shell .dashboard :is(.button,.link-button):is(.danger-link,.lesson-cancel) {
  color: #973b32;
  background: #fff0ea;
  border: 1px solid #edcfc7;
  box-shadow: none;
}
body.account-shell.cabinet-shell .dashboard :is(input,textarea,select):not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]) {
  color: var(--school-ink);
  background: var(--school-card);
  border-color: #ced8cc;
  border-radius: 12px;
  box-sizing: border-box;
  max-width: 100%;
}
body.account-shell.cabinet-shell .dashboard :is(input,textarea)::placeholder {color:#74817b;opacity:1}
body.account-shell.cabinet-shell :is(button,a,input,textarea,select,summary):focus-visible {
  outline: 2px solid #28675d;
  outline-offset: 3px;
}
body.account-shell.cabinet-shell .dashboard :is(.staff-tabs,.profile-tabs,.subscription-tabs) {gap:6px}
body.account-shell.cabinet-shell .dashboard :is(.staff-tab,.profile-tab,.subscription-tab).is-active {background:var(--school-green);color:var(--school-card)}
body.account-shell.cabinet-shell .staff-form-card {background:var(--school-card);border-color:var(--school-line);border-radius:18px;box-shadow:none}
body.account-shell.cabinet-shell .staff-panel>.staff-form-card {padding:0;border:0;background:transparent}
body.account-shell.cabinet-shell .dashboard :is(.tutor-student-card,.group-summary-card,.group-member-row,.group-lesson-row,.attendance-row) {border-color:var(--school-line);background:var(--school-card);border-radius:16px;box-shadow:none}
body.account-shell.cabinet-shell .board-permission {background:#f4f6ef;border-color:var(--school-line)}
body.account-shell.cabinet-shell .board-role {background:var(--school-card);border-color:var(--school-line)}
body.account-shell.cabinet-shell .board-filter-fields>a {color:var(--school-green);text-underline-offset:3px}
body.account-shell.cabinet-shell .dashboard :is(.board-search-row,.board-filter-fields) .button {min-width:0;padding-inline:16px}
body.account-shell.cabinet-shell .staff-table th {background:#edf1e7;color:#456258;font-size:11px;letter-spacing:.035em}
body.account-shell.cabinet-shell .staff-table td {border-color:var(--school-line);line-height:1.5}
body.account-shell.cabinet-shell .staff-table a {text-underline-offset:3px}
body.account-shell.cabinet-shell .staff-panel-head {gap:12px}
body.account-shell.cabinet-shell .staff-search {flex-wrap:wrap;gap:8px}
body.account-shell.cabinet-shell .staff-search input {min-width:0;flex:1 1 180px}
.responsive-cell-label {display:none}
.responsive-table-wrap {scrollbar-color:#b3c3b6 transparent;scrollbar-width:thin}
body.public-luxury {
  --lux-ink:var(--school-ink);--lux-green:var(--school-green);--lux-paper:var(--school-card);--lux-cream:var(--school-paper);
  background:var(--school-paper);color:var(--school-ink);
}
body.public-luxury .site-header {background:var(--school-card);border-color:var(--school-line);border-radius:22px;box-shadow:0 4px 20px #29433a04}
body.public-luxury :is(.button,button.button,.dc-btn,.dc-btn-primary) {background:var(--school-action);color:var(--school-ink);border-radius:13px;min-height:44px;font-weight:650;box-shadow:none}
body.public-luxury :is(.button,button.button,.dc-btn,.dc-btn-primary):hover {background:linear-gradient(110deg,#ffac24,#ffca61);box-shadow:none;transform:none}
body.public-luxury :is(.logout-button,.link-button,.seo-back) {display:inline-flex;align-items:center;justify-content:center;min-height:44px;box-sizing:border-box;padding:10px 16px;border-radius:13px;background:var(--school-sage);border:1px solid var(--school-line);box-shadow:none;color:var(--school-green);text-decoration:none;font-size:14px;font-weight:600}
body.public-luxury :is(.seo-hero__content,.seo-panel,.seo-card,.seo-faq,.seo-price-card,.legal-document) {background:var(--school-card);border-color:var(--school-line);border-radius:20px;box-shadow:0 3px 16px #29433a03}
body.public-luxury :is(.seo-hero__aside,.seo-price-card--popular) {background:var(--school-green);color:#fffefa;border-color:var(--school-green);border-radius:20px;box-shadow:none}
body.public-luxury .seo-hero__aside .eyebrow {color:#ffe0a0}
body.public-luxury .seo-price-card--popular :is(p,li) {color:#eef2e8}
body.public-luxury .seo-hero h1 {font-size:clamp(32px,4vw,54px);line-height:1.08;letter-spacing:-.04em}
body.public-luxury.home-luxury .dc {--dc-bg:var(--school-paper);--dc-dark:var(--school-ink);--dc-green:var(--school-green);background:var(--school-paper)}
body.public-luxury.home-luxury .dc :is(.dc-feature,.dc-course,.dc-price,.dc-trial,.dc-rule,.dc-faq,.dc-review-form) {border-color:var(--school-line);border-radius:20px;background:var(--school-card);box-shadow:none}
body.public-luxury.home-luxury .dc .dc-price--popular {background:var(--school-green);color:#fffefa;border-color:var(--school-green)}
body.public-luxury.home-luxury .dc .dc-price--popular :is(p,li) {color:#eef2e8}
body.public-luxury.home-luxury .dc .dc-section--cream {background:#eeeede}
body.public-luxury.home-luxury .dc .dc-hero__h1 em {color:var(--school-ink)}
body.public-luxury.home-luxury .dc .dc-hero__link {background:var(--school-sage);border:1px solid var(--school-line);border-radius:13px;box-shadow:none;color:var(--school-green)}
.board-editor-page {background:var(--school-paper);color:var(--school-ink);font-family:"Segoe UI",Arial,sans-serif}
.board-editor-page :is(.board-editor-header,.board-tools,#board-lesson-tools,.board-dialog,.board-more-panel) {background:var(--school-card);border-color:var(--school-line)}
.board-editor-page .board-access {background:var(--school-green)}
.board-editor-page .board-tools button {background:var(--school-sage);color:var(--school-green);border-radius:12px;min-height:44px}
.board-editor-page .board-tools button[aria-pressed=true],.board-editor-page #board-lesson-tools button[aria-pressed=true]:not(.lesson-color) {background:var(--school-green);color:#fffefa}
.board-editor-page .board-dialog-done,.board-editor-page #board-dictionary-form button {background:var(--school-action);color:var(--school-ink);border-color:transparent}
.board-editor-page .board-dialog {border-radius:20px}
.board-editor-page #board-dictionary-panel {border-color:#bcccb8;border-radius:20px;background:var(--school-card)}
.board-editor-page #board-root>.excalidraw {--color-primary:#174e49;--color-primary-darker:#123f42;--color-primary-light:#eaf0e5;--island-bg-color:#fffefa}
body.account-shell.cabinet-shell .homework-detail .homework-review-actions [value=checked] {background:var(--school-green);color:var(--school-card)}
body.account-shell.cabinet-shell .homework-detail .homework-review-actions [value=revision] {background:var(--school-action);color:var(--school-ink)}
body.account-shell.cabinet-shell .homework-detail .homework-review-actions {gap:8px}
body.account-shell.cabinet-shell .cabinet-page-footer {border-color:var(--school-line);color:var(--school-muted)}
@media(min-width:641px) {
  body.account-shell.cabinet-shell .schedule-table {min-width:840px;table-layout:fixed;border-spacing:6px}
  body.account-shell.cabinet-shell .schedule-table td {min-width:0;width:auto}
  body.account-shell.cabinet-shell .schedule-table th:first-child {width:64px}
  body.account-shell.cabinet-shell .schedule-table .slot-cell {padding:9px 7px;font-size:13px;min-height:72px;border-radius:12px;overflow-wrap:anywhere}
  body.account-shell.cabinet-shell .schedule-table .slot-cell>span {font-weight:650;white-space:nowrap;font-size:12px}
  body.account-shell.cabinet-shell .schedule-table .slot-closed {background:#f1f2eb;border-color:#e0e4d8;color:#60736d}
  body.account-shell.cabinet-shell .schedule-table .slot-closed :is(span,strong) {color:#60736d}
  body.account-shell.cabinet-shell .schedule-table .slot-open {background:#e7f1e2;border-color:#a9c0a0;box-shadow:none}
  body.account-shell.cabinet-shell .schedule-table .slot-booked {background:#e4efeb;border-color:#91aea1}
  body.account-shell.cabinet-shell .schedule-table .slot-booked :is(span,strong,em) {color:#174e49}
  body.account-shell.cabinet-shell .staff-actions .button {background:var(--school-card);border-color:var(--school-line);color:var(--school-green);min-width:0;padding:10px 18px}
  body.account-shell.cabinet-shell .staff-actions .button:hover {background:var(--school-sage);border-color:#a9bda9}
  body.account-shell.cabinet-shell .dashboard .board-grid {gap:18px}
  body.account-shell.cabinet-shell .board-cover {height:138px;background-position:center;background-size:cover}
  body.account-shell.cabinet-shell .board-cover--materials {background-image:url('../img/cabinet/materials.jpg')}
  body.account-shell.cabinet-shell .board-cover--homework {background-image:url('../img/cabinet/homework.jpg')}
  body.account-shell.cabinet-shell .board-cover--schedule {background-image:url('../img/cabinet/schedule.jpg')}
  body.account-shell.cabinet-shell .board-cover>span {display:none}
  body.account-shell.cabinet-shell .board-card-actions .board-open-link {background:var(--school-action);padding:8px 18px;min-height:40px;box-sizing:border-box;border-radius:22px;display:inline-flex;align-items:center;text-decoration:none}
  body.account-shell.cabinet-shell .board-card-actions .board-open-link>span {display:none}
  body.account-shell.cabinet-shell .board-card-actions {align-items:center}
  body.account-shell.cabinet-shell .board-card-body h2 {font-size:20px;line-height:1.3}
  body.account-shell.cabinet-shell .tutor-home .dashboard-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
  body.account-shell.cabinet-shell .tutor-home .dashboard-grid .card {display:flex;flex-direction:column;align-items:flex-start;padding:22px;min-height:190px}
  body.account-shell.cabinet-shell .tutor-home .dashboard-grid .card .button {margin-top:auto}
  body.account-shell.cabinet-shell .tutor-home .dashboard-grid .card p {font-size:14px;margin:0 0 16px}
  body.account-shell.cabinet-shell .tutor-home .dashboard-grid .card .muted {font-size:13px;margin-bottom:12px}
  body.account-shell.cabinet-shell .dashboard .staff-stats {grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
}
@media(min-width:641px) and (max-width:1000px) {
  body.account-shell.cabinet-shell .tutor-home .dashboard-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px) {
  body.public-luxury .site-header.site-header {background:var(--school-paper);border:0;border-radius:0;box-shadow:none}
  body.public-luxury :is(.seo-hero__content,.seo-hero__aside,.seo-panel,.seo-card,.seo-faq,.seo-price-card,.legal-document) {padding:18px;border-radius:18px}
  body.public-luxury .seo-hero h1 {font-size:32px}
  body.public-luxury .seo-page {padding-top:20px}
  body.account-shell.cabinet-shell .site-header {background:var(--school-paper);border:0;box-shadow:none;border-radius:0}
  body.account-shell.cabinet-shell .dashboard {padding-top:8px}
  body.account-shell.cabinet-shell .dashboard-head:has(>a.logout-button)>.button.logout-button {background:transparent;border:0}
  body.account-shell.cabinet-shell .dashboard :is(.card,.balance-card,.material-card,.staff-panel,.staff-form-panel,.student-profile-summary,.homework-lessons-panel,.tutor-students-panel,.board-settings-card) {padding:16px;border-radius:18px}
  body.account-shell.cabinet-shell .dashboard .staff-stats {gap:8px}
  body.account-shell.cabinet-shell .dashboard .staff-stats .balance-card {min-height:0;padding:13px;display:flex;flex-direction:column;gap:4px}
  body.account-shell.cabinet-shell .dashboard .staff-stats .balance-card span {font-size:12px;line-height:1.4}
  body.account-shell.cabinet-shell .dashboard .staff-stats .balance-card strong {font-size:23px;margin:0;line-height:1.3}
  body.account-shell.cabinet-shell .dashboard .staff-stats .balance-card small {font-size:11px}
  body.account-shell.cabinet-shell .dashboard .staff-search {width:100%;display:flex;flex-wrap:wrap}
  body.account-shell.cabinet-shell .dashboard .staff-search input {flex:1 1 100%;width:100%}
  body.account-shell.cabinet-shell .dashboard .staff-search :is(select,.button) {flex:1 1 110px;min-width:0;width:auto}
  body.account-shell.cabinet-shell .dashboard .staff-search:not(:has(select)) input {flex:1 1 120px;width:0}
  body.account-shell.cabinet-shell .dashboard .staff-search:not(:has(select)) .button {flex:0 0 auto;padding-inline:14px}
  body.account-shell.cabinet-shell .dashboard .staff-form-card {padding:14px}
  body.account-shell.cabinet-shell .dashboard .staff-panel>.staff-form-card {padding:0}
  body.account-shell.cabinet-shell .dashboard .group-member-row {padding:12px}
  body.account-shell.cabinet-shell .dashboard .group-member-row form {margin-left:auto}
  body.account-shell.cabinet-shell .dashboard .group-member-row .danger-link {padding:6px 10px;font-size:13px;border-radius:10px}
  body.account-shell.cabinet-shell .dashboard :is(.profile-tabs,.staff-tabs) {max-width:100%;box-sizing:border-box}
  body.account-shell.cabinet-shell .dashboard .profile-tab {padding:10px 8px;font-size:12px;min-height:44px;display:flex;align-items:center;justify-content:center;flex:1;min-width:0;text-align:center}
  body.account-shell.cabinet-shell .dashboard .responsive-table-wrap {overflow:visible;padding:0;margin:0}
  body.account-shell.cabinet-shell .dashboard .responsive-table-wrap::before {display:none}
  body.account-shell.cabinet-shell .dashboard .responsive-card-table {display:block;width:100%;min-width:0;border:0}
  .responsive-card-table thead {position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  body.account-shell.cabinet-shell .responsive-card-table tbody {display:grid;gap:10px}
  body.account-shell.cabinet-shell .responsive-card-table tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px;border:1px solid var(--school-line);border-radius:16px;background:var(--school-card)}
  body.account-shell.cabinet-shell .responsive-card-table td {display:block;min-width:0;padding:0;border:0;font-size:14px;white-space:normal;overflow-wrap:anywhere}
  body.account-shell.cabinet-shell .responsive-card-table td:first-child {grid-column:1/-1;font-size:16px;font-weight:600}
  body.account-shell.cabinet-shell .responsive-card-table td.responsive-cell-wide {grid-column:1/-1}
  body.account-shell.cabinet-shell .responsive-card-table td::before {content:none}
  body.account-shell.cabinet-shell .responsive-card-table .responsive-cell-label {display:block;margin-bottom:3px;font-size:11px;line-height:1.4;color:var(--school-muted);font-weight:400}
  body.account-shell.cabinet-shell .responsive-card-table td :is(input,select,textarea,.button) {width:100%;min-width:0;max-width:100%;font-size:16px}
  body.account-shell.cabinet-shell .responsive-card-table td a {display:inline-flex;align-items:center;min-height:44px;margin-right:12px;font-size:14px}
  body.account-shell.cabinet-shell .staff-dashboard.is-enhanced .staff-table tr {background:var(--school-card);border-color:var(--school-line)}
  body.account-shell.cabinet-shell .homework-detail .homework-chat {padding:0}
  body.account-shell.cabinet-shell .dashboard .tutor-home .button {min-width:0}
  body.account-shell.cabinet-shell .dashboard .button:disabled {background:#ecece2;color:#6c766e;opacity:1}
}
.homework-quick-actions {display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
body.account-shell.cabinet-shell .dashboard .homework-quick-actions .button {min-width:0;min-height:44px;white-space:normal;margin-top:0}
body.account-shell.cabinet-shell .dashboard .tutor-student-actions-card {display:flex;flex-direction:column;align-items:stretch;gap:8px}
.tutor-student-actions-card .tutor-student-main {color:inherit;text-decoration:none;overflow-wrap:anywhere}
.tutor-student-actions-card .tutor-student-main:hover {text-decoration:underline}
.tutor-student-actions-card .homework-quick-actions {margin:0;margin-top:auto}
.homework-assign-picker {padding:18px;margin:18px 0;background:var(--school-card);border:1px solid var(--school-line);border-radius:18px;scroll-margin-top:24px}
.homework-assign-picker>summary {cursor:pointer;font-weight:700;color:var(--school-ink);min-height:44px;display:list-item;list-style-position:inside;align-content:center}
.homework-assign-picker p,.homework-queue-intro p {color:var(--school-muted);font-size:14px;line-height:1.5}
.homework-picker-form {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;margin:14px 0}
.homework-picker-form label {grid-column:1/-1;font-weight:600}
.homework-picker-form select {min-width:0;width:100%;min-height:44px}
.homework-assign-picker small {color:var(--school-muted);line-height:1.5;display:block}
.homework-queue-intro {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:20px}
.homework-queue-intro p {flex:1 1 280px;margin:0}
.homework-lesson-entry {min-width:0;display:flex;flex-direction:column}
.homework-lesson-entry .homework-lesson-card {flex:1}
.homework-chat-link {display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;font-size:13px;color:var(--school-ink);text-decoration:none;border-radius:12px}
.homework-chat-link:hover {background:var(--school-sage);text-decoration:underline}
.homework-chat-link svg {width:18px;height:18px}
#assignment,#lesson-chat {scroll-margin-top:100px}
@media(max-width:640px) {
  .homework-picker-form {grid-template-columns:minmax(0,1fr)}
  .homework-picker-form .button,.homework-queue-intro>.button {width:100%;box-sizing:border-box}
  .homework-quick-actions .button {flex:1 1 140px}
  .homework-assign-picker {padding:14px;scroll-margin-top:100px}
  body.account-shell.cabinet-shell .dashboard .profile-tabs {display:flex;flex-wrap:nowrap;gap:2px}
  body.account-shell.cabinet-shell .dashboard .profile-tabs .profile-tab {box-sizing:border-box;padding:9px 6px;white-space:normal}
  body.account-shell.cabinet-shell .homework-lessons-grid {grid-template-columns:minmax(0,1fr)}
  body.account-shell.cabinet-shell .homework-lesson-entry .homework-lesson-card {min-height:0}
  body.account-shell.cabinet-shell .homework-detail .homework-chat-head p {display:block;line-height:1.4}
}
@media(prefers-reduced-motion:reduce) {
  .board-card,.button,.workspace-list-row {transition:none!important;scroll-behavior:auto!important}
}
