/* Presentation only: keep product layouts, behavior and brand palettes. */
:root { color-scheme: dark; }
body { overflow-wrap: break-word; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--signal, #a7e879); outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
input:not([type="file"]), select, textarea { min-width: 0; }
.brand-operator, .coach-disclosure { color: var(--muted); font-size: .85rem; line-height: 1.6; }
.brand-operator { margin: 16px 0 0; font-weight: 400; letter-spacing: 0; }
footer { flex-wrap: wrap; }
footer > .brand-operator { width: min(1120px, calc(100% - 32px)); margin: 12px auto 0; padding-bottom: 16px; }
.polish-footer { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0; text-align: center; }
.polish-footer > .brand-operator { width: 100%; padding: 0; }
.coach-disclosure { margin: 8px 0; }
.polish-error-nav { padding: 26px 0; font-weight: 800; }
.polish-error-main { margin: 40px 0; }
.qm-nav, .qm-navlinks, .hw-nav, .hw-navlinks, .site-nav, .form-row, .account-actions { flex-wrap: wrap; }
.qm-logo { white-space: normal; }
.qm-navlinks a, .site-nav a, .footer-links a, .qm-footer a, .site-links a, .polish-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.qm-btn, .hw-btn, .button, .tab, .ghost, .session-new, .session-delete { min-height: 44px; }
.price { overflow-wrap: normal; }
@media (max-width: 680px) {
  .site-nav a:not(.nav-primary), .hw-navlinks a:not(.nav-primary) { display: inline-flex; }
  .site-header .site-shell { flex-wrap: wrap; gap: 8px 16px; padding-block: 12px; }
  .site-nav { gap: 4px 16px; }
  .qm-card { padding: 22px; }
  .qm-nav { align-items: flex-start; gap: 8px 16px; }
  .brand, .brand-name { min-width: 0; }
  .brand span, .brand-name span { white-space: normal; }
  .form-row { align-items: flex-start; }
  .signal-visual::after { width: min(320px, 90vw); height: min(320px, 90vw); }
  .chat-top { flex-wrap: wrap; }
  .controls { flex-wrap: wrap; max-width: 100%; }
  .chat-page .coach-disclosure { font-size: .75rem; }
}

.price span { white-space: nowrap; }

/* Legacy grid cards must shrink with the viewport, including form controls. */
.qm-center { grid-template-columns: minmax(0, 1fr); }
.qm-card, .auth-card, .auth-context { min-width: 0; }
.qm-logo, .logo, .brand, .brand-name { display: inline-flex; align-items: center; min-height: 44px; }
.qm-msg, .hw-msg, .status { overflow-wrap: anywhere; }

/* Final brand polish: copy rules live in AGENTS.md; no usage/auth behavior here. */
.audit-compact-footer { width:min(1120px,calc(100% - 32px)); margin:0 auto; padding:24px 0; border-top:1px solid var(--line); color:var(--muted); font-size:.85rem; display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px 24px; }
.audit-compact-footer nav { display:flex; flex-wrap:wrap; gap:4px 18px; }
.audit-compact-footer a { display:inline-flex; min-height:44px; align-items:center; }
body:has(.audit-compact-footer),body:has(.auth-main) { min-height:100svh; display:flex; flex-direction:column; }
body:has(.audit-compact-footer) > .qm-narrow { flex:1; }
body:has(.audit-compact-footer) .qm-center { min-height:0; padding:clamp(28px,7vh,64px) 0; }
body:has(.audit-compact-footer) .polish-error-main { margin:clamp(28px,7vh,64px) 0; }
.auth-main { flex:1; min-height:0; padding:clamp(28px,6vh,54px) 0; }
.auth-layout { min-width:0; }
.auth-context h1,.auth-context h2,.auth-card h1 { font-size:clamp(1.85rem,3.6vw,3rem); line-height:1.12; overflow-wrap:normal; word-break:normal; hyphens:none; letter-spacing:-.04em; }
.auth-card h2 { overflow-wrap:normal; word-break:normal; }
@media(max-width:680px) { .auth-card,.auth-context { padding:24px 22px; } .audit-compact-footer { justify-content:center; text-align:center; } }

/* Pricing uses equal heading/amount rows and bottom-aligned actions. */
.price-card h2 { min-height:2.5em; line-height:1.25; margin:0; }
.price-card .price { display:grid; grid-template-rows:auto auto; align-content:start; gap:6px; min-height:82px; font-size:clamp(1.9rem,2.5vw,2.4rem); line-height:1.1; margin:18px 0; }
.price-card .price-amount { font:inherit; white-space:nowrap; }
.price-card .price-interval { line-height:1.3; }
.price-card > p { min-height:3.2em; margin:0; }
.price-card .hw-actions { margin-top:24px; }
.price-card .hw-actions > * { width:100%; }

.hw-assessment-page { min-height:100svh; display:flex; flex-direction:column; }
.hw-assessment-page .assessment-shell { flex:1; }
.assessment-index-links { display:grid; gap:12px; }
.assessment-index-links .assessment-primary { white-space:normal; text-align:center; }

.polish-error-main h1 { font-size:clamp(1.65rem,4vw,2.5rem); line-height:1.15; overflow-wrap:normal; word-break:normal; }
body:has(.polish-error-main) { min-height:100svh; display:flex; flex-direction:column; }
body:has(.polish-error-main) > .hw-narrow,body:has(.polish-error-main) > .qm-narrow { flex:1; }
