/* Shared finishing layer: readable information, steady alignment and usable controls. */
:root{--focus-ring:#217cac}
html[data-theme=dark]{--focus-ring:#8ad4f5}
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--focus-ring);outline-offset:3px}
:where(button,input,select,textarea){-webkit-tap-highlight-color:transparent}
:where(.new-card,.dash-card,.stat-card,.public-card,.class-box,.discovery-class,.material-card,.opportunity-row,.workspace-grid,.column-stack,.school-grid,.new-grid,.form-grid,.compact-form,.directory-layout,.cova-wallet-top,.access-payment-grid)>*{min-width:0}
.unified-workspace,.unified-public,.dash-content,.growth-content,.new-card,.dash-card,.column-stack,.directory-sidebar{min-width:0}
.unified-workspace :is(.new-card,.dash-card,.stat-card,.class-box),.unified-public :is(.new-card,.public-card){border-color:var(--border);box-shadow:0 2px 6px #173e5103}

/* Important supporting copy remains readable without enlarging decorative labels. */
:is(.dashboard-note,.public-note,.muted-note,.notification-footnote,.material-preview-note,.material-bottom-note p,.plan-seat-note,.stat-desc,.class-meta,.activity-meta,.payout-note,.role-summary){font-size:12px;line-height:1.75}
.unified-workspace :is(.item-row small,.class-cover small,.file-chip .small,.stat-card .stat-title,.stat-card .stat-desc){font-size:12px;line-height:1.6}
.unified-workspace .item-row strong{font-size:14px;line-height:1.5;color:var(--text)}
.unified-workspace .item-row small{color:var(--muted)}
.opportunity-main>.opportunity-funder,.opportunity-facts>span,.opportunity-row-bottom small,.discovery-class-meta,.class-tutor small,.class-session small,.class-detail-facts small,.directory-results-heading span{font-size:12px;line-height:1.6}
.section-title a,.section-title button,.directory-toolkit>.link,.directory-toolkit .btn{font-size:12px}
.unified-caption{font-size:10px;line-height:1.5;letter-spacing:.11em}
.unified-rail nav a,.rail-utilities a,.rail-utilities button{font-size:13px;line-height:1.5}
.profile-trigger-copy small{line-height:1.6}
.unified-workspace p,.unified-public .public-card p{line-height:1.75}

/* Shared headers and actions keep a clear reading edge as content changes. */
.dash-heading{align-items:flex-start;gap:22px}
.dash-heading>div:first-child{flex:1;min-width:0}
.dash-heading h1{line-height:1.25;letter-spacing:-.035em;margin:5px 0 11px}
.dash-heading p{max-width:760px;line-height:1.7}
.dash-heading .actions{justify-content:flex-end;align-items:center;gap:10px;flex-shrink:0;max-width:45%}
.section-title,.room-head-row,.directory-heading{gap:20px}
.section-title h3{line-height:1.4}
.item-row,.file-chip{gap:16px;align-items:center}
.item-row>div:first-child,.file-chip>div:first-child{min-width:0;flex:1;overflow-wrap:anywhere}
.item-row>.btn,.file-chip>.btn{flex-shrink:0}
.file-chip .row{flex-wrap:wrap;justify-content:flex-end}
.new-card>h3:first-child{margin-top:0}
.new-card>p:last-child{margin-bottom:0}

/* Forms and actions use consistent touch targets, including compact tables. */
.btn{min-height:44px;line-height:1.4;font-size:14px;padding:11px 17px;text-align:center}
.btn.sm,.btn.tiny{font-size:12px;min-height:36px;padding:8px 12px;line-height:1.4}
.btn>svg{flex-shrink:0}
.btn:disabled{transform:none;box-shadow:none;opacity:.55}
.form-field,.compact-form>label{font-size:13px;line-height:1.6;font-weight:600}
.input,.select,.textarea{font-size:14px;line-height:1.5;border-radius:9px;max-width:100%}
.input,.select{min-height:44px}
.textarea{min-height:110px;resize:vertical}
.form-field :is(.input,.select,.textarea),.compact-form>label :is(.input,.select,.textarea){width:100%}
.form-field .input[type=file]{padding:10px;white-space:normal;font-size:12px}
.form-field .input[type=file]::file-selector-button{margin-right:10px;border:1px solid var(--border);border-radius:6px;padding:7px 10px;background:var(--canvas);color:var(--text);font:inherit;cursor:pointer}
.consent-label{line-height:1.7;font-size:13px}
.consent-label input[type=checkbox],.consent-label input[type=radio]{flex:0 0 auto;margin-top:4px;width:16px;height:16px;accent-color:var(--accent)}
input[data-money]{font-variant-numeric:tabular-nums;letter-spacing:.01em}
input[aria-invalid=true],textarea[aria-invalid=true],select[aria-invalid=true]{border-color:#b33932;outline-color:#b33932}

/* Tables scroll inside their card; long amounts never widen the page. */
.table-scroll{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;border:1px solid var(--border);border-radius:10px;scrollbar-width:thin}
.table-scroll .data-table{margin:0;border:0;width:100%;font-size:14px;line-height:1.55}
.data-table th{font-size:11px;line-height:1.5;font-weight:600;letter-spacing:.045em;padding:13px 16px;color:var(--muted);text-align:left;vertical-align:middle}
.data-table td{padding:16px;vertical-align:middle;font-variant-numeric:tabular-nums;color:var(--text);border-color:var(--border)}
.data-table td:first-child{white-space:normal;min-width:170px;max-width:360px;overflow-wrap:anywhere}
.data-table strong{font-weight:600;color:var(--text)}
.data-table small{font-size:12px;line-height:1.65;white-space:normal;color:var(--muted)}
.data-table .pill{max-width:100%;vertical-align:middle;font-size:11px;line-height:1.5}
.data-table tbody tr:last-child td{border-bottom:0}
.data-table thead{background:var(--canvas)}
html[data-theme=dark] .data-table tbody tr:hover{background:#122330}
.money-value,.plan-price,.stat-number,.checkout-lines b,.checkout-lines strong,.balance-number{font-variant-numeric:tabular-nums}
.stat-card .stat-number{font-size:clamp(21px,2vw,28px);font-weight:650;letter-spacing:-.035em;line-height:1.3}
.stat-card .stat-title{align-items:flex-start;gap:10px;line-height:1.6}
.stat-card .stat-title>span{flex-shrink:0}
.stat-card .stat-desc{margin-top:10px}
.checkout-lines>div{gap:20px;align-items:baseline}
.checkout-lines>div>b,.checkout-lines>div>strong:last-child{white-space:nowrap;text-align:right}

/* Dialogs stay within the available screen and maintain a usable close control. */
.modal-backdrop{padding:24px;overscroll-behavior:contain}
.modal{max-width:100%;max-height:calc(100dvh - 48px);border:1px solid var(--border);border-radius:18px;overscroll-behavior:contain;scrollbar-width:thin;padding:28px}
.modal .modal-head{gap:18px;align-items:flex-start;margin-bottom:24px}
.modal .modal-head h2{font-size:24px;line-height:1.35;letter-spacing:-.025em;overflow-wrap:anywhere}
.modal .modal-head .close{width:36px;height:36px;min-height:36px;flex:0 0 36px;display:grid;place-items:center;border-radius:8px;padding:0;font-size:24px;line-height:1}
.modal p{line-height:1.75}
.modal .compact-form{gap:18px}
.modal .row{flex-wrap:wrap}
.modal :is(h2,h3,h4){overflow-wrap:anywhere}
.modal input,.modal select,.modal textarea{max-width:100%}

@media(max-width:1100px){
 .dash-heading{flex-wrap:wrap}
 .dash-heading .actions{max-width:100%;justify-content:flex-start}
 .payout-hero .money-value{font-size:clamp(28px,4vw,44px);line-height:1.2}
}
@media(max-width:700px){
 .dash-heading{display:flex;flex-direction:column;gap:16px;margin-bottom:24px}
 .dash-heading .actions{margin-top:0;width:100%;max-width:100%;justify-content:flex-start}
 .dash-heading h1{font-size:26px}
 .dash-heading p{font-size:14px}
 .directory-heading{align-items:flex-start;flex-wrap:wrap}
 .item-row,.file-chip{flex-wrap:wrap;gap:12px}
 .item-row>div:first-child{flex-basis:180px}
 .file-chip>div:first-child{flex-basis:100%}
 .file-chip .row{justify-content:flex-start}
 .new-card .row.wrap{gap:10px}
 .new-card .row.wrap>.btn{white-space:normal}
 .discovery-class-actions{flex-wrap:wrap}
 .discovery-class-actions .btn{flex:1;white-space:normal;min-width:90px}
 .plan-request-row{align-items:flex-start;gap:15px;flex-wrap:wrap}
 .plan-request-row>div:first-child{min-width:0;flex:1 1 200px}
 .plan-request-row .row{flex-wrap:wrap}
 .table-scroll .data-table{font-size:13px}
 .data-table td{padding:14px 13px}
 .data-table th{padding:12px 13px}
 .modal-backdrop{padding:12px}
 .modal{padding:22px;max-height:calc(100dvh - 24px);border-radius:15px}
 .modal .modal-head h2{font-size:22px}
 .modal .form-grid{grid-template-columns:minmax(0,1fr)}
 .modal .btn{white-space:normal;max-width:100%}
 .modal .form-field,.modal .compact-form>label{font-size:13px}
 .modal :is(input.input,select.select,textarea.textarea){font-size:16px}
 .modal .checkout-lines>div{gap:12px;flex-wrap:wrap}
 .modal .checkout-lines>div>b,.modal .checkout-lines>div>strong:last-child{margin-left:auto}
 .stat-card .stat-number{font-size:clamp(19px,3.4vw,25px)}
 .stat-card{padding:17px}
}
@media(max-width:420px){
 .stat-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 .stat-card .stat-number{font-size:27px}
 .stat-card .stat-title{margin-bottom:12px}
 .modal{padding:18px}
 .modal .modal-head h2{font-size:21px}
 .modal .plan-assign-options,.modal .inline-child-fields{grid-template-columns:minmax(0,1fr)}
 .modal .inline-child-fields .wide-field{grid-column:auto}
 .directory-results-heading{align-items:flex-start;flex-wrap:wrap;gap:7px}
 .class-discovery-banner a{white-space:normal}
}
@media(prefers-reduced-motion:reduce){.btn{transition:none}.btn:hover{transform:none}}

/* Compact, accessible arrow action for the discovery composer. */
.focus-composer-bottom button.focus-submit-arrow,.landing-home .focus-composer-bottom button.focus-submit-arrow{width:48px;height:48px;min-width:48px;min-height:48px;flex:0 0 48px;padding:0;border-radius:14px;display:inline-flex;align-items:center;justify-content:center}
.focus-submit-arrow svg{display:block;flex-shrink:0}
