/* Livra — design system: tokens (light and dark), type, the app shell, controls and components.
   Neutral greys, Inter, one green accent for primary actions, links, selection and focus. */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/public/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("/public/fonts/inter-latin-wght-normal.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-display: swap; font-weight: 100 900; src: url("/public/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"), url("/public/fonts/inter-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* accent */
  --green: #15803d; --green-deep: #166534; --accent-ring: rgba(21, 128, 61, .22); --accent-text: #15803d;
  --blue: #2563eb; --amber: #d97706; --red: #dc2626;
  /* surfaces */
  --bg: #ffffff; --page: #fafafa; --side: #f7f7f8; --card: #ffffff; --subtle: #f4f4f5; --hover: #f1f1f3; --active: #e9e9ec;
  --border: #e4e4e7; --border-subtle: #ececef; --input: #d4d4d8;
  /* text */
  --text: #18181b; --text-2: #3f3f46; --text-3: #71717a;
  /* states */
  --ok-bg: #f0fdf4; --ok-fg: #166534; --ok-border: #bbf7d0;
  --info-bg: #eff6ff; --info-fg: #1e40af; --info-border: #bfdbfe;
  --warn-bg: #fffbeb; --warn-fg: #92400e; --warn-border: #fcd34d;
  --bad-bg: #fef2f2; --bad-fg: #b91c1c; --bad-border: #fecaca;
  --soft: #f0fdf4;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04); --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06); --shadow-xl: 0 16px 48px rgba(0,0,0,.16), 0 2px 6px rgba(0,0,0,.08);
  --radius: 8px; --radius-lg: 12px;
  --h-control: 36px; --h-control-sm: 30px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --glass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[data-theme="dark"] {
  --green: #16a34a; --green-deep: #15803d; --accent-ring: rgba(34, 197, 94, .3); --accent-text: #4ade80;
  --bg: #111113; --page: #141416; --side: #18181b; --card: #1b1b1e; --subtle: #232327; --hover: #26262a; --active: #2e2e33;
  --border: #2c2c31; --border-subtle: #242428; --input: #3f3f46;
  --text: #fafafa; --text-2: #d4d4d8; --text-3: #a1a1aa;
  --ok-bg: #0f2418; --ok-fg: #86efac; --ok-border: #166534; --info-bg: #111c33; --info-fg: #93c5fd; --info-border: #1e3a8a;
  --warn-bg: #2a1f0b; --warn-fg: #fcd34d; --warn-border: #92400e; --bad-bg: #2c1212; --bad-fg: #fca5a5; --bad-border: #7f1d1d; --soft: #0f2418;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 4px 16px rgba(0,0,0,.5); --shadow-xl: 0 16px 48px rgba(0,0,0,.6);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --glass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --green: #16a34a; --green-deep: #15803d; --accent-ring: rgba(34, 197, 94, .3); --accent-text: #4ade80;
    --bg: #111113; --page: #141416; --side: #18181b; --card: #1b1b1e; --subtle: #232327; --hover: #26262a; --active: #2e2e33;
    --border: #2c2c31; --border-subtle: #242428; --input: #3f3f46;
    --text: #fafafa; --text-2: #d4d4d8; --text-3: #a1a1aa;
    --ok-bg: #0f2418; --ok-fg: #86efac; --ok-border: #166534; --info-bg: #111c33; --info-fg: #93c5fd; --info-border: #1e3a8a;
    --warn-bg: #2a1f0b; --warn-fg: #fcd34d; --warn-border: #92400e; --bad-bg: #2c1212; --bad-fg: #fca5a5; --bad-border: #7f1d1d; --soft: #0f2418;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 4px 16px rgba(0,0,0,.5); --shadow-xl: 0 16px 48px rgba(0,0,0,.6);
    --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    --glass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

/* ── base ─────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: var(--accent-text); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: 22px; font-weight: 650; } h2 { font-size: 15px; font-weight: 600; } h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
b, strong { font-weight: 600; }
code, pre, .mono { font-family: var(--mono); font-size: .92em; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-ring); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-3); } .small { font-size: 13px; } .xs { font-size: 12px; }
.ellipsis { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; }
.break { overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 4px 0; }

/* thin, quiet scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--input) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--input); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ── app shell: sidebar · content (page bar, page, pinned Claude) ── */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: clip; transition: grid-template-columns .18s ease; }
/* only the page scrolls: a link to #section must not scroll the window or the sidebar (overflow: clip can't be scrolled) */
html:has(body > .app), body:has(> .app) { overflow: clip; }
body[data-side="collapsed"] .app { grid-template-columns: 0 minmax(0, 1fr); }
body[data-side="collapsed"] .side { visibility: hidden; }
.side { position: relative; min-width: 0; min-height: 0; background: var(--side); border-right: 1px solid var(--border); overflow: clip; }
.content { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); overflow: clip; }
.pagebar { flex: none; height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--border-subtle); background: var(--bg); }
.pagebar .crumb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); }
.pagebar .crumb b { color: var(--text); font-weight: 600; }
.pagebar [data-action="side-open"] { display: none; }
body[data-side="collapsed"] .pagebar [data-action="side-open"] { display: inline-flex; }
.workarea { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
body[data-panel="pinned"] .workarea { grid-template-columns: minmax(0, 1fr) 400px; }
.main { position: relative; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 28px max(32px, calc((100% - 1160px) / 2)) 56px; container-type: inline-size; }
.main > *, .main [id] { scroll-margin-top: 20px; }
.main > * { flex-shrink: 0; }
.main.wide { padding-inline: max(32px, calc((100% - 1480px) / 2)); }
.side-scrim { display: none; }
@media (max-width: 1200px) { body[data-panel="pinned"] .workarea { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .app, body[data-side] .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 80; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .2s ease; visibility: hidden; box-shadow: var(--shadow-xl); }
  body[data-drawer="open"] .side { transform: none; visibility: visible; }
  body[data-drawer="open"] .side-scrim { display: block; position: fixed; inset: 0; z-index: 79; background: rgba(0,0,0,.35); }
  .pagebar [data-action="side-open"] { display: inline-flex; }
  .side [data-action="side-collapse"] { display: none; }
  .side [data-mobile-only] { display: inline-flex !important; }
  .side .nav-item, .side .recent > a { height: 40px; }   /* easier to tap in the drawer */
  .main, .main.wide { padding: 20px 16px 48px; }
}

/* ── type helpers and layout ───────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.stack { display: flex; flex-direction: column; gap: 12px; } .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } .grid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@container (max-width: 1000px) { .grid4, .grid5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3 { grid-template-columns: 1fr; } }
@container (max-width: 640px) { .grid2, .grid4, .grid5 { grid-template-columns: 1fr; } }

/* ── cards ─────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card.pad { padding: 20px 24px; }
.card .head { padding: 14px 24px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 56px; }
.card > h2:first-child, .card .head h2 { font-size: 15px; }
@container (max-width: 640px) { .card.pad { padding: 16px; } .card .head { padding: 12px 16px; } }

/* ── buttons ───────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--h-control); padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--input); background: var(--card); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; line-height: 1; text-decoration: none !important; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--hover); color: var(--text); }
.btn:active { background: var(--active); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); border-color: var(--green); border-radius: var(--radius); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; } .btn.primary:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.btn.soft { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-fg); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; } .btn.danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; } .btn.ghost:hover { background: var(--hover); }
.btn.sm { height: var(--h-control-sm); padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.icon { width: var(--h-control); padding: 0; } .btn.sm.icon { width: var(--h-control-sm); }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn[aria-disabled="true"] { pointer-events: none; }
.btn svg { flex: none; }

/* ── badges, chips, notes ──────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--subtle); color: var(--text-2); border: 1px solid var(--border); }
.badge.green, .badge.ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-border); } .badge.blue { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-border); }
.badge.yellow, .badge.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-border); } .badge.red, .badge.bad { background: var(--bad-bg); color: var(--bad-fg); border-color: var(--bad-border); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; background: var(--subtle); border: 1px solid var(--border); font-size: 13px; max-width: 100%; }
.note { padding: 12px 14px; border-radius: var(--radius); font-size: 14px; line-height: 1.5; border: 1px solid var(--border); background: var(--subtle); color: var(--text); }
.note.warn { background: var(--warn-bg); border-color: var(--warn-border); } .note.ok { background: var(--ok-bg); border-color: var(--ok-border); } .note.bad { background: var(--bad-bg); border-color: var(--bad-border); } .note.info { background: var(--info-bg); border-color: var(--info-border); }
.note.small { font-size: 13px; padding: 10px 12px; }
.jira { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--accent-text) !important; white-space: nowrap; }

/* ── form controls ─────────────────────── */
label.field, div.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); min-width: 0; }
input:not([type]), input[type=text], input[type=search], input[type=email], input[type=password], input[type=url], input[type=number], input[type=tel], input[type=date], select, textarea {
  height: var(--h-control); padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--input); background: var(--card); color: var(--text); font: inherit; font-size: 14px; font-weight: 400; width: 100%; box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: color-mix(in srgb, var(--input) 60%, var(--text-3)); }
input:focus, select:focus, textarea:focus, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--accent-ring); border-radius: var(--radius); }
textarea { height: auto; padding: 9px 12px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 1; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: var(--chev); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; text-overflow: ellipsis; }
select[multiple] { height: auto; padding: 6px; background-image: none; }
input[type=search] { -webkit-appearance: none; appearance: none; padding-left: 34px; background-image: var(--glass); background-repeat: no-repeat; background-position: 11px center; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; height: 14px; width: 14px; cursor: pointer; background: var(--text-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / 14px no-repeat; }
input:disabled, select:disabled, textarea:disabled { background-color: var(--subtle); color: var(--text-3); border-color: var(--border); cursor: not-allowed; box-shadow: none; opacity: 1; }
input[type=number] { font-variant-numeric: tabular-nums; }

/* checkboxes and radios: drawn, the same in every browser */
input[type=checkbox], input[type=radio] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 2px 0 0; flex: none; border: 1px solid var(--input); background: var(--card) center / 12px no-repeat; box-shadow: var(--shadow-sm); cursor: pointer; display: inline-grid; place-content: center; transition: background-color .12s, border-color .12s, box-shadow .12s; vertical-align: -3px; }
input[type=checkbox] { border-radius: 4px; }
input[type=radio] { border-radius: 99px; }
input[type=checkbox]:hover:not(:disabled), input[type=radio]:hover:not(:disabled) { border-color: var(--green); }
input[type=checkbox]:checked { background-color: var(--green); border-color: var(--green); background-image: var(--check); }
input[type=checkbox]:indeterminate { background-color: var(--green); border-color: var(--green); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 8h8'/%3E%3C/svg%3E"); }
input[type=radio]:checked { border-color: var(--green); border-width: 5px; background: var(--card); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); border-radius: 4px; }
input[type=radio]:focus-visible { border-radius: 99px; }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .5; cursor: not-allowed; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; line-height: 1.45; }
label.check input { margin-top: 2px; }
label.check:has(input:disabled) { cursor: not-allowed; }

/* switches (a button with role=switch holding .switch) */
.switch { width: 34px; height: 20px; border-radius: 99px; background: var(--input); display: inline-flex; align-items: center; padding: 2px; flex: none; transition: background .15s; }
.switch::after { content: ""; width: 16px; height: 16px; border-radius: 99px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
[aria-checked="true"] .switch { background: var(--green); } [aria-checked="true"] .switch::after { transform: translateX(14px); }
.switch-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--text); cursor: pointer; padding: 6px 8px; border-radius: var(--radius); font: inherit; font-size: 13px; }
.switch-btn:hover { background: var(--hover); } .switch-btn[disabled] { opacity: .5; cursor: not-allowed; }

.help { font-size: 12px; font-weight: 400; color: var(--text-3); }

/* ── tables, lists, small parts ────────── */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; padding: 10px 16px; font-size: 12px; font-weight: 500; color: var(--text-3); background: var(--page); border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
table.list td { padding: 12px 16px; border-top: 1px solid var(--border-subtle); vertical-align: middle; }
table.list tbody tr:first-child td { border-top: 0; }
table.list tbody tr:hover td { background: var(--page); }
ul.plain, ol.plain { list-style: none; margin: 0; padding: 0; }
.kv dt { font-size: 12px; font-weight: 500; color: var(--text-3); } .kv dd { margin: 2px 0 10px; font-size: 14px; }
.tile { padding: 12px 14px; border-radius: var(--radius); background: var(--page); border: 1px solid var(--border-subtle); } .tile .k { font-size: 12px; font-weight: 500; color: var(--text-3); } .tile .v { font-size: 16px; font-weight: 600; margin-top: 4px; }
.dot { width: 8px; height: 8px; border-radius: 99px; background: var(--amber); flex: none; display: inline-block; }
.progress { height: 6px; border-radius: 99px; background: var(--subtle); overflow: hidden; } .progress > span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.md { font-size: 14px; line-height: 1.65; color: var(--text-2); max-width: 90ch; } .md h1 { font-size: 20px; } .md h2 { font-size: 16px; margin-top: 18px; } .md pre { background: var(--page); border: 1px solid var(--border-subtle); padding: 12px; border-radius: var(--radius); overflow-x: auto; } .md code { font-size: 12.5px; } .md table { border-collapse: collapse; } .md td, .md th { border: 1px solid var(--border); padding: 6px 8px; }
pre.code { margin: 0; padding: 14px 16px; border-radius: var(--radius); background: var(--page); border: 1px solid var(--border-subtle); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.avatar { width: 32px; height: 32px; border-radius: 99px; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; letter-spacing: .02em; }
.empty { padding: 40px 20px; text-align: center; color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* ── menus ─────────────────────────────── */
.menu { position: absolute; z-index: 30; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); padding: 5px; display: flex; flex-direction: column; min-width: 232px; }
.menu[hidden] { display: none; }
.menu.up { left: 8px; right: 8px; bottom: calc(100% + 6px); }
.menu a, .menu button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; text-decoration: none !important; cursor: pointer; width: 100%; }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--hover); color: var(--text); outline: none; }
.menu .label { padding: 8px 10px 4px; font-size: 12px; color: var(--text-3); }
.menu .ico { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.menu .ico svg { color: var(--text-3); flex: none; }
.menu .danger { color: var(--bad-fg); }

/* ── sidebar ───────────────────────────── */
.sidebar { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.side-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 10px 8px 14px; }
.side-head .brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.side-head .logo, .brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.side-head .brand b { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; }
.side-head .brand span span { display: block; font-size: 12px; color: var(--text-3); line-height: 1.3; }
.side-actions { flex: none; padding: 4px 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.side-new { justify-content: flex-start; gap: 8px; padding-left: 10px; font-weight: 500; }
.side-actions input[type=search] { height: 32px; font-size: 13px; background-color: var(--card); }
.side-nav { flex: none; padding: 0 10px 6px; display: flex; flex-direction: column; gap: 1px; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 7px; color: var(--text-2); text-decoration: none !important; font-size: 14px; font-weight: 450; }
.nav-item svg { flex: none; color: var(--text-3); }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item[aria-current] { background: var(--active); color: var(--text); font-weight: 550; }
.nav-item .count { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; background: var(--green); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
/* one scroll for the links, the settings behind More and the features, like a chat app's sidebar */
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 10px; }
.side-scroll .side-nav { padding: 2px 10px 0; }
.side-scroll .list { flex: none; overflow: visible; padding: 8px 10px 0; }
.side-scroll .list > .grp { padding-top: 8px; }
.side-nav .nav-item .ellipsis { flex: 1; min-width: 0; }
button.nav-item { width: 100%; border: 0; background: transparent; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.side-more-btn svg { transition: transform .15s ease; }
.side-more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.side-more-hint { margin-left: auto; font-size: 12px; color: var(--text-3); font-weight: 400; }
.side-more-items { display: flex; flex-direction: column; gap: 1px; }
.side-more-items .grp { padding: 10px 10px 3px; }
.sidebar .list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 10px; }
.sidebar .grp { padding: 14px 10px 4px; font-size: 12px; font-weight: 500; color: var(--text-3); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.recent { position: relative; display: flex; align-items: center; border-radius: 7px; }
.recent > a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px; color: var(--text-2); text-decoration: none !important; font-size: 14px; border-radius: 7px; }
.recent > a:hover, .recent:hover > a { background: var(--hover); color: var(--text); }
.recent > a[aria-current] { background: var(--active); color: var(--text); font-weight: 550; }
.recent .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent .who { font-size: 12px; color: var(--text-3); max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
.state-dot { width: 7px; height: 7px; border-radius: 99px; flex: none; background: var(--input); }
.state-dot.needs { background: var(--amber); } .state-dot.done { background: var(--green); } .state-dot.failed { background: var(--red); }
.recent .del { position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; border: 0; border-radius: 6px; background: var(--hover); color: var(--text-3); cursor: pointer; display: none; place-items: center; }
.recent:hover .del, .recent .del:focus-visible { display: grid; }
.recent .del:hover { background: var(--bad-bg); color: var(--bad-fg); }
.sidebar .confirm { margin: 4px 0 8px; padding: 12px; border-radius: var(--radius); background: var(--bad-bg); border: 1px solid var(--bad-border); font-size: 13px; }
.side-more { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; margin-top: 4px; border-radius: 7px; font-size: 13px; color: var(--text-3); text-decoration: none !important; }
.side-more:hover { background: var(--hover); color: var(--text); }
.scope { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--subtle); border: 1px solid var(--border-subtle); }
.scope a { white-space: nowrap; height: 20px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 5px; font-size: 11.5px; font-weight: 500; color: var(--text-3); text-decoration: none !important; }
.scope a[aria-current] { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.snav a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 7px; color: var(--text-2); text-decoration: none !important; font-size: 14px; }
.snav a:hover { background: var(--hover); color: var(--text); } .snav a[aria-current] { background: var(--active); color: var(--text); font-weight: 550; }
.snav li[hidden], .snav .grp[hidden] { display: none; }
.sidebar .account { position: relative; flex: none; border-top: 1px solid var(--border); padding: 8px 10px; }
.sidebar .account > button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 6px 8px; border: 0; border-radius: var(--radius); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sidebar .account > button:hover, .sidebar .account > button[aria-expanded="true"] { background: var(--hover); }
#account-menu [role="menuitemradio"] { position: relative; padding-left: 30px; }
#account-menu [role="menuitemradio"]::before { content: ''; position: absolute; left: 10px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: var(--green); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 12px no-repeat; visibility: hidden; }
#account-menu [role="menuitemradio"][aria-checked="true"]::before { visibility: visible; }
.bell { position: relative; } .bell .count { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--bg); }

/* ── settings pages: title, then sections ── */
.settings-title { display: flex; flex-direction: column; gap: 4px; padding-bottom: 4px; }

/* ── phase bar and steps ───────────────── */
.phases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.phases a { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--card); color: var(--text); text-decoration: none; min-width: 0; }
.phases a .s { font-size: 11px; font-weight: 600; color: var(--text-3); }
.phases a.done .s, .phases a.now .s { color: var(--ok-fg); } .phases a.cur { border-color: var(--green); background: var(--ok-bg); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--card); }
.steps li.cur { border-color: var(--green); background: var(--ok-bg); }
.steps .n { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; font-size: 13px; font-weight: 650; background: var(--subtle); color: var(--text-3); flex: none; }
.steps li.cur .n, .steps li.done .n { background: var(--green); color: #fff; }
@media (max-width: 900px) { .phases, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--card); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--green); background: var(--soft); }

/* ── Claude panel ──────────────────────── */
.claude-slot { display: contents; }
.claude { display: none; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; height: 100%; }
body[data-panel="pinned"] .claude-slot { display: block; min-width: 0; height: 100%; }
body[data-panel="pinned"] .claude, body[data-panel="open"] .claude { display: flex; }
body[data-panel="open"] .claude { position: fixed; top: 64px; right: 24px; bottom: 16px; width: min(440px, calc(100vw - 32px)); z-index: 60; box-shadow: var(--shadow-xl); }
@media (max-width: 1200px) { body[data-panel="pinned"] .claude { position: fixed; top: 64px; right: 24px; bottom: 16px; width: min(440px, calc(100vw - 32px)); z-index: 60; box-shadow: var(--shadow-xl); } }
.claude header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); }
.claude .log { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--page); }
.msg { max-width: 92%; padding: 10px 14px; border-radius: var(--radius-lg); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.claude-t { align-self: flex-start; background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.msg.tool { align-self: stretch; max-width: 100%; padding: 0 4px; font-family: var(--mono); font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg.err { align-self: stretch; background: var(--bad-bg); }
.msg.ask { align-self: stretch; max-width: 100%; background: var(--warn-bg); border: 1px solid var(--warn-border); }
.claude form.compose { padding: 10px 14px 12px; border-top: 1px solid var(--border-subtle); display: flex; gap: 8px; align-items: flex-end; }
.claude form.compose textarea { min-height: 44px; max-height: 160px; }
.ask-btn[aria-expanded="true"] { background: var(--ok-bg); border-color: var(--green); }

/* ── auth pages ────────────────────────── */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth main { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; }
.auth { background: var(--page); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.auth-brand .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--green); color: #fff; display: grid; place-items: center; }
.auth-brand b { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.auth .card.pad { padding: 28px; }
.auth-lang { display: flex; justify-content: center; gap: 4px; font-size: 13px; }
.auth-lang a { padding: 4px 8px; border-radius: 6px; color: var(--text-3); } .auth-lang a[aria-current] { color: var(--text); font-weight: 600; background: var(--subtle); }

/* ── plugin editor ─────────────────────── */
.files { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 560px; }
.files nav { border-right: 1px solid var(--border-subtle); padding: 10px 8px; overflow-y: auto; max-height: 720px; }
.files nav a { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius); text-decoration: none; color: var(--text); }
.files nav a.cur { background: var(--ok-bg); } .files nav a:hover { background: var(--hover); }
.diff li { padding: 0 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
.diff .add { background: var(--ok-bg); } .diff .del { background: var(--bad-bg); } .diff .gap { color: var(--text-3); }
@media (max-width: 900px) { .files { grid-template-columns: 1fr; } .files nav { border-right: 0; border-bottom: 1px solid var(--border-subtle); max-height: 260px; } }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tabs a { height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-bottom: 3px solid transparent; color: var(--text-3); font-weight: 600; text-decoration: none; }
.tabs a.cur { border-color: var(--green); color: var(--text); }
.seg { display: inline-flex; padding: 3px; border-radius: var(--radius); background: var(--subtle); gap: 2px; } .seg a { height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; } .seg a.cur { background: var(--card); }
/* states expressed with aria-current (server-rendered) */
.tabs a[aria-current] { border-color: var(--green); color: var(--text); }
.seg a[aria-current] { background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.files nav a[aria-current] { background: var(--ok-bg); }
.files .grp, .flist .grp { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 12px 10px 4px; }
.files nav a > span:first-child { flex: 1; min-width: 0; }
.files nav a { flex-wrap: wrap; } .files nav a .ellipsis { width: 100%; }
.fview { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
pre.diff { margin: 0; padding: 10px 0; border-radius: var(--radius); background: var(--page); font-family: var(--mono); font-size: 12.5px; line-height: 1.6; overflow-x: auto; }
pre.diff span { display: block; padding: 0 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
pre.diff .add { background: var(--ok-bg); } pre.diff .del { background: var(--bad-bg); text-decoration: line-through; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); } pre.diff .gap { color: var(--text-3); font-style: italic; }
textarea.code { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; min-height: 420px; resize: vertical; }
details > summary { list-style: none; } details > summary::-webkit-details-marker { display: none; }
details > summary:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; border-radius: var(--radius-lg); }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.msg.pending-reply { opacity: .6; }
/* plugin files: both panels the card's height; each scrolls on its own only when its content is taller */
.files { height: min(680px, calc(100dvh - 220px)); min-height: 420px; overflow: hidden; }
.files nav { max-height: none; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.files .grp { position: sticky; top: -10px; z-index: 1; background: var(--card); }
.fview { min-height: 0; overflow: hidden; }
.fview > .row { flex: none; }
.fview > .md, .fview > pre.diff, .fview > .note { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; max-width: none; }
.fview > .md { background: var(--page); border-radius: var(--radius); padding: 14px 18px; }
.fview > form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.fview > form textarea.code { flex: 1 1 auto; min-height: 0; resize: none; overflow-y: auto; }
.fview > form > .row { flex: none; }
.fview > p.small { flex: none; }
@media (max-width: 900px) { .files { height: auto; overflow: visible; } .fview > .md, .fview > pre.diff { max-height: 60vh; } }
.main { container-type: inline-size; }
@container (max-width: 640px) { .phases .h { display: none; } }
@container (max-width: 700px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.claude .log > * { flex-shrink: 0; }
.msg.ask { white-space: normal; } .msg.ask pre { white-space: pre-wrap; }
/* searchable selects */
.combo { position: relative; min-width: 0; width: 100%; }
.combo-input { padding-right: 34px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23808a84' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; text-overflow: ellipsis; }
.combo-input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.combo-native { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; width: 100% !important; height: 100% !important; }
.combo-list { position: fixed; z-index: 90; margin: 0; padding: 6px; list-style: none; overflow-y: auto; overscroll-behavior: contain; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xl, 0 12px 32px rgba(0,0,0,.18)); scrollbar-width: thin; }
.combo-list li { padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--text); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-list li.active { background: var(--hover); }
.combo-list li[aria-selected="true"] { font-weight: 600; }
.combo-list li[aria-selected="true"]::after { content: "  ✓"; color: var(--green); }
.combo-list li mark { background: transparent; color: var(--ok-fg, var(--green)); font-weight: 600; }
.combo-list li.combo-empty { color: var(--text-3); cursor: default; }
/* sign-in with Google / GitLab */
.sso { display: grid; gap: 10px; } .sso.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 460px) { .sso.two { grid-template-columns: 1fr; } }
.sso-btn { width: 100%; height: 46px; justify-content: center; gap: 10px; font-size: 15px; font-weight: 600; }
.sso-mark { flex: none; width: 22px; height: 22px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 650; color: #fff; background: var(--text-3); }
.sso-mark.sso-google { background: #4a6ee0; } .sso-mark.sso-gitlab { background: #c4572a; }
.or { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-3); } .or span { flex: 1; height: 1px; background: var(--border); }
.strength { display: block; height: 4px; border-radius: 99px; background: var(--border-subtle); overflow: hidden; margin-top: 2px; } .strength > i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.qr { width: 184px; height: 184px; padding: 10px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); } .qr svg { width: 100%; height: 100%; display: block; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font-family: var(--mono); font-size: 14px; padding: 14px 16px; background: var(--page); border-radius: var(--radius); }
/* helper text at the foot of the sign-in and sign-up cards */
.auth-help { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
/* stored secrets: "Saved · ends 1234" with Replace / Remove */
.secret-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); min-width: 0; }
.secret-field > label { display: flex; flex-direction: column; gap: 2px; }
.secret-saved { gap: 8px; align-items: center; font-weight: 400; }
.sso-icon { flex: none; width: 22px; height: 22px; object-fit: contain; border-radius: 4px; }
div.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); min-width: 0; }
/* loaders while Claude works */
.spin { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 99px; border: 2px solid color-mix(in srgb, var(--green) 25%, transparent); border-top-color: var(--green); animation: spin .8s linear infinite; vertical-align: -3px; }
.spin.sm { width: 12px; height: 12px; border-width: 2px; vertical-align: -1px; }
.spin.xs { width: 10px; height: 10px; border-width: 1.5px; margin-left: 6px; vertical-align: -1px; }
.btn .spin { width: 14px; height: 14px; }
.btn.primary .spin { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.claude .working { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--border-subtle); background: var(--page); font-size: 12.5px; color: var(--text-2); min-width: 0; }
.claude .working[hidden] { display: none; }
.typing { display: inline-flex; gap: 3px; flex: none; } .typing i { width: 6px; height: 6px; border-radius: 99px; background: var(--green); opacity: .3; animation: typing 1.2s infinite ease-in-out; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.working.paused .typing i { animation: none; opacity: .6; background: var(--warn-fg, #d9822b); }
.btn[aria-busy="true"] { cursor: progress; }
@media (prefers-reduced-motion: reduce) { .spin, .typing i { animation-duration: 2.4s; } }

/* ── plan and build (stages, tiers, merge requests) ── */
.tabs button { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--text-3); font: inherit; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { border-color: var(--green); color: var(--green); }
.tabs .count { font-size: 12px; font-weight: 600; color: var(--text-3); }
.cfgline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; box-shadow: none; }
.cfgline .k { font-size: 12px; font-weight: 600; color: var(--text-3); margin-right: 4px; }
.cfgline .more { margin-left: auto; font-size: 13px; font-weight: 600; }
.tag { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--subtle); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.stat { padding: 16px 18px; min-width: 0; } .stat .k { font-size: 12px; font-weight: 600; color: var(--text-3); }
.stat .v { font-size: 30px; font-weight: 650; line-height: 1.15; margin-top: 6px; font-variant-numeric: tabular-nums; } .stat .f { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.stage > header { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border-subtle); }
.stage .num { width: 30px; height: 30px; border-radius: 99px; background: var(--ok-bg); color: var(--ok-fg); font-weight: 650; display: grid; place-items: center; font-size: 13px; flex: none; }
.stage h2 { font-size: 15px; }
.stage .batch { padding: 12px 20px 14px; display: flex; flex-direction: column; gap: 8px; } .stage .batch + .batch { border-top: 1px solid var(--border-subtle); }
.stage .commit { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: var(--page); border-radius: var(--radius); font-size: 13px; }
.stage .commit code { flex: 1; font-size: 12px; color: var(--text); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: flex; gap: 14px; padding-bottom: 16px; } .timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 0; width: 2px; background: var(--border); }
.timeline li.done:not(:last-child)::before { background: var(--green); }
.timeline .mark { width: 26px; height: 26px; border-radius: 99px; flex: none; display: grid; place-items: center; background: var(--card); border: 2px solid var(--border); position: relative; z-index: 1; }
.timeline .mark::after { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--input); }
.timeline .done .mark { background: var(--green); border-color: var(--green); } .timeline .done .mark::after { background: #fff; }
.timeline .current .mark, .timeline .waiting .mark { border-color: var(--green); background: var(--ok-bg); box-shadow: 0 0 0 4px var(--soft); } .timeline .current .mark::after, .timeline .waiting .mark::after { background: var(--green); }
.timeline .blocked .mark { border-color: var(--amber); background: var(--warn-bg); } .timeline .blocked .mark::after { background: var(--amber); }
.mrlist > li { padding: 12px 20px; border-top: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 4px; } .mrlist > li:first-child { border-top: 0; }
.mrname { text-decoration: none; font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notesbtn { height: 28px; font-size: 12px; } .notesbtn.warn { background: var(--warn-bg); border-color: var(--warn-border); } .notesbtn[disabled] { opacity: 1; color: var(--text-3); cursor: default; }
.notes { margin-top: 6px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.notes .n { padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; } .notes .n + .n { border-top: 1px solid var(--border-subtle); } .notes .n.open { background: var(--warn-bg); }
.notes code { font-size: 11px; }
.share { position: relative; }
.share .pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 340px; max-width: calc(100vw - 48px); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.share .pop[hidden] { display: none; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; flex: 1; }
.seg button[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.share .seg { display: flex; }
.design { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.design .pv { height: 140px; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok-fg); font-size: 13px; font-weight: 600; } .design .pv.figma { background: var(--subtle); color: var(--text-2); }
[role="tabpanel"][hidden] { display: none; }
li.is-off { background: var(--page); } li.is-off .ellipsis { color: var(--text-3); }
input:disabled, select:disabled, textarea:disabled { background: var(--subtle); color: var(--text-2); border-color: var(--border); cursor: not-allowed; opacity: 1; }
/* someone else's feature, opened by an admin: look, don't touch (the server refuses changes anyway) */
body[data-readonly] .main form[method="post"]:not(.ro-keep), body[data-readonly] .main [data-approve], body[data-readonly] .main [data-cancel],
body[data-readonly] .main [data-handoff-action], body[data-readonly] .main .ro-hide, body[data-readonly] .main [data-action="menu"],
body[data-readonly] [data-compose], body[data-readonly] .main [data-action="ask-claude"], body[data-readonly] .main [data-action="open-chat"] { display: none !important; }
.btn[hidden], .note[hidden] { display: none; }


/* merge request page */
.mr-act { position: relative; } .mr-act > summary { list-style: none; } .mr-act > summary::-webkit-details-marker { display: none; }
.mr-act .pop-card { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 340px; box-shadow: var(--shadow-md); }
@media (max-width: 600px) { .mr-act .pop-card { position: static; width: auto; margin-top: 8px; } }
.difffile { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.difffile > summary { padding: 10px 14px; cursor: pointer; background: var(--page); }
.difftable { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; overflow-x: auto; }
.difftable .dl { display: grid; grid-template-columns: 48px 48px 1fr; min-width: max-content; }
.difftable .ln { padding: 0 8px; text-align: right; color: var(--text-3); user-select: none; border-right: 1px solid var(--border-subtle); }
.difftable .code { padding: 0 12px; white-space: pre; }
.difftable .add { background: var(--ok-bg); } .difftable .del { background: var(--bad-bg); }
.difftable .hunk, .difftable .cut { background: var(--info-bg); color: var(--text-2); }
b.bad { color: var(--bad-fg); } b.warn { color: var(--warn-fg); }
.chip-x { border: 0; background: transparent; color: var(--text-3); font-size: 15px; line-height: 1; padding: 0 2px 0 6px; cursor: pointer; } .chip-x:hover { color: var(--bad-fg); }

/* notifications */
.ntf li { display: flex; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border-subtle); } .ntf li.unread { background: var(--soft); }
.ntf a { color: var(--text); text-decoration: none; } .ntf a:hover b { text-decoration: underline; }

/* billing (Phase 6) */
.billing-facts { display: grid; grid-template-columns: repeat(4, minmax(90px, auto)); gap: 4px 20px; margin: 0; }
.billing-facts dd { margin: 2px 0 0; font-weight: 600; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; background: var(--card); }
.plan input { position: absolute; inset: 14px 14px auto auto; }
.plan:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 25%, transparent); }
.plan:has(input:disabled) { cursor: default; }
.plan:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.plan-name { font-weight: 600; display: flex; gap: 6px; align-items: center; padding-right: 24px; }
.plan-price { font-size: 22px; font-weight: 600; }
.billing-banner .btn { white-space: nowrap; }
@media (max-width: 640px) { .billing-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .billing-banner { flex-wrap: wrap !important; } }

/* Claude panel: flush against the page when pinned, a floating sheet when open */
body[data-panel="pinned"] .claude { border-radius: 0; border-width: 0 0 0 1px; box-shadow: none; }
@media (max-width: 1200px) { body[data-panel="pinned"] .claude { border-radius: var(--radius-lg); border-width: 1px; } }
/* narrow screens: a pinned panel doesn't cover the page (the script opens it on demand); pinning is for wide screens */
@media (max-width: 1200px) { body[data-panel="pinned"] .claude { display: none; } .claude [data-action="pin"] { display: none; } }
/* the feature page's "How it works" toggle: a light bulb, highlighted while the steps show */
.how-toggle { color: var(--text-3); } .how-toggle:hover { color: var(--text); }
.how-toggle.on { color: var(--accent-text); background: var(--soft); border-color: var(--ok-border); }
.claude header .avatar { background: var(--ok-bg); color: var(--green); border-radius: 8px; }
.ask-btn[aria-expanded="true"] { background: var(--ok-bg); border-color: var(--ok-border); }

/* help centre */
.help-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 0 8px; }
.help-hero h1 { font-size: 26px; }
.help-search { display: flex; gap: 8px; width: 100%; max-width: 620px; margin-top: 8px; }
.help-search input { height: 42px; font-size: 15px; }
.help-search .btn { height: 42px; }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@container (max-width: 760px) { .help-grid { grid-template-columns: 1fr; } }
.help-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--ok-bg); color: var(--green); display: grid; place-items: center; flex: none; }
.help-link { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; margin: 0 -10px; border-radius: var(--radius); color: var(--text); text-decoration: none !important; }
.help-link:hover { background: var(--hover); }
.help-link > span:first-child { font-weight: 500; }
.help-results li a { display: flex; flex-direction: column; gap: 2px; padding: 12px 24px; border-top: 1px solid var(--border-subtle); color: var(--text); text-decoration: none !important; }
.help-results li:first-child a { border-top: 0; } .help-results li a:hover { background: var(--page); }
.faq details { border-top: 1px solid var(--border-subtle); } .faq details:first-child { border-top: 0; }
.faq summary { padding: 14px 24px; cursor: pointer; font-weight: 500; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: ''; width: 16px; height: 16px; flex: none; background: var(--chev) center / 16px no-repeat; transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq .md { padding: 0 24px 16px; }
.help-article { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.help-side { position: sticky; top: 0; }
@container (max-width: 900px) { .help-article { grid-template-columns: 1fr; } .help-side { position: static; } }
.help-body { max-width: 74ch; font-size: 15px; color: var(--text-2); }
.help-body h2 { font-size: 17px; margin: 22px 0 6px; color: var(--text); scroll-margin-top: 16px; } .help-body h3 { margin: 16px 0 4px; }
.help-body ul, .help-body ol { padding-left: 22px; } .help-body li { margin: 4px 0; }
.help-body blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--green); background: var(--ok-bg); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text); }
.help-body blockquote p { margin: 0; }
.help-body kbd, kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--card); font: 12px var(--mono); text-align: center; }
.help-body p { margin: 0 0 10px; }
.help-pn { border-top: 1px solid var(--border-subtle); padding-top: 12px; }
.help-req { padding: 16px 24px; border-top: 1px solid var(--border-subtle); } .help-req:first-child { border-top: 0; }

/* the getting-started checklist */
.checklist .ck-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none !important; }
.checklist .ck-item:hover { background: var(--hover); }
.checklist .ck-mark { width: 22px; height: 22px; border-radius: 99px; border: 2px solid var(--input); display: grid; place-items: center; flex: none; color: #fff; }
.checklist .ck-item.done .ck-mark { background: var(--green); border-color: var(--green); }
.checklist .ck-item.done b { color: var(--text-3); font-weight: 500; text-decoration: line-through; text-decoration-color: var(--input); }

/* ── Insights: tables, stat figures, server-drawn charts (one axis, zero baseline, recessive grid) ── */
table.table { width: 100%; border-collapse: collapse; }
table.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.table td { padding: 7px 8px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
table.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .big { display: block; font-size: 24px; font-weight: 650; line-height: 1.2; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.card.stat { padding: 14px 16px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--border-subtle); stroke-width: 1; }
.ch-base { stroke: var(--border); stroke-width: 1; }
.ch-tick { fill: var(--text-3); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.ch-label { fill: var(--text-2); font-size: 11px; font-family: var(--font); }
.ch-bar { fill: var(--green); pointer-events: none; }
.ch-line { fill: none; stroke: var(--green); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.ch-proj { stroke-dasharray: 5 5; opacity: .75; }
.ch-budget { stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 2 4; }
.ch-dot { fill: var(--green); stroke: var(--card); stroke-width: 2; pointer-events: none; }
.ch-hit { fill: transparent; cursor: default; outline: none; }
.ch-hit:hover, .ch-hit:focus-visible { fill: var(--hover); }
.key-line { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--green); }
.key-line.dashed { border-top-style: dashed; opacity: .75; } .key-line.budget { border-top: 2px dotted var(--text-3); }
.meter { display: inline-block; vertical-align: middle; width: 56px; height: 6px; margin-right: 8px; border-radius: 99px; background: var(--subtle); overflow: hidden; }
.meter.right { margin: 0 8px 0 0; } .meter > span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.chart-tip { position: fixed; z-index: 90; pointer-events: none; max-width: 260px; padding: 6px 9px; border-radius: 7px; background: var(--text); color: var(--bg); font-size: 12px; line-height: 1.35; box-shadow: var(--shadow-md); }
/* Settings › Security: the fields of the chosen protocol only */
.sso-form:has(input[name="kind"][value="off"]:checked) .only-on,
.sso-form:not(:has(input[name="kind"][value="oidc"]:checked)) .only-oidc,
.sso-form:not(:has(input[name="kind"][value="saml"]:checked)) .only-saml { display: none; }
.copyable { display: block; padding: 6px 8px; background: var(--page); border: 1px solid var(--border-subtle); border-radius: 6px; font-size: 12.5px; user-select: all; }

/* support: a request's conversation, and its page (the conversation, then what to do beside it) */
.support-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@container (max-width: 900px) { .support-grid { grid-template-columns: minmax(0, 1fr); } }
.thread { gap: 12px; }
.thread .hmsg { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border-subtle); background: var(--card); max-width: 92%; }
.thread .hmsg.them { background: var(--subtle); align-self: flex-start; }
.thread .hmsg.staff { background: var(--info-bg); border-color: var(--info-border); align-self: flex-end; }
.thread .hmsg.note { background: var(--warn-bg); border-color: var(--warn-border); border-style: dashed; align-self: flex-end; }
.thread .msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.thread .msg-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
#reply.is-note textarea { background: var(--warn-bg); }

/* Platform › Roles: the permissions grid */
table.list.perm-grid th.lv, table.list.perm-grid td.lv { text-align: center; width: 84px; }
.perm-grid .perm { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; }
.perm-grid .perm:hover { background: var(--hover); }
.perm-grid .perm input { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.perm-grid .perm input:disabled { cursor: default; }
table.list.perm-grid th, table.list.perm-grid td { white-space: normal; vertical-align: middle; }
.perm-grid th[scope="row"] { width: auto; }
table.list.perm-grid tbody th { background: none; color: var(--text); font-size: 14px; padding: 12px 16px; border-top: 1px solid var(--border-subtle); border-bottom: 0; }
table.list.perm-grid tbody tr:first-child th { border-top: 0; }

/* code review on a merge request page */
.review-card { padding-bottom: 16px; }
.review-card > :not(.head) { margin-left: 20px; margin-right: 20px; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; }
@container (max-width: 820px) { .review-grid { grid-template-columns: minmax(0, 1fr); } }
.avatar-sm { width: 28px; height: 28px; border-radius: 99px; display: inline-grid; place-items: center; flex: none; font-size: 11px; font-weight: 650; background: var(--subtle); color: var(--text-2); border: 1px solid var(--border); }
.assign-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 8px 10px; display: grid; gap: 4px; }
.line-target { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--info-bg); color: var(--info-fg); }
.btn.ghost { background: none; border-color: transparent; }
.difftable .ln-btn { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: right; padding: inherit; }
.difftable .ln-btn:hover { background: var(--info-bg); color: var(--info-fg); }
.line-note { margin: 4px 8px 6px 96px; padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); border: 1px solid var(--warn-border); white-space: normal; font-family: var(--font); }
.line-note p { margin: 4px 0 0; white-space: pre-wrap; }
.rv-timeline { border-top: 1px solid var(--border-subtle); padding-top: 12px; }
.rv-timeline summary { cursor: pointer; }
.tl-item { padding-left: 12px; border-left: 2px solid var(--border); }
.tl-item.tl-approved, .tl-item.tl-merged { border-color: var(--green); } .tl-item.tl-changes { border-color: var(--amber); }
.tl-body { margin: 4px 0 0; white-space: pre-wrap; color: var(--text-2); }
.review-row { border-top: 1px solid var(--border-subtle); } .review-row:first-child { border-top: 0; }
.review-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; color: inherit; text-decoration: none !important; }
.review-link:hover { background: var(--page); }
.avatars { display: inline-flex; align-items: center; } .avatars .avatar-sm { margin-left: -6px; border: 2px solid var(--card); } .avatars .avatar-sm:first-child { margin-left: 0; }
.avatar-sm.st-approved { background: var(--ok-bg); color: var(--ok-fg); } .avatar-sm.st-changes { background: var(--warn-bg); color: var(--warn-fg); } .avatar-sm.st-commented { background: var(--info-bg); color: var(--info-fg); }
@container (max-width: 640px) { .review-link { flex-direction: column; align-items: flex-start; } }

/* Platform › Roles: role cards, the comparison, and a role's permissions */
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.role-card { padding: 16px; color: inherit; text-decoration: none !important; transition: box-shadow .15s, border-color .15s; }
.role-card:hover { border-color: var(--accent-ring, var(--green)); box-shadow: var(--shadow-md); }
.meter { height: 6px; border-radius: 99px; background: var(--subtle); overflow: hidden; } .meter span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
table.list.compare th, table.list.compare td { white-space: nowrap; }
table.list.compare tbody th[scope="row"] { background: none; color: var(--text); font-size: 13px; font-weight: 500; border-top: 1px solid var(--border-subtle); padding: 8px 16px; }
table.list.compare tr.grp th { background: var(--page); color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding-top: 12px; }
table.list.compare td { padding: 8px 16px; }
.lvls { display: inline-flex; gap: 3px; }
.lv-dot { width: 20px; height: 20px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; background: var(--subtle); color: var(--text-3); opacity: .55; }
.lv-dot.on { background: var(--ok-bg); color: var(--ok-fg); opacity: 1; box-shadow: inset 0 0 0 1px var(--ok-border); }
.role-edit { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; padding-bottom: 72px; }
@container (max-width: 980px) { .role-edit { grid-template-columns: minmax(0, 1fr); } }
.role-side { position: sticky; top: 12px; }
.perm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border-subtle); }
.perm-row .perm-help { grid-column: 1 / -1; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 16px; }
.perm-group .head + .perm-row { border-top: 0; }
@container (max-width: 640px) { .perm-row { grid-template-columns: minmax(0, 1fr); } }
.perm-help { margin: 6px 0 0; display: grid; gap: 2px; }
.perm-help li { font-size: 12px; color: var(--text-3); }
.perm-help li.on { color: var(--text-2); }
.lv-tag { display: inline-block; min-width: 46px; font-weight: 600; color: var(--text-3); }
.perm-help li.on .lv-tag { color: var(--ok-fg); }
.perm-chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; --lv-w: 86px; }
.lvchip { position: relative; display: inline-flex; width: var(--lv-w); }
/* the real checkbox stays, invisible, over the pill (it beats the global checkbox styles, ticked or disabled) */
.lvchip input[type=checkbox], .lvchip input[type=checkbox]:checked, .lvchip input[type=checkbox]:disabled, .lvchip input[type=checkbox]:hover {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; border: 0; border-radius: 99px; background: none; box-shadow: none; }
.lvchip input[type=checkbox]:disabled { cursor: default; }
.lvchip span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 30px; padding: 0 10px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--card); color: var(--text-3); font-size: 12.5px; font-weight: 600; line-height: 1;
  transition: background-color .12s, border-color .12s, color .12s; user-select: none; }
.lvchip span::before { content: ''; flex: none; width: 14px; height: 14px; border-radius: 99px; border: 1.5px solid var(--input, var(--border)); background: var(--card) center / 10px no-repeat; box-sizing: border-box; transition: inherit; }
.lvchip input:checked + span { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-fg); }
.lvchip input:checked + span::before { border-color: var(--green); background-color: var(--green); background-image: var(--check); }
.lvchip:hover input:not(:disabled):not(:checked) + span { border-color: var(--green); color: var(--text-2); }
.lvchip:hover input:not(:disabled):checked + span { border-color: var(--green); }
.lvchip input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-ring); border-color: var(--green); }
/* locked roles (owners): granted, always; shown plainly, not greyed out */
.lvchip input:disabled + span { cursor: default; }
.lvchip input:disabled:not(:checked) + span { opacity: .55; }
.lvchip.na { justify-content: center; align-items: center; height: 30px; color: var(--text-3); opacity: .45; font-size: 13px; }
.row-presets { display: inline-flex; gap: 8px; margin-left: 6px; }
button.link { background: none; border: 0; padding: 0; color: var(--accent-text, var(--green)); cursor: pointer; font: inherit; }
button.link:hover { text-decoration: underline; }
.summary-list li { padding-left: 16px; position: relative; } .summary-list li::before { content: '✓'; position: absolute; left: 0; color: var(--ok-fg); }
.save-bar { position: sticky; bottom: 0; grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.save-bar.dirty { border-color: var(--warn-border); background: var(--warn-bg); }
/* sign-up: an independent developer signs up with a password (Google and GitLab sign-up join an organisation) */
.reg:has(input[name="kind"][value="independent"]:checked) .sso-only { display: none; }
.kind-pick .choice { align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.kind-pick .choice input { margin-top: 3px; }
/* a feature built from descriptions (no issue tracker): the earlier descriptions, like a ticket list */
.desc-row { border-top: 1px solid var(--border-subtle); padding: 12px 20px; }
.desc-row:first-child { border-top: 0; }
.desc-row.is-off { opacity: .7; }
.dropzone { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 14px 16px; border: 1.5px dashed var(--border); border-radius: var(--radius); background: var(--soft); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--green); background: var(--ok-bg); }
.dropzone:focus-within { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.design-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.design-item { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 4px; border: 1px solid var(--border-subtle); border-radius: var(--radius); background: var(--card); max-width: 260px; min-width: 0; }
.design-item .ellipsis { flex: 1; min-width: 0; }
.design-thumb { display: block; width: 56px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border-subtle); background: var(--soft); flex: none; }
a.design-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.desc-text .design-list { margin-top: 8px; align-items: center; }
.design-link { padding: 4px 8px; border: 1px solid var(--border-subtle); border-radius: 999px; }
.pdf-thumb { display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--bad-fg); background: var(--bad-bg); }
.claim-form > summary { list-style: none; display: inline-flex; }
.facts { display: grid; gap: 6px; margin: 0; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 6px; }
.facts dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.claim-form > summary::-webkit-details-marker { display: none; }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.proof-grid a { display: block; border: 1px solid var(--border-subtle); border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.proof-grid img { display: block; width: 100%; height: 180px; object-fit: contain; background: var(--card); }
.proof-grid .pdf-thumb { height: 180px; font-size: 18px; }
.proof-grid span.xs { display: block; padding: 6px 10px; }
.desc-text summary { cursor: pointer; color: var(--accent-text, var(--green)); margin-top: 4px; width: fit-content; }
.desc-text p { margin: 6px 0 0; white-space: pre-wrap; color: var(--text-2); }
