/* hive — the project tracker of Beeons, in the Beeons "look beyond" language: pure black and white surfaces, hairlines,
   glass pills, and the brand colours (blue, violet, yellow) only as soft glows. Compact: hive is a work tool.
   Light and dark themes (html[data-theme], set before the first paint by theme.js).
   No inline styles anywhere (strict CSP): widths of progress bars are classes (.w-0 … .w-100).
   Overflow rule: every grid/flex child that holds text gets min-width: 0, and titles truncate with a title tooltip. */
@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/plus-jakarta-sans-latin-wght-normal-7660bd9909fb097989b19471a75f1b7a.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Jost"; src: url("/fonts/jost-latin-wght-normal-928f4210aa4859fcfdb853d2c6329589.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400-normal-79936b18df9f734fb6b0a256b20d36b4.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal-b1c8a895f5fd3fe6cbf5b4cf95c58d87.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* Brand palette: light only, never surfaces */
  --beeons-blue: #0A65E7; --beeons-violet: #8A2AE3; --beeons-yellow: #FFD600;
  --radius: 16px; --radius-sm: 10px;
  --sidebar-w: 232px; --rail-w: 60px; --topbar-h: 52px;
  --head: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --body: "Jost", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
:root, [data-theme="dark"] {
  --ink: #000; --panel: #0A0A0A; --panel-2: #111111; --panel-3: #1A1A1A;
  --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .18);
  --text: #F1F7FE; --muted: #A1A4A5; --faint: #8A8D90;
  --fg: #FFFFFF; --on-fg: #000000; --fg-hover: #E8E8E8; --tint: 255, 255, 255;
  --header-bg: rgba(0, 0, 0, .66); --tile-top: #1A1A1A; --tile-bottom: #050505; --heading-end: rgba(255, 255, 255, .58);
  /* Meaning colours (text ≥ 4.5:1 on the surfaces and on their own 13% tint) */
  --ok: #4ADE80; --ko: #FF8A7A; --warn: #FFC34D; --info: #7FB0FF; --review: #C9A0FF; --orange: #FFA26B;
  /* Chart series (validated: lightness band, CVD and contrast on the panel surface) */
  --series-a: #3F82F0; --series-b: #B08C00; --series-ref: #8A8D90;
  --glow-a: rgba(138, 42, 227, .20); --glow-b: rgba(10, 101, 231, .20); --glow-c: rgba(255, 214, 0, .06);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .9);
  --scrim: rgba(0, 0, 0, .6); --nav-glow: .24;
  color-scheme: dark;
}
[data-theme="light"] {
  --ink: #FFFFFF; --panel: #F7F8F9; --panel-2: #F0F1F3; --panel-3: #E7E9EC;
  --line: rgba(0, 0, 0, .09); --line-strong: rgba(0, 0, 0, .16);
  --text: #0F0B0A; --muted: #5B6168; --faint: #6B7178;
  --fg: #000000; --on-fg: #FFFFFF; --fg-hover: #222222; --tint: 0, 0, 0;
  --header-bg: rgba(255, 255, 255, .76); --tile-top: #FFFFFF; --tile-bottom: #ECEDEF; --heading-end: rgba(15, 11, 10, .62);
  --ok: #157F3D; --ko: #C2332B; --warn: #8F6200; --info: #0A58CC; --review: #7A22CC; --orange: #B5470B;
  --series-a: #0A65E7; --series-b: #9A7400; --series-ref: #6B7178;
  --glow-a: rgba(138, 42, 227, .10); --glow-b: rgba(10, 101, 231, .10); --glow-c: rgba(255, 214, 0, .12);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .28);
  --scrim: rgba(15, 11, 10, .35); --nav-glow: .1;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 .9375rem/1.5 var(--body); -webkit-font-smoothing: antialiased;
  isolation: isolate; overflow-x: clip; }
a { color: var(--text); text-underline-offset: 3px; text-decoration-color: rgba(var(--tint), .35); }
a:hover { color: var(--fg); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; margin: 0 0 .5em; color: var(--fg); }
h1 { font-size: clamp(1.3rem, 2.3vw, 1.7rem); font-weight: 800; letter-spacing: -.03em; padding-bottom: .06em;
  background: linear-gradient(180deg, var(--fg) 35%, var(--heading-end)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: .95rem; font-weight: 600; }
p { margin: 0 0 .75em; }
img, svg { max-width: 100%; }
strong { font-weight: 600; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.muted { color: var(--muted); } .small { font-size: .8125rem; } .nowrap { white-space: nowrap; }
.ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); font-size: .875rem; padding: 6px 0; margin: 0; }
.help { color: var(--muted); font-size: .78rem; margin: 4px 0 0; }
.error { color: var(--ko); font-size: .8125rem; margin: 4px 0 0; }
.overdue { color: var(--ko) !important; }
.break { overflow-wrap: anywhere; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
kbd { font: 500 .66rem/1 var(--mono); border: 1px solid var(--line-strong); border-radius: 5px; padding: 3px 5px; color: var(--muted); }
.ico { display: block; width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px;
  font: 500 .66rem/1 var(--mono); background: rgba(var(--tint), .1); color: var(--muted); vertical-align: middle; }
[data-theme="dark"] .theme-icon-moon, [data-theme="light"] .theme-icon-sun { display: none; }

/* ---------- App layout ---------- */
/* Faint brand glow in the top right corner of every screen */
body.app::before { content: ""; position: fixed; z-index: -1; pointer-events: none; top: -35vh; right: -25vw; width: 80vw; height: 85vh;
  background: radial-gradient(40% 42% at 62% 42%, var(--glow-a), transparent 70%), radial-gradient(36% 38% at 36% 56%, var(--glow-b), transparent 70%),
    radial-gradient(22% 24% at 52% 82%, var(--glow-c), transparent 70%); }
body.app { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1280px; padding: 18px 16px 56px; min-width: 0; }
@media (min-width: 720px) { .content { padding: 22px 28px 64px; } }
.content-wide { max-width: none; }
.narrow { max-width: 820px; }

/* Sidebar: drawer on small screens */
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(280px, 86vw); display: flex; flex-direction: column; gap: 4px;
  padding: 12px 10px; background: var(--ink); border-right: 1px solid var(--line); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-100%); visibility: hidden; transition: transform .22s ease, visibility .22s; }
.sidebar.open { transform: none; visibility: visible; box-shadow: var(--shadow); }
body.app:has(.sidebar.open)::after { content: ""; position: fixed; inset: 0; z-index: 45; background: var(--scrim); backdrop-filter: blur(2px); }
.logo { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px 12px; color: var(--fg); text-decoration: none;
  font: 800 1.3rem/1 var(--head); letter-spacing: -.035em; }
.logo:hover { color: var(--fg); }
.logo-mark { width: 24px; height: 27px; color: var(--fg); flex-shrink: 0; filter: drop-shadow(0 4px 14px rgba(10, 101, 231, .45)) drop-shadow(0 2px 10px rgba(138, 42, 227, .35)); }
.sidebar-nav { flex: 1; min-height: 0; }
.nav { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: 10px; color: var(--muted);
  text-decoration: none; font-size: .875rem; min-width: 0; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(var(--tint), .06); color: var(--fg); }
.nav a .ico { width: 18px; height: 18px; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-ext { margin-left: auto; opacity: .6; } .nav-ext .ico { width: 13px; height: 13px; }
/* Active item: hairline, glass and a faint blue/violet glow */
.nav a.active { color: var(--fg); background: rgba(var(--tint), .07); box-shadow: inset 0 0 0 1px var(--line); }
.nav a.active::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(90% 160% at 0% 50%, rgba(10, 101, 231, var(--nav-glow)), transparent 65%), radial-gradient(70% 140% at 100% 50%, rgba(138, 42, 227, calc(var(--nav-glow) * .6)), transparent 70%); }
.nav-title { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 14px 0 4px; padding: 0 4px 0 10px;
  font: 500 .66rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.nav-title > a:first-child { display: flex; align-items: center; gap: 10px; color: var(--faint); text-decoration: none; min-width: 0; border-radius: 6px; }
.nav-title > a:first-child:hover, .nav-title > a.active { color: var(--fg); }
.nav-title > a:first-child .ico { display: none; }
.nav-add { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; color: var(--muted); }
.nav-add:hover { background: rgba(var(--tint), .08); color: var(--fg); }
.nav-add .ico { width: 14px; height: 14px; }
.nav-projects a { gap: 9px; }
.nav-empty { color: var(--faint); font-size: .8125rem; padding: 4px 10px; }
.sidebar-foot { display: none; padding-top: 6px; border-top: 1px solid var(--line); }
.rail-btn .ico { width: 18px; height: 18px; transition: transform .2s; }

/* Sidebar: always on screen from 900px; icon rail between 900 and 1199px, or when reduced (html.rail) */
@media (min-width: 900px) {
  body.app { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: 100vh; width: auto; z-index: 20; transform: none; visibility: visible; transition: none; box-shadow: none; }
  .menu-btn { display: none !important; }
}
@media (min-width: 1200px) {
  html:not(.rail) body.app { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .sidebar-foot { display: flex; justify-content: flex-end; }
  html.rail .sidebar-foot { justify-content: center; }
  html.rail .rail-btn .ico { transform: scaleX(-1); }
}
@media (min-width: 900px) and (max-width: 1199.98px) {
  .sidebar { padding: 12px 8px; align-items: stretch; }
  .logo { justify-content: center; padding: 4px 0 12px; }
  .logo-word, .nav-label, .nav-ext, .nav-add, .nav-empty { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav a { justify-content: center; padding: 6px 0; }
  .nav-title { justify-content: center; margin: 10px 0 4px; padding: 10px 0 0; border-top: 1px solid var(--line); }
  .nav-title > a:first-child { justify-content: center; width: 100%; min-height: 34px; border-radius: 10px; }
  .nav-title > a:first-child .ico { display: block; }
  .nav-title > a:first-child:hover { background: rgba(var(--tint), .06); }
  .nav-projects .project-key { max-width: 40px; overflow: hidden; text-overflow: ellipsis; padding: 4px 4px; font-size: .6rem; }
}
@media (min-width: 1200px) {
  html.rail .sidebar { padding: 12px 8px; }
  html.rail .logo { justify-content: center; padding: 4px 0 12px; }
  html.rail .logo-word, html.rail .nav-label, html.rail .nav-ext, html.rail .nav-add, html.rail .nav-empty { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html.rail .nav a { justify-content: center; padding: 6px 0; }
  html.rail .nav-title { justify-content: center; margin: 10px 0 4px; padding: 10px 0 0; border-top: 1px solid var(--line); }
  html.rail .nav-title > a:first-child { justify-content: center; width: 100%; min-height: 34px; border-radius: 10px; }
  html.rail .nav-title > a:first-child .ico { display: block; }
  html.rail .nav-title > a:first-child:hover { background: rgba(var(--tint), .06); }
  html.rail .nav-projects .project-key { max-width: 40px; overflow: hidden; text-overflow: ellipsis; padding: 4px 4px; font-size: .6rem; }
}

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; height: var(--topbar-h); padding: 0 12px;
  background: var(--header-bg); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .topbar { padding: 0 28px; gap: 10px; } }
.search { position: relative; flex: 1 1 auto; min-width: 0; max-width: 460px; }
.search > .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input { min-height: 34px; padding: 6px 34px 6px 34px; border-radius: 999px; background: rgba(var(--tint), .05); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.topbar-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
@media (max-width: 719.98px) {
  .search kbd { display: none; }
  .search input { padding-right: 12px; }
  .topbar .create-btn { width: 34px; padding: 0; }
  .create-btn .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Account menu */
.account { position: relative; }
.account summary { list-style: none; cursor: pointer; border-radius: 999px; display: flex; }
.account summary::-webkit-details-marker { display: none; }
.account-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 230px; max-width: calc(100vw - 24px); padding: 6px;
  background: var(--ink); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.account-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.account-who p { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.account-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu form { margin: 0; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; border: 0; background: none;
  color: var(--text); font: inherit; font-size: .875rem; text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: rgba(var(--tint), .07); color: var(--fg); }
.menu-item .ico { width: 16px; height: 16px; color: var(--muted); }

/* Page heads, crumbs */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin: 0; min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: .78rem; color: var(--muted); margin: 0 0 6px; min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; }
.crumbs .sep { opacity: .5; }
.crumbs .tag { margin: 0; }
.title-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-bottom: 14px; align-items: start; }
@media (min-width: 1000px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid-2 > .panel { margin-bottom: 0; }
.stack > * + * { margin-top: 12px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(var(--tint), .07); color: var(--text); font: 500 .8438rem/1 var(--body);
  text-decoration: none; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background .15s, box-shadow .15s, border-color .15s, color .15s; }
.btn:hover { background: rgba(var(--tint), .15); color: var(--fg); }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--fg); color: var(--on-fg); border-color: var(--fg); }
.btn-primary:hover { background: var(--fg-hover); color: var(--on-fg); box-shadow: 0 0 0 4px rgba(var(--tint), .1); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(var(--tint), .08); }
.btn-danger { background: transparent; color: var(--ko); border-color: color-mix(in srgb, var(--ko) 45%, transparent); }
.btn-danger:hover { color: var(--ko); background: color-mix(in srgb, var(--ko) 12%, transparent); }
.btn-danger-text { color: var(--ko); }
.btn-sm { min-height: 30px; padding: 0 11px; font-size: .8125rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; flex-shrink: 0; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(var(--tint), .06); color: var(--text); cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover { background: rgba(var(--tint), .14); color: var(--fg); }
.icon-btn .ico { width: 16px; height: 16px; }
.icon-btn-sm { width: 28px; height: 28px; }
.icon-btn-sm .ico { width: 14px; height: 14px; }
.icon-btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.icon-btn-ghost:hover { color: var(--fg); }
.icon-btn-primary { background: var(--fg); color: var(--on-fg); border-color: var(--fg); }
.icon-btn-primary:hover { background: var(--fg-hover); color: var(--on-fg); }
.icon-btn-danger:hover { color: var(--ko); border-color: color-mix(in srgb, var(--ko) 45%, transparent); background: color-mix(in srgb, var(--ko) 12%, transparent); }
details > summary.btn, details > summary.icon-btn { list-style: none; }
details > summary.btn::-webkit-details-marker, details > summary.icon-btn::-webkit-details-marker { display: none; }
details[open] > summary.icon-btn { background: rgba(var(--tint), .16); color: var(--fg); }
.link-btn { color: var(--text); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.toolbar > form { margin: 0; display: flex; }
.corner-theme { position: fixed; top: 14px; right: 14px; z-index: 10; backdrop-filter: blur(8px); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 500; font-size: .8125rem; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; font-size: .875rem; color: var(--text); background: rgba(var(--tint), .03);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 6px 10px; min-height: 34px; min-width: 0; }
select { cursor: pointer; }
select option, select optgroup { background: var(--ink); color: var(--text); }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: rgba(var(--tint), .28); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px rgba(var(--tint), .12); }
[aria-invalid="true"] { border-color: var(--ko); }
input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--fg); margin: 0; flex-shrink: 0; }
input[type="file"] { padding: 4px; font-size: .8125rem; color: var(--muted); }
input[type="file"]::file-selector-button { margin-right: 10px; min-height: 26px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(var(--tint), .08); color: var(--text); font: 500 .8125rem/1 var(--body); cursor: pointer; }
.field { min-width: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; font-size: .875rem; color: var(--text); margin: 0; cursor: pointer; min-height: 34px; }
.checks { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.field-row { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .field-row, .field-row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .field-row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.input-key { text-transform: uppercase; font-family: var(--mono); max-width: 180px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.inline-form .field { margin: 0; }
.inline-form .grow { flex: 1 1 180px; }
.inline-form select, .inline-form input:not([type="checkbox"]) { width: auto; max-width: 100%; }
.inline-form .grow input { width: 100%; }
.copy { font-family: var(--mono); font-size: .78rem; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.filters input[type="search"] { flex: 1 1 180px; max-width: 280px; width: auto; }
.filters select { width: auto; max-width: 100%; }
.filters-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-items: end; gap: 10px 12px; padding: 14px;
  background: linear-gradient(180deg, rgba(var(--tint), .035), rgba(var(--tint), .01)); border: 1px solid var(--line); border-radius: var(--radius); }
.filters-wrap .field { min-width: 0; }
.filters-wrap select, .filters-wrap input:not([type="checkbox"]) { width: 100%; max-width: none; }
.filters-wrap .actions { justify-content: flex-start; grid-column: 1 / -1; }
@media (min-width: 900px) { .filters-wrap .actions { grid-column: auto / span 2; justify-content: flex-end; } }
.field-label { display: flex; align-items: center; gap: 5px; }
.field-label .ico { width: 13px; height: 13px; }

/* ---------- Messages ---------- */
.flashes:empty { display: none; }
.flash { display: flex; align-items: flex-start; gap: 10px; border-radius: 12px; padding: 9px 12px; margin: 0 0 14px; font-size: .875rem;
  border: 1px solid; color: var(--text); overflow-wrap: anywhere; }
.flash::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.flash-ok { --c: var(--ok); background: color-mix(in srgb, var(--ok) 9%, transparent); border-color: color-mix(in srgb, var(--ok) 38%, transparent); }
.flash-ko { --c: var(--ko); background: color-mix(in srgb, var(--ko) 9%, transparent); border-color: color-mix(in srgb, var(--ko) 42%, transparent); }
div.flash { display: block; } div.flash::before { display: none; }
div.flash p:last-child { margin: 0; }

/* ---------- Panels, rows, tables ---------- */
.panel { position: relative; min-width: 0; background: linear-gradient(180deg, rgba(var(--tint), .035), rgba(var(--tint), .01)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 12px; margin-bottom: 10px; flex-wrap: wrap; min-width: 0; }
.panel-head > * { min-width: 0; }
.panel-head h2 { margin: 0 0 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-head h2 > .ico { width: 16px; height: 16px; color: var(--muted); }
.panel-head p { margin: 2px 0 0; }
.panel-summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font: 700 .95rem/1.3 var(--head); color: var(--fg); list-style: none; }
.panel-summary::-webkit-details-marker { display: none; }
.panel-summary .ico { width: 16px; height: 16px; }
details.panel[open] .panel-summary { margin-bottom: 14px; }
.panel-link { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.panel-link:hover { color: var(--fg); }
.panel-link .ico { width: 14px; height: 14px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row, .sprint-row, .epic-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); min-width: 0; }
.row:first-child, .sprint-row:first-child, .epic-row:first-child { border-top: 0; }
.row > *, .sprint-row > *, .epic-row > * { flex-shrink: 0; }
.row-title { flex: 1 1 auto !important; min-width: 0; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; }
.row-title:hover { color: var(--fg); }
.row-title .card-key { margin-right: 4px; }
.row time { font: 400 .72rem/1 var(--mono); color: var(--muted); white-space: nowrap; }
@media (max-width: 479.98px) { .row time { display: none; } }
@media (max-width: 599.98px) { .row .status .status-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .row .status { padding: 0 4px; } }
.sprint-row { flex-wrap: wrap; }
.sprint-row .row-title { flex-basis: 60% !important; }
.sprint-row .progress { flex: 1 1 100%; order: 3; }
.epic-row { flex-wrap: wrap; gap: 6px 8px; }
.epic-row > a { flex: 1 1 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; text-decoration: none; }
.epic-row .progress { flex: 1 1 auto; }
.table-wrap { overflow: auto; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--tint), .015); margin-bottom: 14px; }
@media (min-width: 900px) { .table-wrap-tall { max-height: calc(100vh - 210px); } }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .8438rem; }
.table th, .table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { position: sticky; top: 0; z-index: 1; background: var(--panel); font: 500 .66rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td, .table tbody tr:hover th { background: rgba(var(--tint), .025); }
.table tbody th { font-weight: 500; }
.table td a { color: var(--text); text-decoration: none; } .table td a:hover { color: var(--fg); text-decoration: underline; }
.panel > .table th:first-child, .panel > .table td:first-child { padding-left: 0; }
.panel > .table th:last-child, .panel > .table td:last-child { padding-right: 0; }
.cell-title { min-width: 200px; max-width: 440px; }
.cell-title a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-title .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cell-title .tag { margin: 0; }
.cell-flex { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: .8rem; }
.inactive { opacity: .55; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person > div { min-width: 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; font-family: var(--mono); font-size: .78rem; }
.stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: .9rem; margin: 0 0 14px; }
.stat strong { font: 800 1.5rem/1 var(--head); color: var(--fg); letter-spacing: -.02em; }
.result-count { font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

/* Headings with an icon, checkbox labels with an icon, compact forms inside tables */
.panel > h2, .stack > h2, section > h2 { display: flex; align-items: center; gap: 8px; }
h2 > .ico { width: 16px; height: 16px; color: var(--muted); }
.check .ico { width: 14px; height: 14px; color: var(--muted); }
.table .inline-form { flex-wrap: nowrap; align-items: center; }
.table .inline-form .check { min-height: 28px; white-space: nowrap; }
.table .inline-form select, .table .inline-form input:not([type="checkbox"]) { min-height: 30px; }
.filters .field-label { margin: 0; }
.distribution td, .distribution th { padding-top: 6px; padding-bottom: 6px; }

/* ---------- Progress (width classes: CSP forbids style="") ---------- */
.progress { height: 5px; background: rgba(var(--tint), .1); border-radius: 999px; overflow: hidden; min-width: 40px; }
.progress-bar { display: block; height: 100%; background: var(--fg); border-radius: 999px; width: 0; box-shadow: 0 0 10px rgba(10, 101, 231, .55); }
.w-0 { width: 0%; } .w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; } .w-20 { width: 20%; } .w-25 { width: 25%; } .w-30 { width: 30%; }
.w-35 { width: 35%; } .w-40 { width: 40%; } .w-45 { width: 45%; } .w-50 { width: 50%; } .w-55 { width: 55%; } .w-60 { width: 60%; } .w-65 { width: 65%; }
.w-70 { width: 70%; } .w-75 { width: 75%; } .w-80 { width: 80%; } .w-85 { width: 85%; } .w-90 { width: 90%; } .w-95 { width: 95%; } .w-100 { width: 100%; }

/* ---------- Chips: avatars, types, priorities, statuses, tags, keys ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font: 700 .68rem/1 var(--head); letter-spacing: .02em;
  color: #FFF; flex-shrink: 0; user-select: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.avatar-xs { width: 22px; height: 22px; font-size: .56rem; }
.avatar-sm { width: 30px; height: 30px; }
.avatar-c0 { background: linear-gradient(135deg, #0A65E7, #05316F); }
.avatar-c1 { background: linear-gradient(135deg, #8A2AE3, #3D1166); }
.avatar-c2 { background: linear-gradient(135deg, #3A3A3A, #000); }
.avatar-c3 { background: linear-gradient(135deg, #0E7C86, #053B40); }
.avatar-c4 { background: linear-gradient(135deg, #B5470B, #4F1E04); }
.avatar-none { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); box-shadow: none; }
/* Meaning colour of a chip: --c */
.type-epic, .status-in-review { --c: var(--review); }
.type-story, .status-done { --c: var(--ok); }
.type-task, .status-in-progress { --c: var(--info); }
.type-bug { --c: var(--ko); }
.type-subtask, .status-todo { --c: var(--muted); }
.prio-highest { --c: var(--ko); } .prio-high { --c: var(--orange); } .prio-medium { --c: var(--warn); } .prio-low { --c: var(--info); } .prio-lowest { --c: var(--faint); }
.type-ico { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); }
.type-ico .ico { width: 13px; height: 13px; stroke-width: 2.1; }
.prio { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex-shrink: 0; color: var(--c); }
.prio .ico { width: 16px; height: 16px; stroke-width: 2.3; }
.status { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 999px; flex-shrink: 0; max-width: 100%;
  font: 500 .66rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.status .ico { width: 13px; height: 13px; stroke-width: 2; }
.status-label { overflow: hidden; text-overflow: ellipsis; line-height: 1.4; padding-top: 1px; }
/* Icon-only status (lines of the backlog): the label stays for screen readers and in the tooltip */
.status-compact, .line .status { padding: 0; width: 22px; justify-content: center; }
.status-compact .status-label, .line .status .status-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tag { display: inline-block; vertical-align: middle; max-width: 100%; font: 500 .66rem/1.5 var(--mono); color: var(--muted); background: rgba(var(--tint), .06);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; text-decoration: none; margin: 0 4px 4px 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
a.tag:hover { color: var(--fg); border-color: var(--line-strong); }
.tag-epic { --c: var(--review); color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 28%, transparent); max-width: 160px; }
.tag-active { --c: var(--info); color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 28%, transparent); }
.tag-internal { --c: var(--warn); color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 28%, transparent); }
.tag-ok { --c: var(--ok); color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); border-color: color-mix(in srgb, var(--c) 26%, transparent); }
.card-key { font: 500 .72rem/1 var(--mono); color: var(--muted); white-space: nowrap; flex-shrink: 0; text-decoration: none; }
a.card-key:hover { color: var(--fg); }
.points { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; flex-shrink: 0;
  font: 500 .66rem/1 var(--mono); background: rgba(var(--tint), .1); color: var(--text); border-radius: 999px; }
.due { display: inline-flex; align-items: center; gap: 3px; font: 500 .68rem/1 var(--mono); color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.due .ico { width: 12px; height: 12px; }
.project-key { display: inline-block; font: 500 .66rem/1 var(--mono); letter-spacing: .05em; color: var(--fg); background: rgba(var(--tint), .07);
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 4px 6px; flex-shrink: 0; white-space: nowrap; -webkit-text-fill-color: var(--fg); }
.project-key-lg { font-size: .78rem; padding: 6px 8px; border-radius: 8px; }

/* ---------- Project header, tabs, project cards ---------- */
.project-header { margin-bottom: 14px; min-width: 0; }
.project-header h1 { margin-bottom: 10px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; margin-bottom: -1px; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; white-space: nowrap; font-size: .875rem; }
.tabs a .ico { width: 16px; height: 16px; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--fg); }
@media (max-width: 599.98px) {
  .tabs { justify-content: space-between; }
  .tabs a { flex: 1; justify-content: center; padding: 10px 6px; }
  .tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.project-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.project-card { display: flex; flex-direction: column; gap: 8px; color: var(--text); text-decoration: none; margin: 0; transition: border-color .2s, transform .2s; }
.project-card:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-2px); }
.project-card h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-card p { margin: 0; }
.project-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.project-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .78rem; color: var(--muted); margin-top: auto; }
.project-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.project-card-meta .ico { width: 14px; height: 14px; }
.project-card.archived { opacity: .6; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Board ---------- */
.sprint-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 14px; margin-bottom: 12px; min-width: 0;
  background: linear-gradient(180deg, rgba(var(--tint), .035), rgba(var(--tint), .01)); border: 1px solid var(--line); border-radius: var(--radius); }
.sprint-bar > div:first-child { flex: 1 1 260px; min-width: 0; }
.sprint-bar h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.sprint-bar h2 .ico { width: 16px; height: 16px; color: var(--muted); }
.sprint-bar p { margin: 0; }
.sprint-goal { display: flex; align-items: center; gap: 6px; overflow: hidden; }
.sprint-goal span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sprint-goal .ico { width: 13px; height: 13px; }
.sprint-stats { display: flex; align-items: center; gap: 12px; font: 500 .72rem/1 var(--mono); color: var(--muted); white-space: nowrap; }
.sprint-stats span { display: inline-flex; align-items: center; gap: 5px; }
.sprint-stats .ico { width: 14px; height: 14px; }
.board-hint { display: flex; gap: 8px; align-items: flex-start; }
.board-hint .ico { width: 16px; height: 16px; margin-top: 1px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 10px; align-items: start;
  min-width: 0; scroll-snap-type: x proximity; }
@media (max-width: 719.98px) { .board { grid-auto-columns: min(84vw, 320px); } }
.column { min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column; min-height: 180px;
  background: rgba(var(--tint), .025); border: 1px solid var(--line); border-radius: var(--radius); }
.column-head { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line);
  font: 500 .68rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.column-head > .ico { width: 14px; height: 14px; color: var(--c); }
.column-head .count { margin-left: auto; }
.column-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 8px; min-height: 120px; flex: 1; align-content: start;
  border-radius: 0 0 var(--radius) var(--radius); }
.column-body.over, .list-drop.over { background: rgba(10, 101, 231, .07); outline: 1px dashed color-mix(in srgb, var(--info) 60%, transparent); outline-offset: -4px; }
.card { position: relative; min-width: 0; display: grid; gap: 7px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, rgba(var(--tint), .06), rgba(var(--tint), .02)), var(--ink); transition: border-color .15s, box-shadow .15s; }
.card[draggable="true"] { cursor: grab; }
.card:hover { border-color: var(--line-strong); box-shadow: 0 10px 30px -18px rgba(10, 101, 231, .5); }
.card.dragging, .line.dragging { opacity: .4; }
.card-done .card-title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(var(--tint), .3); }
.card-title { color: var(--text); text-decoration: none; font-size: .875rem; line-height: 1.35; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-title:hover { color: var(--fg); }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.card-tags .tag { margin: 0; max-width: 100%; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.card-meta .avatar { margin-left: auto; }

/* ---------- Backlog ---------- */
.backlog-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1280px) { .backlog-layout { grid-template-columns: minmax(0, 1fr) 280px; } }
.backlog-main, .epics { min-width: 0; }
.sprint-block .panel-head h2 .tag { margin: 0; }
.sprint-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font: 500 .7rem/1.3 var(--mono); color: var(--muted); }
.sprint-meta span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sprint-meta .ico { width: 13px; height: 13px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.head-actions > form { margin: 0; display: flex; }
.list-drop { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-height: 48px; border-radius: 12px; padding: 2px; }
.line { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 8px; font-size: .8438rem; cursor: grab;
  background: rgba(var(--tint), .03); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, background .15s; }
.line > * { flex-shrink: 0; }
.line:hover { border-color: var(--line-strong); background: rgba(var(--tint), .05); }
.grip { display: inline-flex; color: var(--faint); }
.grip .ico { width: 14px; height: 14px; }
.line-title { flex: 1 1 auto !important; min-width: 0; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-title:hover { color: var(--fg); }
.line .tag { margin: 0; flex-shrink: 1; min-width: 0; max-width: 140px; }
/* Narrow lines: secondary chips go first, then the key */
@media (max-width: 1439.98px) { .backlog-layout .line .tag-epic { max-width: 110px; } }
@media (max-width: 899.98px) { .line .tag-epic { display: none; } }
@media (max-width: 599.98px) { .line .card-key, .line .grip, .line .prio { display: none; } }
.drop-hint { color: var(--faint); font-size: .8125rem; text-align: center; padding: 10px; margin: 0; border: 1px dashed var(--line-strong); border-radius: 10px; }
.popover { position: relative; }
.popover summary { list-style: none; }
.popover summary::-webkit-details-marker { display: none; }
.popover-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(300px, calc(100vw - 32px)); padding: 14px;
  background: var(--ink); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); }
.popover-title { font: 700 .875rem/1.3 var(--head); color: var(--fg); margin: 0; }
/* Phones: the popover becomes a bottom sheet, so it never opens off-screen whatever the position of its button */
@media (max-width: 599.98px) {
  .popover-body { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto; width: auto; z-index: 60; max-height: calc(100vh - 24px); overflow-y: auto; }
}

/* ---------- Issue page ---------- */
.issue-layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .issue-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.issue-main { min-width: 0; }
.issue-title { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.issue-title .type-ico { margin-top: 6px; width: 24px; height: 24px; border-radius: 7px; }
.issue-title .type-ico .ico { width: 15px; height: 15px; }
.issue-title h1 { overflow-wrap: anywhere; margin-bottom: 8px; min-width: 0; }
.issue-key { font: 500 .72rem/1 var(--mono); color: var(--muted); }
.issue-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 18px; }
.issue-actions > form { margin: 0; display: flex; align-items: center; }
.issue-actions .sep-v { width: 1px; height: 20px; background: var(--line-strong); margin: 0 4px; }
.block { margin-bottom: 24px; min-width: 0; }
.block-title { display: flex; align-items: center; gap: 7px; font: 500 .68rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px; }
.block-title .ico { width: 14px; height: 14px; }
.prose { overflow-wrap: anywhere; font-size: .9rem; }
.prose > :last-child { margin-bottom: 0; }
.prose pre { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; font: .8rem/1.5 var(--mono); }
.prose code { font: .86em var(--mono); background: rgba(var(--tint), .08); border-radius: 4px; padding: 1px 4px; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 0 0 .8em; padding-left: 12px; border-left: 2px solid var(--line-strong); color: var(--muted); }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; } .prose th, .prose td { border: 1px solid var(--line); padding: 5px 8px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.issue-side { min-width: 0; background: linear-gradient(180deg, rgba(var(--tint), .04), rgba(var(--tint), .012)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; }
@media (min-width: 1100px) { .issue-side { position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 32px); overflow-y: auto; } }
.status-form { margin: 0; }
.status-select { font: 600 .8125rem/1 var(--body); }
.status-select.status-done, .status-select.status-in-progress, .status-select.status-in-review { color: var(--c); border-color: color-mix(in srgb, var(--c) 40%, transparent);
  background: color-mix(in srgb, var(--c) 8%, transparent); }
.fields { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr); gap: 8px 12px; margin: 14px 0 0; font-size: .8438rem; align-items: center; }
.fields dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.fields dt .ico { width: 14px; height: 14px; }
.fields dd { margin: 0; min-width: 0; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.fields dd form { width: 100%; margin: 0; }
.fields dd .tag { margin: 0; }
.fields .mono { font: 400 .75rem/1.3 var(--mono); }
.files { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.file { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--tint), .025); }
.file > form { margin: 0; flex-shrink: 0; }
.file-ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: rgba(var(--tint), .06); color: var(--muted); flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-info a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; }
.file-info .muted { font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb { flex-shrink: 0; }
.thumb img { display: block; width: 56px; height: 42px; object-fit: cover; border-radius: 6px; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.upload input[type="file"] { flex: 1 1 220px; width: auto; max-width: 420px; }
.upload .muted { flex-basis: 100%; font-size: .75rem; }
.block-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--muted); padding: 9px 12px; font: inherit; font-size: .875rem; cursor: pointer; white-space: nowrap; }
.tab .ico { width: 15px; height: 15px; }
.tab:hover { color: var(--fg); }
@media (max-width: 479.98px) { .tab { padding: 9px 8px; font-size: .8125rem; gap: 5px; } }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.comments, .history { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.comment { display: flex; gap: 10px; min-width: 0; }
.comment-body { flex: 1; min-width: 0; background: rgba(var(--tint), .025); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.comment.internal .comment-body { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 5%, transparent); }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 4px; font-size: .8438rem; }
.comment-head time { font: 400 .72rem/1 var(--mono); }
.comment-head .tag { margin: 0; }
.comment-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: flex-start; }
.comment-actions form { margin: 0; }
.inline-edit summary { list-style: none; }
.inline-edit summary::-webkit-details-marker { display: none; }
.inline-edit[open] { flex-basis: 100%; order: 2; }
.inline-edit[open] form { margin-top: 8px; }
.comment-form { margin-left: 40px; }
@media (max-width: 599.98px) { .comment-form { margin-left: 0; } }
.comment-form .actions { justify-content: space-between; }
.history li { display: flex; gap: 10px; min-width: 0; }
.history li > div { min-width: 0; }
.history p { margin: 0; }
.history time { font: 400 .72rem/1 var(--mono); }
.history-change { color: var(--muted); overflow-wrap: anywhere; }
.history del { color: var(--faint); }
.history ins { text-decoration: none; color: var(--text); }
.time-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .875rem; margin-bottom: 12px; }
.time-summary span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.time-summary strong { color: var(--fg); font-family: var(--mono); font-weight: 500; }
.time-summary .ico { width: 14px; height: 14px; }

/* ---------- Charts (dataviz rules: thin marks, recessive grid, legend + table view, hover tooltip) ---------- */
.chart-panel .panel-head { margin-bottom: 4px; }
.chart { position: relative; margin: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart svg [hidden] { display: none; }   /* the hidden attribute is ignored on SVG elements */
.grid line { stroke: var(--line); stroke-width: 1; }
.tick { fill: var(--muted); font: 400 10px var(--mono); }
.line-a { fill: none; stroke: var(--series-a); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.line-ref { fill: none; stroke: var(--series-ref); stroke-width: 1.5; stroke-dasharray: 5 5; }
.dot-a { fill: var(--series-a); stroke: var(--ink); stroke-width: 2; }
.crosshair { stroke: var(--muted); stroke-width: 1; }
.hit { fill: transparent; cursor: crosshair; }
.hit:focus { outline: none; fill: rgba(var(--tint), .05); }
.bar-a { fill: var(--series-a); } .bar-b { fill: var(--series-b); }
.bar-a:hover, .bar-b:hover, .bar-a:focus, .bar-b:focus { outline: none; stroke: var(--fg); stroke-width: 1.5; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; font-size: .78rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.key { display: inline-block; }
.key-line { width: 18px; height: 0; border-top: 2px solid; }
.key-line.key-a { border-color: var(--series-a); }
.key-line.key-ref { border-top: 2px dashed var(--series-ref); }
.key-bar { width: 10px; height: 10px; border-radius: 3px; }
.key-bar.key-a { background: var(--series-a); } .key-bar.key-b { background: var(--series-b); }
.tooltip { position: absolute; pointer-events: none; background: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 10px; font-size: .78rem; box-shadow: var(--shadow); min-width: 140px; z-index: 5; }
.tooltip strong { display: block; font: 500 .7rem/1.2 var(--mono); color: var(--muted); margin-bottom: 4px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 8px; }
.tooltip .tt-row b { font-variant-numeric: tabular-nums; color: var(--fg); }
.table-view { margin-top: 10px; font-size: .8438rem; }
.table-view summary { cursor: pointer; color: var(--muted); font: 500 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 0; }
.table-view summary:hover { color: var(--fg); }

/* ---------- Login and error pages ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 64px 16px 24px;
  background: radial-gradient(45% 50% at 85% 5%, var(--glow-a), transparent 70%), radial-gradient(40% 45% at 5% 95%, var(--glow-b), transparent 70%),
    radial-gradient(25% 25% at 50% 0%, var(--glow-c), transparent 70%), var(--ink); }
.auth-box { width: 100%; max-width: 400px; padding: 28px 24px; border: 1px solid var(--line-strong); border-radius: 22px;
  background: color-mix(in srgb, var(--ink) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
@media (min-width: 480px) { .auth-box { padding: 32px; } }
.auth-logo { display: flex; align-items: center; gap: 10px; color: var(--fg); font: 800 1.35rem/1 var(--head); letter-spacing: -.035em; margin: 0 0 22px; }
.auth h1 { font-size: 1.6rem; }
.auth-box > p.small { margin: 14px 0 0; text-align: center; }
.auth-box .btn-block { min-height: 40px; font-size: .9rem; margin-top: 6px; }

/* ---------- Public bug report: explanation on the left, airy form card on the right, brand glows behind ---------- */
.report-box { max-width: 560px; }
.report-box .field { margin: 0; }
.report-page { place-items: center; padding: 64px 20px 32px; background:
    radial-gradient(40% 50% at 12% 10%, var(--glow-a), transparent 70%),
    radial-gradient(35% 45% at 90% 85%, var(--glow-b), transparent 70%),
    radial-gradient(25% 30% at 60% 0%, var(--glow-c), transparent 70%), var(--ink); }
.report { width: 100%; max-width: 1080px; display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .report { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; } }
.report-intro { min-width: 0; }
.report-intro h1 { font: 800 clamp(2rem, 4.2vw, 3rem)/1.08 var(--head); letter-spacing: -.035em; margin: 8px 0 14px;
  background: linear-gradient(180deg, var(--fg) 30%, var(--heading-end)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.report-lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 28px; max-width: 40ch; }
.report-tips { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.report-tips li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, rgba(var(--tint), .035), rgba(var(--tint), .01)); }
.report-tips li > span:last-child { display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: .92rem; min-width: 0; }
.report-tips strong { color: var(--fg); font-family: var(--head); font-weight: 600; }
.report-tip-ico { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(180deg, var(--tile-top), var(--tile-bottom)); border: 1px solid var(--line-strong); color: var(--fg);
  box-shadow: inset 0 1px 0 rgba(var(--tint), .12), 0 12px 26px -12px rgba(138, 42, 227, .5), 0 8px 20px -10px rgba(10, 101, 231, .5); }
.report-tip-ico svg, .dropzone svg, .report-send svg, .report-done svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.report-page-link { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: .875rem; min-width: 0; }
.report-page-link span { font: 500 .68rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.report-card { min-width: 0; background: color-mix(in srgb, var(--ink) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong); border-radius: 22px; padding: 28px 22px; box-shadow: var(--shadow); }
@media (min-width: 600px) { .report-card { padding: 36px 36px 32px; } }
.report-form { display: grid; gap: 20px; }
.report-form .field { margin: 0; }
.report-form label, .report-form .label { display: block; font-weight: 500; font-size: .9rem; color: var(--text); margin-bottom: 8px; }
.report-form .req { color: var(--fg); }
.report-form input:not([type="file"]), .report-form textarea { min-height: 46px; padding: 11px 14px; border-radius: 12px; font-size: .95rem; }
.report-form .field-row { gap: 20px; }
.dropzone { position: relative; display: flex !important; align-items: center; gap: 14px; margin: 0 !important; padding: 16px 18px; border: 1.5px dashed var(--line-strong);
  border-radius: 14px; cursor: pointer; background: rgba(var(--tint), .02); transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--fg); background: rgba(var(--tint), .05); }
.dropzone > svg { width: 26px; height: 26px; color: var(--fg); flex: none; }
.dropzone > span { display: flex; flex-direction: column; gap: 2px; font-size: .875rem; min-width: 0; }
.dropzone strong { font-weight: 500; color: var(--text); font-size: .95rem; overflow-wrap: anywhere; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.report-send { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border-radius: 999px; font-size: .95rem; margin-top: 4px; }
.report-note { margin: 0; text-align: center; }
.report-done { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; margin-bottom: 14px;
  background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.report-done svg { width: 28px; height: 28px; }
.report-card h1 { font: 800 1.9rem/1.15 var(--head); margin: 0 0 12px; }
.report-back { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.report-back .btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; border-radius: 999px; padding: 0 16px; font-size: .875rem; }
.report-back svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.report-kicker { font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
