/* Final shared layout layer for public pages, checkout and account workspaces. */
html { text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 0; }
*, *::before, *::after { box-sizing: border-box; }
main, section, article, aside, form, fieldset, nav, .portal-content, .portal-card, .login-panel { min-width: 0; }
fieldset { margin-inline: 0; }
button, input, select, textarea { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { width: 100%; max-width: 100%; min-width: 0; font-size: 1rem; line-height: 1.5; }
button, .button, summary { touch-action: manipulation; }
button, .button { white-space: normal; overflow-wrap: anywhere; }
a, p, dd, h1, h2, h3, small, .tag { overflow-wrap: anywhere; }
.form-grid { align-items: start; }
.form-grid > div { min-width: 0; }
.form-grid label { line-height: 1.5; }
.form-grid input, .form-grid select, .form-grid textarea { margin-bottom: 1rem; }
.breadcrumb { flex-wrap: wrap; gap: .375rem .75rem; }
.site-footer .footer-grid > *, .footer-bottom > * { min-width: 0; }
.table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; }
.table-scroll:focus-visible { outline: 3px solid #387bd3; outline-offset: 3px; }
body[data-view] .portal-shell { width: 100%; max-width: 100rem; margin-inline: auto; grid-template-columns: 14rem minmax(0, 1fr); }
body[data-view] .portal-content { min-width: 0; padding: clamp(1.25rem, 3vw, 2.75rem); }
body[data-view] .portal-heading { display: flex; align-items: start; flex-wrap: wrap; gap: 1rem; }
body[data-view] .portal-heading > div { flex: 1 1 18rem; min-width: 0; }
body[data-view] .portal-heading h1 { line-height: 1.2; }
body[data-view] .portal-card { padding: clamp(1rem, 2vw, 1.5rem); }
body[data-view] .portal-card form { max-width: 100%; }
body[data-view] .portal-card label, body[data-view] .portal-card summary { font-size: .9375rem; line-height: 1.5; }
body[data-view] .portal-card input, body[data-view] .portal-card select, body[data-view] .portal-card textarea { margin: .375rem 0 1rem; }
body[data-view] .portal-card input[type="checkbox"], body[data-view] .portal-card input[type="radio"] { width: 1.125rem; min-height: 1.125rem; margin: .1875rem 0 0; flex: 0 0 1.125rem; }
body[data-view] .portal-stats > div { display: block; min-width: 0; }
body[data-view] .portal-stats strong { margin: .5rem 0 0; line-height: 1.2; }
body[data-view] .portal-stats span, body[data-view] .stat-detail { line-height: 1.5; }
body[data-view] .case-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
body[data-view] .case-grid > aside { min-width: 0; }
body[data-view] .case-tabs button { min-height: 2.75rem; font-size: .9375rem; }
body[data-view] .workspace-toolbar { grid-template-columns: minmax(0, 1fr) minmax(10rem, .4fr); align-items: end; }
body[data-view] .workspace-toolbar label { min-width: 0; }
body[data-view] .team-table { width: 100%; table-layout: fixed; }
body[data-view] .team-table th, body[data-view] .team-table td { overflow-wrap: anywhere; white-space: normal; }
body[data-view] .team-table td a, body[data-view] .team-table td button { max-width: 100%; white-space: normal; }
body[data-view] .team-table td small { font-size: .875rem; line-height: 1.5; }
body[data-view] .custom-invoice-panel form { max-width: 52rem; }
body[data-view] .custom-invoice-panel .form-grid { margin: 1rem 0 0; gap: 0 1.25rem; }
body[data-view] .custom-invoice-panel #custom-result:empty { display: none; }
body[data-view] #custom-invoice-history { margin-top: 2rem; }
body[data-view] .login-layout { width: min(calc(100% - 2 * var(--page-gutter)), 75rem); margin: 2rem auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body[data-view] .login-panel { max-width: none; width: 100%; align-self: stretch; }
body[data-view] .login-layout .login-story, body[data-view] .login-layout .login-panel { padding: clamp(1.25rem, 4vw, 3.5rem); }
body[data-view] .login-panel input#code { width: 100%; max-width: 100%; letter-spacing: .35em; padding-inline: .75rem; }
body[data-view] .workspace-brand { min-width: 0; }
body[data-view] .workspace-brand img { flex: 0 0 auto; }
body[data-view] .workspace-brand span { min-width: 0; }
body[data-view] .workspace-header > a:last-child { flex-shrink: 0; }
body[data-view] .workspace-footer { flex-wrap: wrap; }
body[data-view] .workspace-footer a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.invoice-heading > *, .invoice-meta > *, .invoice-total > * { min-width: 0; }
.invoice-paper h1 { overflow-wrap: anywhere; }
.invoice-lines { table-layout: fixed; }
.invoice-lines th:last-child, .invoice-lines td:last-child { width: 8rem; }
.invoice-lines td { overflow-wrap: anywhere; }
.invoice-total { flex-wrap: wrap; align-items: start; gap: .5rem 1rem; }
@media (max-width: 75rem) {
 body[data-view] .case-grid { grid-template-columns: minmax(0, 1fr); }
 body[data-view] .case-grid > aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
 body[data-view] .case-grid > aside .payment-card { grid-column: 1 / -1; }
 body[data-view] .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 60rem) {
 body[data-view] .portal-shell { display: block; }
 body[data-view] .portal-nav { position: static; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); padding: 1rem var(--page-gutter); display: flex; flex-direction: row; flex-wrap: wrap; gap: .5rem; }
 body[data-view] .portal-nav > .eyebrow { width: 100%; margin: 0 0 .5rem; padding: 0; }
 body[data-view] .workspace-nav { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .375rem; }
 body[data-view] .workspace-nav button { width: 100%; min-height: 2.75rem; padding: .75rem; text-align: center; font-size: .875rem; }
 body[data-view] .portal-user { width: 100%; margin: .75rem 0 0; padding: .75rem 0 0; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .375rem 1rem; }
 body[data-view] .portal-user > span { width: auto; order: 0; min-width: 0; }
 body[data-view] .portal-user #signout { margin-left: auto; }
 body[data-view] .login-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
 body[data-view] .login-benefits { display: none; }
 body[data-view] .login-story h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1rem; }
 body[data-view] .login-story .lead { margin-bottom: 0; }
 body[data-view] .workspace-toolbar { grid-template-columns: minmax(0, 1fr); }
 body[data-view] .admin-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 48rem) {
 body[data-view] .case-grid > aside { display: block; }
 body[data-view] .form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
 body[data-view] .team-table, body[data-view] .team-table tbody { display: block; min-width: 0; }
 body[data-view] .team-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
 body[data-view] .team-table tbody tr { display: block; padding: .5rem 1rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: .625rem; }
 body[data-view] .team-table tbody td { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .375rem .75rem; padding: .75rem 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
 body[data-view] .team-table tbody td::before { content: attr(data-label); grid-column: 1; font-size: .875rem; font-weight: 700; color: var(--muted); margin: 0; }
 body[data-view] .team-table tbody td > * { min-width: 0; grid-column: 2; }
 body[data-view] .team-table tbody td:last-child { border-bottom: 0; }
 body[data-view] .team-table tbody tr:last-child { border-bottom: 1px solid var(--line); }
 body[data-view] .table-scroll { overflow-x: auto; border: 0; }
 body[data-view] .invoice-heading { flex-direction: column; }
 .invoice-meta { grid-template-columns: minmax(0, 1fr); }
 .package-comparison { min-width: 42rem; }
 .table-scroll:has(.package-comparison) { overflow-x: auto; border: 1px solid var(--line); }
}
@media (max-width: 40rem) {
 body[data-view] .workspace-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
 body[data-view] .portal-heading > .button { width: 100%; }
 body[data-view] .fields { grid-template-columns: minmax(0, 1fr); }
 body[data-view] .case-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
 body[data-view] .case-tabs button { min-width: 0; }
 body[data-view] .attention-item { align-items: start; flex-wrap: wrap; }
 body[data-view] .invoice-main { padding: 1.25rem var(--page-gutter) 2.5rem; }
 body[data-view] .invoice-paper { padding: 1rem; }
 .invoice-lines th:last-child, .invoice-lines td:last-child { width: 6.75rem; padding-left: .75rem; }
 .invoice-total { font-size: 1.125rem; }
 .calculator-controls { grid-template-columns: minmax(0, 1fr); }
 .page-hero .lead, .hero .lead { font-size: 1rem; }
 .scope-list > div { gap: 1rem; }
 .section-heading { align-items: start; }
}
@media (max-width: 30rem) {
 body[data-view] .workspace-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 body[data-view] .workspace-header { padding: .875rem 1rem; gap: .75rem; align-items: center; }
 body[data-view] .workspace-brand { font-size: .875rem; }
 body[data-view] .workspace-brand img { width: 2.5rem; height: 2.5rem; }
 body[data-view] .workspace-brand small { font-size: .75rem; letter-spacing: 0; }
 body[data-view] .workspace-header > a:last-child { font-size: .875rem; max-width: 5rem; }
 body[data-view] .portal-content { padding: 1.25rem 1rem 2.5rem; }
 body[data-view] .portal-stats { grid-template-columns: minmax(0, 1fr); }
 body[data-view] .portal-stats > div { padding: 1rem; }
 body[data-view] .team-table tbody td { display: block; }
 body[data-view] .team-table tbody td::before { margin-bottom: .375rem; }
 body[data-view] .team-table tbody td small { margin-top: .375rem; }
 body[data-view] .custom-invoice-panel form > .button { width: 100%; }
 body[data-view] .portal-user > span { width: 100%; }
 body[data-view] .login-layout { border-radius: .875rem; margin-block: 1rem; }
 body[data-view] .login-story h1 br { display: none; }
 .cart-totals > div { gap: .75rem; }
 .cart-totals dd { max-width: 8rem; }
}
@media print {
 body[data-view] .portal-nav, body[data-view] .workspace-header, body[data-view] .workspace-footer { display: none; }
 body[data-view] .invoice-main { padding: 0; }
 body[data-view] .invoice-paper { padding: 10mm; border: 0; }
}
