/* Sarvia research workspace: forest, cream, and coral from sarvia.ai.
   Local fonts; numbered setup editors; accessible light and dark themes. */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/instrument-sans.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Merriweather"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/static/fonts/merriweather-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Merriweather"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/static/fonts/merriweather-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


:root {
  color-scheme: light;
  --sans: "Instrument Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Merriweather", Georgia, serif;
  --forest: #163528; --coral: #e0612e; --coral-text: #a9401c; --cream: #f6f0e4; --cream-surface: #f6f0e4;
  --page: #f7f8f5; --surface: #fbfcf9; --surface-2: #f0f4f1; --surface-3: #f6f8f3; --fill: #e5ece6; --fill-2: #edf1ed;
  --ink: #163528; --ink-2: #40594a; --muted: #5e6f64; --tab-ink: #66756c;
  --hair: #e3e8e3; --line: #d7dfd7; --line-strong: #a4b4a8; --grid: #e4e9e4; --axis: #bbc7bd; --rail: #e3e8e0;
  --accent: #163528; --accent-hover: #254d38; --accent-ink: #ffffff; --accent-text: #285a3e; --accent-soft: #eaf0e8; --accent-ring: rgba(36, 83, 56, .18);
  --series: #397150; --series-muted: #8c9b91; --whisker: #163528; --focus: #ad471f;
  --good: #397150; --good-ink: #285a3e; --good-soft: #eaf2e9;
  --warn: #ce9137; --warn-ink: #795100; --warn-soft: #fcf1da;
  --bad: #c54439; --bad-ink: #ab302b; --bad-soft: #fbedeb; --info-soft: #edf2eb;
  --s0: transparent; --s1: #eff4ec; --s2: #dbe8d6; --s3: #b9d3b5; --s4: #91b690; --s5: #6a976e; --s6: #47764e; --s7: #275334;
  --cat-0: #397150; --cat-1: #d06034; --cat-2: #347f92; --cat-3: #bf870c; --cat-4: #b46386; --cat-5: #6d8050; --cat-6: #6f65a3; --cat-7: #b84245;
  --cat-other: #9ca598; --cat-none: #e7ebe5;
  --c-aud: #397150; --c-par: #a06523; --c-scr: #bb512a; --c-web: #357875;
  --shadow: 0 2px 6px rgba(22, 53, 40, .035);
  --shadow-pop: 0 18px 48px rgba(22, 53, 40, .16), 0 2px 8px rgba(22, 53, 40, .06);
  --radius: 12px; --bar-h: 112px;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23637469' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {

  color-scheme: dark;
  --coral: #ef946c; --coral-text: #efad8d; --cream-surface: #26392d;
  --page: #10221b; --surface: #182f25; --surface-2: #20392c; --surface-3: #16291f; --fill: #304a39; --fill-2: #29402f;
  --ink: #f2f1e8; --ink-2: #cbd7cb; --muted: #a7b9ab; --tab-ink: #acbaaf;
  --hair: #2c4335; --line: #3b5140; --line-strong: #6a806e; --grid: #2c4435; --axis: #536655; --rail: #304938;
  --accent: #b8d4b3; --accent-hover: #d2e4c9; --accent-ink: #163528; --accent-text: #bfd8b4; --accent-soft: #29422e; --accent-ring: rgba(184, 212, 179, .24);
  --series: #91bb91; --series-muted: #718775; --whisker: #f2f1e8; --focus: #ef946c;
  --good: #86b98c; --good-ink: #abd2a9; --good-soft: #223e29; --warn-ink: #e9c078; --warn-soft: #3d331b; --bad-ink: #f2a698; --bad-soft: #422924;
  --info-soft: #243b2d;
  --s1: #223c29; --s2: #304e36; --s3: #47684b; --s4: #608664; --s5: #82a380; --s6: #acc4a3; --s7: #d4e1ca;
  --cat-0: #86b98c; --cat-1: #e49a6b; --cat-2: #77b4c4; --cat-3: #d9b45b; --cat-4: #cf98b4; --cat-5: #acbc7d; --cat-6: #aaa2d4; --cat-7: #dd9090;
  --cat-other: #839180; --cat-none: #304236;
  --c-aud: #9ac49b; --c-par: #e3bd76; --c-scr: #eeaa84; --c-web: #8bbfb0;
  --shadow: 0 2px 6px rgba(0, 0, 0, .12); --shadow-pop: 0 18px 48px rgba(0, 0, 0, .35);
}
}
:root[data-theme="dark"] {

  color-scheme: dark;
  --coral: #ef946c; --coral-text: #efad8d; --cream-surface: #26392d;
  --page: #10221b; --surface: #182f25; --surface-2: #20392c; --surface-3: #16291f; --fill: #304a39; --fill-2: #29402f;
  --ink: #f2f1e8; --ink-2: #cbd7cb; --muted: #a7b9ab; --tab-ink: #acbaaf;
  --hair: #2c4335; --line: #3b5140; --line-strong: #6a806e; --grid: #2c4435; --axis: #536655; --rail: #304938;
  --accent: #b8d4b3; --accent-hover: #d2e4c9; --accent-ink: #163528; --accent-text: #bfd8b4; --accent-soft: #29422e; --accent-ring: rgba(184, 212, 179, .24);
  --series: #91bb91; --series-muted: #718775; --whisker: #f2f1e8; --focus: #ef946c;
  --good: #86b98c; --good-ink: #abd2a9; --good-soft: #223e29; --warn-ink: #e9c078; --warn-soft: #3d331b; --bad-ink: #f2a698; --bad-soft: #422924;
  --info-soft: #243b2d;
  --s1: #223c29; --s2: #304e36; --s3: #47684b; --s4: #608664; --s5: #82a380; --s6: #acc4a3; --s7: #d4e1ca;
  --cat-0: #86b98c; --cat-1: #e49a6b; --cat-2: #77b4c4; --cat-3: #d9b45b; --cat-4: #cf98b4; --cat-5: #acbc7d; --cat-6: #aaa2d4; --cat-7: #dd9090;
  --cat-other: #839180; --cat-none: #304236;
  --c-aud: #9ac49b; --c-par: #e3bd76; --c-scr: #eeaa84; --c-web: #8bbfb0;
  --shadow: 0 2px 6px rgba(0, 0, 0, .12); --shadow-pop: 0 18px 48px rgba(0, 0, 0, .35);
}
/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; min-height: 100%; color: var(--ink); font: 15px/1.55 var(--sans); background: var(--page); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 8px; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 30px; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 10px; }
a { color: var(--accent-text); }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.serif { font-family: var(--sans); font-weight: 600; letter-spacing: -0.025em; }
.grow { flex: 1 1 auto; }
.pad { padding: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 90; border-radius: 8px; }
.skip:focus { left: 8px; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 16px; height: 16px; }
.i.xs { width: 13px; height: 13px; }
.kicker { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }

/* Primary actions use forest; supporting controls stay quiet. */
button, .button { font: inherit; font-size: 14px; font-weight: 500; border-radius: 10px; padding: 0 16px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  line-height: 1.3; min-height: 36px; box-shadow: 0 1px 2px rgba(31, 28, 20, 0.04); transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s; }
button:hover, .button:hover { background: var(--surface-2); border-color: var(--line-strong); }
button:disabled { opacity: 0.5; cursor: default; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); padding: 0 16px; border-radius: 8px; box-shadow: none; }
button.primary:hover, .button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.primary:disabled { opacity: 0.55; }
button.secondary { color: var(--ink); }
button.ghost, .icon-btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); box-shadow: none; }
button.ghost:hover, .icon-btn.ghost:hover { background: var(--fill); border-color: transparent; color: var(--ink); }
button.small { font-size: 13px; padding: 0 12px; min-height: 30px; border-radius: 8px; }
button.danger-btn { background: var(--bad); border-color: var(--bad); color: #fff; border-radius: 8px; }
button.danger-btn:hover { background: var(--bad-ink); border-color: var(--bad-ink); }
.icon-btn { width: 36px; min-width: 36px; padding: 0; border-radius: 10px; color: var(--ink-2); }
a.icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; height: 36px; text-decoration: none; }
.icon-btn.sm { width: 30px; min-width: 30px; min-height: 30px; border-radius: 8px; }
.icon-btn.sm .i { width: 16px; height: 16px; }
.icon-btn.danger { color: var(--bad-ink); }
.icon-btn.outline { background: var(--surface); }
button.link { border: 0; background: none; padding: 0; min-height: 0; box-shadow: none; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; font-weight: 500; }
button.link:hover { background: none; }
input[type="text"], input[type="number"], input[type="search"], textarea, select {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 12px; width: 100%; transition: border-color 0.15s, box-shadow 0.15s; }
input::placeholder, textarea::placeholder { color: var(--tab-ink); opacity: 1; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
select { width: auto; max-width: 100%; appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: var(--chevron); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
select.op-out { color: var(--bad-ink); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background-color: var(--bad-soft); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: none; }
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin: 12px 0 6px; }
.field { display: block; margin: 0; }
.field .hint { display: block; font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; background: var(--surface); border: 1px solid var(--line); padding: 3px; border-radius: 12px; }
.seg button { border: 0; background: transparent; min-height: 30px; padding: 0 14px; font-size: 13.5px; color: var(--muted); border-radius: 9px; box-shadow: none; }
.seg button:hover { background: var(--fill-2); color: var(--ink); }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.search { position: relative; display: flex; align-items: center; min-width: 200px; }
.search > .i { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 36px; border-color: var(--line); background: var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); min-height: 30px; }
.chip.val, .chip.seg-chip { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent-text); }
.chip-x { border: 0; background: transparent; min-height: 0; width: 24px; height: 24px; padding: 0; border-radius: 50%; box-shadow: none; color: inherit; }
.chip-x:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.chip-btn { min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.chip-btn.quick.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); gap: 5px; }
.chip-btn.add { border-style: dashed; color: var(--accent-text); background: transparent; box-shadow: none; gap: 6px; }
.chip-btn.add:hover { background: var(--accent-soft); border-color: var(--accent); }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 500; background: var(--fill-2); color: var(--ink-2); white-space: nowrap; }
.tag.s-draft { background: var(--fill-2); }
.tag.s-planning, .tag.s-running { background: var(--accent-soft); color: var(--accent-text); }
.tag.s-planned { background: color-mix(in srgb, var(--c-scr) 12%, var(--surface)); color: color-mix(in srgb, var(--c-scr) 75%, var(--ink)); }
.tag.s-done { background: var(--good-soft); color: var(--good-ink); }
.tag.s-paused, .tag.s-failed, .tag.s-cancelled { background: var(--warn-soft); color: var(--warn-ink); }
.status-pill { display: inline-grid; grid-template-columns: 7px minmax(0, 1fr); align-items: center; gap: 7px; max-width: 100%; min-height: 26px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.status-pill-dot { grid-column: 1; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status-pill-label { grid-column: 2; min-width: 0; overflow-wrap: anywhere; }
.status-pill.good .status-pill-dot { background: var(--good); }
.status-pill.warn .status-pill-dot { background: var(--warn); }
.status-pill.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad-ink); }
.status-pill.bad .status-pill-dot { background: var(--bad); }
.status-pill.wait .status-pill-dot { background: var(--series); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 11px 14px; font-size: 13.5px; margin: 0 0 12px; text-align: left; }
.banner .ico { flex: none; font-weight: 700; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; margin-top: 1px; }
.banner.warn { background: var(--warn-soft); color: var(--ink); }
.banner.warn .ico { background: var(--warn); color: #141414; }
.banner.bad { background: var(--bad-soft); color: var(--ink); }
.banner.bad .ico { background: var(--bad); color: #fff; }
.banner.info { background: var(--info-soft); color: var(--ink); }
.banner.info .ico { background: var(--series); color: #fff; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--grid); border-top-color: var(--series); animation: spin 0.8s linear infinite; flex: none; display: inline-block; }
button.primary .spinner { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 24px 0; }
.loading.page, .empty.page { min-height: 70vh; justify-content: center; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 64px 16px; }
.empty .button, .empty button { margin-top: 8px; }
.empty-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 6px; }
.empty-ico .i { width: 28px; height: 28px; }
.empty h2 { font-size: 24px; margin: 0; }
.empty p { max-width: 520px; }
.bar-line { height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.bar-line > div { height: 100%; background: var(--series); border-radius: 99px; transition: width 0.4s; }
.bar-line.indeterminate > div { width: 35%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--hair); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.note .i { color: var(--accent-text); margin-top: 2px; }
.note p { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }

/* Disclosure rows preserve the native details interaction. */
details > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; flex: none; width: 18px; height: 18px; background: var(--chevron) center / 16px no-repeat; transition: transform 0.2s; }
details[open] > summary::after { transform: rotate(180deg); }
.acc { border-top: 1px solid var(--hair); padding: 12px 0 2px; margin-top: 14px; }
.acc > summary { font-size: 14.5px; font-weight: 500; color: var(--ink); padding: 2px 0 10px; }
.acc-body { padding-bottom: 8px; }
.acc-body > p { margin: 6px 0; }

/* ------------------------------------------------------------------ the shell of the studies pages: a sidebar and the content */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 12px 14px; background: var(--surface-3);
  border-right: 1px solid var(--hair); overflow: auto; }
.side-top { padding: 0 8px 14px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; }
.logo-word { font-family: var(--serif); font-size: 21px; letter-spacing: -0.01em; }
.logo-word i { font-style: italic; font-weight: 300; color: var(--accent-text); margin-left: 3px; }
.side-nav { display: grid; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.side-link:hover { background: var(--fill-2); color: var(--ink); }
.side-link.on { background: var(--fill); color: var(--ink); }
.side-sec { margin-top: 18px; display: grid; gap: 1px; }
.side-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 0 10px 6px; }
.side-study { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 4px 10px 4px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.side-study span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-study:hover { background: var(--fill-2); color: var(--ink); }
.dot-s { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--line-strong); }
.dot-s.s-done { background: var(--good); }
.dot-s.s-planned { background: var(--c-scr); }
.dot-s.s-running, .dot-s.s-planning { background: var(--series); }
.dot-s.s-paused, .dot-s.s-failed, .dot-s.s-cancelled { background: var(--warn); }
.side-foot { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--hair); }
.side-foot > * { min-width: 0; max-width: 100%; }
.status-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.side-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.account { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
#orgSwitch { display: block; flex: 1; min-width: 0; }
#userBtn { flex: none; }
.side-foot-row > .icon-btn { flex: none; }
.side #orgSwitch > * { min-width: 0; width: 100%; }
.side #orgSwitch .cl-organizationSwitcherTrigger { width: 100%; min-width: 0; justify-content: space-between; }
.side #orgSwitch .cl-organizationSwitcherTrigger .cl-organizationPreview { flex: 1; min-width: 0; }
.side #orgSwitch .cl-organizationSwitcherTrigger .cl-organizationPreviewTextContainer { min-width: 0; }
.side #orgSwitch .cl-organizationSwitcherTrigger .cl-organizationPreviewMainIdentifier { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side #orgSwitch .cl-organizationSwitcherTrigger :is(.cl-organizationPreviewAvatarContainer, .cl-organizationSwitcherTriggerIcon) { flex: none; }
.side #orgSwitch .cl-organizationSwitcherTrigger,
.side #orgSwitch .cl-organizationSwitcherTrigger :is(.cl-organizationPreviewMainIdentifier, .cl-organizationSwitcherTriggerIcon) { color: #fff; }

/* the credit: a meter in the sidebar, a chip in a study's top bar (both open Usage) */
.credit { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 5px; padding: 11px 12px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
a.credit:hover { border-color: var(--line-strong); background: var(--surface-2); }
.credit-h { display: flex; align-items: center; min-width: 0; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.credit-h > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit-n { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.credit-bar { display: block; height: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; }
.credit-bar span { display: block; height: 100%; min-width: 3px; border-radius: 3px; background: var(--accent); }
.credit-sub { font-size: 12px; line-height: 1.4; color: var(--muted); font-variant-numeric: tabular-nums; }
.credit.low .credit-n { color: var(--bad-ink); }
.credit.low .credit-bar span { background: var(--bad); }
.credit.demo { background: var(--warn-soft); border-color: transparent; }
.credit.demo .credit-sub { color: var(--warn-ink); }
.credit-chip-slot { display: contents; }
.credit-chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
a.credit-chip:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }
.credit-chip.low { color: var(--bad-ink); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
span.credit-chip { background: var(--warn-soft); border-color: transparent; color: var(--warn-ink); }

/* the studies, reports and persona sets */
.home { padding: 40px 48px 72px; max-width: 1240px; width: 100%; }
.home-head h1 { font-size: 34px; margin-bottom: 6px; }
.home-head p { max-width: 720px; font-size: 15px; }
.home-bar { display: flex; align-items: center; gap: 14px; margin: 26px 0 22px; flex-wrap: wrap; }
.utabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-right: auto; }
.utab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 0 10px; color: var(--tab-ink); text-decoration: none; font-size: 14.5px; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.utab:hover { color: var(--ink); }
.utab.on { color: var(--ink); border-bottom-color: var(--ink); }
.utab-n { font-size: 12px; color: var(--muted); font-weight: 500; }
.utab-n:empty { display: none; }
.home-bar .search { width: min(420px, 100%); }
.file-btn { display: inline-flex; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 18px; }
.scard { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; padding: 20px 22px 18px;
  box-shadow: var(--shadow); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; text-align: left; }
.scard:hover { border-color: var(--line-strong); box-shadow: 0 10px 28px rgba(31, 28, 20, 0.08); }
.scard.static { cursor: default; }
.scard.static:hover { transform: none; }
.scard-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-right: 36px; }
.scard-more { position: absolute; top: 14px; right: 12px; }
.scard h3 { font-size: 21px; line-height: 1.3; margin: 2px 0 0; font-weight: 400; }
.scard-sec { display: grid; gap: 2px; }
.scard-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2px; }
.scard-sec p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more { font-size: 13px; color: var(--accent-text); font-weight: 500; }
.scard-foot { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }

/* Usage: the credit and the cost of each study. */
.usage { display: grid; gap: 18px; max-width: 1000px; }
.u-card { display: grid; gap: 12px; padding: 22px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.u-lbl { margin: 0; font-size: 13.5px; color: var(--muted); }
.u-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; }
.u-big { margin: 0; font-size: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.u-big b { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.u-left { margin: 0; font-size: 14px; color: var(--muted); }
.u-left b { font-weight: 600; color: var(--ink-2); }
.u-bar { height: 10px; border-radius: 5px; background: var(--accent-soft); overflow: hidden; }
.u-bar span { display: block; height: 100%; min-width: 3px; border-radius: 5px; background: var(--accent); }
.u-bar.low span { background: var(--bad); }
.u-card > p.muted.small { margin: 0; }
.u-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.u-head h2 { margin: 0; font-size: 22px; font-weight: 400; }
.u-table th[scope="row"] { font-weight: 500; }
.u-table th[scope="row"] a { color: var(--ink); text-decoration: none; }
.u-table th[scope="row"] a:hover { color: var(--accent-text); text-decoration: underline; }
.u-table tr.u-other th { font-weight: 400; color: var(--muted); }
.u-table td.num { white-space: nowrap; }
.u-table tfoot th, .u-table tfoot td { font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; }

/* ------------------------------------------------------------------ a study: its bar, its body (the open tab) and the guide */
.study { display: grid; grid-template-rows: var(--bar-h) minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); height: 100vh; min-height: 520px; }
.sbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 0 20px 0 14px;
  background: var(--surface); border-bottom: 1px solid var(--hair); z-index: 20; }
.sbar-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sbar-div { width: 1px; height: 22px; background: var(--line); flex: none; }
.sbar-l input.title-in { border: 1px solid transparent; background: transparent; font-size: 15.5px; font-weight: 500; padding: 6px 8px; width: auto; min-width: 150px;
  max-width: 100%; flex: 0 1 auto; field-sizing: content; border-radius: 8px; text-overflow: ellipsis; }
.sbar-l input.title-in:hover { border-color: var(--line); }
.sbar-l input.title-in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.title-in[readonly] { pointer-events: none; }
.save-state { white-space: nowrap; flex: none; }
.stabs { display: flex; gap: 4px; }
.stab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; font-size: 14.5px; font-weight: 500;
  color: var(--tab-ink); background: transparent; border: 0; box-shadow: none; }
.stab:hover { background: var(--fill-2); color: var(--ink); }
.stab.on { background: var(--fill); color: var(--ink); }
.stab[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.stab[aria-disabled="true"]:hover { background: transparent; color: var(--tab-ink); }
.sbar-r { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.sbar-r .primary { min-height: 38px; white-space: nowrap; }
.sbody { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; }
.study.guide-on .sbody { grid-template-columns: minmax(0, 1fr) 356px; }
.smain { position: relative; min-width: 0; min-height: 0; overflow: auto; }
.smain[data-tab="planner"] { overflow: hidden; }
.guide { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--hair); }
.guide-fab { position: absolute; right: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; padding: 0; z-index: 15; color: var(--accent-text);
  background: var(--surface); box-shadow: var(--shadow-pop); }
.guide-fab .i { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ study planner: a panel at the left, the canvas */
.np-head { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 12px 0 22px; border-bottom: 1px solid var(--hair); flex: none; }
.np-head h2 { font-size: 16px; font-weight: 600; margin: 0; flex: 1; }
.np-head h2:focus { outline: none; }
.planner-back { flex: none; min-height: 34px; padding: 0 9px; gap: 5px; }
.np-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--c); border: 1.5px solid var(--c); --c: var(--c-aud); }
.np-ico.c-par { --c: var(--c-par); } .np-ico.c-scr { --c: var(--c-scr); }
.np-body { flex: 1; min-height: 0; overflow: auto; padding: 18px 22px 40px; overscroll-behavior: contain; }
.np-inner { display: grid; gap: 18px; }
.np-inner[inert] { opacity: 0.75; }
.np-inner[inert] :is(.attr-acts, .add-attr, .groups-row button, .chip-x, .chip-btn.add, .q-acts, .q-rail button, .add-q, .np-actions, .drag-hint, .stepper button, .dropzone, .n-picks) { display: none; }
.np-inner[inert] .chips:has(> .chip-btn:not(.add)) { display: none; }
.np-inner[inert] .np-sec:has(> .chips > .chip-btn:not(.add)) { display: none; }
.np-sec { display: grid; gap: 8px; }
.np-sec.center { justify-items: center; text-align: center; }
.np-lbl { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.np-lbl.plain { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.np-hint { margin: 0; }
.np-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lock-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--accent-soft); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.lock-note > span { flex: 1 1 200px; }
.lock-note .i { color: var(--accent-text); }
.lock-note > .spinner { flex: none; }  /* not stretched like the note's text */
.lock-note.soft { background: var(--surface-2); border: 1px solid var(--hair); }

.ready-pill { display: inline-flex; align-items: center; gap: 14px; padding: 10px 28px 10px 12px; min-height: 64px; border-radius: 40px; border: 0; background: var(--accent);
  color: #fff; text-align: left; box-shadow: 0 12px 32px rgba(22, 53, 40, 0.18); white-space: nowrap; font-weight: 400; animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
button.ready-pill:hover { background: var(--accent-hover); border: 0; }
.ready-pill.quiet { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); border: 1px solid var(--line); }
.rp-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.18); flex: none; }
.ready-pill.quiet .rp-ico { background: var(--accent-soft); color: var(--accent-text); }
.rp-ico .i { width: 22px; height: 22px; }
.rp-text b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.rp-text span { display: block; font-size: 13.5px; opacity: 0.92; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Audience panel */
.src { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.src-opt { display: flex; align-items: flex-start; gap: 10px; text-align: left; justify-content: flex-start; padding: 10px 12px; min-height: 0; border-radius: 12px; font-weight: 400; }
.src-opt b { display: block; font-size: 13.5px; font-weight: 600; }
.src-opt small { display: block; font-size: 12px; color: var(--muted); }
.src-dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; margin-top: 2px; }
.src-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.src-opt.on .src-dot { border: 5px solid var(--accent); }
.upbox { display: grid; gap: 10px; margin-top: 4px; }
.upbox p { margin: 0; }
.upinfo { display: grid; gap: 8px; background: var(--surface-2); border: 1px solid var(--hair); border-radius: 12px; padding: 12px 14px; }
.upinfo p { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; margin: 0; }
.upinfo p.muted { display: block; margin-top: -4px; }
.upinfo .acc { margin-top: 0; padding-top: 8px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 22px 16px; cursor: pointer;
  border: 1.5px dashed var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); }
.dropzone:hover, .dropzone.over, .dropzone:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.dropzone .i { width: 24px; height: 24px; color: var(--accent-text); margin-bottom: 2px; }
.dropzone b { font-size: 14px; }
pre.prompt { white-space: pre-wrap; word-break: break-word; background: var(--surface); border: 1px solid var(--hair); border-radius: 10px;
  padding: 12px 14px; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 0; max-height: 300px; overflow: auto; }
.reach { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.reach-n { font-family: var(--serif); font-size: 40px; line-height: 1.15; letter-spacing: -0.02em; margin: 6px 0 4px; }
.reach-sub { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.reach.zero .reach-n, .reach.zero .reach-sub { color: var(--bad-ink); }
.aud { gap: 10px; }
.aud-head { display: flex; align-items: center; gap: 10px; }
.aud-head h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 0; }
.count-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent); color: #fff; }
.add-attr { justify-self: start; border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent-text); background: transparent; box-shadow: none; border-radius: 12px; gap: 6px; }
.add-attr:hover { background: var(--accent-soft); border-color: var(--accent); }
.aud-cat { font-size: 13px; color: var(--muted); margin: 6px 0 -2px; }
.attr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 10px 12px 12px; }
.attr-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.attr-main { display: grid; min-width: 0; }
.attr-main b { font-size: 14.5px; font-weight: 600; }
.attr-val { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attr-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--fill-2); color: var(--ink-2); white-space: nowrap; }
.attr-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.attr-tag.out { background: var(--bad-soft); color: var(--bad-ink); }
.attr-tag.out::before { background: var(--bad); }
.attr-acts { display: flex; gap: 2px; }
.attr.editing { display: block; padding: 0; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 0 0 3px var(--accent-ring); }
.ed-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 14px 12px; border-bottom: 1px solid var(--hair); }
.ed-head .attr-tag::before { display: none; }
.ed-body { display: grid; gap: 12px; padding: 14px 16px; }
.ed-body p { margin: 0; }
.ed-intro { font-size: 13.5px; color: var(--ink-2); }
.ed-rule { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--hair); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.ed-reach { font-size: 13px; color: var(--muted); }
.ed-reach b { color: var(--ink); }
.ed-foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--hair); flex-wrap: wrap; }
.ed-proj { margin-right: auto; font-size: 13.5px; color: var(--ink-2); }
.ed-proj b { color: var(--accent-text); }
.range-ed { display: grid; gap: 8px; }
.range-big { font-size: 17px; font-weight: 600; }
.range-ed p { margin: -4px 0 0; }
.dual { position: relative; height: 24px; }
.dual-track { position: absolute; left: 0; right: 0; top: 9px; height: 6px; border-radius: 3px; background: var(--fill); }
.dual-fill { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; }
.dual-in { position: absolute; inset: 0; width: 100%; height: 24px; margin: 0; padding: 0; background: transparent; border: 0; pointer-events: none; -webkit-appearance: none; appearance: none; box-shadow: none !important; }
.dual-in::-webkit-slider-runnable-track { background: transparent; height: 24px; }
.dual-in::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(31, 28, 20, 0.25); cursor: pointer; }
.dual-in::-moz-range-track { background: transparent; }
.dual-in::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); cursor: pointer; }
.dual-in:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.slider-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.slider-ticks { position: relative; height: 18px; margin-top: 2px; }
.slider-ticks span { position: absolute; top: 0; transform: translateX(-50%); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slider-ticks span:last-child { left: auto !important; right: 0; transform: none; }
.n-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 10px; }
.n-pick { min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-variant-numeric: tabular-nums; }
.n-pick[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.range-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.range-row input { width: 110px; }
.as { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.as-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--hair); color: var(--muted); }
.as-head input { border: 0; box-shadow: none !important; padding: 6px 4px; background: transparent; }
.as-list { max-height: 380px; overflow: auto; padding: 4px 6px 8px; }
.as-cat { font-size: 12.5px; color: var(--muted); padding: 10px 8px 4px; }
.as-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; background: transparent;
  box-shadow: none; text-align: left; border-radius: 10px; min-height: 0; font-weight: 400; }
.as-item:hover { background: var(--fill-2); }
.as-item .attr-ico { width: 32px; height: 32px; }
.as-text { display: grid; min-width: 0; }
.as-text b { font-size: 14px; font-weight: 600; }
.as-text small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-item.used { opacity: 0.7; }
.as-used { color: var(--good); }
.groups-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px dashed var(--line-strong); border-radius: 14px; padding: 12px; }
.groups-row b { display: block; font-size: 14px; }
.groups-row .muted { display: block; line-height: 1.4; }

/* Participants panel */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; background: var(--surface); margin-top: 8px; }
.stepper button { border: 0; border-radius: 0; min-height: 0; width: 64px; box-shadow: none; color: var(--ink-2); }
.stepper button .i { width: 20px; height: 20px; }
.step-num { width: 7ch !important; border: 0 !important; border-left: 1px solid var(--line) !important; border-right: 1px solid var(--line) !important; border-radius: 0 !important;
  text-align: center; font-size: 34px !important; font-weight: 600; padding: 10px 6px !important; letter-spacing: -0.02em; appearance: textfield; -moz-appearance: textfield; }
.step-num::-webkit-inner-spin-button, .step-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.size-slider { width: 100%; margin-top: 6px; }
input.slider { --p: 20%; -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; padding: 0; background: transparent; border: 0; cursor: pointer; box-shadow: none !important; }
input.slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), var(--fill) var(--p)); }
input.slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(31, 28, 20, 0.25); }
input.slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
input.slider::-moz-range-track { height: 6px; border-radius: 3px; background: var(--fill); }
input.slider::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
input.slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }

/* Script panel */
.upload-panel { display: grid; gap: 12px; }
.upload-panel .format { background: var(--surface-2); border: 1px solid var(--hair); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.upload-panel .format p { margin: 6px 0; }
table.cols { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 13px; }
table.cols th, table.cols td { text-align: left; vertical-align: top; padding: 5px 10px 5px 0; border-top: 1px solid var(--hair); font-weight: 400; }
code { font-size: 12px; background: var(--surface); border: 1px solid var(--hair); border-radius: 6px; padding: 1px 6px; }
.drag-hint { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0; }
.qlist { display: grid; gap: 12px; }
.qcard { display: grid; grid-template-columns: 34px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; transition: box-shadow 0.15s; }
.qcard.bad { border-color: color-mix(in srgb, var(--warn) 65%, var(--line)); }
.qcard.dragging { opacity: 0.45; }
.qcard.drop-before { box-shadow: 0 -3px 0 var(--accent); }
.qcard.drop-after { box-shadow: 0 3px 0 var(--accent); }
.q-rail { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 0; background: var(--fill-2); border-right: 1px solid var(--hair); }
.rail-btn { width: 26px; min-height: 26px; height: 26px; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--muted); border-radius: 6px; }
.rail-btn:hover { background: var(--fill); color: var(--ink); }
.q-grip { color: var(--muted); cursor: grab; display: grid; place-items: center; padding: 6px 0; }
.q-main { padding: 12px 14px 12px; display: grid; gap: 8px; min-width: 0; }
.q-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.q-ord { font-size: 15px; font-weight: 500; }
.q-acts { display: flex; gap: 2px; }
.q-type { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.q-help { margin: -2px 0 0; line-height: 1.45; }
.q-opts { display: grid; gap: 6px; }
.q-lbl { font-size: 13px; font-weight: 600; }
.q-main .acc { margin-top: 2px; padding-top: 10px; }
.q-main .acc > summary { font-size: 13.5px; }
.q-prob { margin: 0; font-size: 13px; color: var(--warn-ink); font-weight: 500; }
.q-prob:empty { display: none; }
.add-q { width: 100%; border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent-text); background: transparent; box-shadow: none; border-radius: 12px; min-height: 44px; }
.add-q:hover { background: var(--accent-soft); border-color: var(--accent); }

/* ------------------------------------------------------------------ the guide (right column) */
.guide-head { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 12px 0 20px; border-bottom: 1px solid var(--hair); flex: none; }
.guide-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.guide-title .i { color: var(--accent-text); }
.guide-body { flex: 1; min-height: 0; overflow: auto; padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.g-instructions h3 { font-size: 18px; line-height: 1.4; margin: 6px 0 12px; }
.g-instructions ol { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.g-instructions li { font-size: 14px; line-height: 1.55; padding-left: 3px; color: var(--ink-2); }
.g-instructions li::marker { color: var(--accent-text); font-weight: 600; }
.guide-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 12px 14px 14px 18px; border-top: 1px solid var(--hair); flex: none; }
.g-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 4px 8px; }
.g-spark { width: 58px; height: 58px; display: grid; place-items: center; color: var(--accent-text); }
.g-spark .i { width: 46px; height: 46px; stroke-width: 1.4; }
.g-spark.done { width: 52px; height: 52px; border-radius: 50%; background: var(--good-soft); color: var(--good-ink); }
.g-spark.done .i { width: 26px; height: 26px; stroke-width: 2; }
.g-big { font-size: 19px; line-height: 1.4; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.g-text { font-size: 14px; color: var(--ink-2); margin: 0; line-height: 1.55; }
.g-action { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 44px; padding: 0 14px; border-radius: 10px; text-align: left; font-size: 14.5px; font-weight: 400; }
.g-action .i { color: var(--accent-text); }
.g-action.primary { justify-content: center; font-weight: 500; }
.g-action.primary .i { color: #fff; }
.g-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.g-chip { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--ink-2); box-shadow: none; font-size: 13.5px; font-weight: 400; }
.g-chip:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border: 0; color: var(--ink); }
.g-msg p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.g-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.g-card p { margin: 4px 0 0; font-size: 14px; }
.g-lbl { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.g-progress { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 9px; box-shadow: var(--shadow); }
.g-progress-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.g-progress-top .i { color: var(--ink-2); }
.g-progress p { margin: 0; }
.guide-body .banner { margin: 0; }

/* ------------------------------------------------------------------ Participants tab */
.pt { padding: 26px 32px 56px; display: grid; gap: 14px; max-width: 1360px; }
.pt-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pt-head h1 { font-size: 30px; margin: 0; font-weight: 400; }
.inline-field { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.inline-field select { min-width: 200px; }
.pt-status { display: grid; gap: 8px; }
.pt-status p { margin: 0; color: var(--ink-2); font-size: 14px; }
.search.wide { width: 100%; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.legend-h { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 8px; border: 0; background: transparent; box-shadow: none; font-size: 13.5px; font-weight: 400; border-radius: 8px; }
.legend-item:hover { background: var(--fill-2); border: 0; }
.legend-item i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.legend-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.legend-item.off { opacity: 0.45; text-decoration: line-through; }
.tile-group { background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; padding: 20px 22px 24px; box-shadow: var(--shadow); }
.tg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.tg-head h2 { font-size: 20px; margin: 0; font-weight: 400; }
.tg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.ptile { aspect-ratio: 1; min-height: 0; padding: 0; border: 0; border-radius: 9px; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; box-shadow: none;
  transition: transform 0.12s, opacity 0.15s; }
.ptile:hover { transform: translateY(-2px); border: 0; filter: brightness(1.05); }
.ptile.dim { opacity: 0.16; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; text-align: left; border-radius: 16px; border: 1px solid var(--hair); background: var(--surface);
  box-shadow: var(--shadow); min-height: 0; font-weight: 400; }
.pcard:hover { border-color: var(--line-strong); background: var(--surface); transform: translateY(-1px); }
.pc-head { display: flex; align-items: center; gap: 12px; }
.pc-who { display: grid; min-width: 0; }
.pc-who b { font-size: 15px; font-weight: 600; }
.pc-who span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-rows { display: grid; gap: 10px; border-top: 1px solid var(--hair); padding-top: 12px; }
.pc-q { display: grid; gap: 5px; }
.pc-q-top { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.pc-qid { font-size: 11px; font-weight: 600; color: var(--muted); flex: none; }
.pc-opt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.pc-q-top b { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.mini-bar { height: 6px; border-radius: 3px; background: var(--rail); overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--series); border-radius: 3px; }
.pc-attr { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.pc-attr span { color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--av, var(--accent)); color: #fff; font-size: 14px; font-weight: 500; flex: none; letter-spacing: 0; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.av0 { --av: #e6a12b; color: #2b1a00; } .av1 { --av: #128641; } .av2 { --av: #2672dc; } .av3 { --av: #7761d5; } .av4 { --av: #cb4744; } .av5 { --av: #107f90; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--hair); vertical-align: top; }
thead th { font-size: 12.5px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); vertical-align: bottom; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }
.people-box { max-height: 70vh; overflow: auto; border: 1px solid var(--hair); border-radius: 14px; background: var(--surface); }
.people-box table.people thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; box-shadow: inset 0 -1px 0 var(--line); }
table.people td, table.people th { white-space: nowrap; }
td.summary-cell { max-width: 460px; white-space: normal !important; font-size: 13px; color: var(--muted); }
.id-tag { display: block; font-size: 11.5px; }

/* ------------------------------------------------------------------ Insights tab */
.insights { display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); height: 100%; }
.itabs { display: flex; align-items: center; gap: 8px; padding: 0 20px 0 28px; height: 60px; background: var(--surface); border-bottom: 1px solid var(--hair); position: sticky; top: 0; z-index: 4;
  overflow-x: auto; scrollbar-width: none; }
.itabs > * { flex: none; }
.itabs > .grow { flex: 1 1 auto; }
.itab-list { display: flex; gap: 26px; align-self: stretch; }
.itab { height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--tab-ink); font-size: 15px; font-weight: 400;
  border-bottom: 2px solid transparent; min-height: 0; }
.itab:hover { background: transparent; color: var(--ink); border-bottom-color: var(--line-strong); }
.itab.on { color: var(--ink); border-bottom-color: var(--ink); }
.icontent { min-height: 0; overflow: auto; }

/* interviews: the people at the left, the transcript at the right */
.iv { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: 100%; min-height: 0; }
.iv-side { display: flex; flex-direction: column; gap: 12px; padding: 22px 16px 16px 24px; min-height: 0; border-right: 1px solid var(--hair); }
.iv-prog { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.iv-prog b { display: block; font-size: 15px; }
.iv-prog .bar-line { grid-column: 1 / -1; margin-top: 8px; }
.iv-prog-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--fill-2); color: var(--ink-2); }
.iv-prog-ico.ok { background: var(--good-soft); color: var(--good-ink); }
.iv-list { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 2px; padding: 2px 4px 2px 0; }
.iv-name { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 12px; border: 0; background: transparent; box-shadow: none;
  font-size: 15px; font-weight: 400; color: var(--ink-2); border-radius: 10px; }
.iv-name:hover { background: var(--fill-2); border: 0; color: var(--ink); }
.iv-person.on .iv-name { background: var(--fill); color: var(--ink); font-weight: 600; }
.iv-qs { display: grid; gap: 0; padding: 6px 0 8px 16px; }
.iv-q { justify-content: flex-start; text-align: left; border: 0; background: transparent; box-shadow: none; min-height: 32px; padding: 4px 8px; font-size: 13.5px; font-weight: 400;
  color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; border-radius: 6px; }
.iv-q:hover { background: var(--fill-2); color: var(--ink); border: 0; }
.iv-main { min-height: 0; overflow: auto; padding: 22px 28px 64px; }
.iv-main:focus { outline: none; }
.transcript { max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; padding: 32px 44px 40px; box-shadow: var(--shadow); }
.tr-head { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--hair); margin-bottom: 8px; flex-wrap: wrap; }
.tr-who { flex: 1; min-width: 200px; }
.tr-who h2 { margin: 0; font-size: 19px; }
.tr-who p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.tr-block { padding: 22px 0 6px; border-bottom: 1px solid var(--hair); scroll-margin-top: 16px; }
.tr-block:last-child { border-bottom: 0; }
.tr-q { font-size: 17.5px; line-height: 1.45; font-weight: 600; margin: 0 0 12px; scroll-margin-top: 16px; }
.tr-lead { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.tr-mix { display: grid; gap: 6px; margin-bottom: 14px; }
.tr-row { display: grid; grid-template-columns: minmax(120px, 38%) minmax(0, 1fr) 40px; align-items: center; gap: 12px; font-size: 13.5px; }
.tr-opt { color: var(--ink-2); line-height: 1.35; }
.tr-track { height: 8px; border-radius: 4px; background: var(--rail); overflow: hidden; }
.tr-track span { display: block; height: 100%; background: var(--series); border-radius: 0 4px 4px 0; min-width: 2px; }
.tr-row.na { color: var(--muted); font-style: italic; }
.tr-row.na .tr-track span { background: repeating-linear-gradient(135deg, var(--muted) 0 3px, transparent 3px 6px); }  /* not an answer: hatched, not the series colour */
.tr-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.tr-whys { display: grid; gap: 14px; }
.tr-why { margin: 0; }
.tr-why-lbl { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 3px; }
.tr-why p { font-family: var(--serif); font-size: 16px; line-height: 1.75; font-weight: 300; margin: 0; color: var(--ink); }

/* summary: what we found */
.sum-wrap { padding: 24px 28px 64px; }
.sum-card { max-width: 900px; margin: 0 auto; background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.sum-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--hair); }
.sum-top .kicker { color: var(--accent-text); margin: 0; }
.sum-doc { margin: 22px; border: 1px solid var(--hair); border-radius: 14px; padding: 26px 30px 30px; }
.sum-title { font-family: var(--serif); font-weight: 700; font-size: 21px; line-height: 1.35; margin: 0 0 4px; letter-spacing: -0.01em; }
.sum-based { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 13.5px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); margin-bottom: 16px; }
.sum-overview { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 15.5px; line-height: 1.75; color: var(--ink-2); margin: 0 0 6px; }
.sum-sec { padding: 22px 0 18px; border-top: 1px solid var(--hair); margin-top: 16px; }
.sum-sec:first-of-type { border-top: 0; }
.sum-q { font-size: 14px; color: var(--ink-2); margin: 0 0 6px; }
.sum-h { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.35; margin: 2px 0 12px; letter-spacing: -0.01em; }
.sum-h-n { color: var(--accent-text); font-size: 17px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 6px; }
.chart-head .muted { flex: 1 1 260px; }
.na-note { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 8px; font-size: 13px; color: var(--ink-2); }
.na-note .i { margin-top: 2px; color: var(--muted); }
.lp { display: grid; gap: 2px; margin-top: 6px; }
.lp-row, .lp-axis { display: grid; grid-template-columns: minmax(130px, 36%) minmax(0, 1fr) 52px; align-items: center; gap: 14px; }
.lp-row { min-height: 34px; padding: 0 8px; margin: 0 -8px; border-radius: 8px; }
.lp-row:hover, .lp-row:focus-visible { background: var(--surface-2); }
.lp-label { font-family: var(--serif); font-size: 14.5px; line-height: 1.35; }
.lp-track { position: relative; height: 18px; }
.lp-track::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--rail); border-radius: 1px; }
.lp-ci { position: absolute; top: 4px; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--series-muted) 22%, transparent); }
.lp-row.lead .lp-ci { background: color-mix(in srgb, var(--series) 20%, transparent); }
.lp-line { position: absolute; left: 0; top: 8px; height: 2px; background: var(--series-muted); border-radius: 1px; }
.lp-dot { position: absolute; top: 4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--series-muted); box-shadow: 0 0 0 2px var(--surface); }
.lp-row.lead .lp-line, .lp-row.lead .lp-dot { background: var(--series); }
.lp-val { text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.lp-row.lead .lp-val { color: var(--ink); }
.lp-axis { min-height: 18px; }
.lp-ticks { position: relative; height: 16px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lp-ticks span { position: absolute; transform: translateX(-50%); }
.lp-ticks span:first-child { transform: none; }
.lp-ticks span:last-child { transform: translateX(-100%); }
.key-quote { margin: 18px 0 4px; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.key-quote blockquote { margin: 0; display: flex; gap: 10px; }
.kq-mark { font-family: var(--serif); font-size: 40px; line-height: 0.9; color: var(--accent-text); }
.key-quote p { font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.65; margin: 0; }
.key-quote figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.heat-wrap { margin-top: 22px; }
.seg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 10px; font-size: 13px; color: var(--ink-2); }
.seg-key { display: inline-flex; align-items: center; gap: 6px; }
.seg-key i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.stack-head, .stack-row { display: grid; grid-template-columns: minmax(90px, 170px) 72px 1fr; column-gap: 12px; align-items: center; }
.stack-head { font-size: 12.5px; font-weight: 600; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.stack-head .num, .stack-n { text-align: right; font-variant-numeric: tabular-nums; }
.stack-row { padding: 8px 0; border-bottom: 1px solid var(--hair); }
.stack-name { font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.stack { display: flex; height: 28px; border-radius: 6px; overflow: hidden; background: var(--rail); gap: 2px; }
.stk { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: #141414; min-width: 0; white-space: nowrap; }
.stk.strong { color: #fff; }
:root[data-theme="dark"] .stk.strong { color: #141414; }
:root[data-theme="dark"] .stk:not(.strong) { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stk.strong { color: #141414; } :root:not([data-theme="light"]) .stk:not(.strong) { color: #fff; } }
.stk:hover, .stk:focus-visible { filter: brightness(1.08); outline: none; }
.stack-row.thin { opacity: 0.75; }
.badge { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 99px; background: var(--warn-soft); color: var(--warn-ink); font-weight: 600; }
.na-tag { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.stack-none { padding: 4px 0; font-style: italic; }
.reason-opt { margin-top: 10px; }
.reason-opt ul { margin: 4px 0 0 18px; padding: 0; color: var(--ink-2); font-size: 13.5px; }
.reason-opt li { margin: 3px 0; }
.themes { margin-top: 14px; display: grid; gap: 10px; }
.theme ul { margin: 4px 0 0 18px; padding: 0; color: var(--ink-2); font-size: 13.5px; }

/* report: an outline at the left, the document */
.rp { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100%; }
.rp-side { padding: 26px 16px 24px 26px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid var(--hair); position: sticky; top: 0; align-self: start; }
.rp-status { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.rp-status .i { color: var(--good-ink); }
.rp-outline { display: grid; gap: 2px; border-top: 1px solid var(--hair); padding-top: 12px; }
.rp-link { justify-content: flex-start; border: 0; background: transparent; box-shadow: none; text-align: left; font-weight: 400; font-size: 14.5px; color: var(--ink-2); min-height: 38px; padding: 0 10px; border-radius: 9px; }
.rp-link:hover { background: var(--fill-2); border: 0; color: var(--ink); }
.rp-main { padding: 24px 28px 72px; min-width: 0; }
.report-doc { max-width: 780px; margin: 0 auto; background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; padding: 48px 72px 56px; box-shadow: var(--shadow); }
.report-doc p.kicker { font-family: var(--sans); font-weight: 600; font-size: 11.5px; line-height: 1.4; color: var(--accent-text); margin-bottom: 8px; }
.rd-title { font-family: var(--serif); font-weight: 700; font-size: 28px; line-height: 1.3; letter-spacing: -0.015em; margin: 0 0 6px; }
.rd-meta { color: var(--muted); font-size: 13.5px; padding-bottom: 22px; border-bottom: 1px solid var(--hair); margin-bottom: 8px; }
.report-doc h2 { font-family: var(--serif); font-weight: 700; font-size: 19px; margin: 30px 0 12px; scroll-margin-top: 20px; letter-spacing: -0.01em; }
.report-doc p { font-family: var(--serif); font-weight: 300; font-size: 15.5px; line-height: 1.8; margin: 0 0 14px; }
.report-doc .banner, .report-doc .banner p { font-family: var(--sans); font-weight: 400; }
.rd-item { position: relative; padding-left: 20px; }
.rd-item::before { content: ""; position: absolute; left: 2px; top: 0.78em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.skel { display: grid; gap: 12px; margin: 6px 0 14px; }
.skel span { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--fill-2), var(--accent-soft), var(--fill-2)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.skel span:nth-child(2) { width: 96%; } .skel span:nth-child(3) { width: 86%; } .skel span:nth-child(4) { width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* data */
.data { padding: 24px 32px 64px; max-width: 1240px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column-reverse; gap: 2px; background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.kpi span { display: block; font-size: 13px; color: var(--muted); }
.kpi b { display: block; font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }

/* ------------------------------------------------------------------ a persona's story: the drawer */
.drawer-back { position: fixed; inset: 0; background: rgba(24, 20, 36, 0.28); z-index: 60; opacity: 0; transition: opacity 0.2s; }
.drawer-back.in { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 61; display: flex; flex-direction: column;
  box-shadow: var(--shadow-pop); transform: translateX(24px); opacity: 0; transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s; }
.drawer.in { transform: none; opacity: 1; }
.dr-head { display: flex; align-items: center; gap: 14px; padding: 16px 14px 16px 24px; border-bottom: 1px solid var(--hair); }
.dr-who { flex: 1; min-width: 0; }
.dr-who h2 { margin: 0; font-size: 18px; }
.dr-who p { margin: 2px 0 0; }
.dr-body { flex: 1; min-height: 0; overflow: auto; padding: 20px 26px 40px; display: grid; gap: 10px; align-content: start; }
.dr-body .kicker { margin-top: 10px; color: var(--accent-text); }
.profile p { margin: 0 0 14px; font-family: var(--serif); font-weight: 300; font-size: 14.5px; line-height: 1.75; }
.profile p:first-child { font-size: 15.5px; }
.profile b { display: block; font-family: var(--sans); color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }
.profile.raw p { white-space: pre-line; }
.dr-body .tr-block { padding-top: 16px; }
.dr-body .tr-q { font-size: 15.5px; }

/* ------------------------------------------------------------------ popover, menu, tooltip, toast, modal, sign-in */
.pop { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; box-shadow: var(--shadow-pop); max-width: calc(100vw - 24px); overflow: auto; }
.pop:has(.pop-body) { overflow: hidden; }
.pop-body { display: flex; flex-direction: column; max-height: inherit; min-height: 0; padding-bottom: 2px; }
.pop-head { padding: 14px 16px 0; flex: none; max-height: 28vh; overflow: auto; }
.pop-head p { margin: 4px 0 0; }
input.pop-search { margin: 12px 12px 6px; width: auto; flex: none; }
.pop-list { overflow: auto; overscroll-behavior: contain; padding: 4px 8px 8px; flex: 1 1 auto; min-height: 0; max-height: 360px; }
.pop-list.tall { max-height: 58vh; }
.pop-cat { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 8px 4px; }
.pop-item { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.pop-item:hover, .pop-field:hover { background: var(--fill-2); }
.pop-text { flex: 1; }
.pop-about { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 1px; }
.pop-n { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pop-field { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px; border-radius: 8px; min-height: 0; box-shadow: none; font-weight: 400; }
.pop-field span { display: block; font-size: 14px; font-weight: 500; }
.pop-field small { display: block; font-size: 12px; line-height: 1.35; margin-top: 1px; }
.pop-foot { display: flex; flex: none; justify-content: space-between; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--hair); background: var(--surface); }
.menu { display: grid; padding: 6px; }
.menu-item { justify-content: flex-start; gap: 10px; border: 0; background: transparent; box-shadow: none; min-height: 36px; padding: 0 10px; border-radius: 8px; font-weight: 400; }
.menu-item:hover, .menu-item:focus-visible { background: var(--fill-2); border: 0; }
.menu-item.danger { color: var(--bad-ink); }
.tip { position: fixed; z-index: 80; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--hair);
  border-radius: 12px; padding: 9px 12px; font-size: 13px; line-height: 1.45; box-shadow: var(--shadow-pop); max-width: 320px; }
.tip b { font-size: 14px; }
.toast { position: fixed; z-index: 85; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; padding: 14px 28px 14px 14px;
  background: var(--accent); color: #fff; border-radius: 38px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; box-shadow: 0 12px 32px rgba(22, 53, 40, 0.18);
  width: max-content; max-width: min(600px, calc(100vw - 32px)); animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.toast-ico { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); display: grid; place-items: center; flex: none; font-weight: 700; font-size: 18px; }
.toast-ico .i { width: 20px; height: 20px; }
.toast-msg b { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.toast-msg span { display: block; font-weight: 400; }
.toast.bad { background: var(--bad); box-shadow: 0 12px 32px rgba(214, 50, 50, 0.35); }
body.pill-on .toast { bottom: 104px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 20px); } }
.modal { border: 1px solid var(--hair); border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: 86vh; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }
.modal::backdrop { background: rgba(24, 20, 36, 0.4); backdrop-filter: blur(2px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px 14px 24px; border-bottom: 1px solid var(--hair); }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-inner { padding: 18px 24px 22px; }
.modal-inner p { margin: 0 0 10px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.share-modes { display: grid; gap: 8px; margin: 12px 0; }
.share-list { display: grid; gap: 4px; max-height: 280px; overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.share-person { display: flex; align-items: baseline; gap: 6px; }
.gate { max-width: 520px; margin: 0 auto; padding: 12vh 16px 32px; display: grid; justify-items: center; text-align: center; gap: 12px; }
.gate .gate-mount { display: flex; justify-content: center; margin-top: 10px; }
.gate:has(.organization-onboarding) { max-width: 820px; padding-top: 7vh; }
.gate .organization-onboarding { display: flex; flex-direction: column; gap: 18px; width: 100%; }
.onboarding-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; text-align: left; }
.onboarding-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.onboarding-card h2 { font-size: 20px; }
.onboarding-card p { flex: 1; margin: 0; }
.onboarding-card label { font-weight: 500; }
.onboarding-card input { width: 100%; min-width: 0; }
.onboarding-card button { min-height: 44px; }
.onboarding-message { margin: 0; }
.onboarding-message:empty { display: none; }
.onboarding-message.bad { color: var(--bad-ink); }
.onboarding-memberships { display: flex; flex-direction: column; gap: 10px; }
.onboarding-memberships:empty { display: none; }
.organization-details { display: flex; flex-direction: column; gap: 14px; }
.organization-code-output { display: flex; gap: 8px; flex-wrap: wrap; }
.organization-code-output:empty { display: none; }
.organization-code-output input { min-width: 0; width: 100%; font-family: monospace; }
@media (max-width: 600px) {
  .onboarding-options { grid-template-columns: minmax(0, 1fr); }
  .gate:has(.organization-onboarding) { padding-top: 24px; }
}

/* ------------------------------------------------------------------ Browse: statuses, nodes, panels */
.tag.s-exploring { background: var(--accent-soft); color: var(--accent-text); }
.tag.s-review { background: color-mix(in srgb, var(--c-scr) 12%, var(--surface)); color: color-mix(in srgb, var(--c-scr) 75%, var(--ink)); }
.tag.s-stopped { background: var(--warn-soft); color: var(--warn-ink); }
.dot-s.s-exploring { background: var(--series); }
.dot-s.s-review { background: var(--c-scr); }
.dot-s.s-stopped { background: var(--warn); }
.node.c-web, .np-ico.c-web { --c: var(--c-web); }
.src.three { grid-template-columns: repeat(3, 1fr); }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.warn-hint { color: var(--warn-ink) !important; }
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.page-tile { display: grid; gap: 3px; align-content: start; padding: 0; min-height: 0; border: 0; background: transparent; box-shadow: none; text-align: left; font-weight: 400; justify-content: stretch; }
.page-tile:hover { background: transparent; border: 0; }
.page-tile .thumb { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--fill-2); color: var(--bad-ink); }
.page-tile:hover .thumb { border-color: var(--accent); }
.page-tile img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.page-tile b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-tile small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-tile.bad small { color: var(--bad-ink); }
.page-tile:disabled { opacity: 1; }
.examples { display: grid; gap: 6px; margin-top: 2px; }
.example { justify-content: flex-start; text-align: left; min-height: 0; padding: 7px 12px; border: 0; border-radius: 10px; box-shadow: none; font-size: 13.5px; font-weight: 400;
  line-height: 1.4; color: var(--ink-2); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.example:hover { background: color-mix(in srgb, var(--accent) 17%, var(--surface)); border: 0; color: var(--ink); }
.tlist { display: grid; gap: 12px; }
.tcard { display: grid; gap: 8px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tcard .lbl { margin: 2px 0 0; }
.tcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tcard .why { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.tcard .why b { color: var(--ink-2); font-weight: 600; }
.tcard.done { gap: 2px; }
.tcard.done p { margin: 0; }
.live { display: grid; gap: 8px; }
.live-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: 13px; line-height: 1.45; }
.live-row q { display: block; margin-top: 2px; font-family: var(--serif); font-weight: 300; font-style: italic; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* outcomes, ease, severity */
.bt-outcome { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.bt-outcome.sm { height: 22px; padding: 0 7px; font-size: 11.5px; gap: 3px; }
.o-done { background: var(--good-soft); color: var(--good-ink); }
.o-gaveup { background: var(--bad-soft); color: var(--bad-ink); }
.o-stopped { background: var(--warn-soft); color: var(--warn-ink); }
.bt-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: -4px 0 14px; }
.bt-ease { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sev { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.sev-high { background: var(--bad-soft); color: var(--bad-ink); }
.sev-medium { background: var(--warn-soft); color: var(--warn-ink); }
.sev-low { background: var(--fill-2); color: var(--ink-2); }
.pc-sess { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.pc-outs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pc-sus { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.iv-dots { display: inline-flex; gap: 3px; }
.iv-dots i { width: 8px; height: 8px; border-radius: 50%; }
.iv-dots i.o-done { background: var(--good); } .iv-dots i.o-gaveup { background: var(--bad); } .iv-dots i.o-stopped { background: var(--warn); }
.iv-q.on { background: var(--fill); color: var(--ink); }

/* a session, step by step */
.bsession .tr-q { margin-bottom: 8px; }
.tr-why-lbl.q { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-2); }
.steps { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 18px; }
.step { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.step-shot { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; min-height: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--fill-2); box-shadow: none; cursor: zoom-in; }
.step-shot:hover { border-color: var(--accent); background: var(--fill-2); }
.step-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.step-dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 3px var(--accent-ring); pointer-events: none; }
.step-n { position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: rgba(20, 20, 20, 0.72); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.step-body { display: grid; gap: 6px; min-width: 0; }
.step-body p { margin: 0; }
.step-where { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.step-where b { color: var(--ink-2); font-weight: 600; }
.scan { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.scan li { font-family: var(--serif); font-weight: 300; font-size: 15px; line-height: 1.65; }
.scan-region { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-text); margin-right: 8px; }
.step-said { font-family: var(--serif); font-size: 15px; line-height: 1.65; font-style: italic; font-weight: 300; color: var(--ink-2); }
.step-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; }
.step-act .i { color: var(--accent-text); }
.step-res { font-size: 13px; line-height: 1.5; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--hair); border-radius: 10px; padding: 7px 10px; }
.step-res.r-blocked, .step-res.r-failed, .step-res.r-invalidated, .step-res.r-unknown { background: var(--warn-soft); border-color: transparent; color: var(--ink); }
.sus { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; margin: 4px 0 14px; }
.sus-n { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sus-right { display: grid; gap: 6px; }
.sus-lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sus-bar { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--bad-soft), var(--warn-soft) 55%, var(--good-soft)); }
.sus-bar span { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.sus-bar i { position: absolute; top: 1px; width: 2px; height: 8px; margin-left: -1px; border-radius: 1px; background: color-mix(in srgb, var(--ink) 40%, transparent); }
.sus-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sus-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.sus-items li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--hair); padding: 4px 0; }
.sus-items b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.concerns { display: grid; gap: 10px; margin-top: 16px; }
.concern, .fcard { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; background: var(--surface); }
.concern p, .fcard p { margin: 0; }
.k-experienced { border-left-color: var(--bad); }
.k-noticed { border-left-color: var(--warn); }
.k-anticipated { border-left-color: var(--line-strong); }
.concern-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.concern-d { font-family: var(--serif); font-size: 15px; line-height: 1.6; }

/* findings, summary, report, drawer */
.fd { max-width: 980px; margin: 0 auto; padding: 26px 28px 64px; display: grid; gap: 16px; }
.fd-head h1 { font-size: 30px; font-weight: 400; margin: 0 0 6px; }
.fd-head p { margin: 0; max-width: 760px; }
.fd-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fd-bar .search { flex: 1 1 220px; }
.fd-list { display: grid; gap: 12px; }
.fcard { padding: 16px 18px; gap: 8px; box-shadow: var(--shadow); }
.fcard-d { font-family: var(--serif); font-size: 17px; line-height: 1.55; }
.fcard .acc { margin-top: 2px; padding-top: 8px; }
.occ { padding: 8px 0; border-top: 1px solid var(--hair); display: grid; gap: 3px; }
.occ:first-child { border-top: 0; }
.outcome-stack { margin: 6px 0 4px; }
.outcome-stack .stk, .outcome-stack .stk.strong { color: inherit; }
.seg-key i.o-done { background: var(--good-soft); border: 1px solid var(--good); }
.seg-key i.o-gaveup { background: var(--bad-soft); border: 1px solid var(--bad); }
.seg-key i.o-stopped { background: var(--warn-soft); border: 1px solid var(--warn); }
.top-finds { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 8px; }
.top-finds li { font-family: var(--serif); font-size: 15px; line-height: 1.55; }
.rd-q { font-style: italic; }
.rd-issue { padding: 10px 0 2px; border-top: 1px solid var(--hair); }
.rd-issue p { margin: 0 0 8px; }
.rd-issue-h { font-family: var(--sans) !important; font-weight: 400 !important; font-size: 15px !important; display: flex; align-items: center; gap: 6px; }
.dr-sess { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.dr-sess-top { display: flex; align-items: center; gap: 10px; }
.dr-task { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

/* a screenshot shown large */
.lightbox { position: fixed; inset: 0; z-index: 75; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(14, 12, 20, 0.88); color: #f3f2f5; }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 6px 20px; }
.lb-head p { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.lb-url { color: #b9b6c4; }
.lightbox .icon-btn { background: rgba(255, 255, 255, 0.1); border-color: transparent; color: #fff; box-shadow: none; }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox .icon-btn:disabled { opacity: 0.3; }
.lb-stage { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 0; padding: 6px 14px; }
.lb-frame { position: relative; max-width: min(1440px, calc(100vw - 132px)); }
.lb-frame img { display: block; max-width: 100%; max-height: calc(100vh - 210px); border-radius: 8px; background: #fff; }
.lb-box { position: absolute; border: 2px solid #ff5fa2; border-radius: 4px; pointer-events: none; }
.lb-box b { position: absolute; left: -2px; top: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 4px 0 4px 0; background: #ff5fa2; color: #fff; font-size: 12px; display: grid; place-items: center; }
.lb-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 3px var(--accent-ring); pointer-events: none; }
.lb-cap { padding: 8px 24px 16px; max-height: 26vh; overflow: auto; font-size: 14px; line-height: 1.55; }
.lb-cap ol { margin: 0 0 6px; padding-left: 20px; }
.lb-cap p { margin: 2px 0; }
.lb-act { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.lb-note { color: #a9a6b4; font-size: 12px; }

/* ------------------------------------------------------------------ smaller screens */
@media (max-width: 1280px) {
  .study.guide-on .sbody { grid-template-columns: minmax(0, 1fr); }
  .guide { position: absolute; right: 0; top: 0; bottom: 0; width: min(356px, 100%); z-index: 30; box-shadow: var(--shadow-pop); }
}
@media (max-width: 1100px) {
  .stab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .stab { padding: 0 12px; }
  .iv { grid-template-columns: 260px minmax(0, 1fr); }
  .rp { grid-template-columns: minmax(0, 1fr); }
  .rp-side { position: static; border-right: 0; border-bottom: 1px solid var(--hair); }
  .rp-outline { display: flex; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--hair); }
  .side-top { padding: 0; }
  .side-nav { display: flex; flex-wrap: wrap; }
  .side-sec { display: none; }
  .side-foot { margin: 0; border: 0; padding: 0; width: 100%; }
  .home { padding: 24px 16px 56px; }
  .home-head h1 { font-size: 28px; }
  .sbar { grid-template-columns: minmax(0, 1fr) auto; padding: 0 10px; gap: 8px; }
  .stabs { grid-column: 1 / -1; grid-row: 2; justify-content: center; padding-bottom: 8px; }
  .study { grid-template-rows: auto minmax(0, 1fr); }
  .sbar { height: auto; min-height: var(--bar-h); padding-top: 10px; row-gap: 6px; }
  .save-state { display: none; }
  .sbar-r .icon-btn.outline:not(:last-of-type) { display: none; }
  .iv { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .iv-side { border-right: 0; border-bottom: 1px solid var(--hair); max-height: 42vh; padding: 16px; }
  .iv-main { padding: 16px; }
  .transcript { padding: 22px 18px 28px; }
  .report-doc { padding: 30px 22px 36px; }
  .rp-main, .sum-wrap { padding: 16px; }
  .sum-doc { margin: 12px; padding: 18px; }
  .pt, .data { padding: 18px 16px 48px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .lp-row, .lp-axis { grid-template-columns: minmax(90px, 40%) minmax(0, 1fr) 44px; gap: 8px; }
  .tr-row { grid-template-columns: minmax(90px, 40%) minmax(0, 1fr) 34px; }
  .ready-pill { padding: 8px 18px 8px 10px; min-height: 56px; }
  .rp-text b { font-size: 14.5px; }
  .rp-text span { font-size: 12.5px; }
  .home-bar .search { width: 100%; }
}
@media (max-width: 760px) {
  .csv-btn .btn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .csv-btn { width: 36px; padding: 0; }
  .itabs { padding: 0 12px 0 16px; }
  .itab-list { gap: 18px; }
  .tr-head .small { width: 100%; }
}
@media (max-width: 560px) {
  .src { grid-template-columns: 1fr; }
  .attr { grid-template-columns: auto minmax(0, 1fr) auto; }
  .attr-tag { display: none; }
  .stack-head, .stack-row { grid-template-columns: 80px 48px 1fr; column-gap: 8px; }
  .sbar-r .primary { padding: 0 12px; }
  .sbar-l input.title-in { min-width: 60px; }
  span.credit-chip { width: 36px; padding: 0; justify-content: center; }
  span.credit-chip .cc-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {  /* browse */
  .step { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .step-shot { max-width: 440px; }
  .fd { padding: 18px 16px 48px; }
  .lb-frame { max-width: calc(100vw - 32px); }
  .lb-stage { padding: 6px; }
  .lb-nav { display: none; }
}
@media (max-width: 560px) { .src.three { grid-template-columns: 1fr; } .sus-n { font-size: 32px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ Sarvia workspace */
body { -webkit-font-smoothing: antialiased; }
::selection { background: #f1c6a9; color: #163528; }
button, .button, input[type="text"], input[type="number"], input[type="search"], textarea, select { border-radius: 7px; }
button, .button { min-height: 40px; }
.workspace-label { display: inline-flex; align-items: center; gap: 9px; font: 11px/1.5 "Courier New", monospace; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.brand-period { color: var(--coral); }
.shell { grid-template-columns: 360px minmax(0, 1fr); }
.side {
  --ink: #f6f0e4; --ink-2: #d5dfd6; --muted: #b7c8ba; --tab-ink: #b7c8ba;
  --surface: #234334; --surface-2: #2c503d; --fill: #2b4b38; --fill-2: #254632;
  --line: #47614d; --line-strong: #79907a; --hair: #3b5642; --accent-text: #f2b393; --accent-soft: #2c4c37;
  --focus: #ef946c;
  background: var(--forest); padding: 28px 16px 18px; border: 0; gap: 5px;
}
.side-top { padding: 0 4px 28px; }
.logo { gap: 7px; }
.logo-mark { width: 42px; height: 33px; object-fit: contain; background: transparent; border-radius: 0; }
.logo-word { font: 700 23px/1.1 var(--sans); letter-spacing: .055em; }
.logo-word small { display: block; font-size: 10px; font-weight: 400; letter-spacing: .04em; margin-top: 5px; color: var(--muted); }
.side-section-label { padding: 0 12px 8px; font-size: 10px; letter-spacing: .13em; }
.side-link { height: 44px; border-radius: 6px; padding: 0 12px; font-size: 15px; font-weight: 400; }
.side-link.on { background: #2b4d38; color: #fff; box-shadow: inset 3px 0 0 #ef7a45; }
.side-link.on .i { color: #efaa80; }
.side-sec { border-top: 1px solid var(--hair); padding-top: 22px; margin-top: 26px; }
.side-h { font-size: 10px; letter-spacing: .1em; }
.side-study { min-width: 0; min-height: 38px; font-size: 13px; color: #d0dcd1; }
.side-foot { padding-top: 18px; gap: 12px; }
.side .credit { border-color: #46614a; border-radius: 7px; background: #20402f; box-shadow: none; }
.side .credit.demo { color: var(--cream); background: #20402f; }
.side .credit.demo :is(.credit-h, .credit-sub) { color: #d2dfd0; }
.side .credit-bar { background: #46614a; }
.side .credit-bar > span { background: #efaa80; }
.side .side-foot-row > .muted { font-size: 11px; max-width: 140px; }
.home { width: 100%; max-width: 1500px; margin: 0 auto; padding: 44px clamp(24px, 3.6vw, 64px) 64px; }
.home-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.home-heading { max-width: 650px; }
.home-head h1 { font-size: clamp(34px, 3.2vw, 46px); font-weight: 600; letter-spacing: -.055em; margin: 16px 0 12px; }
.home-head p { font-size: 15.5px; line-height: 1.6; max-width: 570px; margin-bottom: 0; }
.home-head > .primary, .home-head > .file-btn > .primary { min-height: 46px; white-space: nowrap; padding: 0 20px; }
.workspace-overview { margin: 32px 0 36px; padding: 26px 28px; display: grid; grid-template-columns: minmax(220px, 1fr) repeat(3, 100px); gap: 22px; background: var(--cream-surface); border: 1px solid color-mix(in srgb, var(--line) 60%, var(--cream-surface)); border-left: 3px solid var(--coral); border-radius: 2px 10px 10px 2px; }
.workspace-overview:empty { display: none; }
.overview-intro { display: flex; flex-direction: column; justify-content: center; }
.overview-intro .workspace-label { color: var(--coral-text); font-size: 10px; }
.overview-intro p { margin: 10px 0 8px; font-size: 21px; font-weight: 500; line-height: 1.25; letter-spacing: -.025em; max-width: 300px; }
.overview-path { font-size: 12px; color: var(--muted); }
.overview-stat { display: flex; flex-direction: column; justify-content: center; gap: 3px; border-left: 1px solid var(--line); padding-left: 22px; }
.overview-stat .i { color: var(--muted); margin-bottom: 5px; }
.overview-stat b { font-size: 32px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.overview-stat > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.home-bar { justify-content: space-between; margin: 30px 0 18px; gap: 16px; }
.library-heading { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -.015em; }
.library-count { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; color: var(--muted); }
.library-count:empty { display: none; }
.home-bar .search { width: min(290px, 100%); }
.study-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.study-entry { display: grid; grid-template-columns: 42px minmax(0, 1.2fr) minmax(140px, .85fr) 148px; gap: 20px; padding: 22px 42px 22px 20px; align-items: center; border: 1px solid var(--line); border-radius: 9px; box-shadow: none; }
.study-entry:hover { border-color: var(--line-strong); background: var(--surface-3); box-shadow: none; }
.study-entry-mark { display: grid; place-items: center; align-self: start; width: 42px; height: 46px; margin-top: 5px; background: var(--cream-surface); border-radius: 6px; color: var(--coral-text); }
.study-entry-mark .i { width: 20px; height: 20px; }
.study-entry-main, .study-entry-preview, .study-entry-meta { min-width: 0; }
.study-entry .scard-top { padding: 0; gap: 8px; }
.study-entry .scard-top .tag { font-size: 10px; padding: 3px 7px; letter-spacing: .02em; }
.report-ready { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--good-ink); }
.study-entry h3 { font-family: var(--sans); font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.025em; margin: 9px 0 8px; overflow-wrap: anywhere; }
.study-open { color: var(--ink); text-decoration: none; }
.study-open::after { content: ""; position: absolute; inset: 0; border-radius: 9px; }
.study-open:focus-visible { outline: none; }
.study-open:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 3px; }
.study-open:hover { text-decoration: underline; text-underline-offset: 4px; }
.study-audience { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; margin: 3px 0 0; overflow-wrap: anywhere; }
.study-audience .i { margin-top: 2px; width: 13px; height: 13px; }
.study-entry-preview { padding: 4px 0 4px 20px; border-left: 1px solid var(--hair); }
.study-entry-preview .scard-lbl { font-size: 10px; color: var(--muted); margin-bottom: 8px; }
.study-entry-preview p { font-size: 13px; margin: 0 0 4px; color: var(--ink-2); }
.study-entry-meta { display: flex; flex-direction: column; gap: 5px; }
.study-entry-meta b { font-size: 13px; font-weight: 500; }
.study-entry-meta > .small { font-size: 11px; }
.study-next { display: inline-flex; gap: 9px; align-items: center; color: var(--accent-text); font-size: 12px; margin-top: 12px; }
.study-next .i { color: var(--coral); transition: transform .15s; }
.study-entry:hover .study-next .i { transform: translateX(3px); }
.study-entry .scard-more { right: 7px; top: 10px; width: 30px; min-width: 30px; z-index: 1; }
.home-body > .empty { border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface); min-height: 300px; }
.empty-ico { color: var(--coral-text); background: var(--cream-surface); border-radius: 12px; }
.empty h2 { letter-spacing: -.025em; font-weight: 600; }
.empty p { max-width: 480px; }
.study { height: 100dvh; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
.sbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 64px 48px; column-gap: 16px; padding: 0 24px; border-top: 3px solid var(--forest); border-bottom: 1px solid var(--line); }
.sbar-l { grid-column: 1; grid-row: 1; }
.sbar-r { grid-column: 2; grid-row: 1; }
.study-brand { object-fit: contain; flex: none; }
.sbar-l input.title-in { font-size: 17px; font-weight: 600; }
.stabs { grid-column: 1 / -1; grid-row: 2; gap: 24px; height: 48px; padding: 0 96px 0 0; border-top: 1px solid var(--hair); }
.stab { height: 48px; border-radius: 0; padding: 0 4px; font-size: 14px; background: transparent; border-bottom: 3px solid transparent; gap: 8px; }
.stab span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
.stab.on { background: transparent; border-bottom-color: var(--coral); color: var(--ink); }
.stab:hover { background: transparent; color: var(--accent-text); }
.stab .i { width: 16px; height: 16px; order: -1; }
.study.guide-on .sbody { grid-template-columns: minmax(0, 1fr) 312px; }
.guide { background: var(--surface-3); border-left: 1px solid var(--line); }
.guide-head { height: 65px; }
.guide-toggle { grid-column: 2; grid-row: 2; justify-self: end; z-index: 1; min-height: 36px; padding: 0 10px; }
.guide-toggle[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); }
.smain[data-tab="planner"] { overflow: hidden; }
.planner { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; }
.planner-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 30px 24px; }
.planner-heading .workspace-label { color: var(--coral-text); font-size: 10px; }
.planner-heading h1 { font-size: 31px; font-weight: 600; letter-spacing: -.04em; margin: 8px 0 8px; }
.planner-heading p { font-size: 13px; margin: 0; }
.planner-heading > button { flex: none; }
.planner-workspace { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 0; margin: 0 28px 24px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.world { position: static; display: flex; flex-direction: column; gap: 8px; padding: 22px 14px; background: var(--cream-surface); border-right: 1px solid var(--line); overflow: auto; }
.outline-heading { display: grid; gap: 6px; margin: 0 10px 12px; }
.outline-heading .workspace-label { font-size: 10px; color: var(--ink-2); }
.outline-heading .small { font-size: 11px; }
.node { position: relative; flex: none; width: 100%; display: flex; flex-direction: column; align-items: stretch; padding: 16px 12px; gap: 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; box-shadow: none; color: var(--ink); font-weight: 400; text-align: left; transition: border-color .15s, box-shadow .15s; }
.node:hover { border-color: var(--line-strong); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.node.open { background: var(--forest); border-color: var(--forest); color: var(--cream); box-shadow: inset 3px 0 var(--coral); }
.node-head { display: flex; gap: 10px; align-items: center; }
.node-head > .i { margin-left: auto; width: 13px; height: 13px; }
.node-number { font: 12px "Courier New", monospace; color: var(--coral-text); }
.node.open .node-number { color: #efaa80; }
.nt { min-width: 0; }
.nt b { font-size: 15px; font-weight: 600; display: block; }
.ns { font-size: 11px; color: var(--muted); display: block; margin-top: 4px; line-height: 1.3; }
.node.ready:not(.open) .ns { color: var(--good-ink); }
.node.warn:not(.open) .ns { color: var(--warn-ink); }
.node.open .ns { color: #c3d5c1; }
.node.open.warn .ns { color: #f0c188; }
.node-body { display: grid; gap: 3px; padding-left: 25px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.node-body > :nth-child(n+3) { display: none; }
.nb-lead { font-weight: 400; }
.nb-line { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.node.open .node-body { color: #c7d7c5; }
.outline-note { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; color: var(--muted); margin: auto 10px 0; padding-top: 24px; }
.outline-note .i { margin-top: 1px; width: 13px; height: 13px; }
.npanel { position: static; display: flex; flex-direction: column; min-height: 0; min-width: 0; width: auto; background: var(--surface); box-shadow: none; border: 0; }
.np-head { height: 66px; padding: 0 24px; gap: 10px; }
.np-head h2 { font-size: 21px; font-weight: 600; letter-spacing: -.025em; }
.np-ico { border: 0; border-radius: 5px; background: var(--cream-surface); width: 30px; height: 30px; }
.panel-counter { font: 10px "Courier New", monospace; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.np-body { padding: 24px 28px 32px; }
.np-inner { max-width: 760px; width: 100%; margin: 0 auto; gap: 24px; }
.np-footer { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 65px; padding: 12px 24px; border-top: 1px solid var(--hair); }
.np-footer > span { display: flex; gap: 6px; align-items: center; font-size: 11px; }
.np-footer button { font-size: 12px; }
.reach { box-shadow: none; background: var(--surface-3); border-radius: 8px; }
.reach-n, .aud-head h3 { font-family: var(--sans); font-weight: 500; letter-spacing: -.035em; }
.reach-n { font-size: 42px; }
.aud-head h3 { font-size: 23px; }
.src-opt, .attr, .q { border-radius: 8px; box-shadow: none; }
.planner-status:empty { display: none; }
.planner-status { border-top: 1px solid var(--line); }
.ready-pill { display: flex; width: 100%; padding: 12px 70px 12px 28px; min-height: 64px; border-radius: 0; box-shadow: none; color: var(--accent-ink); white-space: normal; }
.ready-pill.quiet { border: 0; box-shadow: none; background: var(--cream-surface); }
.rp-ico { width: 34px; height: 34px; border-radius: 6px; background: color-mix(in srgb, currentColor 12%, transparent); }
.rp-ico .i { width: 19px; height: 19px; }
.rp-text b { font-size: 14px; }
.rp-text span { font-size: 12px; }
.toast { color: var(--accent-ink); border-radius: 9px; }
.toast-ico { border-radius: 6px; }
.pill-on .toast { bottom: 88px; }
.itabs { border-bottom-color: var(--line); }
.itab.on { border-bottom-color: var(--coral); }
.transcript, .report-doc { border-radius: 8px; box-shadow: var(--shadow); border-top: 3px solid var(--coral); }
.pt-head h1, .fd-head h1 { font-weight: 600; letter-spacing: -.035em; }
.av3 { --av: #8b6746; }

@media (max-width: 1280px) {
  .study.guide-on .sbody { grid-template-columns: minmax(0, 1fr); }
  .guide { width: min(340px, 100%); }
  .home { padding: 32px 28px 56px; }
  .workspace-overview { grid-template-columns: minmax(160px, 1fr) repeat(3, 84px); padding: 22px; gap: 12px; }
  .overview-stat { padding-left: 16px; }
  .overview-intro p { font-size: 19px; }
  .study-entry { grid-template-columns: 36px minmax(0, 1fr) 136px; gap: 14px; }
  .study-entry-preview { grid-column: 2; grid-row: 2; padding: 0; border: 0; }
  .study-entry-meta { grid-column: 3; grid-row: 1 / 3; }
  .study-entry-mark { width: 36px; }
  .planner-workspace { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding: 16px 20px; display: grid; grid-template-columns: 1fr auto; gap: 16px; overflow: visible; }
  .side-top { padding: 0; }
  .side-section-label, .side-sec { display: none; }
  .side-nav { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .side-link { justify-content: center; font-size: 13px; gap: 6px; padding: 0 6px; }
  .side-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 0; border: 0; }
  .side-foot .credit { padding: 6px 10px; display: flex; gap: 10px; align-items: center; }
  .side-foot .credit-n { font-size: 16px; }
  .side-foot .credit-bar, .side-foot-row > .muted, .side-foot .status-box { display: none; }
  .side-foot .credit:not(.demo) .credit-sub { display: none; }
  .side-foot .credit-sub { font-size: 11px; }
  .side-foot .credit-slot { margin-right: auto; }
  .side-foot-row { min-height: 32px; flex: 1 1 220px; }
  .side-foot-row .icon-btn { min-height: 32px; width: 32px; }
  .home { padding: 28px 24px 48px; }
  .home-head h1 { font-size: 38px; }
  .home-bar .search { width: min(290px, 55%); }
  .sbar { grid-template-rows: auto 46px; padding: 8px 16px 0; gap: 6px 12px; min-height: 0; }
  .sbar-l { min-height: 42px; }
  .sbar-l input.title-in { font-size: 15px; }
  .stabs { justify-content: flex-start; gap: 22px; height: 46px; }
  .stab { height: 46px; min-height: 46px; }
  .sbar-r .credit-chip-slot { display: none; }
  .sbar-r { flex-wrap: wrap; }
  .sbar-r .icon-btn.outline:not(:last-of-type) { display: inline-flex; }
  .sbar-r .icon-btn.outline.duplicate-study { display: none; }
  .planner-heading { padding: 20px 22px; }
  .planner-workspace { margin: 0 20px 20px; grid-template-columns: 180px minmax(0, 1fr); }
  .world { padding: 18px 8px; }
  .node { padding: 14px 10px; }
  .node-head { gap: 7px; }
  .np-body { padding: 22px; }
  .np-footer { padding: 12px 18px; }
  .np-footer > span { max-width: 110px; }
}
@media (max-width: 650px) {
  .side { padding: 14px; gap: 12px; }
  .logo-word { font-size: 20px; }
  .logo-word small { font-size: 9px; }
  .logo-mark { width: 34px; height: 28px; }
  .side-link { min-height: 42px; font-size: 12px; gap: 5px; }
  .side-link .i { width: 15px; height: 15px; }
  .home { padding: 28px 18px 40px; }
  .home-head { flex-wrap: wrap; gap: 20px; }
  .home-head h1 { font-size: 36px; margin-top: 12px; }
  .home-head p { font-size: 14px; }
  .workspace-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 20px; gap: 20px 12px; margin: 26px 0; }
  .overview-intro { grid-column: 1 / -1; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
  .overview-intro p { max-width: none; }
  .overview-stat { padding-left: 0; border: 0; }
  .overview-stat .i { display: none; }
  .overview-stat b { font-size: 28px; }
  .overview-stat > span { font-size: 11px; }
  .home-bar { align-items: center; gap: 14px; }
  .home-bar .search { width: 100%; }
  .study-entry { grid-template-columns: 32px minmax(0, 1fr); padding: 18px 30px 18px 14px; gap: 12px; }
  .study-entry h3 { font-size: 19px; }
  .study-entry-mark { width: 32px; height: 38px; }
  .study-entry-meta { grid-column: 2; grid-row: 3; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
  .study-next { margin-top: 0; width: 100%; }
  .sbar { padding: 8px 10px 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .sbar-l { grid-column: 1; grid-row: 1; gap: 6px; }
  .sbar-r { grid-column: 1; grid-row: 2; justify-content: flex-end; padding-bottom: 4px; }
  .sbar-r .primary { margin-left: auto; min-height: 40px; }
  .stabs { grid-row: 3; justify-content: flex-start; gap: 18px; }
  .guide-toggle { grid-column: 1; grid-row: 3; font-size: 11px; gap: 4px; padding: 0 8px; }
  .stab { font-size: 12px; gap: 6px; }
  .stab .i { display: none; }
  .save-state { display: inline; font-size: 10px; }
  .sbar-l input.title-in { flex: 1; min-width: 40px; }
  .planner-heading { padding: 16px 16px 12px; gap: 12px; align-items: flex-start; }
  .planner-heading .workspace-label { font-size: 9px; }
  .planner-heading h1 { font-size: 25px; margin: 6px 0; }
  .planner-heading p { display: none; }
  .planner-heading > button { padding: 0 9px; font-size: 11px; min-height: 36px; }
  .planner-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); margin: 0 12px 12px; }
  .world { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 7px; gap: 4px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .outline-heading, .outline-note, .node-body, .node-head > .i { display: none; }
  .node { padding: 11px 4px; min-width: 0; align-items: center; }
  .node-head { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
  .node-number { font-size: 10px; }
  .nt b { font-size: 12px; }
  .ns { font-size: 9px; margin-top: 3px; }
  .node.open { box-shadow: inset 0 -3px var(--coral); }
  .np-head { height: 54px; padding: 0 16px; gap: 8px; }
  .np-head h2 { font-size: 19px; }
  .np-head .planner-back { min-height: 34px; width: 34px; padding: 0; }
  .planner-back > span { display: none; }
  .panel-counter { font-size: 9px; }
  .np-body { padding: 18px 16px 24px; }
  .np-inner { gap: 20px; }
  .np-footer { min-height: 58px; padding: 8px 12px; gap: 8px; }
  .np-footer > span { font-size: 10px; }
  .np-footer button { font-size: 11px; min-height: 40px; padding: 0 10px; }
  .ready-pill { padding: 10px 64px 10px 16px; min-height: 64px; gap: 9px; }
  .rp-text b { font-size: 12px; }
  .rp-text span { font-size: 10px; }
  .guide-fab { bottom: auto; right: 14px; }
}
@media (max-width: 360px) {
  .side .logo { gap: 4px; }
  .side .logo-word { font-size: 18px; }
  .side-link { padding: 0 4px; font-size: 11px; }
  .side-link .i { display: none; }
}
@media (prefers-reduced-motion: reduce) { .study-next .i { transition: none; } }

/* ------------------------------------------------------------------ filter the study library */
.home-bar.with-study-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.with-study-filter .library-heading { grid-column: 1 / -1; }
.study-type-filter { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(350px, 100%); padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--fill-2); }
.study-type-filter::before { content: ''; position: absolute; z-index: -1; inset: 4px auto 4px 4px; width: calc((100% - 8px) / 3); border-radius: 6px; background: var(--accent); transform: translateX(calc(var(--selected-type) * 100%)); transition: transform .18s ease; }
.study-type-option { position: relative; display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 8px; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; }
.study-type-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.study-type-option:hover { color: var(--ink); }
.study-type-option:has(input:checked) { color: var(--accent-ink); }
.study-type-option:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .study-type-filter::before { transition: none; }
}
@media (max-width: 1100px) {
  .home-bar.with-study-filter { grid-template-columns: minmax(0, 1fr); }
  .with-study-filter .study-type-filter, .home-bar.with-study-filter .search { width: 100%; }
}
@media (max-width: 360px) {
  .study-type-option { padding: 0 5px; font-size: 12px; }
}

/* ------------------------------------------------------------------ choose a study type */
.study-kind { color: var(--muted); font-size: 11px; line-height: 1.4; }
.study-type-dialog { width: min(920px, calc(100vw - 40px)); max-height: calc(100dvh - 40px); padding: 30px; border-radius: 18px; overflow-y: auto; overscroll-behavior: contain; }
.study-type-dialog::backdrop { background: rgb(10 30 20 / .48); backdrop-filter: blur(5px); }
body:has(.study-type-dialog[open]) { overflow: hidden; }
.study-type-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.study-type-header h2 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -.045em; line-height: 1.2; margin: 12px 0 8px; }
.study-type-header p { margin: 0; font-size: 14px; }
.study-type-close { flex: none; margin: -10px -10px 0 0; }
.study-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.study-type-card { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0; min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-align: left; background: var(--surface); box-shadow: none; }
.study-type-card:hover:not(:disabled), .study-type-card:focus-visible { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 1px var(--accent); }
.study-type-card:focus-visible { outline-offset: 4px; border-radius: 12px; }
.study-type-card:disabled { opacity: .65; }
.study-type-copy { display: flex; flex-direction: column; padding: 22px 22px 24px; flex: 1; }
.study-type-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.study-type-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-text); }
.type-browse .study-type-icon { background: var(--cream-surface); color: var(--coral-text); }
.study-type-icon .i { width: 22px; height: 22px; }
.study-type-arrow { color: var(--muted); transition: transform .15s; }
.study-type-card:hover:not(:disabled) .study-type-arrow { color: var(--accent-text); transform: translateX(3px); }
.study-type-title { display: block; font-size: 23px; font-weight: 600; letter-spacing: -.035em; line-height: 1.2; margin-bottom: 10px; }
.study-type-description { display: block; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.6; }
.study-preview { display: block; height: 258px; flex: none; border-top: 1px solid var(--hair); pointer-events: none; user-select: none; }
.survey-preview { padding: 22px; background: var(--accent-soft); }
.preview-survey-sheet { display: block; padding: 17px 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 5px 16px rgb(22 53 40 / .06); }
.preview-overline { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 500; }
.preview-example { margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 400; }
.preview-question { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; margin: 12px 0 14px; max-width: 235px; }
.preview-answers { display: grid; gap: 10px; }
.preview-answer-label { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--ink-2); margin-bottom: 5px; }
.preview-answer-label b { color: var(--ink); font-weight: 600; }
.preview-answer-track { display: block; height: 7px; background: var(--fill-2); border-radius: 2px; overflow: hidden; }
.preview-answer-fill { display: block; height: 100%; border-radius: inherit; background: var(--series); }
.preview-answer-fill.answer-1 { background: var(--c-web); }
.preview-answer-fill.answer-2 { background: var(--coral); }
.usability-preview { position: relative; padding: 22px 18px 0; background: var(--cream-surface); }
.preview-browser { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); box-shadow: 0 5px 16px rgb(22 53 40 / .06); }
.preview-browser-bar { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; background: var(--surface-2); border-bottom: 1px solid var(--hair); }
.preview-window-dots { display: flex; gap: 3px; }
.preview-window-dots i { width: 4px; height: 4px; background: var(--line-strong); border-radius: 50%; }
.preview-address { display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1; font-size: 8px; color: var(--muted); }
.preview-address .i { width: 9px; height: 9px; }
.preview-website { display: block; padding: 10px 14px 16px; }
.preview-site-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.preview-site-nav > b { font-size: 17px; font-weight: 600; letter-spacing: -.06em; }
.preview-nav-box { display: inline-flex; align-items: center; gap: 12px; position: relative; padding: 5px 8px; border: 1px dashed var(--c-web); border-radius: 3px; font-size: 8px; }
.preview-nav-box .i { width: 10px; height: 10px; }
.preview-box-number { position: absolute; display: grid; place-items: center; left: -6px; top: -7px; width: 13px; height: 13px; border-radius: 3px; color: var(--surface); background: var(--c-web); font-size: 8px; font-weight: 600; }
.preview-site-content { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; }
.preview-site-copy { display: block; padding-top: 1px; }
.preview-site-heading { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; margin-bottom: 9px; }
.preview-copy-line { display: block; width: 90%; max-width: 112px; height: 3px; background: var(--line); margin-bottom: 4px; border-radius: 2px; }
.preview-copy-line.short { width: 60%; }
.preview-cta-box { display: inline-block; position: relative; margin-top: 7px; padding: 4px; border: 1.5px solid var(--coral-text); border-radius: 3px; }
.preview-cta-box .preview-box-number { background: var(--coral-text); }
.preview-site-cta { display: flex; align-items: center; gap: 5px; padding: 6px; background: var(--accent); color: var(--accent-ink); border-radius: 2px; font-size: 8px; }
.preview-site-cta .i { width: 10px; height: 10px; }
.preview-click-dot { position: absolute; right: 9px; bottom: 6px; width: 13px; height: 13px; background: rgb(224 97 46 / .3); border: 1px solid var(--coral); border-radius: 50%; }
.preview-pointer { position: absolute; width: 18px; height: 18px; right: -1px; bottom: -4px; color: var(--ink); fill: var(--surface); }
.preview-product { position: relative; display: block; min-width: 0; height: 112px; border-radius: 45% 45% 4px 4px; overflow: hidden; background: var(--cream-surface); }
.preview-vase { position: absolute; bottom: 12px; display: block; border-radius: 35% 35% 28% 28%; box-shadow: inset -7px 0 12px rgb(40 40 15 / .12), 4px 4px 5px rgb(40 40 15 / .06); }
.vase-back { height: 65px; width: 42px; background: #a4ad91; left: 20%; }
.vase-front { height: 46px; width: 37px; background: #d6ab88; right: 15%; }
.preview-vase::before { content: ''; position: absolute; height: 6px; top: -1px; left: 20%; width: 60%; border-radius: 50%; background: rgb(40 40 15 / .18); }
.preview-session-note { display: flex; align-items: center; gap: 9px; position: absolute; bottom: 13px; left: 30px; right: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 3px 9px rgb(22 53 40 / .08); color: var(--ink-2); font-size: 10px; line-height: 1.45; }
.preview-note-number { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 5px; background: var(--cream-surface); color: var(--coral-text); font-weight: 600; }
.preview-session-note b { display: block; color: var(--ink); font-size: 9px; margin-bottom: 2px; }
.study-type-unavailable, .study-type-progress, .study-type-error { margin: 18px 0 0; }
@media (max-width: 640px) {
  .study-type-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 20px; border-radius: 14px; }
  .study-type-header { margin-bottom: 22px; }
  .study-type-header h2 { font-size: 26px; }
  .study-type-header .workspace-label { font-size: 10px; }
  .study-type-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .study-type-title { font-size: 22px; }
  .study-type-copy { padding: 18px; }
  .study-type-top { margin-bottom: 14px; }
  .survey-preview { padding: 20px 16px; }
  .usability-preview { padding: 20px 12px 0; }
  .preview-survey-sheet { padding: 16px; }
  .preview-session-note { left: 20px; right: 8px; }
}
@media (max-width: 360px) {
  .study-type-dialog { padding: 16px; }
  .study-type-copy { padding: 16px; }
  .preview-site-heading { font-size: 17px; }
  .preview-website { padding-left: 10px; padding-right: 10px; }
  .preview-nav-box { gap: 9px; }
  .preview-session-note { padding: 8px; gap: 6px; font-size: 9px; }
}

/* ------------------------------------------------------------------ printing the report ("Download Report") */
@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff; }
  body * { visibility: hidden; }
  .report-doc, .report-doc * { visibility: visible; }
  .report-doc { position: absolute; left: 0; top: 0; width: 100%; max-width: none; border: 0; box-shadow: none; padding: 0; margin: 0; color: #000; background: #fff; }
  .report-doc .kicker, .rd-item::before { color: #444; }
  .study, .sbody, .smain, .insights, .icontent, .rp, .rp-main { display: block !important; position: static !important; overflow: visible !important; height: auto !important; min-height: 0 !important; }
  .sbar, .itabs, .rp-side, .guide, .guide-toggle { display: none !important; }
  .toast, .tip, .pop, .drawer, .drawer-back, .lightbox { display: none !important; }
}
