/* ALYVRISK presentation layer. Business states and score thresholds are untouched. */
:root {
  --ink-950: var(--color-text); --ink-900: var(--color-text); --ink-800: var(--color-text);
  --ink-700: var(--color-muted); --ink-600: var(--color-muted); --ink-500: var(--color-muted);
  --blue-700: var(--color-action); --blue-600: var(--color-action); --blue-500: var(--color-action);
  --blue-100: #E5F2FC; --blue-50: #EFF6FC; --azure: var(--color-action);
  --canvas: var(--color-canvas); --surface: var(--color-surface); --surface-soft: var(--color-canvas);
  --line: var(--color-border); --line-dark: var(--color-input-border);
  --radius-sm: var(--radius-control); --radius: var(--radius-card); --radius-lg: var(--radius-dialog);
  --shadow-sm: var(--shadow-card); --shadow-md: var(--shadow-dialog); --shadow-blue: var(--shadow-card);
  --ease: var(--motion-fast) var(--motion-easing);
  font-family: -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif;
}
body { background: var(--canvas); font-size: var(--text-body); }
:focus-visible { outline: 3px solid var(--color-action); outline-offset: 3px; }
.btn, .language-toggle, .filter-chip, .tab-button, .topbar-ai-button, .badge-action { min-height: var(--control-min); }
.btn-icon { min-width: var(--control-min); width: var(--control-min); }
.btn { font-size: var(--text-label); border-radius: var(--radius-control); }
.btn-primary { background: var(--color-action); box-shadow: none; }
.btn-primary:hover { background: #1B75CF; box-shadow: none; }
.btn:hover { transform: none; }
.input, .select, .textarea { border-color: var(--color-input-border); font-size: var(--text-body); }
.input, .select { min-height: var(--control-min); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--color-action); box-shadow: 0 0 0 3px #146CC41A; }
.field-label { font-size: var(--text-label); color: var(--color-text); }
.field-hint, .source-note, .empty-state p { font-size: var(--text-caption); line-height: 1.55; }
.brand { gap: var(--space-3); }
.brand img { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; }
.brand-text > span { font-size: 20px; letter-spacing: .055em; }
.brand small { color: var(--color-muted); opacity: 1; font-size: 10px; letter-spacing: .075em; }
.sidebar { color: var(--color-text); background: var(--color-surface); border-right: 1px solid var(--line); box-shadow: none; }
.sidebar .brand, .sidebar-profile .identity-copy strong { color: var(--color-text); }
.sidebar-profile .identity-copy span, .sidebar-profile button { color: var(--color-muted); }
.sidebar-profile { border-color: var(--line); }
.workspace-chip { background: var(--canvas); border-color: var(--line); color: var(--color-text); }
.workspace-chip strong { color: var(--color-text); }
.workspace-chip span, .workspace-chip > div > span { color: var(--color-muted); }
.workspace-icon { color: var(--color-action); background: var(--blue-50); }
.nav-pill { color: var(--color-action); background: var(--blue-100); }
.nav-label { color: var(--color-muted); }
.nav-item { color: var(--color-muted); min-height: 46px; font-size: var(--text-label); }
.nav-item:hover { color: var(--color-text); background: var(--canvas); }
.nav-item.active { color: var(--color-action); background: var(--blue-50); box-shadow: none; }
.nav-item.active::before { background: var(--color-action); }
.sidebar .badge { color: var(--color-action); background: var(--blue-50); }
.sidebar-bottom, .sidebar-footer { color: var(--color-muted); }
.page, .page.client-followup-page { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: clamp(16px, 3vw, 40px); }
.page-header h1 { font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -.035em; }
.page-header p { font-size: var(--text-label); }
.card { border-color: var(--line); box-shadow: var(--shadow-card); }
.card-head h2, .card-head h3 { color: var(--color-text); }
.topbar { background: var(--color-surface); border-color: var(--line); }
.domain-notice { margin: 20px clamp(16px,3vw,40px) 0; padding: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.domain-notice p { margin: 5px 0 0; max-width: 65ch; font-size: 14px; line-height: 1.5; }
.topbar-ai-button, .ai-assistant-logo, .ai-assistant-action-icon { color: var(--color-action); background: var(--blue-50); }
.ai-entry-card, .ai-card { background: var(--color-surface); border-color: var(--line); }
.ai-card::after { display: none; }
.ai-title, .ai-title .metric-icon, .ai-setup-hero-icon { color: var(--color-action); }
.ai-title .metric-icon, .ai-setup-hero-icon { background: var(--blue-50); }
.ai-setup-hero { background: var(--color-canvas); }
.dashboard-hero { background: linear-gradient(125deg, var(--color-text), #174762); box-shadow: var(--shadow-card); }
.dashboard-hero .btn-ghost { color: white; }
.dashboard-hero .eyebrow, .hero-score-content span { color: var(--color-accent-soft); }
.dashboard-hero p, .hero-score-content small { color: #D7E5EE; }
.hero-score { background: conic-gradient(var(--color-accent-soft) var(--score-angle), #527386 0); box-shadow: none; }
.hero-score::before { background: var(--color-text); }
.ai-integration-row .integration-icon { color: var(--color-action) !important; background: var(--blue-50) !important; }
.modal-panel { border: 1px solid var(--line); border-radius: var(--radius-dialog); box-shadow: var(--shadow-dialog); }
.modal-head { background: var(--surface); }
.login-story { color: var(--color-text); background: linear-gradient(150deg, #EDF5FC, var(--canvas) 65%, #EEF6F0); padding: clamp(32px,4vw,64px); justify-content: center; }
.login-story::before, .login-story::after { display: none; }
.login-full-logo { width: min(100%, 410px); height: auto; align-self: center; border: 1px solid var(--line); border-radius: var(--radius-dialog); box-shadow: var(--shadow-card); }
.login-story-content { margin: 28px 0; max-width: 680px; }
.login-kicker { color: var(--color-action); }
.login-story h1 { font-size: clamp(32px,3.6vw,52px); line-height: 1.08; }
.login-story-content > p { color: var(--color-muted); font-size: 16px; margin: 20px 0 28px; }
.login-proof { grid-template-columns: 1fr; gap: var(--space-3); }
.login-proof-item { padding: 0; border: 0; background: none; backdrop-filter: none; }
.login-proof-item strong { margin: 0 0 3px; font-size: var(--text-label); }
.login-proof-item span, .login-footnote { color: var(--color-muted); font-size: var(--text-caption); }
.login-panel { padding: clamp(24px,5vw,72px); }
.login-card { max-width: 460px; }
.login-card h2 { font-size: 30px; }
.report-brand-header { align-items: center; }
.report-brand-header img.report-full-logo { width: 170px; height: auto; flex: 0 0 auto; border-radius: 0; }
.report-brand-header-label { color: var(--color-text); flex-wrap: wrap; white-space: normal; }
.report-brand-header-label strong { color: var(--color-text); }
.report-brand-header-label b { color: var(--color-muted); }
.sheet-cover-page { background: var(--color-surface); color: var(--color-text); }
.sheet-cover-page::before { background: var(--color-action); width: 4px; }
.sheet-cover-page .sheet-brand { align-items: start; }
.sheet-brand small, .sheet-title span, .sheet-aerial-view.sheet-site-capture figcaption { color: var(--color-muted); }
.sheet-title h1 { color: var(--color-text); }
.sheet-cover-page:not(.is-compact) .sheet-title { top: 22%; }
.sheet-cover-page:not(.is-compact) .report-brand-header-label { display: none; }
.sheet-cover-page:not(.is-compact) .sheet-brand { flex-direction: row; gap: 3%; align-items: flex-start; }
.sheet-cover-page:not(.is-compact) .sheet-brand .report-brand-header { width: 24%; flex: 0 0 24%; }
.sheet-cover-page:not(.is-compact) .report-brand-header img.report-full-logo { width: 100%; max-width: 170px; height: auto; }
.sheet-cover-page:not(.is-compact) .sheet-brand > small { max-width: 64%; text-align: right; }
.sheet-cover-identity { color: var(--color-text); background: var(--color-canvas); border-color: var(--color-action); }
.sheet-cover-identity span, .sheet-cover-identity small { color: var(--color-muted); }
.sheet-cover-identity b { background: var(--color-action); }
.sheet-section h2 { color: var(--color-text); }
.sheet-metric, .sheet-callout { background: var(--color-canvas); }
.client-followup-page .table-wrap th { color: var(--color-muted); }
.client-request-summary dt, .client-history-list, .client-history-list small { font-size: var(--text-label); }
/* Quiet, spacious interaction design; retain ALYVRISK identity and risk colours. */
@media screen {
  .page-header { margin-bottom:28px; }
  .page-header h1 { font-weight:650; line-height:1.15; }
  .page-header p { line-height:1.6; max-width:72ch; }
  .card { border-color:#E0E6EC; border-radius:22px; box-shadow:0 4px 20px rgb(8 38 61 / 4%); }
  .card-head h2, .card-head h3 { font-weight:650; letter-spacing:-.025em; line-height:1.3; }
  .btn { font-weight:600; letter-spacing:-.01em; transition:background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease; }
  .btn-primary, .btn-secondary, .btn-soft, .btn-ghost { border-radius:999px; }
  .btn-secondary, .btn-soft { background:#F1F5F9; border-color:transparent; box-shadow:none; }
  .btn-secondary:hover, .btn-soft:hover { background:#E8EFF6; border-color:transparent; }
  .btn:disabled { cursor:not-allowed; }
  .btn:disabled:hover { transform:none; box-shadow:none; }
  .nav-item, .tab-button, .filter-chip, .feature-toggle, .portal-option { transition:background-color 180ms ease, border-color 180ms ease, color 180ms ease; }
  .input, .select, .textarea { transition:border-color 160ms ease, box-shadow 160ms ease; }
  .switch, .switch::after { transition:background-color 180ms ease, left 180ms cubic-bezier(.22,1,.36,1); }
  .modal-head { padding-block:20px; }
  .modal-head strong { font-size:1.125rem; font-weight:650; letter-spacing:-.02em; }
  .client-followup-page .empty-state { padding:24px 16px; font-size:.875rem; line-height:1.6; }
  .client-summary-options > div { border-radius:18px; }
  .portal-hero { background:var(--color-surface); }
  .portal-rec { border-color:#E0E6EC; border-radius:22px; }
}
@media (max-width: 1100px) { .login-page { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .login-story { padding: 32px; } }
@media (max-width: 760px) {
  :root { --topbar: 108px; }
  .topbar { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 8px 12px; padding: 10px 16px; }
  .topbar .mobile-menu { grid-column: 1; grid-row: 1; }
  .topbar-actions { grid-column: 2; grid-row: 1; justify-content: flex-end; gap: 8px; min-width: 0; }
  .topbar-actions > .status-indicator, .topbar .topbar-avatar { display: none; }
  .topbar .breadcrumbs { grid-column: 1 / -1; grid-row: 2; min-width: 0; padding: 2px 0 4px; }
  .topbar .breadcrumbs small { font-size: 17px; line-height: 1.35; color: var(--color-text); font-weight: 650; margin: 0; }
  .topbar .breadcrumbs strong { display: none; }
  .topbar .client-notifications-button { min-width: 44px; width: 44px; padding: 0; justify-content: center; }
  .topbar .notification-label { display: none; }
  .client-access-warning { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
  .client-access-warning .btn { max-width: 100%; white-space: normal; }
  .sidebar .brand-text { display: grid; gap: 5px; }
  .login-page { display: flex; flex-direction: column; }
  .login-story { min-height: 0; padding: 28px 24px; }
  .login-full-logo { width: min(100%, 290px); align-self: center; }
  .login-story-content { margin: 20px 0 0; }
  .login-story h1 { font-size: 32px; }
  .login-proof, .login-footnote, .login-kicker { display: none; }
  .login-story-content > p { margin-bottom: 0; }
  .login-panel { min-height: 0; padding: 24px 24px 48px; }
  .page.client-followup-page { margin-inline: auto; }
  .report-brand-header img.report-full-logo { width: 135px; }
  .sheet-cover-page .sheet-title h1 { font-size: 22px; }
  .report-brand-header-label { font-size: 11px; }
  .modal-head, .page-header { gap: var(--space-3); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print { body, .sheet-cover-page, .sheet-cover-identity { background: white; color: black; } .sheet-cover-identity b { color: black; background: white; border: 1px solid black; } }
