/* Authoritative application color roles. A future theme overrides these roles, never component selectors. */
:root{
  --color-ink:#102e27;
  --color-ink-muted:#445f54;
  --color-frame:#153f36;
  --color-frame-deep:#10332c;
  --color-frame-raised:#255044;
  --color-frame-hover:#265748;
  --color-on-frame:#f3f7ef;
  --color-on-frame-muted:#c7d9cf;
  --color-action:#23684e;
  --color-action-hover:#24614c;
  --color-focus:#39794f;
  --color-selected:#c4dc87;
  --color-selected-soft:#d5e6ad;
  --color-canvas:#eaf0eb;
  --color-outer:#d9e4dc;
  --color-surface:#f3f7ef;
  --color-surface-raised:#edf3e9;
  --color-surface-tonal:#e1ebd9;
  --color-surface-heading:#d5e3da;
  --color-surface-strong:#d4e3d2;
  --color-surface-hover:#d8e6d0;
  --color-surface-active:#c6dfb3;
  --color-control:#e1ebdb;
  --color-line:#c9d8cf;
  --color-line-strong:#afbeb6;
  --color-success:#205c38;
  --color-success-soft:#cce8d6;
  --color-warning:#684512;
  --color-warning-soft:#f0ddb0;
  --color-danger:#773a2e;
  --color-danger-soft:#edd0c5;
  --color-info:#254f43;
  --color-info-soft:#d9f0e4;
  --color-avatar-olive:#dde2b4;
  --color-avatar-olive-ink:#485523;
  --color-avatar-copper:#ecd4be;
  --color-avatar-copper-ink:#785035;
  --color-on-action:#f3f7ef;
  --color-on-selected:#153f36;
  --color-link:#23684e;
  --color-control-border:#5d7063;
  --color-on-info:#f3f7ef;
  /* shadcn semantic vocabulary: aliases to the existing validated color contract, never a parallel palette. */
  --background:var(--color-canvas);--foreground:var(--color-ink);
  --card:var(--color-surface);--card-foreground:var(--color-ink);
  --popover:var(--color-surface);--popover-foreground:var(--color-ink);
  --primary:var(--color-action);--primary-foreground:var(--color-on-action);
  --secondary:var(--color-surface-strong);--secondary-foreground:var(--color-ink);
  --muted:var(--color-surface-tonal);--muted-foreground:var(--color-ink-muted);
  --accent:var(--color-selected-soft);--accent-foreground:var(--color-on-selected);
  --destructive:var(--color-danger);--destructive-foreground:var(--color-on-action);
  --border:var(--color-line);--input:var(--color-control-border);--ring:var(--color-focus);
  --sidebar:var(--color-frame);--sidebar-foreground:var(--color-on-frame);
  --sidebar-primary:var(--color-selected);--sidebar-primary-foreground:var(--color-on-selected);
  --sidebar-accent:var(--color-frame-hover);--sidebar-accent-foreground:var(--color-on-frame);
  --sidebar-border:var(--color-frame-raised);--sidebar-ring:var(--color-focus);
  --chart-1:var(--color-action);--chart-2:var(--color-avatar-copper-ink);--chart-3:var(--color-info);
  --chart-4:var(--color-warning);--chart-5:var(--color-ink-muted);
  /* Foundation categories; existing route skins adopt these incrementally. */
  --font-body:Manrope,"Noto Sans Arabic",sans-serif;
  --font-arabic:"Noto Sans Arabic",Manrope,sans-serif;
  --text-caption:.875rem;--text-body:1.125rem;--text-section:1.5rem;--text-page:clamp(1.75rem,2.5vw,2.75rem);
  --leading-body:1.65;--weight-label:700;--weight-title:800;
  --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--space-8:32px;
  --radius-control:9px;--radius-panel:16px;--radius-dialog:18px;
  --elevation-panel:0 8px 24px color-mix(in srgb,var(--color-frame) 7%,transparent);
  --motion-short:120ms;--motion-panel:230ms;--ease-panel:cubic-bezier(.22,1,.36,1);
  --layer-toolbar:10;--layer-menu:30;--layer-dialog:50;
  --grid-row-compact:72px;--content-reading:75ch;
  --grid-row-height:96px;
  --grid-heading-height:52px;
}

/* Integrated password input: shared across access, clinic and platform forms. */
.studio-password{overflow:hidden;display:flex;align-items:stretch;min-width:0;width:100%;background:var(--color-control);border-radius:9px}
.studio-password>input[id]{flex:1;min-width:0!important;width:0!important;border-radius:0;outline-offset:-3px}
.studio-password>.studio-password-toggle{display:flex;align-items:center;justify-content:center;gap:6px;flex:none;min-width:44px;min-height:44px;padding:8px 12px;border:0;border-radius:9px;background:transparent;color:var(--color-frame);font:inherit;font-size:14px;font-weight:750;cursor:pointer}
.studio-password-toggle svg{width:21px;height:21px;flex:none}.studio-password-toggle:hover{background:var(--color-surface-strong)}
.studio-password:focus-within{outline:2px solid var(--color-focus);outline-offset:2px}.studio-password-toggle:focus-visible{outline:3px solid var(--color-focus);outline-offset:-3px}
/* Original static architectural contours, confined to non-data headings. No additional asset request. */
.studio-contour{position:relative;isolation:isolate;overflow:hidden;border-radius:16px;padding:22px;background:var(--color-surface-strong)}
.studio-contour::before{content:"";position:absolute;z-index:-1;pointer-events:none;inset-block:-100px;inset-inline-end:-155px;width:480px;opacity:.08;background:var(--color-frame);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 440' fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M450 430C50 430 50 10 450 10M450 390C105 390 105 50 450 50M450 350C160 350 160 90 450 90M450 310C215 310 215 130 450 130M450 270C270 270 270 170 450 170'/%3E%3C/svg%3E") center/contain no-repeat}
.access-introduction.studio-contour{background:var(--color-frame)}.access-introduction.studio-contour::before{opacity:.17;background:var(--color-on-frame);inset-inline-end:-170px;inset-block-start:auto;height:420px;inset-block-end:-70px}
:dir(rtl) .studio-contour::before{transform:scaleX(-1)}
@media(forced-colors:active){.studio-contour::before{display:none}.studio-password{outline:1px solid CanvasText}}
@media(max-width:480px){.studio-password-toggle span{white-space:nowrap;line-height:1.4}.studio-contour{padding:18px}}

.studio-skeleton{pointer-events:none;user-select:none;min-height:80px;display:flex;gap:16px;padding:20px;background:var(--color-surface-tonal)}
tr.studio-skeleton{display:table-row;height:var(--grid-row-height,96px)}.studio-skeleton>span{flex:1;display:block}.studio-skeleton-line{display:block;height:16px;width:75%;border-radius:5px;background:var(--color-surface-strong);margin-block:14px}
.studio-skeleton:nth-child(even) .studio-skeleton-line{width:55%}
[aria-busy=true] .chart-record-card,[aria-busy=true] tr[data-href]{opacity:.65}
@media(forced-colors:active){.studio-skeleton-line{outline:1px solid GrayText}}

.studio-request-status{font-size:15px;line-height:1.6;color:var(--color-ink-muted);padding:0 22px;margin:8px 0}.studio-request-status:empty{display:none}

/* Native select keeps its platform arrow and keyboard model; no duplicate combobox. */
select:not([multiple]):not([size]):not(.select2-hidden-accessible){appearance:auto}
.studio-password-toggle{font-variant-numeric:tabular-nums}.studio-password-toggle span{white-space:nowrap}

/* Recorded flags are not evidence of a completed clinical assessment. */
.medical-assessment-note{background:var(--color-surface);color:var(--color-ink-muted);padding:14px 18px;border-radius:var(--radius-control);font-size:16px;line-height:1.7;max-inline-size:var(--content-reading)}
