/* Kingswall bug panel.
   Quiet, cool neutrals and a navy ink; colour is spent on meaning only —
   the status of a report and how badly a bug hurts. The one bold element
   is the journey: the five steps a report travels, drawn with motion. */

@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/Onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/Onest-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(/fonts/Unbounded-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(/fonts/Unbounded-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --bg: #eef1f6;
  --surface: #ffffff;
  --sunken: #e5e9f1;
  --ink: #151c2c;
  --ink-2: #4a5468;
  --ink-3: #737d91;
  --line: #cfd6e2;
  --focus: #3e63f5;

  --s-new: #3e7bfa;
  --s-accepted: #7a5af8;
  --s-in_progress: #e08a00;
  --s-fixed: #149a4b;
  --s-verified: #0b8f86;
  --s-reopened: #e5484d;
  --s-closed: #8a94a6;

  --sev-crash: #e5484d;
  --sev-blocker: #f06a25;
  --sev-major: #e08a00;
  --sev-minor: #8a94a6;

  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --text: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sheet: 22px;
  --r-ctl: 12px;
  --float: 0 1px 2px rgba(21, 28, 44, 0.06), 0 12px 32px -12px rgba(21, 28, 44, 0.28);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e1320;
    --surface: #171e30;
    --sunken: #1f2740;
    --ink: #e8ecf5;
    --ink-2: #a9b2c6;
    --ink-3: #7b859b;
    --line: #38435f;
    --focus: #7d98ff;
    --s-new: #6f9dff;
    --s-accepted: #a48cff;
    --s-in_progress: #f5a524;
    --s-fixed: #3cc673;
    --s-verified: #2bbfb3;
    --s-reopened: #ff6b6e;
    --s-closed: #8d97ab;
    --sev-crash: #ff6b6e;
    --sev-blocker: #ff8a4c;
    --sev-major: #f5a524;
    --sev-minor: #8d97ab;
    --float: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  }
}

/* Status and severity carry their colour in --c / --sev. */
.journey, .mini { --c: var(--s-new); }
.badge { --c: var(--s-closed); }
.st-new { --c: var(--s-new); }
.st-accepted { --c: var(--s-accepted); }
.st-in_progress { --c: var(--s-in_progress); }
.st-fixed { --c: var(--s-fixed); }
.st-verified { --c: var(--s-verified); }
.st-reopened { --c: var(--s-reopened); }
.st-wontfix, .st-duplicate { --c: var(--s-closed); }
.sev-crash { --sev: var(--sev-crash); }
.sev-blocker { --sev: var(--sev-blocker); }
.sev-major { --sev: var(--sev-major); }
.sev-minor { --sev: var(--sev-minor); }

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, video { max-width: 100%; display: block; }
a { color: var(--focus); text-underline-offset: 3px; }
p { margin: 0 0 12px; }
code { font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: var(--sunken); }

h1 {
  margin: 0 0 12px;
  font: 600 clamp(24px, 6.2vw, 34px)/1.16 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h2 { margin: 0 0 14px; font: 600 18px/1.3 var(--display); letter-spacing: -0.01em; }
h3 { margin: 22px 0 8px; font: 600 16px/1.35 var(--text); }
.lead { font-size: 17px; color: var(--ink-2); max-width: 60ch; }
.hint, .muted { color: var(--ink-3); font-size: 14.5px; }
.hint { margin: 6px 0 0; }
.small { font-size: 14px; }
.ok { color: var(--s-fixed); }
.small.ok { display: inline-flex; align-items: center; gap: 4px; }
.small.ok .i { width: 16px; height: 16px; }
.req { color: var(--s-reopened); font-weight: 600; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- chrome */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  view-transition-name: bar;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 16px/1 var(--display); letter-spacing: -0.01em; }
.brand .mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: var(--bg); }
.brand .mark .i { width: 21px; height: 21px; stroke-width: 2; }
.account { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.account-name { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-weight: 500; font-size: 14.5px; }
.account form { margin: 0; }
.account .btn { gap: 6px; }
.account .btn .i { width: 17px; height: 17px; }
@media (max-width: 380px) { .account .btn span { display: none; } .account .btn { padding: 6px 10px; } }

.topnav { display: none; margin-left: auto; gap: 4px; align-items: center; }
.topnav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 500; text-decoration: none; transition: background 0.15s, color 0.15s; }
.topnav a:hover { background: var(--sunken); color: var(--ink); }
.topnav a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(21, 28, 44, 0.08); }
.topnav a.new { background: var(--ink); color: var(--bg); margin: 0 6px; }
.topnav a.new .i { width: 18px; height: 18px; }

.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 460px;
  margin: 0 auto;
  padding: 6px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  box-shadow: var(--float);
  view-transition-name: tabbar;
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 18px; color: var(--ink-3); font-size: 12px; font-weight: 500; text-decoration: none; transition: color 0.15s; }
.tabbar a .i { width: 24px; height: 24px; transition: transform 0.25s var(--ease); }
.tabbar a.on { color: var(--ink); }
.tabbar a.on .i { transform: translateY(-1px) scale(1.06); }
.tabbar a.plus { width: 58px; height: 58px; justify-content: center; margin: -26px 10px 0; border-radius: 20px; background: var(--ink); color: var(--bg); box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--ink) 80%, transparent); transition: transform 0.2s var(--ease); }
.tabbar a.plus .i { width: 26px; height: 26px; stroke-width: 2.3; }
.tabbar a.plus:active { transform: scale(0.94); }

main { max-width: 680px; margin: 0 auto; padding: 22px 16px 48px; }
main.with-tabs { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
main.wide { max-width: 1180px; }

@media (min-width: 820px) {
  .topnav { display: flex; }
  .topnav + .account { margin-left: 8px; padding-left: 14px; border-left: 1px solid var(--line); }
  .tabbar { display: none; }
  main { padding: 36px 24px 64px; }
  main.with-tabs { padding-bottom: 64px; }
}

/* ---------------------------------------------------------------- blocks */

.sheet { background: var(--surface); border-radius: var(--r-sheet); padding: 20px; }
.sheet + .sheet, .report-main > * + * { margin-top: 14px; }
.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
@media (min-width: 600px) { .sheet { padding: 26px 28px; } }

.page-head { margin: 4px 0 18px; }
.welcome { max-width: 560px; margin: 12px auto 22px; }
.welcome h1 { font-size: clamp(26px, 7.4vw, 40px); }
.greet { margin: 6px 0 28px; }
.greet .btn.big { margin-top: 6px; }

.stack { display: grid; gap: 18px; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; }
.two { display: grid; gap: 12px; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }


.empty { text-align: center; color: var(--ink-2); padding: 34px 22px; }
.empty p { margin: 0; }

.notice { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r-ctl); font-weight: 500; animation: drop-in 0.4s var(--ease) both; }
.notice.bad { background: color-mix(in srgb, var(--s-reopened) 12%, var(--surface)); color: color-mix(in oklab, var(--s-reopened) 72%, var(--ink)); }
.notice.ok { background: color-mix(in srgb, var(--s-fixed) 12%, var(--surface)); color: color-mix(in oklab, var(--s-fixed) 72%, var(--ink)); }

/* "Sent": a tick draws itself — the answer to pressing "Отправить". */
.sent { display: flex; gap: 14px; align-items: center; margin: 0 0 16px; padding: 16px 18px; border-radius: var(--r-sheet); background: color-mix(in srgb, var(--s-fixed) 11%, var(--surface)); animation: drop-in 0.45s var(--ease) both; }
.sent b { font-size: 17px; }
.sent p { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; }
.tick { width: 46px; height: 46px; flex: none; fill: none; stroke: var(--s-fixed); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.tick circle { stroke-dasharray: 145; stroke-dashoffset: 145; animation: draw 0.6s var(--ease) 0.15s forwards; }
.tick path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw 0.35s var(--ease) 0.65s forwards; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink);
  font: 600 15px/1.2 var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.15s, border-color 0.15s, box-shadow 0.2s;
}
.btn:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--ink) 70%, transparent); }
.btn.big { width: 100%; min-height: 56px; border-radius: 16px; font-size: 16.5px; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }
.btn.danger { background: transparent; color: var(--s-reopened); border-color: color-mix(in srgb, var(--s-reopened) 35%, var(--line)); }
.btn.danger:hover { background: color-mix(in srgb, var(--s-reopened) 8%, transparent); }
.btn.claude-btn { border-color: color-mix(in srgb, var(--s-accepted) 45%, var(--line)); color: color-mix(in oklab, var(--s-accepted) 75%, var(--ink)); }

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 13%, transparent);
  color: color-mix(in oklab, var(--c) 68%, var(--ink));
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.badge.claude { --c: var(--s-accepted); }
.badge.claude.idle { --c: var(--s-closed); }

/* --------------------------------------------------------------- journey */

.journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 22px 0 6px;
  padding: 0;
  list-style: none;
}
.journey::before, .journey::after { content: ""; position: absolute; top: 9px; left: 10%; height: 4px; border-radius: 2px; }
.journey::before { right: 10%; background: var(--line); }
.journey::after {
  width: calc(80% * var(--p, 0));
  background: var(--c);
  transform-origin: left center;
  animation: fill 1s var(--ease) 0.2s both;
}
.journey li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 0 1px; text-align: center; font-size: clamp(10.5px, 2.8vw, 12.5px); letter-spacing: -0.005em; line-height: 1.25; color: var(--ink-3); }
.journey i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); background: var(--surface); }
.journey li.done i { border-color: var(--c); background: var(--c); animation: pop 0.4s var(--ease) both; animation-delay: calc(0.2s + var(--i) * 0.22s); }
.journey li.now i { border-color: var(--c); animation: ring 1.4s var(--ease) calc(0.3s + var(--i) * 0.22s) 2; }
.journey li.done span { color: var(--ink-2); }
.journey li.now span { color: var(--ink); font-weight: 600; }
.journey-note { margin: 10px 0 0; color: var(--ink-2); font-size: 14.5px; }
.sheet .journey { margin-left: -14px; margin-right: -14px; }
@media (min-width: 600px) { .sheet .journey { margin-left: -8px; margin-right: -8px; } }


@media (min-width: 600px) { .journey li { font-size: 13.5px; } }

.mini { display: inline-flex; gap: 3px; }
.mini i { width: 12px; height: 4px; border-radius: 2px; background: var(--line); }
.mini i.on { background: var(--c); }

/* ------------------------------------------------------------------ lists */

.list-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); font: 600 13px/1 var(--text); }

.list { background: var(--surface); border-radius: var(--r-sheet); overflow: hidden; }
.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 14px;
  padding: 15px 16px 15px 20px;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid var(--line);
  transition: background 0.15s;
}
.row:first-child { border-top: 0; }
.row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 3px 3px 0; background: var(--sev, transparent); }
a.row:hover { background: color-mix(in srgb, var(--sunken) 55%, var(--surface)); }
a.row:active { background: var(--sunken); }
.row-num { grid-column: 1; font: 600 12px/1.4 var(--display); color: var(--ink-3); }
.row-title { grid-column: 1; font-weight: 600; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.row-facts { grid-column: 1; display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--ink-3); font-size: 13.5px; }
.with-icon { display: inline-flex; align-items: center; gap: 3px; }
.with-icon .i { width: 15px; height: 15px; }
.row-side { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; }
.badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row:target { animation: flash 1.6s var(--ease) 1; }

@media (max-width: 420px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row-side { grid-column: 1; grid-row: auto; flex-direction: row; justify-content: space-between; align-items: center; margin-top: 6px; }
  .badges { flex-direction: row; }
}

.filter { margin-bottom: 12px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 500; font-size: 14.5px; text-decoration: none; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.tabs a:hover { color: var(--ink); }
.tabs a b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--sunken); font-size: 12.5px; font-weight: 600; text-align: center; }
.tabs a.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tabs a.on b { background: color-mix(in srgb, var(--bg) 22%, transparent); }

@media (min-width: 820px) { .tabs { flex-wrap: wrap; overflow: visible; margin: 0 0 16px; padding: 0; } }

.filters { display: grid; gap: 8px; margin-bottom: 16px; }
@media (min-width: 760px) { .filters { grid-template-columns: minmax(0, 1fr) 190px 250px auto; } }

/* ------------------------------------------------------------------ forms */

.field { display: grid; gap: 8px; min-width: 0; }
.label { font-weight: 600; font-size: 15px; }
.label .muted { font-weight: 400; }

input:not([type="radio"]):not([type="file"]):not([type="hidden"]), select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.2s, background 0.15s;
}
.sheet input:not([type="radio"]):not([type="file"]):not([type="hidden"]), .sheet select, .sheet textarea { background: color-mix(in srgb, var(--bg) 60%, var(--surface)); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 20%, transparent); background: var(--surface); }
textarea { resize: vertical; line-height: 1.5; }
select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737d91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

.group { display: grid; gap: 18px; }
.group h2 { margin: 0; }
.group > .hint { margin-top: -12px; }

/* Radio choices: the input stays real (keyboard, forms), the span shows it. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label, .tile { position: relative; }
.chips input, .tile input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 500; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s var(--ease); }
.chips label:active span { transform: scale(0.97); }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips input:focus-visible + span, .tile input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 30%, transparent); }

.chips.stacked { flex-direction: column; }
.chips.stacked span { width: 100%; border-radius: var(--r-ctl); }
.chips.stacked span::before { content: ""; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--sev, var(--ink-3)); transition: transform 0.2s var(--ease); }
.chips.stacked input:checked + span { background: color-mix(in srgb, var(--sev) 12%, var(--surface)); border-color: var(--sev); color: var(--ink); }
.chips.stacked input:checked + span::before { transform: scale(1.3); }

.chips.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.chips.seg label { display: flex; }
.chips.seg span { flex: 1; justify-content: center; min-height: 44px; padding: 8px 6px; border-radius: var(--r-ctl); font-size: 14.5px; line-height: 1.2; text-align: center; }
.chips.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 12px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color 0.15s, background 0.15s, transform 0.12s var(--ease); }
.tile .i { width: 28px; height: 28px; margin-bottom: 6px; color: var(--ink-3); transition: color 0.15s, transform 0.3s var(--ease); }
.tile b { font-size: 15.5px; }
.tile small { color: var(--ink-3); font-size: 13px; line-height: 1.3; }
.tile:active span { transform: scale(0.97); }
.tile input:checked + span { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, var(--surface)); box-shadow: inset 0 0 0 1px var(--ink); }
.tile input:checked + span .i { color: var(--ink); transform: rotate(-8deg) scale(1.08); }

.drop { position: relative; display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--line); border-radius: 18px; background: color-mix(in srgb, var(--bg) 60%, var(--surface)); color: var(--ink-2); text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop .i { width: 30px; height: 30px; margin-bottom: 6px; color: var(--focus); transition: transform 0.3s var(--ease); }
.drop small { color: var(--ink-3); font-size: 13.5px; }
.drop:hover, .drop.over { border-color: var(--focus); background: color-mix(in srgb, var(--focus) 7%, var(--surface)); }
.drop.over .i { transform: translateY(-4px); }
.drop:focus-within { border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 20%, transparent); }

.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.previews:empty { display: none; }
.previews figure { position: relative; margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--sunken); animation: pop 0.35s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.previews img, .previews video { width: 100%; height: 100%; object-fit: cover; }
.previews figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.progress { display: grid; gap: 8px; }
.progress[hidden] { display: none; }
.progress .track { height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.progress .track div { width: 0; height: 100%; border-radius: 4px; background-color: var(--ink); background-image: linear-gradient(110deg, transparent 30%, color-mix(in srgb, var(--bg) 40%, transparent) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; transition: width 0.25s linear; }
.progress span { color: var(--ink-2); font-size: 14.5px; }

.copy-line { display: flex; gap: 8px; margin-bottom: 12px; }
.copy-line input { flex: 1; min-width: 0; }
.copy-line .btn { flex: none; }

/* ----------------------------------------------------------------- report */

.report-layout { display: grid; gap: 14px; align-items: start; }
.report-main { min-width: 0; }
@media (min-width: 1000px) {
  .report-layout.with-side { grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; }
  .report-side { position: sticky; top: 84px; }
}
.report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; }
.num { font: 600 14px/1 var(--display); color: var(--ink-3); }
.report .title { font-size: clamp(22px, 5.4vw, 30px); font-weight: 600; overflow-wrap: anywhere; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 22px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.facts div { min-width: 0; }
.facts dt { color: var(--ink-3); font-size: 13px; }
.facts dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.text { max-width: 68ch; overflow-wrap: anywhere; }

.gallery { display: flex; gap: 10px; margin: 18px -20px 0; padding: 0 20px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.gallery > * { flex: 0 0 82%; scroll-snap-align: start; overflow: hidden; border-radius: 16px; background: var(--sunken); }
.gallery img { width: 100%; height: 100%; max-height: 460px; object-fit: cover; transition: transform 0.4s var(--ease); }
.gallery a:hover img { transform: scale(1.02); }
.gallery video { width: 100%; max-height: 460px; background: #000; }
@media (min-width: 600px) { .gallery { margin: 18px -28px 0; padding: 0 28px 6px; } }
@media (min-width: 700px) {
  .gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 0; padding: 0; overflow: visible; }
}

.attach-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 20px 14px; border: 2px dashed var(--line); border-radius: 16px; color: var(--ink-3); }

.example-intro { margin-bottom: 14px; }
.tips { margin: 10px 0 18px; padding-left: 20px; }
.tips li { margin: 8px 0; padding-left: 4px; }
.tips li::marker { color: var(--ink-3); }

.verify { border: 1.5px solid color-mix(in srgb, var(--s-fixed) 40%, transparent); background: color-mix(in srgb, var(--s-fixed) 8%, var(--surface)); }
.verify h2 { color: color-mix(in oklab, var(--s-fixed) 70%, var(--ink)); }

.talk { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 88%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg .who { display: flex; gap: 8px; margin: 0 8px 4px; color: var(--ink-3); font-size: 13px; }
.msg .who span { color: var(--ink-2); font-weight: 600; }
.msg .say { padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--sunken); overflow-wrap: anywhere; }
.msg.mine .say { border-radius: 18px 18px 6px 18px; background: var(--ink); color: var(--bg); }
.msg.claude .say { background: color-mix(in srgb, var(--s-accepted) 14%, var(--surface)); }
.sys { align-self: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; max-width: 90%; color: var(--ink-3); font-size: 13px; text-align: center; }
.sys b { color: var(--ink-2); font-weight: 600; }
.composer { display: flex; gap: 8px; align-items: flex-end; margin-top: 18px; }
.composer textarea { flex: 1; min-height: 48px; max-height: 220px; resize: none; }
.composer .btn { flex: none; min-height: 48px; }

.decide h2 { margin-bottom: 16px; }
.decide .two { align-items: end; }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.status-grid .btn { justify-content: flex-start; min-height: 42px; padding: 8px 12px; font-size: 14.5px; font-weight: 500; }
.status-grid .btn::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--c); }
.status-grid .btn.current { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); font-weight: 600; }
.side-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ----------------------------------------------------------------- motion */

@keyframes fill { from { transform: scaleX(0); } }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 45%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes flash { 0%, 35% { background: color-mix(in srgb, var(--focus) 13%, var(--surface)); } }

/* Moving between pages: a short fade and lift; the report title flies from
   its row into the heading (view-transition-name set in the markup). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.16s ease-in both; }
::view-transition-new(root) { animation: vt-in 0.32s var(--ease) both; }
::view-transition-group(*) { animation-duration: 0.38s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}


/* ------------------------------------------------ Claude's answer, waiting */

.proposal { border: 1.5px solid color-mix(in srgb, var(--s-accepted) 45%, transparent); background: color-mix(in srgb, var(--s-accepted) 7%, var(--surface)); animation: drop-in 0.4s var(--ease) both; }
.proposal-head { display: flex; align-items: center; gap: 10px; }
.proposal-head .i { width: 24px; height: 24px; color: var(--s-accepted); }
.proposal-head h2 { margin: 0; }
.proposal > .muted { margin: 6px 0 16px; }
.proposal-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge.awaiting { --c: var(--s-accepted); background: var(--s-accepted); color: #fff; }
.badge.awaiting::before { background: #fff; }

/* ------------------------------ what Claude did with a report handed to him */

.claude-trail .proposal-head { margin-bottom: 16px; }
.trail { margin: 0 0 4px; padding: 0; list-style: none; }
.trail li { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 0 14px 26px; color: var(--ink-3); }
.trail li i { position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.trail li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.trail li.done { color: var(--ink); font-weight: 500; }
.trail li.done i { border-color: var(--s-accepted); background: var(--s-accepted); animation: pop 0.4s var(--ease) both; }
.trail li.done:has(+ li.done)::after { background: color-mix(in srgb, var(--s-accepted) 55%, var(--line)); }
.trail small { flex: none; color: var(--ink-3); font-size: 13px; font-weight: 400; }
.claude-model { margin: 0 0 8px; color: var(--ink-2); font-size: 14.5px; }
.claude-note { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 12px; padding: 10px 14px; border-radius: 14px 14px 14px 6px; background: color-mix(in srgb, var(--s-accepted) 12%, var(--surface)); font-size: 14.5px; overflow-wrap: anywhere; animation: drop-in 0.4s var(--ease) both; }
.claude-note small { color: var(--ink-3); font-size: 12.5px; }
.claude-contact { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r-ctl); background: color-mix(in srgb, var(--s-accepted) 9%, var(--surface)); color: var(--ink-2); font-size: 14.5px; }
.claude-contact .i { flex: none; width: 20px; height: 20px; color: var(--s-accepted); }
.claude-contact b { color: var(--ink); font-weight: 600; }

.invite { resize: none; font-size: 15px; }
.copy-actions { margin: 10px 0 12px; }
