/* FSPreif — product UI.
 *
 * Extends site.css. Everything shared (tokens, type scale, buttons, cards,
 * tables, report primitives, term chips, overall pill) lives THERE and is not
 * repeated here: the marketing demo report and the real report have to render
 * identically, which they cannot do if each stylesheet owns its own copy.
 * This file only holds components that exist nowhere but inside the product.
 */

/* ---------- app chrome ---------- */
.navform{display:flex;align-items:center;margin:0}
/* Logout is a POST, so it is a button — but it sits in a row of links and must
   read and align exactly like one. */
.linkbtn{
  background:none;border:0;font:inherit;font-size:var(--fs-md);font-weight:600;
  color:var(--muted);cursor:pointer;text-decoration:none;border-radius:var(--radius-pill);
  display:inline-flex;align-items:center;min-height:var(--tap);padding-inline:.72rem;
}
.linkbtn:hover{background:var(--blue-tint);color:var(--blue);text-decoration:none}
.appfoot{border-top:1px solid var(--line);background:var(--paper);margin-top:var(--s7);padding-block:var(--s5);color:var(--muted);font-size:var(--fs-sm)}
.appfoot p+p{margin-top:var(--s2)}
.appfoot a{display:inline-block;padding-block:var(--s1)}

/* ---------- app shell: same container and gutters as .wrap ---------- */
.shell{max-width:var(--maxw);margin:0 auto;padding-inline:var(--pad);padding-block:var(--page-y);min-width:0}
.shell--narrow{max-width:var(--maxw-narrow)}
.shell--center{text-align:center}
.pagehead{margin-bottom:var(--sec-gap)}
.pagehead h1{font-size:var(--fs-2xl);margin-bottom:var(--s2)}
.pagehead p{color:var(--ink-mid);max-width:68ch}
/* Every app page reads in the same order:
   pagehead -> notices -> primary action row -> cards -> footnote. */
.shell>.notice{margin-bottom:var(--s3)}
.shell>.notice:last-of-type,.shell>.rowbtns{margin-bottom:var(--stack)}
.pageactions{margin-top:var(--stack)}
.card2>.rowbtns,.card2>form:not(:first-of-type),.card2>.table-wrap+form{margin-top:var(--s4)}
.pagenote{margin-top:var(--s5);color:var(--muted);font-size:var(--fs-sm)}

/* card2 tiles inside a grid keep their CTA on one baseline */
.card2--pick{display:flex;flex-direction:column}
.card2--pick .btn{margin-top:auto}
.card2--pick ul{margin-block:var(--s3);color:var(--muted);font-size:var(--fs-md);display:grid;gap:var(--s1)}

/* ---------- fields: one grid, one height, aligned labels ---------- */
.fld{margin-bottom:var(--s4)}
.fld:last-child{margin-bottom:0}
.fld label{display:block;font-weight:600;font-size:var(--fs-md);margin-bottom:var(--s1)}
/* nt2's field: the STRONG hairline (a thing you type into is not a card edge),
   the small radius, and the accent edge under a pointer. 16px minimum, or iOS
   zooms the page mid-tap and throws the candidate out of the layout. */
.fld input,.fld select,.fld textarea{
  width:100%;border:1px solid var(--line-strong);border-radius:var(--radius-sm);
  padding:.72rem .95rem;min-height:var(--tap);
  font:inherit;font-size:max(1rem,16px);background:var(--paper);color:var(--ink);
}
.fld input:hover,.fld select:hover,.fld textarea:hover{border-color:var(--blue-line)}
.fld textarea{line-height:1.55;resize:vertical}
.fld input:focus-visible,.fld select:focus-visible,.fld textarea:focus-visible{outline:3px solid var(--blue);outline-offset:1px;border-color:var(--blue)}
.fld input[disabled],.fld select[disabled],.fld textarea[disabled]{background:var(--sunken);color:var(--muted);cursor:not-allowed}
.hint{color:var(--muted);font-size:var(--fs-sm);margin-top:var(--s1)}
.checkrow{display:flex;gap:var(--s3);align-items:flex-start;margin-bottom:var(--s3)}
.checkrow input{width:20px;height:20px;margin-top:3px;flex:0 0 auto}
.checkrow label{font-weight:400;font-size:var(--fs-md);color:var(--ink-mid)}
form>.btn,form>.rowbtns{margin-top:var(--s4)}

/* The rule is on the READING-START edge (border-inline-start), so in Arabic it
   moves to the right-hand side with the text instead of staying glued left. */
.notice{padding:var(--s3) var(--s4);border-radius:var(--radius-sm);font-size:var(--fs-md);border:1px solid transparent;border-inline-start-width:4px;border-inline-start-style:solid}
.notice--ok{background:var(--strong-bg);color:var(--strong);border-color:var(--strong-line);border-inline-start-color:var(--strong)}
.notice--err{background:var(--weak-bg);color:var(--weak);border-color:var(--weak-line);border-inline-start-color:var(--weak)}
.notice--info{background:var(--link-soft);color:var(--blue);border-color:var(--blue-line);border-inline-start-color:var(--blue)}

/* ---------- session ---------- */
.sesbar{
  display:flex;flex-wrap:wrap;gap:var(--s3) var(--s4);align-items:center;justify-content:space-between;
  padding:var(--s3) var(--s4);background:var(--paper);margin-bottom:var(--stack);
}
.sesbar__blocks{display:flex;gap:var(--s2);flex-wrap:wrap;align-items:center}
.sesbar__time{text-align:end}
.pill{display:inline-flex;align-items:center;border-radius:var(--radius-pill);padding:var(--s1) var(--s3);font-size:var(--fs-caps);font-weight:600;border:1px solid var(--line);background:var(--wash);color:var(--muted);min-height:28px}
.pill.is-active{background:var(--blue);color:#fff;border-color:var(--blue)}
.pill.is-done{background:var(--strong-bg);color:var(--strong);border-color:var(--strong-line)}
.pill.is-incomplete{background:var(--weak-bg);color:var(--weak);border-color:var(--weak-line)}
.timer{font-family:var(--font-display);font-variant-numeric:tabular-nums;font-size:clamp(1.6rem,4vw,2rem);font-weight:700;letter-spacing:-.03em;line-height:1;color:var(--blue);direction:ltr;unicode-bidi:isolate}
.timer.is-warn{color:var(--weak)}
.timer__cap{margin-bottom:var(--s1)}

.chat{border:1px solid var(--line);border-radius:var(--radius-lg);padding:var(--s4);max-height:52vh;overflow-y:auto;background:var(--paper);box-shadow:var(--shadow-card)}
.chat--full{max-height:none;margin-top:var(--s3)}
.turn{margin-bottom:var(--s4);max-width:46em}
.turn:last-child{margin-bottom:0}
.turn__who{margin-bottom:var(--s1)}
.turn__txt{border:1px solid var(--line);border-radius:var(--radius);padding:var(--s3) var(--s4);background:var(--paper);white-space:pre-wrap;text-align:start;line-height:1.6}
.turn--doctor{margin-inline-start:auto}
.turn--doctor .turn__txt{background:var(--blue-tint);border-color:var(--blue-line)}
.turn--patient .turn__txt{background:var(--wash)}
/* The Oberarzt is the one turn that is not the candidate and not the patient,
   so it takes the system's ONE warm colour at its 8% wash — the only place in
   the product that colour appears as a surface. */
.turn--oberarzt .turn__txt{background:var(--warm-wash);border-color:rgba(245,165,36,.35)}
.turn__ts{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate;margin-inline-start:var(--s2);font-weight:400;letter-spacing:0;text-transform:none}
/* composer: field and send button on one grid, bottoms aligned */
.composer{margin-top:var(--s4);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--s3);align-items:end}
.composer .fld{margin:0}
.composer>.btn{margin-top:0}
@media (max-width:559px){.composer{grid-template-columns:minmax(0,1fr)}}
.sesnote{color:var(--muted);font-size:var(--fs-sm);margin-top:var(--s3)}

/* ---------- report (product-only pieces; the rest is site.css) ---------- */
.dimrow{margin-bottom:var(--s4)}
.dimrow:last-child{margin-bottom:0}
.dimrow__evi{margin-top:var(--s2)}
.omitem{display:flex;gap:var(--s3);align-items:flex-start;padding:var(--s2) 0;border-bottom:1px solid var(--line-soft)}
.omitem:last-child{border-bottom:0}
.omitem__mark{flex:0 0 auto;width:22px;height:22px;border-radius:50%;background:var(--weak-bg);color:var(--weak);
  display:grid;place-items:center;font-weight:600;font-size:var(--fs-caps)}
.riskitem{margin-bottom:var(--s3)}
.riskitem:last-child{margin-bottom:0}
.riskitem__head{font-family:var(--font-display);font-weight:600;letter-spacing:-.02em;margin-bottom:var(--s2)}
.mechfact{background:var(--wash);border:1px solid var(--line);border-radius:var(--radius-sm);padding:var(--s2) var(--s3);margin-top:var(--s2);font-size:var(--fs-md);white-space:pre-wrap}
.briefsec{margin-bottom:var(--s3)}
.briefsec:last-child{margin-bottom:0}
.briefsec p{white-space:pre-wrap;color:var(--muted);margin-top:var(--s1)}
details.tx{border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--paper);box-shadow:var(--shadow-card);padding:var(--card-pad)}
details.tx summary{cursor:pointer;font-family:var(--font-display);font-weight:600;letter-spacing:-.02em;color:var(--blue);min-height:var(--tap);display:flex;align-items:center}

/* ---------- voice (§5) ---------- */
.modepick{padding:var(--s4);margin-block:var(--s4)}
.modepick legend{font-family:var(--font-display);font-weight:600;letter-spacing:-.02em;padding-inline:var(--s2)}
.modepick__opt{display:flex;gap:var(--s3);align-items:flex-start;padding-block:var(--s2);cursor:pointer;min-height:var(--tap)}
.modepick__opt input{margin-top:4px;flex:0 0 auto;width:20px;height:20px}
.modepick__opt .hint{display:block;margin:2px 0 0}
.consentbox{margin-top:var(--s3)}
/* The voice panel is a live control surface, so it takes the accent bar the
   feature cards take — logical, therefore mirrored in Arabic. */
.voicepanel{padding:var(--s4);margin-bottom:var(--s4);background:var(--link-soft);border-color:var(--blue-line);border-inline-start:4px solid var(--blue)}
.voicebar{display:flex;gap:var(--s3);align-items:center;flex-wrap:wrap}
.vstatus{font-size:var(--fs-sm);font-weight:600;padding:var(--s1) var(--s3);border-radius:var(--radius-pill);background:var(--paper);border:1px solid var(--line);color:var(--muted);min-height:32px;display:inline-flex;align-items:center}
.vstatus--ok{background:var(--strong-bg);border-color:var(--strong-line);color:var(--strong)}
.vstatus--busy{background:var(--moderate-bg);border-color:var(--moderate-line);color:var(--moderate)}
.vstatus--err{background:var(--weak-bg);border-color:var(--weak-line);color:var(--weak)}
.vcost{margin-inline-start:auto;font-size:var(--fs-sm);color:var(--muted);font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
.voicepanel audio{display:none}
.voicepanel .notice{margin-top:var(--s3)}
.voicepanel .notice form{margin-top:var(--s3)}
@media (prefers-reduced-motion:no-preference){
  .vstatus--ok::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;
    background:currentColor;margin-inline-end:7px;animation:vpulse 1.6s ease-in-out infinite}
}
@keyframes vpulse{0%,100%{opacity:1}50%{opacity:.25}}

/* ---------- access strip: plan + remaining days (§8) ---------- */
/* Inside a card the info table is already on a surface: drop the second one
   rather than nesting two card treatments. */
.card2 .infotable{margin-top:var(--s3);border:0;box-shadow:none;background:transparent;border-radius:0}
.card2 .infotable .row{padding:var(--s3) 0}
.card2 .infotable .row:nth-child(odd){background:transparent}
.accessline{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2) var(--s3);
  margin-bottom:var(--s4);padding:var(--s2) var(--s4);background:var(--link-soft);
  border:1px solid var(--blue-line);border-radius:var(--radius-pill);min-height:var(--tap)}
.accessline__plan{font-weight:700;color:var(--blue);font-variant-numeric:tabular-nums}
.accessline .btn{margin-inline-start:auto}
