/* ui/styles.css
   Prescriber tools. Every rule is scoped under .pt-root so the module can sit inside the
   member portal without touching the portal's own styles. Colors use the portal's variable
   names; the --pt-* variables are extra shades checked for WCAG AA contrast.

   Look: a warm clinical "slip" on cream graph paper. Maroon ink, orange for action,
   lime for "this is the answer", lavender for caution, sticker buttons with a hard shadow. */

/* Display font: the local copy loads first (same origin, so no cross-site font error);
   the hosted file from the brand handoff is the second source. Titles only. */
@font-face {
  font-family: "Eighties Comeback";
  font-weight: 800;
  font-display: swap;
  src: url("fonts/EightiesComeback-ExtraBold.woff2") format("woff2"),
       url("https://psychnpfellowship.com/wp-content/uploads/fonts/EightiesComeback-ExtraBold.woff2") format("woff2");
}

/* ---------------------------------------------------------------------------
   Tokens: light is the default
   --------------------------------------------------------------------------- */
.pt-root {
  --psych: #E8451F;
  --rounds: #602D36;
  --clinical: #FAF8EE;
  --neuro: #CDCCFF;
  --mentality: #E1E782;
  --bootcamp: #E567CE;
  --ink: #1A1A1A;

  --bg: #F5F3EC;
  --surface: #fff;
  --elev: #F2EEE1;
  --text: #602D36;
  --muted: #8a8275;            /* decoration only; fails AA for small text */

  --pt-text-2: #675f53;        /* secondary text: 5.6:1 on --bg, 6.2:1 on white */
  --pt-link: #B3310E;          /* orange for text: 6.1:1 on white */
  --pt-accent: #CF3A15;        /* button orange: white text 4.9:1 */
  --pt-error: #A62B0B;
  --pt-line: rgba(96, 45, 54, .14);
  --pt-line-strong: rgba(96, 45, 54, .34);
  --pt-field-bg: #fff;
  --pt-focus: #602D36;
  --pt-sticker: #1A1A1A;
  --pt-btn-edge: #1A1A1A;
  --pt-selected-bg: #E1E782;
  --pt-selected-ink: #2a1418;
  --pt-high-bg: #FFF1EB;
  --pt-high-text: #8E2A0C;
  --pt-mod-bg: #F0EFFF;
  --pt-mod-edge: #8A86DE;
  --pt-mod-text: #3F3A8F;
  --pt-dot: rgba(96, 45, 54, .07);
  --pt-shadow: 0 16px 40px rgba(96, 45, 54, .10);
  --pt-drug-0: #602D36;
  --pt-drug-1: #E8451F;
  --pt-drug-2: #B8409F;
  --pt-band: #E1E782;
  --pt-draft-bg: #EEEDFF;
  --pt-peek-bg: #602D36;
  --pt-peek-ink: #FAF8EE;

  --pt-display: "Eighties Comeback", "EC", Georgia, "Times New Roman", serif;
  --pt-body: "Poppins", Arial, sans-serif;
  color-scheme: light;
}

.pt-root[data-theme="dark"] {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --elev: #1e1e36;
  --text: #FAF8EE;
  --muted: rgba(250, 248, 238, .45);
  --pt-text-2: #c9c4b8;
  --pt-link: #FF9373;
  --pt-error: #FF9C80;
  --pt-line: rgba(255, 255, 255, .12);
  --pt-line-strong: rgba(255, 255, 255, .30);
  --pt-field-bg: #14142a;
  --pt-focus: #E1E782;
  --pt-sticker: #000;
  --pt-btn-edge: #000;
  --pt-high-bg: rgba(232, 69, 31, .16);
  --pt-high-text: #FFB49E;
  --pt-mod-bg: rgba(205, 204, 255, .11);
  --pt-mod-edge: #9f9cf0;
  --pt-mod-text: #d9d8ff;
  --pt-dot: rgba(255, 255, 255, .05);
  --pt-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  --pt-drug-0: #CDCCFF;
  --pt-drug-1: #FF8A66;
  --pt-drug-2: #F08BDD;
  --pt-draft-bg: rgba(205, 204, 255, .12);
  --pt-peek-bg: #E1E782;
  --pt-peek-ink: #1A1A1A;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  .pt-root:not([data-theme="light"]) {
    --bg: #0f0f1a;
    --surface: #1a1a2e;
    --elev: #1e1e36;
    --text: #FAF8EE;
    --muted: rgba(250, 248, 238, .45);
    --pt-text-2: #c9c4b8;
    --pt-link: #FF9373;
    --pt-error: #FF9C80;
    --pt-line: rgba(255, 255, 255, .12);
    --pt-line-strong: rgba(255, 255, 255, .30);
    --pt-field-bg: #14142a;
    --pt-focus: #E1E782;
    --pt-sticker: #000;
    --pt-btn-edge: #000;
    --pt-high-bg: rgba(232, 69, 31, .16);
    --pt-high-text: #FFB49E;
    --pt-mod-bg: rgba(205, 204, 255, .11);
    --pt-mod-edge: #9f9cf0;
    --pt-mod-text: #d9d8ff;
    --pt-dot: rgba(255, 255, 255, .05);
    --pt-shadow: 0 16px 40px rgba(0, 0, 0, .35);
    --pt-drug-0: #CDCCFF;
    --pt-drug-1: #FF8A66;
    --pt-drug-2: #F08BDD;
    --pt-draft-bg: rgba(205, 204, 255, .12);
    --pt-peek-bg: #E1E782;
    --pt-peek-ink: #1A1A1A;
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------------------
   Base
   --------------------------------------------------------------------------- */
.pt-root {
  font-family: var(--pt-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.pt-root.pt-standalone {
  min-height: 100vh;
  background-image: radial-gradient(var(--pt-dot) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
}
.pt-root *, .pt-root *::before, .pt-root *::after { box-sizing: border-box; }
/* The portal styles bare form controls, and its `input` rule carries margin-bottom: 12px.
   A margin counts toward the flex line, so an input in a .pt-input-group made the row 12px
   taller than the input itself and the unit chip stretched to fill it, hanging below the box
   beside it. Scoping our own rules is not enough when the page styles the element type, so
   reset every control this module owns. */
.pt-root input, .pt-root textarea, .pt-root select, .pt-root button { margin: 0; }
.pt-root :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, pre, fieldset) { margin: 0; padding: 0; }
.pt-root :where(ul, ol)[role="list"] { list-style: none; }
.pt-root fieldset { border: 0; min-width: 0; }
.pt-root legend { padding: 0; }
.pt-root button, .pt-root input, .pt-root select, .pt-root textarea { font: inherit; color: inherit; }
.pt-root a { color: var(--pt-link); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.pt-root a:hover { text-decoration-thickness: 2.5px; }
.pt-root [hidden] { display: none !important; }
.pt-root :focus-visible { outline: 3px solid var(--pt-focus); outline-offset: 2px; border-radius: 6px; }
.pt-root .pt-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pt-root .pt-icon { display: inline-flex; flex: none; }
.pt-root .pt-icon svg { width: 1.2em; height: 1.2em; }

.pt-root .pt-skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--surface); color: var(--text); border: 2px solid var(--pt-btn-edge);
  border-radius: 10px; padding: 10px 16px; min-height: 44px; font-weight: 600; cursor: pointer;
}
.pt-root .pt-skip:focus { top: 12px; }

/* ---------------------------------------------------------------------------
   App bar
   --------------------------------------------------------------------------- */
.pt-root .pt-appbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1240px; margin: 0 auto; padding: 14px 16px 6px;
}
.pt-root .pt-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-height: 44px; }
.pt-root .pt-brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--pt-accent); color: #fff; border: 2px solid var(--pt-btn-edge);
  box-shadow: 0 3px 0 var(--pt-sticker); font-weight: 800; font-size: .95rem; letter-spacing: -.02em;
}
.pt-root .pt-brand-text { display: grid; line-height: 1.15; }
.pt-root .pt-brand-top { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pt-text-2); font-weight: 600; }
.pt-root .pt-brand-bottom { font-weight: 700; font-size: 1rem; }
.pt-root.pt-embedded .pt-appbar { padding-top: 6px; }
.pt-root.pt-embedded .pt-brand-top { display: none; }

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
.pt-root .pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 9px 16px; border-radius: 12px; border: 2px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer; text-decoration: none;
  background: transparent; color: var(--text);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.pt-root .pt-btn-primary {
  background: var(--pt-accent); color: #fff; border-color: var(--pt-btn-edge);
  box-shadow: 0 4px 0 var(--pt-sticker);
}
.pt-root .pt-btn-primary:hover { background: #BD3310; }
.pt-root .pt-btn-primary:active, .pt-root .pt-btn-secondary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--pt-sticker); }
.pt-root .pt-btn-primary.is-done { background: var(--mentality); color: var(--pt-selected-ink); }
.pt-root .pt-btn-secondary {
  background: var(--surface); color: var(--text); border-color: var(--pt-btn-edge);
  box-shadow: 0 4px 0 var(--pt-sticker);
}
.pt-root[data-theme="dark"] .pt-btn-secondary { border-color: var(--text); }
.pt-root .pt-btn-quiet { border: 1.5px solid var(--pt-line-strong); background: var(--surface); }
.pt-root .pt-btn-quiet:hover { border-color: var(--text); }
.pt-root .pt-theme-btn { padding: 8px 12px; font-size: .88rem; }

/* ---------------------------------------------------------------------------
   Page frame
   --------------------------------------------------------------------------- */
.pt-root .pt-main { max-width: 1240px; margin: 0 auto; padding: 6px 16px 72px; outline: none; }
.pt-root.pt-has-peek .pt-main { padding-bottom: 120px; }
.pt-root .pt-title {
  font-family: var(--pt-display); font-weight: 800; letter-spacing: -.015em; line-height: .98;
  color: var(--text); outline: none;
}
.pt-root .pt-lede { color: var(--pt-text-2); max-width: 62ch; font-size: 1rem; margin-top: 10px; }
.pt-root .pt-eyebrow {
  display: inline-block; background: var(--mentality); color: var(--pt-selected-ink);
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.pt-root .pt-hint { font-size: .84rem; color: var(--pt-text-2); margin-top: 6px; }
.pt-root .pt-loading { color: var(--pt-text-2); padding: 24px 0; }
.pt-root .pt-notice { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--pt-high-bg); color: var(--pt-high-text); font-weight: 600; }

/* ---------------------------------------------------------------------------
   Home
   --------------------------------------------------------------------------- */
.pt-root .pt-hero { position: relative; padding: 22px 0 8px; isolation: isolate; }
.pt-root .pt-hero::before, .pt-root .pt-hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
}
.pt-root .pt-hero::before { width: 300px; height: 300px; right: -90px; top: -60px; background: var(--mentality); opacity: .38; filter: blur(2px); }
.pt-root .pt-hero::after { width: 170px; height: 170px; right: 150px; top: 120px; background: var(--neuro); opacity: .42; }
.pt-root[data-theme="dark"] .pt-hero::before { opacity: .10; }
.pt-root[data-theme="dark"] .pt-hero::after { opacity: .14; }
@media (prefers-color-scheme: dark) {
  .pt-root:not([data-theme="light"]) .pt-hero::before { opacity: .10; }
  .pt-root:not([data-theme="light"]) .pt-hero::after { opacity: .14; }
}
.pt-root .pt-home-title { font-size: clamp(2.7rem, 11vw, 4.8rem); margin-top: 14px; }
.pt-root .pt-search { margin-top: 26px; max-width: 720px; }
.pt-root .pt-search-label { display: block; font-weight: 700; font-size: 1.15rem; margin-bottom: 10px; }
.pt-root .pt-search-box { position: relative; }
.pt-root .pt-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text); pointer-events: none; }
.pt-root .pt-search-input {
  width: 100%; min-height: 60px; padding: 14px 16px 14px 50px; font-size: 1.08rem;
  border: 2px solid var(--pt-btn-edge); border-radius: 16px; background: var(--pt-field-bg); color: var(--text);
  box-shadow: 0 5px 0 var(--pt-sticker); -webkit-appearance: none; appearance: none;
}
.pt-root[data-theme="dark"] .pt-search-input { border-color: var(--pt-line-strong); }
.pt-root .pt-search-input::placeholder { color: var(--pt-text-2); opacity: .85; }
.pt-root .pt-search-input:focus-visible { outline: 3px solid var(--pt-focus); outline-offset: 3px; }
.pt-root .pt-search-results { margin-top: 12px; }
.pt-root .pt-search-list { display: grid; gap: 8px; }
.pt-root .pt-search-hit {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  padding: 12px 16px; min-height: 56px; border-radius: 14px; background: var(--surface);
  border: 1.5px solid var(--pt-line); color: var(--text); text-decoration: none;
}
.pt-root .pt-search-hit.is-top { border-color: var(--text); }
.pt-root .pt-search-hit:hover { border-color: var(--text); }
.pt-root .pt-search-hit .pt-icon { grid-row: span 2; grid-column: 2; color: var(--pt-link); }
.pt-root .pt-search-hit-title { font-weight: 700; }
.pt-root .pt-search-hit-why { font-size: .84rem; color: var(--pt-text-2); }
.pt-root .pt-search-none { color: var(--pt-text-2); }
.pt-root .pt-last { margin-top: 16px; font-size: .92rem; color: var(--pt-text-2); }
.pt-root .pt-last a { font-weight: 600; }

.pt-root .pt-group { margin-top: 44px; }
.pt-root .pt-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1.5px solid var(--pt-line); }
.pt-root .pt-group-title { display: inline-flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.pt-root .pt-group-swatch { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--pt-btn-edge); background: var(--g, var(--neuro)); }
.pt-root .pt-group-note { color: var(--pt-text-2); font-size: .9rem; }
.pt-root .pt-group-convert { --g: var(--neuro); }
.pt-root .pt-group-startstop { --g: var(--mentality); }
.pt-root .pt-group-screen { --g: var(--bootcamp); }
.pt-root .pt-group-safety { --g: var(--psych); }

.pt-root .pt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pt-root .pt-card { position: relative; }
.pt-root .pt-card-link {
  position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%;
  padding: 24px 20px 16px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--pt-line);
  color: var(--text); text-decoration: none; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pt-root .pt-card-link::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: var(--g); }
.pt-root .pt-card-link:hover { transform: translateY(-3px); box-shadow: var(--pt-shadow); border-color: var(--pt-line-strong); }
.pt-root .pt-card-title { font-family: var(--pt-display); font-weight: 800; font-size: 1.55rem; line-height: 1.02; letter-spacing: -.01em; }
.pt-root .pt-card-blurb { color: var(--pt-text-2); font-size: .92rem; flex: 1; }
.pt-root .pt-card-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; color: var(--pt-link); margin-top: 4px; }
.pt-root .pt-card-go .pt-icon { transition: transform .18s ease; }
.pt-root .pt-card-link:hover .pt-card-go .pt-icon { transform: translateX(4px); }
.pt-root .pt-home-foot { margin-top: 40px; font-size: .88rem; color: var(--pt-text-2); }

/* Home entrance: one staggered reveal on load */
@keyframes pt-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pt-root .pt-home .pt-hero > * { animation: pt-rise .5s ease both; }
.pt-root .pt-home .pt-hero > *:nth-child(2) { animation-delay: .05s; }
.pt-root .pt-home .pt-hero > *:nth-child(3) { animation-delay: .1s; }
.pt-root .pt-home .pt-hero > *:nth-child(4) { animation-delay: .15s; }
.pt-root .pt-home .pt-group { animation: pt-rise .5s ease both; }
.pt-root .pt-home .pt-group:nth-of-type(2) { animation-delay: .18s; }
.pt-root .pt-home .pt-group:nth-of-type(3) { animation-delay: .24s; }
.pt-root .pt-home .pt-group:nth-of-type(4) { animation-delay: .30s; }
.pt-root .pt-home .pt-group:nth-of-type(5) { animation-delay: .36s; }

/* ---------------------------------------------------------------------------
   Tool page
   --------------------------------------------------------------------------- */
.pt-root .pt-crumbs { margin: 4px 0 6px; }
.pt-root .pt-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-right: 8px; font-weight: 600; color: var(--text); text-decoration: none; }
.pt-root .pt-back:hover { text-decoration: underline; }
.pt-root .pt-tool-head { position: relative; padding: 6px 0 4px; }
.pt-root .pt-group-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--text);
}
.pt-root .pt-group-pill::before { content: ""; width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--pt-btn-edge); background: var(--g); }
.pt-root .pt-tool-title { font-size: clamp(2.1rem, 8.5vw, 3.5rem); margin-top: 8px; }
.pt-root .pt-draft {
  display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 18px; padding: 9px 12px;
  border-radius: 12px; background: var(--pt-draft-bg); border: 1.5px dashed var(--pt-mod-edge);
  font-size: .86rem; line-height: 1.4; color: var(--text);
}
/* The standing disclaimer is permanent, not an alarm, so it sits quieter than the draft
   banner it replaced while staying legible. */
.pt-root .pt-disclaimer { background: var(--elev); border-style: solid; border-color: var(--pt-line-strong); color: var(--pt-text-2); }
.pt-root .pt-disclaimer .pt-draft-tag { background: var(--pt-text-2); }
.pt-root .pt-draft-tag {
  flex: none; background: var(--rounds); color: var(--clinical); font-weight: 700; font-size: .66rem;
  letter-spacing: .14em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; margin-top: 1px;
}
.pt-root[data-theme="dark"] .pt-draft-tag { background: var(--neuro); color: var(--ink); }
@media (prefers-color-scheme: dark) { .pt-root:not([data-theme="light"]) .pt-draft-tag { background: var(--neuro); color: var(--ink); } }

.pt-root .pt-tool-grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 960px) {
  .pt-root .pt-tool-grid { grid-template-columns: minmax(330px, 410px) minmax(0, 1fr); gap: 24px; }
  .pt-root .pt-tool[data-tool="aims"] .pt-tool-grid,
  .pt-root .pt-tool[data-tool="interactions"] .pt-tool-grid { grid-template-columns: minmax(360px, 460px) minmax(0, 1fr); }
  .pt-root .pt-results { position: sticky; top: 12px; }
  .pt-root .pt-tool[data-tool="aims"] .pt-results { max-height: calc(100vh - 24px); overflow: auto; border-radius: 22px; }
}
.pt-root .pt-results { outline: none; min-width: 0; }

/* ---------------------------------------------------------------------------
   Form panel and fields
   --------------------------------------------------------------------------- */
.pt-root .pt-panel { background: var(--surface); border: 1.5px solid var(--pt-line); border-radius: 22px; padding: 16px 16px 20px; }
.pt-root .pt-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1.5px solid var(--pt-line); }
.pt-root .pt-panel-title { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--pt-text-2); }
.pt-root .pt-reset { font-size: .88rem; }

.pt-root .pt-field, .pt-root .pt-choice, .pt-root .pt-fieldset { margin-top: 18px; }
.pt-root .pt-label { display: block; font-weight: 600; font-size: .98rem; margin-bottom: 8px; }
.pt-root .pt-optional { font-weight: 400; color: var(--pt-text-2); font-size: .88rem; }
.pt-root .pt-choice > .pt-label { margin-bottom: 4px; }
.pt-root .pt-choice > .pt-hint { margin: 0 0 8px; }
.pt-root .pt-input-group { position: relative; display: flex; align-items: stretch; }
.pt-root .pt-input {
  width: 100%; flex: 1 1 auto; min-width: 0; min-height: 52px; padding: 12px 14px; font-size: 1.05rem;
  border: 1.5px solid var(--pt-line-strong); border-radius: 12px; background: var(--pt-field-bg); color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.pt-root .pt-input::placeholder { color: var(--pt-text-2); opacity: .8; }
.pt-root .pt-input:hover { border-color: var(--text); }
.pt-root .pt-input:focus-visible { outline: 3px solid var(--pt-focus); outline-offset: 1px; border-color: var(--text); border-radius: 12px; }
.pt-root .pt-input[aria-invalid="true"] { border-color: var(--pt-error); border-width: 2px; }
.pt-root .pt-input-group:has(.pt-unit) .pt-input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pt-root .pt-unit {
  display: flex; align-items: center; justify-content: center;
  /* One width for every short unit, so two fields side by side end at the same place:
     without it "years" and "kg" give their inputs different widths and the row looks ragged.
     The cap stops any unit from crowding out the box being typed into. */
  flex: 0 0 auto; min-width: 5.5em; max-width: 48%;
  padding: 0 12px; white-space: nowrap; font-size: .9rem; font-weight: 600;
  color: var(--pt-text-2); background: var(--elev); border: 1.5px solid var(--pt-line-strong); border-left: 0;
  border-radius: 0 12px 12px 0;
}
/* Long units set their own width at a smaller size rather than pushing past the cap. */
.pt-root .pt-unit-long { min-width: 0; font-size: .78rem; letter-spacing: -.01em; padding: 0 10px; }
.pt-root .pt-input-date { font-variant-numeric: tabular-nums; }
.pt-root .pt-error { margin-top: 6px; font-size: .86rem; font-weight: 600; color: var(--pt-error); }
.pt-root .pt-error::before { content: "! "; }
/* A short numeric field does not need to stretch across a wide form, but in a narrow column
   the cap just leaves it ending short of every other field, which reads as misalignment.
   The container query measures the form itself, so it works in the portal's narrow column
   as well as on a phone. */
.pt-root .pt-form { container-type: inline-size; container-name: pt-form; }
.pt-root .pt-field-narrow { max-width: 260px; }
@container pt-form (max-width: 430px) {
  .pt-root .pt-field-narrow { max-width: none; }
}
/* Two across when there is room, one when there is not. auto-fit measures the card the form
   sits in rather than the window, which matters because the form column is narrow even on a
   wide screen: a fixed 1fr 1fr left both fields too cramped to type in. */
.pt-root .pt-field-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 12px; align-items: start;
}
.pt-root .pt-field-row .pt-field-narrow { max-width: none; }

/* Choice cards (radio groups) */
.pt-root .pt-choice-options { display: grid; gap: 8px; }
.pt-root .pt-choice-row .pt-choice-options { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
/* A card with a description under the title needs a wider column; 110px made "Immediate
   release / 150, 300, 600 mg" wrap to four cramped lines. One per row is better than that. */
.pt-root .pt-choice-row.pt-choice-rich .pt-choice-options { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.pt-root .pt-choice-item { position: relative; display: flex; }
.pt-root .pt-choice-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pt-root .pt-choice-label {
  flex: 1; display: grid; align-content: center; gap: 2px; min-height: 50px; padding: 10px 14px 10px 40px;
  border: 1.5px solid var(--pt-line-strong); border-radius: 12px; background: var(--pt-field-bg); cursor: pointer; position: relative;
  transition: background-color .12s ease, border-color .12s ease;
}
.pt-root .pt-choice-label::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border-radius: 50%; border: 2px solid var(--pt-line-strong); background: var(--pt-field-bg);
}
.pt-root .pt-choice-label:hover { border-color: var(--text); }
.pt-root .pt-choice-title { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.pt-root .pt-choice-desc { font-size: .82rem; color: var(--pt-text-2); line-height: 1.35; }
.pt-root .pt-choice-input:checked + .pt-choice-label { background: var(--pt-selected-bg); border-color: var(--rounds); color: var(--pt-selected-ink); }
.pt-root .pt-choice-input:checked + .pt-choice-label .pt-choice-desc { color: #3d3920; }
.pt-root .pt-choice-input:checked + .pt-choice-label::before { border-color: var(--rounds); background: var(--rounds); box-shadow: inset 0 0 0 3px var(--pt-selected-bg); }
.pt-root .pt-choice-input:focus-visible + .pt-choice-label { outline: 3px solid var(--pt-focus); outline-offset: 2px; }
.pt-root .pt-choice-input:disabled + .pt-choice-label { opacity: .45; cursor: not-allowed; }

/* Toggle switch */
.pt-root .pt-toggle { position: relative; }
.pt-root .pt-toggle-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pt-root .pt-toggle-label { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; cursor: pointer; }
.pt-root .pt-toggle-track {
  flex: none; position: relative; width: 50px; height: 30px; border-radius: 999px;
  background: var(--elev); border: 1.5px solid var(--pt-line-strong); transition: background-color .15s ease;
}
.pt-root .pt-toggle-thumb {
  position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--pt-line-strong); transition: transform .15s ease;
}
.pt-root .pt-toggle-input:checked + .pt-toggle-label .pt-toggle-track { background: var(--pt-accent); border-color: var(--pt-btn-edge); }
.pt-root .pt-toggle-input:checked + .pt-toggle-label .pt-toggle-thumb { transform: translateX(20px); background: #fff; border-color: var(--pt-btn-edge); }
.pt-root .pt-toggle-input:focus-visible + .pt-toggle-label .pt-toggle-track { outline: 3px solid var(--pt-focus); outline-offset: 2px; }
.pt-root .pt-toggle.is-disabled { opacity: .5; }
.pt-root .pt-toggle.is-disabled .pt-toggle-label { cursor: not-allowed; }
.pt-root .pt-toggle .pt-hint { margin-left: 62px; margin-top: 0; }

.pt-root .pt-swap-row { display: flex; justify-content: flex-end; margin: 8px 0 -8px; }
.pt-root .pt-swap { font-size: .86rem; padding: 6px 12px; }
.pt-root .pt-more-options { margin-top: 24px; padding-top: 6px; border-top: 1.5px dashed var(--pt-line-strong); }
.pt-root .pt-more-title { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--pt-text-2); margin-top: 14px; }
.pt-root .pt-pauses { display: grid; gap: 10px; margin: 10px 0; }
.pt-root .pt-pause { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; align-items: end; padding: 4px 12px 12px; border-radius: 14px; background: var(--elev); }
.pt-root .pt-pause .pt-field { margin-top: 8px; }
.pt-root .pt-pause .pt-field-narrow { max-width: none; }
.pt-root .pt-pause-remove { grid-column: 1 / -1; justify-self: start; margin-top: 8px; font-size: .86rem; }
.pt-root .pt-add-pause { font-size: .9rem; }

/* Type-ahead picker */
.pt-root .pt-combo { position: relative; }
.pt-root .pt-combo .pt-input { padding-right: 48px; }
.pt-root .pt-combo-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent;
  color: var(--pt-text-2); cursor: pointer; border-radius: 10px;
}
.pt-root .pt-combo-clear:hover { color: var(--text); }
.pt-root .pt-listbox {
  position: absolute; left: 0; right: 0; z-index: 30; margin-top: 6px; max-height: 320px; overflow: auto;
  list-style: none; padding: 6px; background: var(--surface); border: 1.5px solid var(--text); border-radius: 14px;
  box-shadow: 0 6px 0 var(--pt-sticker), var(--pt-shadow);
}
.pt-root .pt-option {
  display: grid; gap: 1px; padding: 9px 12px; min-height: 48px; align-content: center;
  border-radius: 10px; cursor: pointer; border-left: 4px solid transparent;
}
.pt-root .pt-option:hover { background: var(--elev); }
.pt-root .pt-option[aria-selected="true"] { background: var(--elev); border-left-color: var(--psych); }
.pt-root .pt-option-label { font-weight: 600; }
.pt-root .pt-option-detail { font-size: .8rem; color: var(--pt-text-2); }
.pt-root .pt-option-via { font-size: .8rem; font-weight: 600; color: var(--pt-link); }
.pt-root .pt-option-empty { padding: 12px; font-size: .88rem; color: var(--pt-text-2); }
.pt-root .pt-match-note {
  display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--mentality); color: var(--pt-selected-ink);
}

/* ---------------------------------------------------------------------------
   Result card
   --------------------------------------------------------------------------- */
.pt-root .pt-result {
  background: var(--surface); border: 1.5px solid var(--pt-line); border-radius: 22px;
  padding: 18px 16px 18px; box-shadow: var(--pt-shadow); position: relative; overflow: hidden;
}
.pt-root .pt-result::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--mentality); }
.pt-root .pt-result-empty::before { background: var(--pt-line-strong); }
.pt-root .pt-result-problem::before, .pt-root .pt-result-error::before { background: var(--psych); }
.pt-root .pt-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pt-root .pt-pill {
  display: inline-block; background: var(--mentality); color: var(--pt-selected-ink); font-size: .7rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
}
.pt-root .pt-pill-quiet { background: var(--elev); color: var(--pt-text-2); }
.pt-root .pt-pill-warn { background: var(--pt-high-bg); color: var(--pt-high-text); border: 1.5px solid var(--psych); }
.pt-root .pt-result-live { font-size: .76rem; color: var(--pt-text-2); display: inline-flex; align-items: center; gap: 6px; }
.pt-root .pt-result-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3f9b5a; box-shadow: 0 0 0 3px rgba(63, 155, 90, .18); }
.pt-root .pt-headline {
  font-size: clamp(1.12rem, 3.6vw, 1.42rem); font-weight: 600; line-height: 1.35; margin: 12px 0 6px;
  text-wrap: pretty; max-width: 62ch;
}
.pt-root .pt-empty-title { font-size: 1.1rem; font-weight: 600; margin: 12px 0 6px; }
.pt-root .pt-needed { margin: 8px 0 0 1.1em; color: var(--pt-text-2); }
.pt-root .pt-needed li { margin: 2px 0; }
.pt-root .pt-empty-note { margin-top: 12px; font-size: .86rem; color: var(--pt-text-2); }
.pt-root .pt-error-detail { margin-top: 8px; font-size: .8rem; color: var(--pt-text-2); font-family: ui-monospace, Menlo, monospace; }
.pt-root .pt-problem-list { margin: 12px 0 4px; display: grid; gap: 8px; }
.pt-root .pt-problem-list li { padding: 10px 14px; border-radius: 12px; background: var(--pt-high-bg); color: var(--pt-high-text); font-weight: 600; }

.pt-root .pt-values { margin-top: 10px; }
.pt-root .pt-value { padding: 16px 0 14px; border-top: 1.5px solid var(--pt-line); }
.pt-root .pt-value-label { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pt-text-2); margin-bottom: 4px; }
.pt-root .pt-value-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.pt-root .pt-value-num { font-size: 1.85rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pt-root .pt-value-main.is-text .pt-value-num { font-size: 1.08rem; font-weight: 600; line-height: 1.35; }
.pt-root .pt-value-unit { font-size: .95rem; font-weight: 500; color: var(--pt-text-2); }
.pt-root .pt-value-range-text { margin-top: 4px; font-size: .9rem; font-weight: 600; }
.pt-root .pt-value-tablets { margin-top: 6px; font-size: .92rem; }
.pt-root .pt-value-note { margin-top: 6px; font-size: .86rem; color: var(--pt-text-2); max-width: 70ch; }
.pt-root .pt-mini-label { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pt-text-2); margin-bottom: 2px; }
.pt-root .pt-value-tablets .pt-mini-label { display: inline; }
@media (min-width: 720px) {
  .pt-root .pt-value { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 20px; }
  .pt-root .pt-value-label { margin-top: 8px; }
}

/* Range view */
.pt-root .pt-range { margin: 14px 0 6px; max-width: 560px; }
.pt-root .pt-range-body { padding: 26px 10px 0; }
.pt-root .pt-range-track { position: relative; height: 12px; border-radius: 999px; background: var(--elev); border: 1px solid var(--pt-line); }
.pt-root .pt-range-band { position: absolute; top: -1px; bottom: -1px; min-width: 6px; border-radius: 999px; background: var(--pt-band); border: 1.5px solid var(--rounds); }
.pt-root .pt-range-dot {
  position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: var(--rounds); border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--rounds);
}
.pt-root[data-theme="dark"] .pt-range-dot { background: var(--neuro); box-shadow: 0 0 0 1.5px var(--neuro); }
@media (prefers-color-scheme: dark) { .pt-root:not([data-theme="light"]) .pt-range-dot { background: var(--neuro); box-shadow: 0 0 0 1.5px var(--neuro); } }
.pt-root .pt-range-count {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: .66rem; font-weight: 700;
  background: var(--surface); color: var(--text); border: 1px solid var(--pt-line-strong); border-radius: 999px; padding: 0 5px; line-height: 1.4;
}
.pt-root .pt-range-marker { position: absolute; top: -8px; bottom: -8px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--psych); }
.pt-root .pt-range-marker-label {
  position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: .68rem; font-weight: 700; color: var(--pt-link); letter-spacing: .04em;
}
.pt-root .pt-range-scale { position: relative; height: 22px; margin-top: 4px; font-size: .76rem; color: var(--pt-text-2); font-variant-numeric: tabular-nums; }
.pt-root .pt-range-scale span { position: absolute; top: 2px; transform: translateX(-50%); }
.pt-root .pt-range-legend { display: grid; gap: 4px; margin-top: 4px; font-size: .86rem; }
.pt-root .pt-range-legend li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.pt-root .pt-range-legend strong { font-variant-numeric: tabular-nums; min-width: 4.5em; }
.pt-root .pt-range-legend span:last-child { color: var(--pt-text-2); }
.pt-root .pt-range-key { width: 10px; height: 10px; border-radius: 50%; background: var(--rounds); flex: none; align-self: center; }
.pt-root[data-theme="dark"] .pt-range-key { background: var(--neuro); }
@media (prefers-color-scheme: dark) { .pt-root:not([data-theme="light"]) .pt-range-key { background: var(--neuro); } }
.pt-root .pt-range-lanes { display: grid; gap: 8px; margin-top: 10px; }
.pt-root .pt-range-lanes li { display: grid; gap: 3px; }
.pt-root .pt-lane-label { font-size: .82rem; color: var(--pt-text-2); }
.pt-root .pt-lane-label strong { color: var(--text); font-variant-numeric: tabular-nums; }
.pt-root .pt-lane-track { position: relative; height: 8px; border-radius: 999px; background: var(--elev); }
.pt-root .pt-lane-seg { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--pt-drug-0); opacity: .8; min-width: 6px; }

/* Warnings: calm but distinct */
.pt-root .pt-warnings { margin-top: 10px; }
.pt-root .pt-warn-list { display: grid; gap: 8px; }
.pt-root .pt-warn {
  display: grid; gap: 3px; padding: 10px 12px 11px 14px; border-radius: 12px; border-left: 5px solid; font-size: .9rem; line-height: 1.45;
}
.pt-root .pt-warn-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.pt-root .pt-warn-icon svg { width: 15px; height: 15px; }
.pt-root .pt-warn-high { background: var(--pt-high-bg); border-left-color: var(--psych); }
.pt-root .pt-warn-high .pt-warn-tag { color: var(--pt-high-text); }
.pt-root .pt-warn-moderate { background: var(--pt-mod-bg); border-left-color: var(--pt-mod-edge); }
.pt-root .pt-warn-moderate .pt-warn-tag { color: var(--pt-mod-text); }
.pt-root .pt-warn-info { background: transparent; border: 1px solid var(--pt-line); border-left: 5px solid var(--pt-line-strong); }
.pt-root .pt-warn-info .pt-warn-tag { color: var(--pt-text-2); }
.pt-root .pt-warn-info .pt-warn-text { color: var(--pt-text-2); }

/* Disclosure */
.pt-root .pt-details { margin-top: 8px; }
.pt-root .pt-details > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: .9rem; color: var(--pt-link); border-radius: 8px; padding-right: 6px;
}
.pt-root .pt-details > summary::-webkit-details-marker { display: none; }
.pt-root .pt-details > summary::before {
  content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease; margin: 0 4px 0 2px;
}
.pt-root .pt-details[open] > summary::before { transform: rotate(45deg); }
.pt-root .pt-bullets { margin: 6px 0 4px 1.2em; display: grid; gap: 4px; font-size: .9rem; }
.pt-root .pt-quote { margin: 6px 0; padding: 8px 12px; border-left: 3px solid var(--pt-line-strong); font-size: .84rem; color: var(--pt-text-2); font-style: italic; }

/* Sections inside the card */
.pt-root .pt-schedule, .pt-root .pt-checklist, .pt-root .pt-after { margin-top: 22px; padding-top: 18px; border-top: 1.5px solid var(--pt-line); }
.pt-root .pt-section-title { font-size: 1.15rem; font-weight: 700; }
.pt-root .pt-section-intro { margin-top: 4px; color: var(--pt-text-2); font-size: .9rem; }
.pt-root .pt-sub-title { margin: 18px 0 8px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--pt-text-2); }
.pt-root .pt-count { color: var(--pt-text-2); font-weight: 600; }
.pt-root .pt-inexact-note { margin-top: 10px; font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* Taper tools (2026-10-04): the plan is built with the patient; doses smaller than tablets */
.pt-root .pt-taper-note { margin-top: 10px; padding: 9px 12px; border-left: 3px solid var(--psych); background: var(--elev); border-radius: 0 8px 8px 0; font-size: .92rem; font-weight: 600; }
.pt-root .pt-badge-compound {
  display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--pt-link); border: 2px dotted var(--pt-link); border-radius: 6px; padding: 1px 6px; margin-left: 4px; white-space: nowrap;
}
.pt-root .pt-compound-note { margin-top: 16px; padding: 4px 14px 12px; border-radius: 10px; background: var(--elev); font-size: .9rem; }
.pt-root .pt-compound-note ul { list-style: disc; margin: 0 0 0 1.2em; display: grid; gap: 6px; }
.pt-root .pt-compound-note .pt-badge-compound { margin-left: 0; }
.pt-root .pt-badge-inexact {
  display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--pt-link); border: 1.5px dashed var(--psych); border-radius: 6px; padding: 1px 6px; margin-left: 4px; white-space: nowrap;
}

/* Week calendar */
.pt-root .pt-cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; margin-bottom: 10px; color: var(--pt-text-2); }
.pt-root .pt-cal-legend li { display: inline-flex; align-items: center; gap: 6px; }
.pt-root .pt-dose-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--pt-drug-0); }
.pt-root .pt-drug-1.pt-dose-dot { background: var(--pt-drug-1); }
.pt-root .pt-drug-2.pt-dose-dot { background: var(--pt-drug-2); }
.pt-root .pt-cal-key { display: inline-block; width: 18px; height: 12px; border-radius: 3px; background: var(--elev); }
.pt-root .pt-cal-key-change { border-top: 4px solid var(--psych); }
.pt-root .pt-cal-key-inexact { border: 1.5px dashed var(--psych); }
.pt-root .pt-cal-key-compound { border: 2px dotted var(--pt-link); }
.pt-root .pt-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; list-style: none; }
.pt-root .pt-week {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 86px; padding: 8px 8px 9px;
  border-radius: 10px; background: var(--elev); border: 1.5px solid transparent; border-top-width: 4px; border-top-color: transparent; font-size: .8rem;
}
.pt-root .pt-week.is-start { border-top-color: var(--mentality); }
.pt-root .pt-week.is-change { border-top-color: var(--psych); }
.pt-root .pt-week.is-inexact { border-style: dashed; border-top-style: solid; border-left-color: var(--psych); border-right-color: var(--psych); border-bottom-color: var(--psych); }
.pt-root .pt-week.is-compounded { border-style: dotted; border-width: 2px; border-top-width: 4px; border-top-style: solid; border-left-color: var(--pt-link); border-right-color: var(--pt-link); border-bottom-color: var(--pt-link); }
.pt-root .pt-week.is-stop { background: var(--rounds); color: var(--clinical); }
.pt-root[data-theme="dark"] .pt-week.is-stop { background: var(--mentality); color: var(--ink); }
@media (prefers-color-scheme: dark) { .pt-root:not([data-theme="light"]) .pt-week.is-stop { background: var(--mentality); color: var(--ink); } }
.pt-root .pt-week.is-continue { background: transparent; border: 1.5px dashed var(--pt-line-strong); border-top-width: 1.5px; }
.pt-root .pt-week-n { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.pt-root .pt-week-date { font-weight: 600; }
.pt-root .pt-week-doses { display: grid; gap: 1px; margin-top: 2px; }
.pt-root .pt-week-dose { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.pt-root .pt-week-stop { font-size: 1rem; }
.pt-root .pt-approx { color: var(--pt-link); font-weight: 800; }
.pt-root .pt-week-events { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.pt-root .pt-week-event { font-size: .64rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--neuro); color: var(--ink); }
.pt-root .pt-week-more { font-size: .72rem; color: var(--pt-text-2); }
.pt-root .pt-cal-more { margin-top: 10px; font-size: .88rem; }

/* Tables */
.pt-root .pt-table-wrap { overflow-x: auto; border-radius: 12px; }
.pt-root .pt-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.pt-root .pt-table th, .pt-root .pt-table td { text-align: left; vertical-align: top; padding: 10px 10px; border-bottom: 1px solid var(--pt-line); }
.pt-root .pt-table thead th { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pt-text-2); border-bottom: 1.5px solid var(--pt-line-strong); }
.pt-root .pt-table tbody th { font-weight: 700; font-variant-numeric: tabular-nums; }
.pt-root .pt-table tr.is-inexact { background: var(--pt-high-bg); }
.pt-root .pt-table tr.is-inexact > :first-child { box-shadow: inset 4px 0 0 var(--psych); }
.pt-root .pt-table tr.is-current { background: var(--elev); }
.pt-root .pt-td-main { display: block; font-weight: 600; }
.pt-root .pt-td-sub { display: block; font-size: .8rem; color: var(--pt-text-2); }
.pt-root .pt-td-dose { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-weight: 600; }
.pt-root .pt-td-dose-text { white-space: nowrap; }
.pt-root .pt-table td[data-label="Dates"] { min-width: 132px; }
.pt-root .pt-table td[data-label="Tablets"] { min-width: 120px; }
.pt-root .pt-td-dose + .pt-td-dose { margin-top: 4px; }
.pt-root .pt-td-note { color: var(--pt-text-2); font-size: .82rem; min-width: 180px; }
.pt-root .pt-table-compact td.pt-td-sub { display: table-cell; }
@media (max-width: 719px) {
  .pt-root .pt-table:not(.pt-table-compact) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pt-root .pt-table:not(.pt-table-compact),
  .pt-root .pt-table:not(.pt-table-compact) tbody,
  .pt-root .pt-table:not(.pt-table-compact) tr { display: block; }
  .pt-root .pt-table:not(.pt-table-compact) tr { border: 1.5px solid var(--pt-line); border-radius: 12px; margin-bottom: 8px; padding: 6px 0; }
  .pt-root .pt-table:not(.pt-table-compact) th,
  .pt-root .pt-table:not(.pt-table-compact) td { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; border: 0; padding: 5px 12px; }
  .pt-root .pt-table:not(.pt-table-compact) :is(th, td)::before {
    content: attr(data-label); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pt-text-2); padding-top: 2px;
  }
  .pt-root .pt-table:not(.pt-table-compact) :is(th, td) > * { grid-column: 2; }
  .pt-root .pt-table:not(.pt-table-compact) td.pt-td-note { min-width: 0; }
  .pt-root .pt-table:not(.pt-table-compact) td.pt-td-note:empty { display: none; }
}

/* Checklist */
.pt-root .pt-check-list { display: grid; gap: 4px; }
.pt-root .pt-check-list li { display: flex; gap: 10px; align-items: flex-start; }
.pt-root .pt-check-box { flex: none; width: 22px; height: 22px; margin: 11px 0 0; accent-color: var(--pt-accent); cursor: pointer; }
.pt-root .pt-check-list label { display: grid; gap: 1px; padding: 8px 0; min-height: 44px; cursor: pointer; }
.pt-root .pt-check-item { font-weight: 600; font-size: .92rem; }
.pt-root .pt-check-why { font-size: .82rem; color: var(--pt-text-2); }

/* Actions and footer */
.pt-root .pt-actions { margin-top: 22px; padding-top: 18px; border-top: 1.5px solid var(--pt-line); }
.pt-root .pt-action-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.pt-root .pt-note-preview {
  white-space: pre-wrap; font-family: var(--pt-body); font-size: .84rem; line-height: 1.5; background: var(--elev);
  border-radius: 12px; padding: 12px 14px; margin-top: 4px; max-height: 320px; overflow: auto;
}
.pt-root .pt-result-foot { margin-top: 22px; padding-top: 16px; border-top: 1.5px solid var(--pt-line); }
.pt-root .pt-check { display: flex; align-items: flex-start; gap: 8px; font-size: .88rem; font-weight: 600; }
.pt-root .pt-check-icon { margin-top: 2px; color: var(--pt-text-2); }
.pt-root .pt-sources-title { margin-top: 14px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--pt-text-2); }
.pt-root .pt-sources { margin: 6px 0 0 1.3em; font-size: .84rem; display: grid; gap: 3px; }
.pt-root .pt-sources li::marker { color: var(--pt-text-2); font-variant-numeric: tabular-nums; }
.pt-root .pt-scope { margin-top: 16px; font-size: .84rem; color: var(--pt-text-2); }

/* ---------------------------------------------------------------------------
   AIMS
   --------------------------------------------------------------------------- */
.pt-root .pt-aims-guide { padding: 4px 0 8px; }
.pt-root .pt-aims-group { margin-top: 22px; }
.pt-root .pt-aims-group-title { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--pt-text-2); padding-bottom: 6px; border-bottom: 1.5px solid var(--pt-line); }
.pt-root .pt-aims-item { padding: 14px 0 12px; border-bottom: 1px solid var(--pt-line); }
.pt-root .pt-aims-legend { float: left; width: 100%; display: flex; align-items: flex-start; gap: 10px; font-weight: 600; font-size: .98rem; line-height: 1.3; }
.pt-root .pt-aims-legend + * { clear: both; }
.pt-root .pt-aims-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--elev); font-size: .82rem; font-weight: 700; }
.pt-root .pt-aims-guidetext { padding-top: 4px; margin: 0 0 0 38px; font-size: .8rem; color: var(--pt-text-2); line-height: 1.4; }
.pt-root .pt-aims-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.pt-root .pt-aims-scale.is-yesno { grid-template-columns: repeat(2, minmax(0, 110px)); }
.pt-root .pt-aims-opt { position: relative; display: flex; }
.pt-root .pt-aims-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pt-root .pt-aims-label {
  flex: 1; display: grid; justify-items: center; align-content: center; gap: 0; min-height: 54px; padding: 6px 2px;
  border: 1.5px solid var(--pt-line-strong); border-radius: 12px; background: var(--pt-field-bg); cursor: pointer; text-align: center;
}
.pt-root .pt-aims-label:hover { border-color: var(--text); }
.pt-root .pt-aims-num { font-size: 1.1rem; font-weight: 700; line-height: 1.1; }
.pt-root .pt-aims-word { font-size: .66rem; color: var(--pt-text-2); line-height: 1.15; overflow-wrap: anywhere; }
.pt-root .pt-aims-input:checked + .pt-aims-label { background: var(--pt-selected-bg); border-color: var(--rounds); color: var(--pt-selected-ink); box-shadow: inset 0 0 0 1px var(--rounds); }
.pt-root .pt-aims-input:checked + .pt-aims-label .pt-aims-word { color: #3d3920; }
.pt-root .pt-aims-input:focus-visible + .pt-aims-label { outline: 3px solid var(--pt-focus); outline-offset: 2px; }
.pt-root .pt-aims-chosen { margin: 8px 0 0; font-size: .86rem; color: var(--pt-text-2); }
.pt-root .pt-aims-item.is-body[data-score="2"] .pt-aims-chosen,
.pt-root .pt-aims-item.is-body[data-score="3"] .pt-aims-chosen,
.pt-root .pt-aims-item.is-body[data-score="4"] .pt-aims-chosen { color: var(--pt-high-text); font-weight: 600; }

.pt-root .pt-aims-score { display: grid; gap: 14px; margin: 14px 0 6px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .pt-root .pt-aims-score { grid-template-columns: auto 1fr; } .pt-root .pt-aims-chart { grid-column: 1 / -1; } }
.pt-root .pt-aims-total, .pt-root .pt-aims-threshold { display: grid; gap: 4px; align-content: start; }
.pt-root .pt-aims-total-label { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pt-text-2); }
.pt-root .pt-aims-total-num { font-size: 3rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.pt-root .pt-aims-total-of { font-size: 1.2rem; font-weight: 600; color: var(--pt-text-2); }
.pt-root .pt-aims-flag { justify-self: start; font-weight: 700; font-size: 1.05rem; padding: 6px 14px; border-radius: 999px; background: var(--elev); }
.pt-root .pt-aims-flag.is-met { background: var(--pt-accent); color: #fff; border: 2px solid var(--pt-btn-edge); box-shadow: 0 3px 0 var(--pt-sticker); }
.pt-root .pt-aims-rule { font-size: .8rem; color: var(--pt-text-2); }
.pt-root .pt-aims-chart { position: relative; padding: 4px 0 0; }
.pt-root .pt-aims-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; position: relative; z-index: 1; }
.pt-root .pt-aims-bar { display: grid; justify-items: center; gap: 3px; }
.pt-root .pt-aims-bar-track { position: relative; width: 100%; max-width: 44px; height: 80px; border-radius: 8px; background: var(--elev); overflow: hidden; }
.pt-root .pt-aims-bar-fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--pt-drug-0); transition: height .2s ease; }
.pt-root .pt-aims-bar.s2 .pt-aims-bar-fill, .pt-root .pt-aims-bar.s3 .pt-aims-bar-fill, .pt-root .pt-aims-bar.s4 .pt-aims-bar-fill { background: var(--psych); }
.pt-root .pt-aims-bar-n { font-size: .7rem; color: var(--pt-text-2); font-weight: 600; }
.pt-root .pt-aims-bar-v { font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pt-root .pt-aims-line { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--pt-line-strong); z-index: 2; pointer-events: none; font-size: .6rem; color: var(--pt-text-2); text-align: right; line-height: 0; }
.pt-root .pt-aims-line.l2 { top: calc(4px + 40px); }
.pt-root .pt-aims-line.l3 { top: calc(4px + 20px); }

/* ---------------------------------------------------------------------------
   Interaction checker
   --------------------------------------------------------------------------- */
.pt-root .pt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pt-root .pt-chip {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding-left: 14px; border-radius: 999px;
  background: var(--elev); border: 1.5px solid var(--pt-line-strong); font-weight: 600; font-size: .95rem;
}
.pt-root .pt-chip.is-unknown { border: 2px dashed var(--psych); background: var(--pt-high-bg); }
.pt-root .pt-chip-flag { font-size: .74rem; font-weight: 700; color: var(--pt-high-text); }
.pt-root .pt-chip-remove { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: var(--pt-text-2); }
.pt-root .pt-chip-remove:hover { color: var(--text); background: var(--pt-line); }
.pt-root .pt-chip-count { margin-top: 14px; }
.pt-root .pt-chip-actions { margin-top: 12px; }
.pt-root .pt-unknown { display: grid; gap: 8px; margin-top: 12px; }
.pt-root .pt-unknown-item { padding: 12px 14px; border-radius: 12px; background: var(--pt-high-bg); border-left: 5px solid var(--psych); font-size: .92rem; }
.pt-root .pt-suggest { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pt-root .pt-suggest-btn { font-size: .88rem; padding: 6px 12px; }
.pt-root .pt-sev-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.pt-root .pt-sev-count { padding: 4px 12px; border-radius: 999px; font-size: .85rem; background: var(--elev); }
.pt-root .pt-sev-group { margin-top: 20px; }
.pt-root .pt-findings { display: grid; gap: 10px; margin-top: 10px; }
.pt-root .pt-finding { border: 1.5px solid var(--pt-line); border-left: 6px solid var(--pt-line-strong); border-radius: 14px; padding: 12px 14px 14px; background: var(--surface); }
.pt-root .pt-finding-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pt-root .pt-finding-title { font-size: 1.02rem; font-weight: 700; flex: 1 1 12em; }
.pt-root .pt-sev-tag { font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--elev); color: var(--text); }
.pt-root .pt-kind { font-size: .72rem; color: var(--pt-text-2); border: 1px solid var(--pt-line-strong); border-radius: 999px; padding: 1px 8px; }
.pt-root .pt-finding-body { display: grid; gap: 8px; margin-top: 8px; font-size: .92rem; }
.pt-root .pt-finding-do { padding: 8px 10px; border-radius: 10px; background: var(--elev); }
.pt-root .pt-finding-note, .pt-root .pt-finding-src { font-size: .82rem; color: var(--pt-text-2); }
.pt-root .pt-sev-contraindicated.pt-finding { border-left-color: var(--rounds); background: var(--pt-high-bg); }
.pt-root .pt-sev-contraindicated .pt-sev-tag { background: var(--rounds); color: var(--clinical); }
.pt-root .pt-sev-major.pt-finding { border-left-color: var(--psych); }
.pt-root .pt-sev-major .pt-sev-tag { background: var(--pt-accent); color: #fff; }
.pt-root .pt-sev-moderate.pt-finding { border-left-color: var(--pt-mod-edge); }
.pt-root .pt-sev-moderate .pt-sev-tag { background: var(--neuro); color: var(--ink); }
.pt-root[data-theme="dark"] .pt-sev-contraindicated .pt-sev-tag { background: var(--clinical); color: var(--rounds); }
@media (prefers-color-scheme: dark) { .pt-root:not([data-theme="light"]) .pt-sev-contraindicated .pt-sev-tag { background: var(--clinical); color: var(--rounds); } }
.pt-root .pt-sev-count.pt-sev-contraindicated { background: var(--rounds); color: var(--clinical); }
.pt-root .pt-sev-count.pt-sev-major { background: var(--pt-accent); color: #fff; }
.pt-root .pt-sev-count.pt-sev-moderate { background: var(--neuro); color: var(--ink); }
.pt-root .pt-quiet { margin-top: 20px; padding: 14px 16px; border-radius: 14px; background: var(--elev); }
.pt-root .pt-quiet-text { margin-top: 4px; font-weight: 600; }
.pt-root .pt-quiet-list { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .86rem; }
.pt-root .pt-quiet-list li { padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--pt-line); }

/* ---------------------------------------------------------------------------
   CYP chart
   --------------------------------------------------------------------------- */
.pt-root .pt-enz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 6px; }
.pt-root .pt-enz-grid-more { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
.pt-root .pt-enz { position: relative; display: flex; }
.pt-root .pt-enz-label {
  flex: 1; display: grid; place-items: center; min-height: 46px; padding: 6px; border: 1.5px solid var(--pt-line-strong);
  border-radius: 12px; font-weight: 700; font-size: .86rem; cursor: pointer; background: var(--pt-field-bg); text-align: center;
}
.pt-root .pt-enz-label:hover { border-color: var(--text); }
.pt-root .pt-enz .pt-choice-input:checked + .pt-enz-label { background: var(--pt-selected-bg); border-color: var(--rounds); color: var(--pt-selected-ink); }
.pt-root .pt-enz .pt-choice-input:focus-visible + .pt-enz-label { outline: 3px solid var(--pt-focus); outline-offset: 2px; }
.pt-root .pt-enz-box .pt-hint { margin-top: 12px; }
.pt-root .pt-cyp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.pt-root .pt-cyp-col { border-radius: 16px; background: var(--elev); padding: 14px; }
.pt-root .pt-cyp-col-title { font-size: 1rem; font-weight: 700; }
.pt-root .pt-cyp-col-note { font-size: .8rem; color: var(--pt-text-2); margin-top: 2px; }
.pt-root .pt-cyp-facts { display: grid; gap: 8px; margin-top: 10px; }
.pt-root .pt-cyp-fact { background: var(--surface); border-radius: 12px; padding: 8px 10px 10px; display: grid; gap: 4px; }
.pt-root .pt-enz-link {
  justify-self: start; min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 1.5px solid var(--pt-line-strong);
  background: transparent; font-weight: 700; cursor: pointer; color: var(--text);
}
.pt-root .pt-enz-link:hover { border-color: var(--text); background: var(--pt-selected-bg); color: var(--pt-selected-ink); }
.pt-root .pt-cyp-level { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; }
.pt-root .pt-pips { display: inline-flex; gap: 3px; }
.pt-root .pt-pips span { width: 8px; height: 14px; border-radius: 2px; background: var(--pt-line-strong); opacity: .5; }
.pt-root .pt-pips span.on { background: var(--psych); opacity: 1; }
.pt-root .pt-cyp-note { font-size: .8rem; color: var(--pt-text-2); }
.pt-root .pt-cyp-none { font-size: .88rem; color: var(--pt-text-2); margin-top: 10px; }
.pt-root .pt-cyp-roles { display: grid; gap: 16px; margin-top: 16px; }
.pt-root .pt-cyp-role { padding-top: 12px; border-top: 1.5px solid var(--pt-line); }
.pt-root .pt-drug-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pt-root .pt-drug-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--pt-line-strong); background: var(--surface); font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--text);
}
.pt-root .pt-drug-chip:hover { border-color: var(--text); }
.pt-root .pt-narrow { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--pt-high-text); background: var(--pt-high-bg); border-radius: 999px; padding: 1px 6px; }
.pt-root .pt-cyp-inhibits .pt-cyp-col-title::before, .pt-root .pt-cyp-induces .pt-cyp-col-title::before, .pt-root .pt-cyp-substrateOf .pt-cyp-col-title::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; background: var(--neuro); border: 1.5px solid var(--pt-btn-edge);
}
.pt-root .pt-cyp-inhibits .pt-cyp-col-title::before { background: var(--psych); }
.pt-root .pt-cyp-induces .pt-cyp-col-title::before { background: var(--mentality); }

/* ---------------------------------------------------------------------------
   Result peek (phones) and toast
   --------------------------------------------------------------------------- */
.pt-root .pt-peek {
  position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 16px;
  background: var(--pt-peek-bg); color: var(--pt-peek-ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.pt-root .pt-peek-tag { flex: none; font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.pt-root .pt-peek-text { flex: 1; font-size: .84rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-root .pt-peek-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border-radius: 12px;
  border: 0; background: var(--mentality); color: var(--ink); font-weight: 700; font-size: .84rem; cursor: pointer;
}
.pt-root[data-theme="dark"] .pt-peek-btn { background: var(--rounds); color: var(--clinical); }
@media (prefers-color-scheme: dark) { .pt-root:not([data-theme="light"]) .pt-peek-btn { background: var(--rounds); color: var(--clinical); } }
@media (min-width: 960px) { .pt-root .pt-peek { display: none !important; } .pt-root.pt-has-peek .pt-main { padding-bottom: 72px; } }
.pt-root .pt-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 80; transform: translate(-50%, 12px);
  max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--clinical);
  font-weight: 600; font-size: .9rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); opacity: 0; transition: opacity .2s ease, transform .2s ease;
}
.pt-root[data-theme="dark"] .pt-toast { background: var(--clinical); color: var(--ink); }
.pt-root .pt-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.pt-root.pt-has-peek .pt-toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

/* ---------------------------------------------------------------------------
   Small screens
   --------------------------------------------------------------------------- */
@media (max-width: 420px) {
  .pt-root .pt-hero::after { display: none; }
  .pt-root .pt-hero::before { width: 220px; height: 220px; right: -110px; top: -40px; }
  .pt-root .pt-main { padding-left: 12px; padding-right: 12px; }
  .pt-root .pt-appbar { padding-left: 12px; padding-right: 12px; }
  .pt-root .pt-panel { padding: 14px 12px 18px; border-radius: 18px; }
  .pt-root .pt-result { padding: 16px 12px 16px 16px; border-radius: 18px; }
  .pt-root .pt-cal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pt-root .pt-theme-label { display: none; }
  .pt-root .pt-aims-scale { gap: 4px; }
}

/* ---------------------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .pt-root *, .pt-root *::before, .pt-root *::after {
    animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------------
   Print sheets (patient calendar, AIMS record). Only present while printing.
   --------------------------------------------------------------------------- */
.pt-print-host { display: none; }
html.pt-print-preview .pt-print-host { display: block; position: fixed; inset: 0; z-index: 9999; overflow: auto; background: #fff; }
.pt-print-host.pt-root { background: #fff; color: #1A1A1A; --text: #1A1A1A; --pt-text-2: #333; font-size: 14pt; }
.pt-print-host .pt-sheet { max-width: 190mm; margin: 0 auto; padding: 8mm 4mm; color: #1A1A1A; font-family: var(--pt-body); font-size: 14pt; line-height: 1.45; }
.pt-print-host .pt-sheet-brand { font-size: 10pt; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #602D36; }
.pt-print-host .pt-sheet-title { font-family: var(--pt-display); font-weight: 800; font-size: 30pt; line-height: 1; color: #602D36; margin-top: 4px; }
.pt-print-host .pt-sheet-sub { font-size: 12pt; margin-top: 4px; }
.pt-print-host .pt-sheet-lines { display: grid; gap: 10px; margin-top: 16px; font-size: 13pt; }
.pt-print-host .pt-sheet-lines p { display: flex; align-items: flex-end; gap: 10px; }
.pt-print-host .pt-blank { display: inline-block; flex: 1; min-width: 60mm; border-bottom: 1.5px solid #1A1A1A; height: 1.3em; }
.pt-print-host .pt-blank-short { flex: 0 1 70mm; }
.pt-print-host .pt-blank-wide { display: block; width: 100%; margin-top: 10mm; }
.pt-print-host .pt-sheet-intro { margin: 14px 0 10px; font-size: 14pt; }
.pt-print-host .pt-sheet-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5pt; }
.pt-print-host .pt-sheet-table th { text-align: left; font-size: 10.5pt; letter-spacing: .08em; text-transform: uppercase; border-bottom: 2px solid #1A1A1A; padding: 6px 8px; }
.pt-print-host .pt-sheet-table td { vertical-align: top; border-bottom: 1px solid #999; padding: 9px 8px; }
.pt-print-host .pt-sheet-table tr { break-inside: avoid; page-break-inside: avoid; }
.pt-print-host .pt-sheet-dates { width: 30%; }
.pt-print-host .pt-sheet-dates strong, .pt-print-host .pt-sheet-dates span { display: block; }
.pt-print-host .pt-sheet-what p + p { margin-top: 4px; }
.pt-print-host .pt-sheet-what .is-stop { font-weight: 700; }
.pt-print-host .pt-sheet-rownote { font-size: 11.5pt; font-style: italic; }
.pt-print-host .pt-sheet-ticks { width: 20%; }
.pt-print-host .pt-tick { display: inline-block; width: 16pt; height: 16pt; border: 2px solid #1A1A1A; border-radius: 3px; margin: 0 5px 5px 0; }
.pt-print-host .pt-sheet-split { margin-top: 16px; font-size: 13pt; }
.pt-print-host .pt-sheet-tips, .pt-print-host .pt-sheet-tests { margin-top: 18px; break-inside: avoid; }
.pt-print-host .pt-sheet-tips h2, .pt-print-host .pt-sheet-tests h2 { font-size: 16pt; margin-bottom: 6px; color: #602D36; }
.pt-print-host .pt-sheet-tips ul { margin-left: 1.2em; display: grid; gap: 5px; }
.pt-print-host .pt-sheet-warning { margin: 10px 0 14px; padding: 10px 12px; border: 2px solid #602D36; border-radius: 6px; break-inside: avoid; }
.pt-print-host .pt-sheet-warning h2 { font-size: 15pt; margin: 0 0 4px; color: #602D36; }
.pt-print-host .pt-sheet-warning p { margin: 0; font-size: 12.5pt; }
.pt-print-host .pt-sheet-together { margin: 12px 0 10px; padding: 10px 12px; border: 2px solid #602D36; border-radius: 6px; break-inside: avoid; }
.pt-print-host .pt-sheet-together h2 { font-size: 15pt; margin: 0 0 4px; color: #602D36; }
.pt-print-host .pt-sheet-together > p { margin: 0; font-size: 12.5pt; }
.pt-print-host .pt-sheet-fill { display: grid; gap: 9px; margin-top: 10px; font-size: 12pt; }
.pt-print-host .pt-sheet-fill p { display: flex; align-items: flex-end; gap: 8px; white-space: nowrap; }
.pt-print-host .pt-sheet-fill .pt-blank { min-width: 40mm; }
.pt-print-host .pt-sheet-small { margin-top: 14px; padding: 8px 12px; border-left: 4px solid #602D36; font-size: 12.5pt; break-inside: avoid; }
.pt-print-host .pt-sheet-small p { margin: 0; }
.pt-print-host .pt-sheet-skills { margin-top: 16px; break-inside: avoid; }
.pt-print-host .pt-sheet-skills h2 { font-size: 16pt; margin-bottom: 4px; color: #602D36; }
.pt-print-host .pt-sheet-skills p { font-size: 12.5pt; }
.pt-print-host .pt-sheet-foot { margin-top: 18px; padding-top: 8px; border-top: 1px solid #999; font-size: 10.5pt; color: #333; }
.pt-print-host .pt-rec-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 8px; }
.pt-print-host .pt-rec-summary p { border: 2px solid #1A1A1A; border-radius: 8px; padding: 8px 12px; display: grid; }
.pt-print-host .pt-rec-summary span { font-size: 10pt; text-transform: uppercase; letter-spacing: .08em; }
.pt-print-host .pt-rec-summary strong { font-size: 20pt; }
.pt-print-host .pt-rec-table { font-size: 12pt; }
.pt-print-host .pt-rec-table td { padding: 6px 8px; }
.pt-print-host .pt-rec-group { display: block; font-size: 9.5pt; color: #444; }
.pt-print-host .pt-rec-score { font-weight: 700; font-size: 14pt; text-align: center; width: 12%; }
.pt-print-host .pt-rec-key { font-size: 10.5pt; margin-top: 8px; }

@media print {
  html.pt-print-mode body > *:not(.pt-print-host) { display: none !important; }
  html.pt-print-mode .pt-print-host { display: block !important; position: static; }
  html.pt-print-mode, html.pt-print-mode body { background: #fff !important; }
  @page { margin: 12mm; }
  /* Printing the tool page itself (Ctrl+P): show the result, hide the controls. */
  html:not(.pt-print-mode) .pt-root .pt-appbar,
  html:not(.pt-print-mode) .pt-root .pt-form,
  html:not(.pt-print-mode) .pt-root .pt-peek,
  html:not(.pt-print-mode) .pt-root .pt-toast,
  html:not(.pt-print-mode) .pt-root .pt-actions,
  html:not(.pt-print-mode) .pt-root .pt-crumbs { display: none !important; }
  html:not(.pt-print-mode) .pt-root .pt-tool-grid { display: block; }
  html:not(.pt-print-mode) .pt-root .pt-result { box-shadow: none; }
}
