/* These tokens and paint rules follow the 2.8.17.27 stylesheet cascade.
   The release supplies dimensions, spacing, document scrolling and breakpoints. */
html.mint-wave {
  color-scheme: light;
  --bg:#eaf5f1; --panel:#ffffff; --soft:#f1f9f5; --wash:#e3f3ec;
  --text:#183a34; --heading:#123f35; --muted:#496a61; --line:#c0d8cd;
  --accent:#12685a; --hover:#0a5749; --rule:#7cb6a0; --ink-on:#fff;
  --start:#146b5a; --end:#10665e; --chat-start:#1d6b5f; --chat-end:#205e54;
  --chat-ink:#fff; --mark:#407966; --paw:#75a996; --tint:#f1f8df;
  --ok-bg:#dff5e9; --ok-fg:#205c42; --hint-bg:#fff4df; --hint-ink:#684a1e;
  --hint-edge:#b37d2c; --alert-bg:#fbe8e6; --alert-fg:#9a3e35;
  --control:10px; --surface:14px; --bubble:15px; --shadow:0 4px 16px #1a514312;
  --pattern:radial-gradient(circle at 1px 1px,#408e7350 .75px,transparent 1px);
  --pattern-size:20px 20px; --fade:linear-gradient(130deg,#f5fbf8de,transparent 88%);
  --button-glint:#ffffff49; --brand-font:inherit;
}


html.mint-wave {--blue:var(--accent);--blue2:var(--hover);--teal:var(--accent);--danger:var(--alert-fg);background:var(--bg);color:var(--text)}
html.mint-wave :is(body,#app){background-color:var(--bg);color:var(--text)}
html.mint-wave :is(.main,.login-screen){background-color:var(--bg);background-image:var(--fade),var(--pattern);background-size:auto,var(--pattern-size)}
html.mint-wave :is(.topbar,.sidebar){background:var(--panel);border-color:var(--line)}
html.mint-wave .sidebar{background:linear-gradient(175deg,var(--panel) 62%,var(--soft))}
html.mint-wave :is(.brand,.sidebar-bottom,.composer-footer,.report-feedback,.report-section,.formatted-content hr){border-color:var(--line)}
html.mint-wave :is(.brand-text,.auth-brand strong,.hero h1,.auth-intro h1,.page-title,.patient-name,.notice-title,.auth-card h2){color:var(--heading)}
html.mint-wave :is(.top-title,.nav-item,.nav-label,.report-scroll,.formatted-content,.field input,.field select,.field textarea,.patient-name .light,.table td){color:var(--text)}
html.mint-wave :is(.brand-sub,.section-title,.credit-unit,.hero p,.auth-intro p,.auth-brand span,.auth-announcement-footer,.notice-meta,.file-name,.msg-meta,.charge-note,.patient-meta,.entry-charge-note,.hint,.help,.field label,.login-card>p,.legal-footer,.login-note,.notice-selector,.notice-empty p,.setup-note){color:var(--muted)}
html.mint-wave :is(.nav-icon,.credit-card strong,.auth-kicker,.notice-selector a,.role-pill,.auth-announcement-footer a,.legal-footer a,.hint a,.text-button,.content-meta,.evidence-sources a,.formatted-content a){color:var(--accent)}
html.mint-wave :is(.language-control,.language-control select){color:var(--text)}
html.mint-wave :is(.role-pill,.nav-badge,.notice-pin){background:var(--wash);border-color:var(--line);color:var(--accent)}
html.mint-wave .nav-item:hover{background:var(--soft);border-color:var(--line);color:var(--accent)}
html.mint-wave .mini-row{color:var(--muted);border-radius:var(--control)}
html.mint-wave .mini-row:hover,html.mint-wave .mini-row.active{background:var(--wash);color:var(--accent)}
html.mint-wave .mini-row.active{box-shadow:inset 2px 0 var(--rule)}
html.mint-wave .mini-dot{background:var(--paw)}
html.mint-wave :is(.secondary,.clear-files,.mobile-toggle,.mobile-close,.collapse,.attach-label,.language-control,.recharge-button,.notice-selector select,.choice,.history-search input){color:var(--accent);background:var(--soft);border-color:var(--line);border-radius:var(--control)}
html.mint-wave :is(.recharge-button,.credit-card,.setup-note,.choice.active){background:var(--wash);border-color:var(--line);color:var(--accent)}
html.mint-wave .credit-card{border-radius:var(--surface)}
html.mint-wave :is(.secondary,.attach-label,.collapse,.recharge-button,.choice,.mobile-toggle):hover:not(:disabled){background:var(--wash);color:var(--hover);border-color:var(--rule)}
html.mint-wave .primary,html.mint-wave .primary:hover:not(:disabled){background:linear-gradient(115deg,var(--start),var(--end));color:var(--ink-on);border-color:var(--end);border-radius:var(--control);box-shadow:inset 0 1px var(--button-glint),var(--shadow)}
html.mint-wave .primary:hover:not(:disabled){filter:brightness(1.06)}
html.mint-wave :is(.panel,.chat-composer,.composer-card,.login-notices,.auth-shell .login-card,.report-reader,.case-header-inner){background:var(--panel);border-color:var(--line);border-radius:var(--surface);color:var(--text);box-shadow:var(--shadow)}
html.mint-wave .case-header{background:var(--bg)}
html.mint-wave .case-header .case-header-inner{box-shadow:inset 3px 0 var(--rule),var(--shadow)}
html.mint-wave .patient-avatar{background:var(--tint);color:var(--accent);box-shadow:inset 0 0 0 1px var(--line);border-radius:var(--control)}
html.mint-wave .case-status{background:var(--ok-bg);color:var(--ok-fg)}
html.mint-wave .case-status.frozen,html.mint-wave .auth-error{color:var(--alert-fg);background:var(--alert-bg);border-color:var(--alert-fg)}
html.mint-wave .conversation-round{background:var(--soft);border-color:var(--line);color:var(--text);border-radius:var(--surface)}
html.mint-wave .conversation-round>summary{color:var(--text)}
html.mint-wave .conversation-round>summary time{color:var(--muted)}
html.mint-wave .conversation-round>summary small{color:var(--accent)}
html.mint-wave .msg.assistant .bubble{background:var(--panel);border-color:var(--line);border-radius:var(--bubble);box-shadow:var(--shadow);color:var(--text)}
html.mint-wave .msg.user .bubble{background:linear-gradient(110deg,var(--chat-start),var(--chat-end));color:var(--chat-ink);border-radius:var(--bubble) var(--bubble) 4px var(--bubble)}
html.mint-wave .clinical-review-note,html.mint-wave .warning{color:var(--hint-ink);background:var(--hint-bg);border-color:var(--hint-edge)}
html.mint-wave .report-reader>.report-directory{background:var(--soft);color:var(--heading);border-color:var(--line);border-radius:var(--surface) var(--surface) 0 0}
html.mint-wave .report-section>summary,html.mint-wave .report-directory>summary{color:var(--heading)}
html.mint-wave :is(.report-subsection,.evidence-sources){background:var(--soft);border-color:var(--line);color:var(--text)}
html.mint-wave :is(.report-feedback button,.report-directory .text-button,.evidence-sources summary){color:var(--accent)}
html.mint-wave .bubble :is(h2,h3,h4,strong){color:inherit}
html.mint-wave :is(.bubble code,.bubble pre,.formatted-content code,.formatted-content pre,.formatted-content blockquote,.bubble blockquote){background:var(--soft);color:var(--text);border-color:var(--rule)}
html.mint-wave :is(.md-table,.table,.formatted-content table) :is(td,th){background:var(--panel);border-color:var(--line);color:var(--text)}
html.mint-wave :is(.md-table,.table,.formatted-content table) th{background:var(--wash);color:var(--heading)}
html.mint-wave :is(.md-table,.table) tr:nth-child(even) td{background:var(--soft)}
html.mint-wave .bubble .citation-text,html.mint-wave .formatted-content .citation-text{color:var(--accent);text-decoration-color:var(--mark);text-decoration-style:dashed}
html.mint-wave .bubble .citation-text:is(:hover,:focus-visible){background:var(--wash);color:var(--hover)}
html.mint-wave :is(.citation-panel,.citation-panel>strong){background:var(--panel);color:var(--text);border-color:var(--rule)}
html.mint-wave .citation-panel>a{color:var(--accent);border-color:var(--line)}
html.mint-wave .citation-panel small{color:var(--muted)}
html.mint-wave .citation-marker{color:var(--accent)!important}
html.mint-wave :is(.chat-composer textarea,.composer-card textarea,.field input,.field select,.field textarea,.notice-selector select,.history-search input){background:var(--panel);color:var(--text);border-color:var(--line)}
html.mint-wave :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
html.mint-wave :is(.field input,.field select,.field textarea){border-radius:var(--control)}
html.mint-wave :is(.chat-composer,.composer-card):focus-within{border-color:var(--rule);box-shadow:0 0 0 2px var(--wash),var(--shadow)}
html.mint-wave :is(.auth-tabs,.legal-checks,.notice-body,.notice-empty-icon,.entry-charge-note){background-color:var(--soft);border-color:var(--line);color:var(--text)}
html.mint-wave .notice-body{background-color:transparent}
html.mint-wave .auth-tabs button{color:var(--muted)}
html.mint-wave .auth-tabs button.active{color:var(--accent);background:var(--panel)}
html.mint-wave .login-notices::before{background:linear-gradient(90deg,var(--accent),var(--rule) 58%,var(--wash))}
html.mint-wave .auth-kicker>span[aria-hidden]{background:var(--rule)}
html.mint-wave .danger-link{color:var(--alert-fg)}
html.mint-wave :is(button,select,textarea,input,a,summary):focus-visible{outline-color:var(--rule)}
html.mint-wave .case-frozen-controls{background:var(--bg)}
html.mint-wave{
 --sky:#daf5e8;--glass:#f8fffb;--jade:#076654;--deep:#073b36;--mesh-line:#b6d9ca;
 --diagram:url('/assets/mint-wave.webp');--pup:url('/assets/mint-peek-dog.webp');--kitty:url('/assets/mint-peek-cat.webp');
}

.case-layout[data-animal=dog]{--face:var(--pup)}.case-layout[data-animal=cat]{--face:var(--kitty)}
html.mint-wave .main,html.mint-wave .login-screen{background-color:#eef8f3;background-image:radial-gradient(ellipse at 95% 0%,#c8f0da91,transparent 48%),radial-gradient(circle at 1px 1px,#5f9b8825 1px,transparent 1.3px);background-size:auto,17px 17px}

html.mint-wave .topbar{background:linear-gradient(100deg,#fff 25%,#f3fcf7 78%,#e3f4ed);box-shadow:0 1px 0 #82b6a571}
html.mint-wave .brand-text{font-family:Inter,'Segoe UI',sans-serif;letter-spacing:-.025em;font-weight:750}
html.mint-wave .case-header{background:transparent}
html.mint-wave .case-header .case-header-inner{position:relative;isolation:isolate;background:linear-gradient(105deg,#fff 14%,#f0fcf4 55%,#c9efdb);border-color:#98c9b5;box-shadow:inset 3px 0 #53a58c,0 3px 16px #235c4315}
html.mint-wave .case-header-inner::after{content:'';position:absolute;z-index:-1;right:13%;top:0;bottom:0;width:32%;pointer-events:none;mask:var(--diagram) center/100% 95% no-repeat;background:#22765d94}
html.mint-wave .case-status{background:#e7faee;border:1px solid #95c7ad;color:#19533a}
html.mint-wave .case-status.frozen{color:var(--alert-fg);border:1px solid var(--alert-fg);background:var(--alert-bg)}
html.mint-wave .patient-avatar{position:relative;overflow:visible;background:#d1f0df;border-radius:50%;box-shadow:0 0 0 1px #8ebaa5}
html.mint-wave .pet-hello,html.mint-wave .composer-mascot{display:block;border:0;background:transparent;padding:0;box-shadow:none;cursor:pointer}
html.mint-wave .pet-hello{position:absolute;inset:-6px;z-index:2;border-radius:45%}
.pet-hello::after,.composer-mascot::after{content:'';position:absolute;inset:0;background:var(--face) center/contain no-repeat;transform-origin:center 85%;pointer-events:none}
html.mint-wave .pet-hello:focus-visible,html.mint-wave .composer-mascot:focus-visible{outline:2px solid var(--jade);outline-offset:1px}
html.mint-wave .starter-tools{position:relative}
html.mint-wave .composer-mascot{position:absolute;right:8px;bottom:2px;width:56px;height:48px;border-radius:14px}
html.mint-wave .composer-mascot::after{transform:rotate(-7deg)}

html.mint-wave .chat-composer,html.mint-wave .composer-card{border:1px solid #93bcaa;background:linear-gradient(104deg,#fbfffd 0%,#fff 65%,#edf9f2);box-shadow:0 4px 26px #234c4124,inset 0 2px #f8fffd}
html.mint-wave :is(.chat-composer,.composer-card) textarea{background:transparent;caret-color:var(--jade)}
html.mint-wave :is(.chat-composer,.composer-card):focus-within{box-shadow:0 0 0 2px #91d4b6,0 4px 22px #17725720}
html.mint-wave .msg.user .bubble{background:linear-gradient(110deg,#186d5b,#175949);box-shadow:inset 0 1px #ffffff2e}
html.mint-wave .msg.assistant .bubble{border-color:#83b8a4;box-shadow:0 4px 21px #1b73551c,0 1px 0 #fff inset}
html.mint-wave .clinical-review-note{isolation:isolate;position:relative;overflow:hidden;display:flex;align-items:center;gap:.6em;padding-inline:11px;color:#dbfff0;border:0;border-radius:9px;background:linear-gradient(100deg,#0c4940 2%,#145f50 51%,#103f38 100%);box-shadow:inset 0 0 0 1px #5baf91;min-height:40px}
html.mint-wave .clinical-review-note>.ai-emblem{display:grid;flex:none;place-items:center;z-index:1;box-sizing:border-box;width:25px;height:25px;font:750 12px/1 ui-monospace,monospace;letter-spacing:-.075em;color:#124d3f;border-radius:8px 6px 8px 4px;background:linear-gradient(135deg,#efffe9,#89e9c5);box-shadow:0 0 0 1px #bdffdf7a,0 0 9px #6ff0ae33}
html.mint-wave .clinical-review-note::after{content:'';z-index:-1;position:absolute;right:0;top:0;bottom:0;width:51%;background:radial-gradient(ellipse at 61% 85%,#38bb7d47,transparent 65%),var(--diagram) right center/100% 144% no-repeat;pointer-events:none}
html.mint-wave .analysis-state{font-size:14px;font-weight:750;letter-spacing:.04em;white-space:nowrap;color:#f1fff8}
html.mint-wave .review-state{color:#cbecd9;font-size:12px;font-weight:500;white-space:nowrap}




html.mint-wave .report-reader>.report-directory{background:linear-gradient(90deg,#daeee3,#f3fbf5);border-color:#b7d5c7}
html.mint-wave .report-section>summary{color:#174e3e}
html.mint-wave .report-section[open]>summary::marker{color:#368c69}
html.mint-wave .primary{background:linear-gradient(145deg,#126852,#074c42);border-color:#125c48;box-shadow:inset 0 1px #81caaa,0 2px 5px #1f604225}
html.mint-wave .nav-item:hover,html.mint-wave .mini-row.active{background:#dcefe5}
html.mint-wave .hero,html.mint-wave .auth-brand{position:relative;isolation:isolate}
html.mint-wave .hero::before,html.mint-wave .hero::after{content:'';position:absolute;top:15px;width:66px;height:62px;pointer-events:none}
html.mint-wave .hero::before{right:calc(50% + 94px);background:var(--pup) center/contain no-repeat;transform:rotate(-10deg)}
html.mint-wave .hero::after{left:calc(50% + 94px);background:var(--kitty) center/contain no-repeat;transform:rotate(9deg)}
html.mint-wave .auth-brand::after{content:'';position:absolute;right:5px;top:0;width:90px;height:44px;pointer-events:none;background:var(--pup) left center/47% auto no-repeat,var(--kitty) right center/47% auto no-repeat}
@media(max-width:720px){
 html.mint-wave .case-header-inner::after{right:20%;width:28%}
 html.mint-wave .clinical-review-note{padding-inline:8px;gap:7px;min-height:36px}
 html.mint-wave .clinical-review-note::after{width:38%}
 html.mint-wave .clinical-review-note>.ai-emblem{width:21px;height:21px;font-size:11px}
 html.mint-wave .analysis-state{font-size:13px}
 html.mint-wave .review-state{font-size:11px;padding-left:6px}
 html.mint-wave .composer-mascot{width:47px;height:41px;right:5px;bottom:0}
 
 html.mint-wave .hero::before,html.mint-wave .hero::after{width:42px;height:42px}
 html.mint-wave .hero::before{right:calc(50% + 68px)}html.mint-wave .hero::after{left:calc(50% + 68px)}
}
@media(max-width:350px){html.mint-wave .clinical-review-note::after{width:27%}html.mint-wave .case-header-inner::after{display:none}}
@keyframes signal-flow{0%{transform:translateX(-3%) scaleY(.70);opacity:.72}100%{transform:translateX(1%) scaleY(1.2);opacity:1}}

@media print{.composer-mascot,.pet-hello,.clinical-review-note::after{display:none!important}}

/* The running state comes from the existing case progress endpoint. */
html.mint-wave .analysis-progress {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(110deg,#0e493d,#195c4b);
  color: #f1fff7;
  border-color: #67a98b;
}
html.mint-wave .analysis-progress > div { position: relative; z-index: 1; max-width: 82%; }
html.mint-wave .analysis-progress p { color: #dcf7e8; }
html.mint-wave .analysis-progress .progress-dot { background: #adeec7; animation: none; }
html.mint-wave .analysis-progress::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 26%;
  z-index: -1;
  background: var(--diagram) right center / 100% 75% no-repeat;
  opacity: .6;
  mask-image: linear-gradient(90deg,transparent,#000 70%);
}
@media (prefers-reduced-motion: no-preference) {
  html.mint-wave .analysis-progress[data-flow=running]::after { animation: signal-flow 1.35s ease-in-out infinite alternate; }
}
html.mint-wave .clinical-review-note :is(.review-state,.analysis-state) {white-space:normal;min-width:0}
html.mint-wave:lang(en) .clinical-review-note::after {width:20%;opacity:.35}
html.mint-wave .case-header-inner .patient-line {position:relative;z-index:1}
@media (max-width:520px) {
  html.mint-wave .case-header-inner::after {opacity:.4}
  html.mint-wave:lang(en) .auth-brand::after {display:none}
}
