/* Receipt. The look of the workspace: tokens, then the shell, then the shared parts, then the chat and the views.
   Cool neutrals, one blue accent, colour for meaning. Each side of the project has its own colour, so who said a
   quote shows at a glance: RELEX blue, Acme orange, Meridian purple. A word always stands next to a colour. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/inter-latin-400.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: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/inter-latin-600.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: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/inter-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/inter-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --bg: #F5F7FA; --panel: #FFFFFF; --sidebar: #EDF1F6; --sunken: #F2F5F9;
  --hover: rgba(15, 30, 60, 0.055); --press: rgba(15, 30, 60, 0.1);
  --text: #0F1728; --text-2: #445066; --text-3: #5F6B80; --line: #E2E7EF; --line-2: #CFD6E1; --edge: #7B8698;
  --primary: #2563EB; --primary-hover: #1D55D6; --primary-soft: #E7EFFF; --primary-ink: #1B4FC4; --on-primary: #FFFFFF;
  --green: #12703A; --green-soft: #E2F4E9; --amber: #A55A05; --amber-soft: #FDF0D9;
  --red: #C0342C; --red-soft: #FCE9E8; --violet: #4F46E5; --violet-soft: #ECEBFD; --grey: #5F6B80; --grey-soft: #EBEFF5;
  --mark: #FFE58A; --mark-ink: #1A1A1A;
  --relex: #1D55D6; --relex-soft: #E1EBFE; --acme: #A8490E; --acme-soft: #FDE9DB;
  --meridian: #8B46C8; --meridian-soft: #F2E8FB; --nobody: #5F6B80; --nobody-soft: #E9EDF3;
  --shadow-1: 0 1px 2px rgba(15, 30, 60, 0.06);
  --shadow-2: 0 1px 2px rgba(15, 30, 60, 0.05), 0 6px 20px rgba(15, 30, 60, 0.07);
  --shadow-3: 0 18px 50px rgba(15, 30, 60, 0.18), 0 2px 8px rgba(15, 30, 60, 0.08);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Charter, "Source Serif Pro", Georgia, serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --r-s: 8px; --r-m: 12px; --r-l: 16px; --r-xl: 22px;
  --fast: 140ms; --mid: 220ms; --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C111B; --panel: #131A26; --sidebar: #0A0E17; --sunken: #111724;
  --hover: rgba(255, 255, 255, 0.06); --press: rgba(255, 255, 255, 0.1);
  --text: #E8EDF5; --text-2: #AEB8C8; --text-3: #7A8599; --line: #223047; --line-2: #31405A; --edge: #637086;
  --primary: #5B9BFF; --primary-hover: #74ABFF; --primary-soft: #15284A; --primary-ink: #A3C6FF; --on-primary: #06101F;
  --green: #5AD68A; --green-soft: #12291F; --amber: #F2B64C; --amber-soft: #2D2311;
  --red: #F7837B; --red-soft: #321A1C; --violet: #9A97FA; --violet-soft: #1F1D45; --grey: #A0AABB; --grey-soft: #1E2636;
  --mark: #6B5412; --mark-ink: #FFF3C4;
  --relex: #6EA6FF; --relex-soft: #152A4D; --acme: #FF9A5C; --acme-soft: #3A2415;
  --meridian: #C28BF5; --meridian-soft: #2B1C40; --nobody: #A0AABB; --nobody-soft: #1F2737;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-2: 0 6px 20px rgba(0, 0, 0, 0.35); --shadow-3: 0 18px 50px rgba(0, 0, 0, 0.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0C111B; --panel: #131A26; --sidebar: #0A0E17; --sunken: #111724;
    --hover: rgba(255, 255, 255, 0.06); --press: rgba(255, 255, 255, 0.1);
    --text: #E8EDF5; --text-2: #AEB8C8; --text-3: #7A8599; --line: #223047; --line-2: #31405A; --edge: #637086;
    --primary: #5B9BFF; --primary-hover: #74ABFF; --primary-soft: #15284A; --primary-ink: #A3C6FF; --on-primary: #06101F;
    --green: #5AD68A; --green-soft: #12291F; --amber: #F2B64C; --amber-soft: #2D2311;
    --red: #F7837B; --red-soft: #321A1C; --violet: #9A97FA; --violet-soft: #1F1D45; --grey: #A0AABB; --grey-soft: #1E2636;
    --mark: #6B5412; --mark-ink: #FFF3C4;
    --relex: #6EA6FF; --relex-soft: #152A4D; --acme: #FF9A5C; --acme-soft: #3A2415;
    --meridian: #C28BF5; --meridian-soft: #2B1C40; --nobody: #A0AABB; --nobody-soft: #1F2737;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-2: 0 6px 20px rgba(0, 0, 0, 0.35); --shadow-3: 0 18px 50px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* a class that sets display must never show what is hidden */
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.55 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11" 1, "ss03" 1; text-rendering: optimizeLegibility; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary-ink); text-decoration: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary-soft); }
h1, h2, h3 { color: var(--text); letter-spacing: -0.015em; }
h1 { font-size: 26px; line-height: 1.25; font-weight: 600; margin: 0; }
h2 { font-size: 17px; line-height: 1.35; font-weight: 600; margin: 28px 0 12px; }
h3 { font-size: 15px; line-height: 1.4; font-weight: 600; margin: 18px 0 6px; }
p { margin: 0 0 10px; }
.tabular { font-variant-numeric: tabular-nums; }
.quiet { color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.card .quiet, .panel .quiet, .list .quiet, .claim .quiet, .sheet .quiet, dialog .quiet, .menu .quiet, .receipt .quiet,
.composer .quiet, .passage .quiet, .login form .quiet, .person-card .quiet, .tour-card .quiet, .sidebar .quiet,
.decision-strip .quiet, .changes .quiet, .callout .quiet, .item .quiet, .claim-marks .quiet { color: var(--text-3); }
.second { color: var(--text-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 15px; height: 15px; }
svg.i.l { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ the shell */

.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); height: 100dvh; }
.app.with-panel { grid-template-columns: 272px minmax(0, 1fr) 400px; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding: 12px 10px 10px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18), 0 1px 2px rgba(30, 80, 220, 0.3); }
.logo svg.i { width: 17px; height: 17px; stroke-width: 2; }
.logo.big { width: 48px; height: 48px; border-radius: 14px; }
.logo.big svg.i { width: 26px; height: 26px; }
/* the mark alive, on the login and the welcome only: no tile, the arms in the text colour around a breathing core */
.logo.alive { width: 72px; height: 72px; border-radius: 0; background: none; box-shadow: none; color: var(--text); }
.logo.alive svg.i { width: 72px; height: 72px; stroke-width: 1.8; overflow: visible; }
.logo.alive .dust { fill: currentColor; stroke: none; animation: drift 3.6s ease-in-out infinite; }
.logo.alive .core { fill: var(--primary); stroke: none; transform-box: fill-box; transform-origin: center; animation: breath 3.6s ease-in-out infinite; }
@keyframes breath { 50% { transform: scale(1.16); } }
@keyframes drift { 50% { opacity: 0.08; } }
.workspace { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin-bottom: 12px; border-radius: var(--r-m);
  border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow-1); text-align: left; color: var(--text); cursor: default; }
.workspace.can-switch { cursor: pointer; }
.workspace.can-switch:hover { border-color: var(--line-2); }
.workspace .mono { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 600; font-size: 15px;
  background: var(--acme-soft); color: var(--acme); flex: none; }
.workspace .name { font-weight: 600; font-size: 14px; line-height: 1.25; }
.workspace .sub { color: var(--text-3); font-size: 12px; line-height: 1.3; }
.newchat { display: flex; align-items: center; justify-content: center; gap: 8px; height: 38px; margin: 0 0 12px; border-radius: 10px; border: 0;
  background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 14px; text-decoration: none;
  box-shadow: 0 1px 2px rgba(30, 80, 220, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14); transition: background var(--fast), transform var(--fast); }
.newchat:hover { background: var(--primary-hover); }
.newchat:active { transform: scale(0.98); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 9px; color: var(--text-2); font-size: 14px;
  transition: background var(--fast), color var(--fast); }
.nav a svg.i { color: var(--text-3); transition: color var(--fast); }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a:active { background: var(--press); }
.nav a[aria-current="page"] { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow-1); }
.nav a[aria-current="page"] svg.i { color: var(--primary); }
.badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 20px;
  text-align: center; background: var(--amber-soft); color: var(--amber); font-variant-numeric: tabular-nums; }
.recents { display: flex; flex-direction: column; min-height: 0; flex: 1; margin-top: 16px; }
.recents .head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 6px 10px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.recents .find { position: relative; margin: 0 0 6px; }
.recents .find svg.i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.recents .find input { width: 100%; height: 32px; padding: 0 10px 0 32px; border-radius: 9px; border: 1px solid var(--edge); background: var(--panel); font-size: 13px; }
.recents .find input:focus { border-color: var(--primary); background: var(--panel); box-shadow: 0 0 0 3px var(--primary-soft); }
.recents .chat-days { overflow-y: auto; flex: 1; min-height: 0; }
.recents ul { list-style: none; margin: 0; padding: 0; }
.recents li a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; line-height: 1.35; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; transition: background var(--fast), color var(--fast); }
.recents li { position: relative; }
.recents li a { padding-right: 30px; }
.recents li a:hover { background: var(--hover); color: var(--text); }
.recents .more-chat { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: 0; border-radius: 7px;
  background: none; color: var(--text-3); display: grid; place-items: center; opacity: 0; transition: opacity var(--fast), background var(--fast); }
.recents li:hover .more-chat, .recents .more-chat:focus-visible { opacity: 1; }
.recents .more-chat:hover { background: var(--press); color: var(--text); }
@media (hover: none) { .recents .more-chat { opacity: 1; } }
.recents li a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.recents .none { padding: 6px 10px; color: var(--text-3); font-size: 13px; }
.me { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.nav + .me { margin-top: auto; }  /* the administrator has no recents to push it down */
.me button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: 10px; border: 0; background: none; text-align: left;
  transition: background var(--fast); }
.me button:hover { background: var(--hover); }
.me .who { flex: 1; min-width: 0; }
.me .who b { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { color: var(--text-3); font-size: 12px; }
.me button:hover .who span { color: var(--text-2); }

.main { display: grid; grid-template-rows: 52px minmax(0, 1fr); min-width: 0; min-height: 0; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 6px; padding: 0 12px 0 20px; min-width: 0; }
.topbar .title { flex: 1; min-width: 0; margin: 0; font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .title.for-view { visibility: hidden; }
.content { overflow-y: auto; min-height: 0; scrollbar-gutter: stable; overscroll-behavior-y: none; }
.content:focus { outline: none; }  /* focused only so a screen reader starts in the new view */
.column { max-width: 780px; margin: 0 auto; padding: 4px 28px 40px; }
.column.wide { max-width: 1000px; }
.column.chat-fill { display: flex; flex-direction: column; min-height: calc(100dvh - 52px); padding-bottom: 12px; }
.column.chat-fill > .chat { flex: 1; min-height: 0; }
.menu-button, .drawer-close { display: none !important; }
.brand .drawer-close { margin: -4px -4px -4px auto; }

.panel { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.panel header { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.panel header .doc { width: 32px; height: 32px; border-radius: 9px; background: var(--sunken); color: var(--text-2); display: grid; place-items: center; flex: none; }
.panel header .what { flex: 1; min-width: 0; }
.panel header .what h2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-weight: 600; font-size: 14px; line-height: 1.3; }
.panel header .what span { color: var(--text-3); font-size: 12px; }
.panel header .on-phone { display: none; }
.panel .body { overflow-y: auto; padding: 12px 12px 24px; flex: 1; }
.scrim { display: none; }

@media (min-width: 768px) and (max-width: 1199px) {  /* the side panel lies over the content */
  .app.with-panel { grid-template-columns: 272px minmax(0, 1fr); }
  .panel { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; z-index: 30; box-shadow: var(--shadow-3); border-left: 0; }
}
@media (max-width: 767px) {  /* one column: the sidebar is a drawer, the side panel a full screen sheet */
  .app, .app.with-panel { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(304px, 86vw); z-index: 40; transform: translateX(-100%); visibility: hidden;
    transition: transform var(--mid) var(--ease), visibility 0s var(--mid); padding-top: max(12px, env(safe-area-inset-top)); border-right: 0; }
  .app.drawer-open .sidebar { transform: none; visibility: visible; transition: transform var(--mid) var(--ease); box-shadow: var(--shadow-3); }  /* closed, it leaves the Tab order */
  .app.drawer-open .scrim, .app.with-panel .scrim { display: block; position: fixed; inset: 0; background: rgba(12, 10, 24, 0.4); z-index: 25; }
  .menu-button, .drawer-close { display: inline-flex !important; }
  .topbar { padding-left: 6px; }
  .topbar .title.for-view { visibility: visible; }
  .column { padding: 4px 16px 32px; }
  .panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 88dvh; z-index: 30; border-left: 0; border-radius: 16px 16px 0 0;
    box-shadow: var(--shadow-3); padding: 0 0 env(safe-area-inset-bottom); }
  .panel header { padding-left: 6px; }
  .panel header .on-phone { display: inline-flex; }
  .panel header .off-phone { display: none; }
}

/* ------------------------------------------------------------------ shared parts */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px; white-space: nowrap;
  border: 1px solid var(--edge); background: var(--panel); color: var(--text); font-size: 13.5px; box-shadow: var(--shadow-1); text-decoration: none;
  transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast), box-shadow var(--fast); }
.btn:hover { background: var(--sunken); }
.btn:active { transform: scale(0.98); }
.btn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.statement-actions { margin-top: 10px; }
.statement-actions form { width: 100%; max-width: 420px; margin-top: 8px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600;
  box-shadow: 0 1px 2px rgba(30, 80, 220, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn.danger:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.icon { width: 34px; padding: 0; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.small.icon { width: 28px; padding: 0; }
.btn.wide { width: 100%; height: 40px; }
.btn.link { border: 0; background: none; box-shadow: none; padding: 0; height: auto; color: var(--primary-ink); font-weight: 600; }
.btn.link:hover { text-decoration: underline; background: none; }
.btn:disabled, .btn.primary:disabled, .btn.danger:disabled { opacity: 1; background: var(--sunken); border-color: var(--edge); color: var(--text-3);
  box-shadow: none; cursor: default; transform: none; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="date"], select, textarea.field {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--edge); background: var(--panel); color: var(--text); font-size: 14px;
  transition: border-color var(--fast), box-shadow var(--fast); }
textarea.field { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea.field:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
label.field { display: block; margin: 0 0 14px; }
label.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.error { color: var(--red); font-size: 13px; margin: 8px 0 0; }
.search { position: relative; }
.search svg.i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.search input { padding-left: 34px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap; background: var(--grey-soft); color: var(--grey); line-height: 1; flex: none; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.pill.plain::before { display: none; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.pill.blue { background: var(--primary-soft); color: var(--primary-ink); }
.tone-green { color: var(--green); } .tone-amber { color: var(--amber); } .tone-red { color: var(--red); }
.tone-violet, .tone-blue { color: var(--violet); } .tone-grey { color: var(--grey); }
.tint-green { background: var(--green-soft); } .tint-amber { background: var(--amber-soft); } .tint-red { background: var(--red-soft); }
.tint-violet, .tint-blue { background: var(--violet-soft); } .tint-grey { background: var(--grey-soft); }

.avatar { --c: var(--nobody); --c-soft: var(--nobody-soft); width: 28px; height: 28px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  background: var(--c-soft); color: var(--c); font-size: 11px; font-weight: 600; letter-spacing: 0.01em; }
.avatar.s { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.l { width: 34px; height: 34px; font-size: 12.5px; }
.avatar.relex { --c: var(--relex); --c-soft: var(--relex-soft); }
.avatar.acme { --c: var(--acme); --c-soft: var(--acme-soft); }
.avatar.meridian { --c: var(--meridian); --c-soft: var(--meridian-soft); }
.avatar svg.i { width: 14px; height: 14px; }
.org { font-weight: 600; }
.org.relex { color: var(--relex); } .org.acme { color: var(--acme); } .org.meridian { color: var(--meridian); }
.stack { display: inline-flex; }
.stack .avatar { box-shadow: 0 0 0 2px var(--panel); }
.stack .avatar + .avatar { margin-left: -6px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-1); }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-m); background: var(--violet-soft); color: var(--text); font-size: 13.5px; line-height: 1.5; }
.callout svg.i { color: var(--violet); margin-top: 2px; width: 16px; height: 16px; }
.callout.amber { background: var(--amber-soft); } .callout.amber svg.i { color: var(--amber); }
.callout.red { background: var(--red-soft); } .callout.red svg.i { color: var(--red); }
.callout.green { background: var(--green-soft); } .callout.green svg.i { color: var(--green); }
.callout p { margin: 0; }

.skeleton { display: grid; gap: 14px; padding: 12px 0; }
.skeleton i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--sunken) 25%, var(--line) 37%, var(--sunken) 63%);
  background-size: 400% 100%; animation: sheen 1.4s ease infinite; }
@keyframes sheen { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.state { text-align: center; padding: 56px 16px; color: var(--text-2); }
.state .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--sunken); color: var(--text-3); display: inline-grid; place-items: center; margin-bottom: 12px; }
.state p { margin: 0 auto 4px; max-width: 420px; }
.state .btn { margin-top: 14px; }

.menu { position: fixed; z-index: 50; min-width: 220px; max-width: 320px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow-3); animation: pop var(--fast) var(--ease); overflow-y: auto; overscroll-behavior: contain; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; background: none; border-radius: 8px;
  color: var(--text); font-size: 13.5px; text-align: left; transition: background var(--fast); }
.menu button:hover, .menu button:focus-visible { background: var(--hover); outline: none; }
.menu button svg.i { color: var(--text-3); width: 16px; height: 16px; }
.menu button .txt { flex: 1; min-width: 0; }
.menu button .sub { display: block; color: var(--text-3); font-size: 12px; line-height: 1.35; }
.menu button .aside { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.menu button .tick { color: var(--primary); }
.menu button.danger, .menu button.danger svg.i { color: var(--red); }
.menu .head { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); letter-spacing: 0.02em; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(0.98); } }
dialog.sheet { border: 0; border-radius: var(--r-l); background: var(--panel); color: var(--text); padding: 22px; width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px); box-shadow: var(--shadow-3); animation: pop var(--mid) var(--ease); }
dialog.sheet::backdrop { background: rgba(12, 10, 24, 0.42); backdrop-filter: blur(2px); }
dialog.sheet h2 { margin: 0 0 14px; font-size: 18px; }
dialog.sheet textarea { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--edge); background: var(--panel);
  color: var(--text); font-size: 14px; line-height: 1.5; resize: vertical; }
dialog.sheet .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.person-card { position: fixed; z-index: 55; width: 258px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-m); box-shadow: var(--shadow-3); pointer-events: none; animation: pop var(--fast) var(--ease); }
.person-card .top { display: flex; gap: 10px; align-items: center; }
.person-card .top b { display: block; font-size: 14px; font-weight: 600; }
.person-card .facts { display: flex; gap: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.person-card .facts b { display: block; font-size: 15px; font-weight: 600; }
.person-card .facts span { color: var(--text-3); font-size: 11.5px; }
[data-person] { cursor: default; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 72; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 999px; background: #111A2B; color: #EEF3FB; box-shadow: var(--shadow-3); font-size: 13.5px; animation: rise var(--mid) var(--ease); }
.toast svg.i { width: 16px; height: 16px; color: #8DB8FF; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ------------------------------------------------------------------ login */

.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--primary-soft), transparent 60%), var(--bg); }
.login form { width: min(380px, 100%); padding: 32px 28px 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-2); }
.login .logo { margin: 0 0 18px; }
.login .wordmark { font-weight: 600; font-size: 20px; letter-spacing: 0.02em; margin: 0 0 4px; }
.login .tagline { color: var(--text-3); font-size: 13px; margin: 0 0 22px; }
.login h1 { font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: -0.01em; margin: 0 0 6px; }
.login p { color: var(--text-3); margin: 0 0 22px; font-size: 14px; }
.login p.error { color: var(--red); margin: 10px 0 0; }  /* a refused login reads as an error, not as the grey lines above it */
.login .btn { margin-top: 6px; }

/* ------------------------------------------------------------------ the open demo's start page */

.start { min-height: 100dvh; padding: 48px 16px 40px; background: radial-gradient(1200px 600px at 50% -10%, var(--primary-soft), transparent 60%), var(--bg); }
.start-inner { width: min(920px, 100%); margin: 0 auto; }
.start-head { text-align: center; }
.start-head .logo { margin: 0 auto 14px; }
.start .wordmark { font-weight: 600; font-size: 20px; letter-spacing: 0.02em; margin: 0; }
.start-lede { color: var(--text-2); font-size: 16px; line-height: 1.5; max-width: 560px; margin: 8px auto 0; }
.start-error { text-align: center; }
.start-tour { display: flex; height: 46px; margin: 28px auto 8px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.start-note { text-align: center; margin: 0 auto 8px; max-width: 520px; }
.start-project { margin-top: 26px; }
.start-project-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 10px; }
.start-project-head h2 { margin: 0; font-size: 17px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.role-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--panel);
  color: var(--text); text-align: left; box-shadow: var(--shadow-1); transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast); }
.role-card:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.role-card:active { transform: none; }
.role-card:disabled { opacity: 0.6; }
.role-card b { font-size: 14px; font-weight: 600; }
.role-card span { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.start-password { display: block; width: fit-content; margin: 32px auto 0; }

/* ------------------------------------------------------------------ the guided tour */

.tour-hole { position: fixed; z-index: 70; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 100vmax rgba(5, 10, 20, 0.5);
  outline: 2px solid var(--primary); transition: left var(--mid) var(--ease), top var(--mid) var(--ease), width var(--mid) var(--ease), height var(--mid) var(--ease); }
.tour-hole.none { outline: 0; }
.tour-card { position: fixed; z-index: 71; width: min(380px, calc(100vw - 16px)); padding: 14px 16px 12px; border-radius: var(--r-l); background: var(--panel);
  border: 1px solid var(--line); box-shadow: var(--shadow-3); overflow: hidden auto; max-height: calc(100dvh - 16px); animation: pop var(--mid) var(--ease); }
.tour-card.sheet { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; }
.tour-card.sheet.top { top: max(8px, env(safe-area-inset-top)); bottom: auto; }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tour-chapter { font-size: 12px; font-weight: 600; color: var(--primary-ink); }
.tour-x { width: 26px; height: 26px; border: 0; border-radius: 7px; background: none; color: var(--text-3); display: grid; place-items: center; }
.tour-x:hover { background: var(--hover); color: var(--text); }
.tour-text { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--text); }
.tour-why-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--text-3); font-size: 12.5px; }
.tour-why-toggle:hover { color: var(--text); }
.tour-why-toggle svg.i { width: 14px; height: 14px; transition: transform var(--fast); }
.tour-why-toggle[aria-expanded="true"] svg.chev { transform: rotate(180deg); }
.tour-why { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.tour-agent { margin: 4px 0 8px; padding: 10px 12px; border-radius: var(--r-m); background: var(--sunken); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.tour-agent p { margin: 6px 0 0; }
.tour-actions { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.tour-actions .grow { flex: 1; }
.tour-wait { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.tour-ok { color: var(--green); font-weight: 600; }
.tour-ok svg.i { width: 15px; height: 15px; }
.tour-progress { height: 3px; margin: 12px -16px -12px; background: var(--line); }
.tour-progress i { display: block; height: 100%; background: var(--primary); transition: width var(--mid) var(--ease); }

/* ------------------------------------------------------------------ the chat */

.chat { display: flex; flex-direction: column; min-height: 100%; }
.chat:not(.empty) { flex: 1; min-height: 0; }
.chat .thread { flex: 1; display: flex; flex-direction: column; gap: 30px; padding: 20px 0 28px; }
.chat:not(.empty) .thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.chat.empty { justify-content: center; padding-bottom: 8vh; }
.chat.empty .thread { flex: 0; padding: 0; overflow: visible; }
.hello { text-align: center; margin: 0 0 26px; }
.hello .logo { margin: 0 auto 18px; }
.hello h1 { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 8px; }
.hello p { color: var(--text-2); font-size: 15px; margin: 0; }
.suggest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.suggest button { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-m); border: 1px solid var(--edge); background: var(--panel);
  color: var(--text-2); font-size: 13.5px; line-height: 1.45; text-align: left; box-shadow: var(--shadow-1);
  transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast), color var(--fast); }
.suggest button:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); color: var(--text); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.suggest button .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.suggest button .ic svg.i { width: 15px; height: 15px; }
.suggest.loading button { color: transparent; }

.exchange { display: flex; flex-direction: column; gap: 16px; }
.stamp { display: block; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.you-stamp { align-self: flex-end; margin-top: -10px; }
.reply > .stamp { margin-top: 10px; }
.recents .when { padding: 12px 10px 4px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.recents section:first-child .when { padding-top: 4px; }
.assist { padding: 16px 18px; margin-bottom: 22px; }
.assist .section-title { margin: 0 0 4px; }
.assist-thread { display: flex; flex-direction: column; gap: 14px; margin: 12px 0; }
.assist-thread:empty { display: none; }
.assist-reply { display: flex; flex-direction: column; gap: 10px; max-width: 92%; }
.assist-reply > p { margin: 0; line-height: 1.5; }
.assist-wait { display: flex; align-items: center; gap: 8px; margin: 0; }
.assist-form { display: flex; gap: 10px; align-items: flex-end; }
.assist-form textarea { flex: 1; resize: vertical; min-height: 44px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--r-m);
  background: var(--panel); color: var(--text); font: inherit; }
.assist-form textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.assist-plan { padding: 12px 14px; }
.assist-fields { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 14px; }
.assist-fields dt { color: var(--text-3); }
.assist-fields dd { margin: 0; color: var(--text); }
@media (max-width: 640px) { .assist-fields { grid-template-columns: 1fr; } .assist-fields dd { margin-bottom: 6px; } }
.you { align-self: flex-end; max-width: 82%; padding: 10px 16px; border-radius: 20px 20px 6px 20px; background: var(--primary-soft); color: var(--text);
  font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply { min-width: 0; }
.read-as { display: flex; gap: 7px; align-items: flex-start; margin: 0 0 12px; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.read-as svg.i { width: 15px; height: 15px; margin-top: 2px; }
.read-as b { color: var(--text-2); font-weight: 600; }
.working { padding: 4px 0; }
.step-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.step-item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; line-height: 1.4; color: var(--text-2); transition: color var(--fast); }
.step-item.current { color: var(--text); }
.step-item.current .step-txt { background: linear-gradient(90deg, var(--text-3) 0%, var(--text) 45%, var(--text-3) 90%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: glide 1.8s linear infinite; }
.step-item.done { color: var(--text-2); }
.step-ic { width: 18px; height: 18px; display: grid; place-items: center; flex: none; color: var(--green); }
.step-item.current .step-ic { color: var(--primary); }
.step-item.current .step-ic .spinner { width: 14px; height: 14px; }
.step-sec { margin-left: auto; }
.step-fold { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 0; border: 0; background: none; color: var(--text-2); font-size: 13px; text-align: left; }
.step-fold:hover { color: var(--text); }
.step-fold .step-summary { font-weight: 600; color: var(--text); }
.step-fold > svg.i:first-child { color: var(--green); }
.step-fold:not([hidden]) + .step-list { margin: 2px 0 6px; }
.step-fold[aria-expanded="true"] svg.chev { transform: rotate(180deg); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--primary-soft); border-top-color: var(--primary); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glide { from { background-position: 110% 0; } to { background-position: -110% 0; } }
.stale { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stale .btn { margin-left: auto; }

.answer .verdict { font-family: var(--serif); font-size: 21px; line-height: 1.5; color: var(--text); margin: 0 0 20px; letter-spacing: -0.005em; overflow-wrap: anywhere; }
/* an answer that rests on no record: set plainer, so it never reads like one that does */
.answer.plain .verdict { font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--text-2); }
.answer.plain .plain-label { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.claims { display: flex; flex-direction: column; gap: 16px; }
.claim-row { display: block; width: 100%; padding: 12px 14px; border: 1px solid var(--edge); border-radius: var(--r-m); background: var(--panel);
  color: inherit; font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow-1);
  transition: border-color var(--fast), box-shadow var(--fast), background var(--fast); }
.claim-row:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--edge)); box-shadow: var(--shadow-2); }
.claim-row:active { background: var(--sunken); }
.claim-row[aria-expanded="true"] { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow-1); }
.claim-row-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; }
/* beside a long word such as Reported, not confirmed, a narrow card would squeeze the sentence, so it moves below instead */
.claim-sentence { flex: 1 1 240px; min-width: 0; font-size: 15.5px; line-height: 1.55; overflow-wrap: anywhere; }
.claim-row-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 12px; }
.state-mark { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12px; margin-top: 2px; }
.state-mark svg.i { width: 14px; height: 14px; }
.claim-lead { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere; }
.claim-lead em { font-family: var(--serif); font-style: italic; color: var(--text); }
.claim.open .claim-lead { display: none; }
.claim.gone .claim-sentence { color: var(--text-3); }
.claim-changes { display: inline-flex; align-items: center; gap: 4px; }
.claim-changes svg.i { width: 13px; height: 13px; }
/* how a topic changed: words on a line, oldest first. Rows are text, not controls, so they take no hover */
.changes { margin-top: 10px; }
.changes-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; width: 100%; padding: 9px 12px; border: 1px solid var(--edge);
  border-radius: var(--r-m); background: var(--panel); color: var(--text-2); font-size: 13px; text-align: left; box-shadow: var(--shadow-1);
  transition: border-color var(--fast), color var(--fast); }
.changes-toggle:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--edge)); color: var(--text); }
.changes-toggle svg.i { width: 15px; height: 15px; color: var(--text-3); }
.changes-toggle .changes-title { font-weight: 600; color: var(--text); }
.changes-toggle svg.chev { margin-left: auto; transition: transform var(--fast); }
.changes-toggle[aria-expanded="true"] svg.chev { transform: rotate(180deg); }
.changes-line { font-size: 12.5px; }
.changes-body { padding: 14px 12px 4px; background: var(--panel); border-radius: var(--r-m); min-width: 0; }
.changes-body .timeline { margin-top: 0; }
.changes .btn { margin-left: 26px; }
.answer-actions { display: flex; gap: 6px; margin-top: 18px; opacity: 0; transition: opacity var(--fast); }
.answer:hover .answer-actions, .answer:focus-within .answer-actions { opacity: 1; }
.ghost-action { border-color: transparent; background: none; box-shadow: none; color: var(--text-3); }
.ghost-action:hover { background: var(--hover); color: var(--text); border-color: var(--line); }
.receipts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
/* Keep the absolute screen-reader label inside its card, so long chats cannot extend the outer document. */
.receipt { --c: var(--nobody); position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) 18px; gap: 11px; align-items: start; width: 100%; padding: 11px 12px;
  border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: var(--r-m); background: var(--panel); color: var(--text); text-align: left;
  box-shadow: var(--shadow-1); transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast); }
.receipt.relex { --c: var(--relex); } .receipt.acme { --c: var(--acme); } .receipt.meridian { --c: var(--meridian); }
.receipt:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.receipt:active { transform: none; }
.receipt .q { font-family: var(--serif); font-size: 15.5px; line-height: 1.5; overflow-wrap: anywhere; }
.receipt .by { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 5px; color: var(--text-3); font-size: 12.5px; line-height: 1.4; }
.receipt .by b { color: var(--text); font-weight: 600; }
.receipt .by .dot::before { content: "·"; }
.receipt .by svg.i { width: 13px; height: 13px; }
.receipt .note { display: block; margin-top: 4px; color: var(--amber); font-size: 12px; }
.receipt .go { color: var(--text-3); opacity: 0; transition: opacity var(--fast); margin-top: 3px; }
.receipt:hover .go, .receipt:focus-visible .go { opacity: 1; }
.receipt.unmatched { border-left-style: dashed; }
@media (hover: none) { .receipt .go { opacity: 0.7; } }
.more { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; height: 30px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--edge);
  background: var(--panel); color: var(--text-2); font-size: 12.5px; transition: border-color var(--fast), color var(--fast); }
.more:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--edge)); color: var(--text); }
.more .stack .avatar { box-shadow: 0 0 0 2px var(--panel); }
/* each dot is centred on the line, so it reaches 4px left of the list: the margin keeps it from being clipped */
.timeline { list-style: none; margin: 10px 0 0 5px; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 12px 12px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel);
  border: 2px solid var(--line-2); }
.timeline li.now::before { border-color: var(--primary); background: var(--primary); }
.timeline li .when { display: block; color: var(--text-3); font-size: 12px; }
.timeline li .what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.timeline li.this { color: var(--text); font-weight: 600; }
.timeline li.this::before { border-color: var(--primary); background: var(--primary); }
.notes { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.followups { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--edge); background: var(--panel);
  color: var(--text-2); font-size: 13.5px; line-height: 1.35; text-align: left; transition: border-color var(--fast), background var(--fast), color var(--fast); }
.chip svg.i { width: 15px; height: 15px; color: var(--text-3); }
.chip:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--edge)); background: var(--primary-soft); color: var(--primary-ink); }
.chip:hover svg.i { color: var(--primary); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 16px; color: var(--text-2); font-size: 12.5px; }
.meta > span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg.i { width: 14px; height: 14px; }
.meta .ok { color: var(--green); }
.meta button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 6px; margin-left: -6px; border-radius: 6px; color: var(--text-2); font-size: 12.5px; }
.meta button:hover { background: var(--hover); color: var(--text); }
.meta button[aria-expanded="true"] svg.i { transform: rotate(180deg); }
.details { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 16px; margin-top: 10px; padding: 14px 16px; border-radius: var(--r-m);
  background: var(--sunken); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.details dt { color: var(--text-3); }
.details dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }

.composer-wrap { position: sticky; bottom: 0; padding: 12px 0 18px; background: linear-gradient(to bottom, transparent, var(--bg) 26px); z-index: 2; }
.chat:not(.empty) .composer-wrap { position: static; margin-top: auto; flex: none; padding-bottom: 18px; }
.chat.empty .composer-wrap { position: static; padding: 0; background: none; }
.composer { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-xl); box-shadow: var(--shadow-2);
  transition: border-color var(--fast), box-shadow var(--fast); }
.composer:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft), var(--shadow-2); }
.composer textarea { display: block; width: 100%; min-height: 54px; max-height: 240px; padding: 14px 18px 4px; border: 0; background: transparent; resize: none; outline: none;
  font-size: 15px; line-height: 1.5; color: var(--text); }
.composer textarea::placeholder { color: var(--text-3); }
.composer .bar { display: flex; align-items: center; gap: 2px; padding: 6px 8px 8px 10px; }
.composer .bar .grow { flex: 1; }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--text-2);
  font-size: 13px; transition: background var(--fast), color var(--fast); }
.tool:hover { background: var(--hover); color: var(--text); }
.tool.icon { width: 32px; padding: 0; justify-content: center; }
.tool svg.i { width: 17px; height: 17px; }
.tool .chev { width: 14px; height: 14px; color: var(--text-3); }
.send { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); margin-left: 4px;
  transition: background var(--fast), transform var(--fast), opacity var(--fast); }
.send svg.i { width: 18px; height: 18px; stroke-width: 2.2; }
.send:hover:not(:disabled) { background: var(--primary-hover); transform: scale(1.05); }
.send.stop { background: var(--text); color: var(--panel); }
.send.stop:hover:not(:disabled) { background: var(--text-2); }
.send:disabled { background: var(--sunken); color: var(--text-3); cursor: default; }
.focus-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 0; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 3px 0 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-ink);
  font-size: 12.5px; font-weight: 600; }
.fchip svg.i { width: 13px; height: 13px; }
.fchip button { width: 20px; height: 20px; border-radius: 50%; border: 0; background: none; color: inherit; display: inline-grid; place-items: center; opacity: 0.7; }
.fchip button:hover { opacity: 1; background: var(--hover); }
.pick { max-height: 52dvh; overflow-y: auto; margin: 12px -8px 0; }
.pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 10px;
  text-align: left; transition: background var(--fast); }
.pick button:hover { background: var(--hover); }
.pick button b { font-weight: 600; font-size: 14px; }
.pick button span { color: var(--text-3); font-size: 12.5px; line-height: 1.4; }

/* the passage beside the answer */
.passage .turn { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px 8px; border-radius: 10px; }
.passage .turn + .turn { margin-top: 2px; }
.passage .turn.focus { background: var(--primary-soft); }
.passage .who { font-size: 12.5px; color: var(--text-3); line-height: 1.4; margin-bottom: 2px; }
.passage .turn.focus .who { color: var(--text-2); }
.passage .who b { color: var(--text); font-weight: 600; }
.passage .said { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
mark { background: var(--mark); color: var(--mark-ink); border-radius: 3px; padding: 0 2px; }

/* ------------------------------------------------------------------ the views */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 22px 0 20px; }
.page-head p { margin: 5px 0 0; color: var(--text-2); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 24px; }
.stat { padding: 14px 16px; }
.stat .n { font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.stat .l small { display: block; color: var(--text-3); font-size: 11.5px; margin-top: 2px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.toolbar .search { flex: 1 1 220px; }
.seg { display: inline-flex; max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 3px; gap: 2px; background: var(--sunken); border: 1px solid var(--line); border-radius: 10px; }
.seg button:focus-visible { outline-offset: -2px; }  /* on a phone the row scrolls inside itself rather than the page sideways */
.seg button { height: 28px; padding: 0 11px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font-size: 13px; white-space: nowrap;
  transition: background var(--fast), color var(--fast); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow-1); }
.seg button:active { background: var(--press); }
.across-note { margin: 12px 0 16px; }
.across-row { align-items: center; }
.across-row .end { min-width: 7.5rem; }
.across-names { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; }
.across-name { height: 28px; padding: 0 8px; border: 0; border-radius: 7px; background: none; color: var(--primary-ink); font-size: 13px; font-weight: 600; }
.across-name:hover { background: var(--hover); }
.across-name:active { background: var(--press); }
.across-name[aria-current="page"] { background: var(--primary-soft); }
.across-others { display: block; margin-top: 6px; color: var(--text-2); font-size: 13px; }
.across-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.across-toggle button { height: 32px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 8px; background: var(--panel);
  color: var(--text); font-size: 13px; font-weight: 600; }
.across-toggle button:hover { background: var(--hover); }
.across-toggle button:active { background: var(--press); }
.across-toggle button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.across-toggle .quiet { margin: 0; }
.drop { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 12px; border-radius: 9px; border: 1px solid var(--edge); background: var(--panel);
  color: var(--text-2); font-size: 13px; box-shadow: var(--shadow-1); transition: border-color var(--fast), color var(--fast); }
.drop:hover { color: var(--text); border-color: var(--text-3); }
.drop.set { border-color: color-mix(in srgb, var(--primary) 45%, var(--edge)); background: var(--primary-soft); color: var(--primary-ink); }
.drop svg.i { width: 14px; height: 14px; }
.list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-1); overflow: hidden; }
.row { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: none;
  text-align: left; color: var(--text); transition: background var(--fast); }
.list > .row:last-child, .list > .item:last-child .row { border-bottom: 0; }
/* a list clips what overflows it, so a focused row draws its ring inside itself. The same for Recents and the topic picker */
.row:focus-visible, .recents li a:focus-visible, .pick button:focus-visible { outline-offset: -2px; }
button.row:hover, a.row:hover { background: var(--sunken); }
button.row:active { background: var(--press); }
button.row[aria-expanded="true"] { background: var(--sunken); }
.row .chev { transition: transform var(--fast); }
.row[aria-expanded="true"] .chev { transform: rotate(180deg); }
.settings-move { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 1px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.settings-move svg.i { width: 13px; height: 13px; color: var(--text-3); }
.row .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.row .ic svg.i { width: 17px; height: 17px; }
.row .body { flex: 1; min-width: 0; }
.row .t { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.row .s { color: var(--text-2); font-size: 13.5px; line-height: 1.5; margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .f { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; color: var(--text-3); font-size: 12.5px; }
.row .f > span { display: inline-flex; align-items: center; gap: 4px; }
.row .f svg.i { width: 13px; height: 13px; }
.row .end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.row.role-wait { align-items: center; }
.row.role-wait .end { flex-direction: row; align-items: center; }
.item .open { padding: 4px 16px 18px 62px; border-bottom: 1px solid var(--line); background: var(--sunken); }
.item .open .receipts { margin-top: 12px; }
.item .open h2, .item .open h3 { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); }
.setting-choice, .setting-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.setting-confirm p { margin: 0; }
.setting-choice .btn, .setting-confirm .btn { max-width: 100%; white-space: normal; height: auto; min-height: 34px; padding: 7px 14px; text-align: start; }
.setting-choice .btn[aria-pressed="true"], .setting-confirm .btn[aria-pressed="true"] {
  border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.more-rows { display: flex; justify-content: center; padding: 14px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.section-title h2 { margin: 0; }
.section-title a, .section-title button { font-size: 13px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.briefing-grid { margin-top: 18px; }
/* two columns need room: below 960 wide, or beside an open passage, they stack */
@media (max-width: 959px) { .column .grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1200px) and (max-width: 1399px) { .app.with-panel .briefing-grid { grid-template-columns: minmax(0, 1fr); } }
.done-head { display: flex; gap: 14px; align-items: flex-start; }
.done-head .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--green) 12%, transparent); }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }
.bar-line { height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.bar-line i { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.receipt-paper { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; padding: 22px 22px 26px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px 6px 0 0; box-shadow: var(--shadow-2); position: relative; margin-bottom: 14px;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 10px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 10px repeat-x; }
.receipt-paper h3 { font-family: var(--sans); margin: 0 0 12px; text-align: center; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.receipt-paper .line { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dashed var(--line-2); padding: 3px 0; }
.receipt-paper .line span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.receipt-paper .stamp { display: inline-block; margin-top: 14px; padding: 4px 10px; border: 2px solid var(--green); color: var(--green); border-radius: 6px;
  font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; transform: rotate(-3deg); }
.receipt-paper .stamp.amber { border-color: var(--amber); color: var(--amber); }
.wizard { list-style: none; display: flex; gap: 6px; margin: 0 0 24px; padding: 0; }
.wizard li { flex: 1; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--text-3); min-width: 0; }
.wizard li::before { content: ""; height: 4px; border-radius: 2px; background: var(--line); transition: background var(--mid); }
.wizard li.done::before, .wizard li.now::before { background: var(--primary); }
.wizard li.done { color: var(--text-2); }
.wizard li.now { color: var(--text); font-weight: 600; }
.wizard li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.choice button { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r-m); border: 1.5px solid var(--edge); background: var(--panel);
  text-align: left; transition: border-color var(--fast), background var(--fast); }
.choice button:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--edge)); }
.choice button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.choice button b { font-weight: 600; font-size: 14px; }
.choice button span { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.dropzone { display: grid; place-items: center; gap: 6px; padding: 26px 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r-m); background: var(--sunken);
  color: var(--text-2); text-align: center; transition: border-color var(--fast), background var(--fast); }
.dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone svg.i { width: 24px; height: 24px; color: var(--text-3); }
.stepper { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stepper li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-3); }
.stepper li .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.stepper li.done { color: var(--text); } .stepper li.done .dot { border-color: var(--green); background: var(--green); color: #fff; }
.stepper li.done .dot svg.i { width: 12px; height: 12px; stroke-width: 3; }
.stepper li.now { color: var(--text); font-weight: 600; } .stepper li.now .dot { border-color: var(--primary); border-top-color: transparent; animation: spin 0.8s linear infinite; }

.row .mono { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; font-weight: 600; font-size: 15px;
  background: var(--sunken); color: var(--text); }

@media (max-width: 767px) {
  .suggest { grid-template-columns: minmax(0, 1fr); }
  .hello h1 { font-size: 30px; }
  .answer-actions { opacity: 1; }
  .details { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .details dd { margin-bottom: 8px; }
  .grid2, .choice { grid-template-columns: minmax(0, 1fr); }
  .item .open { padding-left: 16px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .wizard li:not(.now) span { display: none; }
  .kv dd { margin-bottom: 8px; }
}
@media (pointer: coarse) { .btn, .tool, .nav a, .seg button, .drop, .across-name, .across-toggle button { min-height: 40px; } .send { width: 40px; height: 40px; } .strip-dot, .mark-btn { min-height: 44px; min-width: 44px; } }

.claim { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.claim-row { order: 1; } .claim-marks { order: 2; } .claim-more { order: 3; min-width: 0; }
.status-word { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-size: 12px; font-weight: 600; }
.status-word svg.i { width: 14px; height: 14px; color: var(--text); }
.status-word.alarm { background: var(--red-soft); border-radius: 999px; padding: 1px 8px 1px 4px; }
.status-word.alarm svg.i { color: var(--red); }
.claim-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; padding: 8px 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-m); color: var(--text); }
.mark-newer { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.mark-newer svg.i { width: 15px; height: 15px; }
.mark-part { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.mark-btn { border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; font-size: 13px; padding: 4px 8px; border-radius: 8px; }
.mark-btn:hover { background: var(--hover); }
.mark-btn:active { background: var(--press); }
.mark-btn[aria-expanded="true"] { background: var(--primary-soft); }
.mark-quotes { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.decision-strip { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 14px 8px; margin: 0 0 12px; min-width: 0; max-width: 100%; }
.strip-value { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.strip-now { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.strip-was { margin: 2px 0 12px; }
.strip-scroll { overflow-x: auto; max-width: 100%; }
.strip-board { display: grid; column-gap: 0; row-gap: 12px; width: max-content; min-width: 100%; }
.strip-line { height: 2px; margin-top: 11px; background: var(--text-2); align-self: start; z-index: 0; pointer-events: none; }
.strip-lane-name { align-self: start; padding: 4px 10px 0 0; font-size: 12px; font-weight: 600; color: var(--text); }
.strip-dot { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 96px; padding: 4px 4px 8px; border: 0; background: transparent; border-radius: 8px;
  min-height: 28px; color: var(--text); position: relative; z-index: 1; }
.strip-dot.current { color: var(--primary); }
.strip-dot:hover { background: var(--hover); }
.strip-dot:active { background: var(--press); }
.strip-dot[aria-current="true"] { box-shadow: 0 0 0 3px var(--primary-soft); }
.strip-mark { width: 16px; height: 16px; display: block; }
.strip-cap { display: flex; flex-direction: column; align-items: center; max-width: 96px; color: var(--text); font-size: 12px; line-height: 1.3; text-align: center; }
.struck { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--text-2); }
a.replaced-on:hover { text-decoration: underline; }
a.replaced-on:active { color: var(--primary); }
.changes, .claim-marks, .decision-strip { min-width: 0; max-width: 100%; }

.answer-map { position: relative; margin-top: 12px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); min-width: 0; max-width: 100%; }
.answer-map .quiet { color: var(--text-3); }
.answer-map-board { position: relative; min-width: 0; }
.answer-map-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.answer-map-cols { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.answer-map-col, .answer-map-nodes { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.answer-map-col-name { margin: 0; font-size: 12px; font-weight: 600; color: var(--text); }
.map-node { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--edge);
  border-radius: 8px; background: var(--panel); color: var(--text); font-size: 12.5px; line-height: 1.35; text-align: left; }
.map-node:hover { background: var(--hover); }
.map-node:active { background: var(--press); }
.map-node.on { background: var(--primary-soft); border-color: var(--primary); }
.map-node.on:hover { background: var(--primary-soft); }
.map-node.on:active { background: var(--press); }
.map-num { font-weight: 600; }
.map-title { display: flex; align-items: flex-start; gap: 4px; min-width: 0; max-width: 100%; }
.map-title span { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.map-title svg.i { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.map-link { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-linecap: round; }
.answer-map.lit .map-node.dim { color: var(--text-2); }
.answer-map.lit .map-link.dim { stroke: var(--text-3); }
.answer-map.lit .map-link.on { stroke: var(--primary); stroke-width: 2.25; opacity: 1; }
@media (max-width: 767px) { .answer-map-cols { gap: 8px; } .map-node { padding: 5px 6px; font-size: 12px; } }
@media (pointer: coarse) { .map-node { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* The owner's ids only read log uses the shared light and dark tokens and control states. */
.read-log { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.read-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.read-filters input, .read-filters select { width: 100%; min-width: 0; }
.read-field { margin-bottom: 14px; }
.read-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.read-filters input:hover, .read-filters select:hover { border-color: var(--primary); }
.read-filters input:active, .read-filters select:active { background: var(--primary-soft); }
.read-row { align-items: start; }
.read-row .body { overflow-wrap: anywhere; }
.read-log form, .read-log [aria-live] { margin-bottom: 16px; }
@media (max-width: 560px) { .read-row { flex-wrap: wrap; } }

.path { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; margin: 0 0 12px; min-width: 0; max-width: 100%; }
.path h2 { margin: 0 0 8px; font-size: 14px; }
.path-unset { margin: 0 0 10px; font-size: 13px; }
.path-unset a { font-weight: 600; }
.path-unset a:hover { text-decoration: underline; }
.path-unset a:active { color: var(--primary); }
.path-frame { position: relative; min-width: 0; max-width: 100%; }
.path-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.path-lines line { stroke: var(--edge); stroke-width: 1.5; stroke-linecap: round; }
.path-board { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 8.75rem) repeat(var(--path-cols, 1), minmax(0, 1fr));
  gap: 14px 12px; align-items: start; min-width: 0; max-width: 100%; }
.path-col, .path-row { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; line-height: 1.3; }
.path-col { color: var(--text); }
.path-row { color: var(--text-2); padding-top: 8px; }
.path-cell { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.path-step-wrap { min-width: 0; }
.path-step { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-width: 0; padding: 8px 10px;
  border: 1px solid var(--edge); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; line-height: 1.35; text-align: left; }
.path-step:hover { background: var(--hover); }
.path-step:active { background: var(--press); }
.path-step[aria-expanded="true"] { border-color: var(--primary); background: var(--primary-soft); }
.path-step[aria-expanded="true"]:hover { background: var(--primary-soft); }
.path-step.quiet { color: var(--text-2); }
.path-num, .path-verb { font-weight: 600; }
.path-company, .path-tier, .path-role, .path-name, .path-date { overflow-wrap: anywhere; max-width: 100%; }
.path-replaced { display: inline-block; margin-top: 4px; color: var(--text-2); font-size: 12px; }
.path-replaced:hover { text-decoration: underline; }
.path-replaced:active { color: var(--primary); }
.path-quote { margin-top: 12px; }
.path-list { display: none; }
.role-tiers { margin-top: 22px; padding-top: 8px; min-width: 0; max-width: 100%; }
.role-tiers h2 { margin: 0 0 6px; font-size: 16px; }
.role-tiers > p { margin: 0 0 12px; color: var(--text-2); }
.tier-row { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 8px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.tier-who { min-width: 0; overflow-wrap: anywhere; }
.tier-who b { display: block; font-weight: 600; }
.tier-who span { color: var(--text-2); font-size: 13px; }
.tier-choices { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tier-choices button { max-width: 100%; min-height: 32px; padding: 6px 10px; border: 1px solid var(--edge); border-radius: 8px; background: var(--panel);
  color: var(--text); font: inherit; font-size: 13px; text-align: left; white-space: normal; }
.tier-choices button:hover { background: var(--hover); }
.tier-choices button:active { background: var(--press); }
.tier-choices button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.tier-choices button:disabled { background: var(--sunken); color: var(--text-3); }
@media (max-width: 767px) {
  .path-frame { display: none; }
  .path-list { display: flex; flex-direction: column; gap: 8px; }
  .tier-row { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse) { .path-step, .tier-choices button { min-height: 44px; } }
