:root {
  /* Marken-Akzente (unverändert) */
  --sg-white: #ffffff;
  --sg-blue-1: #c8daff;
  --sg-blue-2: #94b2ff;
  --sg-blue-3: #4a6be8;
  --sg-blue-4: #1f38c2;
  --sg-blue-5: #0a1a4f;
  --sg-lime: #e5ff29;
  --sg-green: #32dc5a;
  /* Basis: Schwarz / Weiß / Grau — modern, ruhig */
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --wash: linear-gradient(180deg, #ffffff 0%, #f5f5f5 48%, #efefef 100%);
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #e2e2e2;
  --line-strong: #bdbdbd;
  --accent: var(--sg-blue-5); /* Buttons, Auswahl, Fokus */
  --accent-fg: #ffffff;
  --ok: #1a9a3c;
  --warn: #a15c00;
  --bot: var(--sg-blue-5);
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  --font: "Helvetica Now Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Helvetica Now Display", "Helvetica Now Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 112.5%; /* 18px Basis — gesamtes rem-UI etwas größer */
  background: #f5f5f5;
}

html,
body {
  margin: 0;
  min-height: 100dvh;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--wash);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.011em;
}

.chrome {
  position: relative;
  z-index: 80;
  width: 100%;
  padding: 22px 20px 8px;
  animation: rise 0.6s var(--ease) both;
}

.chrome .top {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  min-width: 0;
}

.shell {
  width: min(560px, 100%);
  margin: 0 auto;
  min-height: calc(100dvh - 72px);
  padding: 28px 20px 28px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 28px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.brand-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.app-version {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.app-version-label {
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}

.app-version-label:hover,
.app-version-label[aria-current="page"],
.app-version.is-open .app-version-label {
  color: var(--ink);
}

.app-version-pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 90;
  width: min(28rem, calc(100vw - 40px));
  padding: 18px 20px 16px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.16);
}

.app-version-pop[hidden] {
  display: none;
}

.app-version-pop-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-version-pop-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--ink);
}

.app-version-pop-lead {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.app-version-pop section + section {
  margin-top: 14px;
}

.app-version-pop h3 {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-version-pop p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--ink);
}

.account {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.account[hidden] {
  display: none;
}

.account-name {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}

.account-name:hover {
  color: var(--ink);
}

.account-inbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}

.account-inbox:hover,
.account.is-inbox-open .account-inbox {
  color: var(--ink);
}

.account-inbox-badge {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d1242f;
  flex: 0 0 auto;
}

.account-inbox[hidden] {
  display: none;
}

.account-inbox-label {
  line-height: 1;
}

.account-menu,
.account-inbox-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 140px;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.1);
}

.account-inbox-menu {
  min-width: 260px;
  max-width: min(360px, calc(100vw - 24px));
  max-height: min(420px, 70vh);
  overflow: auto;
  padding: 8px;
}

.account-menu[hidden],
.account-inbox-menu[hidden] {
  display: none;
}

.account-out {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: none;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.account-out:hover {
  background: rgba(17, 17, 17, 0.05);
}

.account-inbox-empty {
  margin: 0;
  padding: 10px 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.account-inbox-empty[hidden] {
  display: none;
}

.account-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-inbox-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: none;
  padding: 8px 10px;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.account-inbox-item:hover {
  background: rgba(17, 17, 17, 0.05);
}

.account-inbox-item-title {
  font-size: 0.85rem;
  line-height: 1.25;
}

.account-inbox-item-meta {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}

body.gated .shell,
body.gated .shell-full,
body.gated .shell-wide {
  visibility: hidden;
  pointer-events: none;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gate-box {
  width: min(22rem, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gate-box .empty-title {
  text-align: left;
}

.gate-box .empty-sub {
  margin: 0;
}

.gate-box label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.gate-box select {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 10px 0;
}

.gate-box select:focus {
  outline: none;
  border-color: var(--accent);
}

.login-page {
  min-height: 100dvh;
  display: flex;
}

.login-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.login-card {
  width: min(22.5rem, 100%);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: rise 0.6s var(--ease) both;
}

.login-kicker {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sg-blue-4);
}

.login-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.login-lead {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 22em;
}

.login-submit {
  width: 100%;
  margin-top: 10px;
  padding: 14px 18px;
  border-radius: 12px;
}

.gate-box > a.btn {
  display: block;
  width: 100%;
  margin: 8px 0 16px;
}

.login-error {
  margin: 0;
  color: #b42318;
  font-size: 0.9rem;
}

.login-error[hidden] {
  display: none !important;
}

.shell-wide {
  width: min(720px, 100%);
  grid-template-rows: auto;
}

.settings {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: rise 0.5s var(--ease) both;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-form fieldset {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-form legend {
  padding: 0 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.settings-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.settings-form label.check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.settings-form input,
.settings-form select {
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
}

.settings-form input:focus,
.settings-form select:focus {
  outline: 2px solid var(--sg-blue-3);
  outline-offset: 1px;
}

.hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.runtime {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.9rem;
}

.status.ok {
  color: var(--ok);
}

.status.err {
  color: #b42318;
}

.tag {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding: 4px 2px 12px;
  scroll-behavior: smooth;
}

.empty {
  margin: auto 0;
  padding: 12vh 8px 8vh;
  text-align: center;
  animation: rise 0.7s var(--ease) 0.05s both;
}

.empty-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.empty-sub {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.log-shell {
  width: min(1080px, 100%);
}

.changelog {
  padding: 8px 0 64px;
  animation: rise 0.5s var(--ease) both;
}

.log-highlights {
  margin: 22px 0 36px;
}

.log-highlight-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.log-highlight-list li {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
}

.log-frame {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px 48px;
  align-items: start;
}

.log-side {
  position: sticky;
  top: 12px;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding-right: 4px;
}

.log-side-line {
  margin: 16px 0 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.log-side-line a {
  color: var(--ink);
  text-decoration: none;
}

.log-line {
  margin: 0 0 8px;
  padding: 4px 0 12px;
}

.log-main .log-lane:first-of-type {
  margin-top: 28px;
}

.changelog .empty-sub {
  margin-bottom: 28px;
}

.log-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 48px;
  margin: 0 0 48px;
  padding: 0 0 8px;
  align-items: start;
}

.log-index {
  margin: 0;
  padding: 0;
}

.log-index-kicker {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.log-lane {
  margin: 0 0 48px;
  padding: 0;
}

.log-lane-title {
  margin: 0 0 8px;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.log-lane-lead {
  margin: 0 0 20px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
}

.log-lane .log-release:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

@media (max-width: 860px) {
  .log-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .log-frame {
    grid-template-columns: 1fr;
  }

  .log-side {
    position: static;
    max-height: 42vh;
  }
}

.log-index ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.log-side .log-index a {
  flex-wrap: wrap;
  gap: 2px 10px;
  padding: 7px 0;
  font-size: 0.82rem;
}

.log-index a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.log-index a span {
  font-size: 0.78rem;
  font-weight: 450;
  letter-spacing: 0;
  color: var(--muted);
  text-align: right;
}

.log-index a:hover {
  color: var(--ink);
}

.log-index a:hover span {
  color: var(--ink);
}

.log-release {
  margin: 0;
  padding: 28px 0 8px;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
  scroll-margin-top: 24px;
}

.log-release.is-current {
  border-top: 0;
  padding-top: 4px;
}

.log-meta {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.log-title {
  margin: 0 0 10px;
  font-family: var(--font);
  font-size: clamp(1.28rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
}

.log-lead {
  margin: 0 0 22px;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--muted);
}

.log-blocks {
  display: grid;
  gap: 18px 28px;
}

.log-blocks h3 {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.log-blocks p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}

.msg {
  max-width: 92%;
  animation: rise 0.35s var(--ease) both;
}

.msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius) var(--radius) 4px var(--radius);
  font-size: 0.95rem;
  line-height: 1.45;
}

.msg.bot {
  align-self: flex-start;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.6vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--bot);
  padding: 4px 0;
}

.msg.thinking {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.msg.thinking .dots span {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 1.2s ease-in-out infinite;
}

.msg.thinking .dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.msg.thinking .dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  animation: rise 0.4s var(--ease) both;
}

.panel-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.panel h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.impulse {
  margin-top: 12px;
}

.review-card {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.review-card summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.review-card summary::-webkit-details-marker {
  display: none;
}

.review-card[open] summary {
  margin-bottom: 10px;
}

.suggestion.soft {
  background: transparent;
  border-style: dashed;
}

.badge {
  display: inline-block;
  margin: 12px 0 0;
  padding: 4px 8px;
  border-radius: 6px;
  background: #fff6e8;
  color: var(--warn);
  font-size: 0.75rem;
  font-weight: 500;
}

.fields {
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
}

.field {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.field dt {
  margin: 0;
  color: var(--muted);
}

.field dd {
  margin: 0;
  color: var(--ink);
  word-break: break-word;
}

.actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: transform 0.15s var(--ease), opacity 0.15s ease, background 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

a.btn {
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-primary:hover:not(:disabled) {
  background: var(--sg-blue-4);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--sg-blue-2);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(10, 26, 79, 0.06);
  border-color: var(--sg-blue-3);
}

.ticket-key {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ok);
}

.dock {
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  background: transparent;
}

.composer {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--line-strong);
  border-radius: 0;
  padding: 0 0 8px;
  box-shadow: none;
}

.composer:focus-within {
  border-color: var(--accent);
}

.composer.disabled {
  opacity: 0.55;
  pointer-events: none;
}

#form.hidden {
  display: none;
}

#input {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 0;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-color: transparent;
  box-shadow: none;
  outline: none;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 12px 0;
  color: var(--ink);
  resize: none;
  line-height: 1.4;
  overflow-y: auto;
  color-scheme: inherit;
}

#input:focus,
#input:hover {
  background: transparent;
  background-color: transparent;
}

#input:-webkit-autofill,
#input:-webkit-autofill:focus {
  background: transparent;
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  -webkit-text-fill-color: var(--ink);
}

#input::placeholder {
  color: var(--muted);
  font-weight: 400;
}

.send {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.send:hover,
.composer:focus-within .send {
  color: #fff;
}

.send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---------- Chat: Frage-Turn und Steckbrief ---------- */

.turn {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: rise 0.35s var(--ease) both;
}

.msg.prose {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  letter-spacing: 0;
  max-width: 100%;
}

.msg.prose a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.msg.prose a:hover {
  border-color: var(--accent);
}

.turn-meta {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chip-group .turn-meta {
  margin-bottom: 6px;
}

.fact-actions {
  margin-top: 4px;
}

.suggestion {
  appearance: none;
  font: inherit;
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.suggestion:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--sg-blue-3);
  color: var(--ink);
}

.suggestion.on,
.suggestion.is-selected,
.suggestion.go:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.suggestion.is-selected:hover {
  background: var(--sg-blue-4);
  border-color: var(--sg-blue-4);
  color: #fff;
}

.field-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.field-picked:empty {
  display: none;
}

.suggestion:disabled {
  opacity: 0.4;
  cursor: default;
}

.steer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}

.steer-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.steer-item select {
  border-color: var(--line-strong);
  background: var(--bg);
  padding: 8px 10px;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
}

.dup {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.dup a {
  color: var(--ink);
}

.risk-warn {
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink);
}

.msg.bot.risk-warn {
  margin-top: 4px;
  padding-top: 8px;
  font-size: 1.05rem;
  font-weight: 500;
}

.collab-sources {
  margin: 8px 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.collab-sources a {
  color: var(--ink);
}

/* Geloester Fall aus der Wissensbasis: zugeklappt, damit er nichts verdeckt. */
.hint-case {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
}

.hint-case summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 500;
}

.hint-case p {
  margin: 8px 0 0;
  color: var(--muted);
  white-space: pre-line;
}

.hint-case .hint-needs {
  color: var(--ink);
  font-size: 0.78rem;
}

.ticket-panel .ticket-key {
  margin: 10px 0 0;
  font-size: 1.6rem;
}

.ticket-panel h2 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.sync-line {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.sync-line a {
  color: var(--ink);
  font-weight: 600;
}

.sync-line.err {
  color: #b42318;
}

/* ---------- Workspace Hub ---------- */

.shell-full {
  width: min(1080px, 100%);
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: calc(100dvh - 72px);
}

.ticket-view {
  flex: 1 1 auto;
  min-height: 0;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 12px 20px 20px;
  overflow: auto;
}

body:not(.ticket-active) .ticket-view {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.shell-full .dock {
  flex: 0 0 auto;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  width: 100%;
  padding: 22px 20px 14px;
  background: transparent;
  border-top: 0;
  box-shadow: none;
  z-index: 20;
  overflow: visible;
}

.dock-guide {
  width: min(1080px, 100%);
  margin: 0 auto 10px;
  overflow: visible;
}

.dock-guide:not(:has(.field-prompt:not([hidden]))) {
  display: none;
}

.dock-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
}

.field-prompt {
  margin: 0;
  padding: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.field-prompt-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.field-prompt-kicker {
  display: block;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-prompt-step {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.field-prompt-step[hidden] {
  display: none !important;
}

.field-prompt-text {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: anywhere;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.field-prompt[hidden] {
  display: none !important;
}

.field-prompt-in {
  animation: promptIn 0.42s var(--ease) both;
}

.ticket-edit-hint {
  margin: 4px 0 0;
  padding: 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.date-wrap[hidden] {
  display: none !important;
}

.date-wrap {
  display: flex;
  justify-content: flex-start;
}

.date-wrap.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.cal {
  box-sizing: border-box;
  width: 320px;
  max-width: 100%;
  padding: 14px 16px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(17, 17, 17, 0.06);
}

.cal-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 32px;
  margin-bottom: 12px;
}

.cal-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.cal-month,
.cal-year {
  appearance: none;
  box-sizing: border-box;
  margin: 0;
  padding: 2px 22px 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-elev)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23111111' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 7px center;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  cursor: pointer;
}

.cal-month {
  /* feste Breite = längster Monatsname (September) */
  width: 9.2em;
  min-width: 9.2em;
  max-width: 9.2em;
}

.cal-year {
  width: 4.8em;
  min-width: 4.8em;
  max-width: 4.8em;
  text-align: center;
  padding-left: 4px;
  padding-right: 20px;
}

.cal-month:focus,
.cal-year:focus {
  outline: 2px solid var(--sg-blue-3);
  outline-offset: 1px;
}

.cal-nav {
  appearance: none;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.cal-nav:hover {
  background: rgba(10, 26, 79, 0.08);
  border-color: var(--line-strong);
  color: var(--ink);
}

.cal-week,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.cal-grid {
  grid-template-rows: repeat(6, 36px);
  height: 236px;
  min-height: 236px;
  max-height: 236px;
  overflow: hidden;
}

.cal-week {
  height: 18px;
  margin-bottom: 6px;
}

.cal-week span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.cal-day {
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 36px;
  cursor: pointer;
}

.cal-day.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.cal-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.cal-day:hover:not(:disabled):not(.is-selected) {
  background: rgba(10, 26, 79, 0.08);
  color: var(--ink);
}

.cal-day.is-selected {
  background: var(--accent);
  color: #fff;
}

.cal-today {
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 28px;
  margin-top: 10px;
  padding: 6px 0 2px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}

.cal-today:hover {
  color: var(--ink);
}

.cal.field-edit-cal {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  /* Nicht width:100% der schmalen Meta-Zelle — sonst zerquetscht. */
  width: 300px;
  max-width: min(300px, calc(100vw - 48px));
  box-sizing: border-box;
}

.ticket-meta-item:has(.field-edit-cal),
.ticket-meta-item:has(.field-edit-chips),
.ticket-meta-item:has(.field-edit-lookup) {
  z-index: 20;
  overflow: visible;
}

/* Rechte Spalten: Kalender nach links aufklappen, nicht aus dem Blatt schneiden */
.ticket-meta-item:nth-child(n + 3) .field-edit-cal {
  left: auto;
  right: 0;
}

.ticket-meta,
.ticket-head,
.ticket-sheet {
  overflow: visible;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 4px;
}

.choice-row[hidden] {
  display: none !important;
}

.choice-row .suggestion {
  background: var(--bg-elev);
  box-shadow: 0 8px 24px rgba(10, 26, 79, 0.08);
}

.choice-row .suggestion.is-selected,
.choice-row .suggestion.go:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: none;
}

.jira-suggest {
  margin-bottom: 8px;
}

.jira-suggest.is-tags-multi {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.field-tags-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.field-tags-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.field-tags-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  margin-left: 0;
}

.jira-suggest .field-tags-go {
  width: 100%;
  min-width: 0;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: none;
}

.jira-suggest .field-tags-go:disabled {
  opacity: 0.4;
  box-shadow: none;
}

.jira-suggest .suggestion {
  background: #fff;
}

.jira-suggest .suggestion.is-selected,
.jira-suggest .suggestion.go:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@keyframes promptIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#start-change {
  margin-top: 0;
}

.jira-create.is-quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.jira-create.is-quiet:hover:not(:disabled) {
  background: rgba(17, 17, 17, 0.04);
}

.jira-create {
  appearance: none;
  display: block;
  width: 100%;
  margin: 12px 0 4px;
  padding: 13px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s var(--ease);
}

.jira-create:hover:not(:disabled) {
  background: var(--sg-blue-4);
}

.jira-create[hidden] {
  display: none;
}

.jira-create:hover {
  filter: brightness(1.08);
}

.jira-create:disabled {
  opacity: 0.55;
  cursor: default;
  filter: none;
}

.ticket-finish {
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
}

.ticket-finish[hidden] {
  display: none;
}

.ticket-finish-open {
  display: block;
  text-align: center;
  text-decoration: none;
}

.ticket-finish-open.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

.ticket-finish-new {
  appearance: none;
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.ticket-finish-new:hover {
  border-color: var(--accent);
}

.ticket-finish-new[hidden] {
  display: none;
}

body.ticket-open .shell-full .dock,
body.ticket-ready .shell-full .dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  margin: 0;
}

body.ticket-open .ticket-view,
body.ticket-ready .ticket-view {
  padding-bottom: 96px;
}

.shell-full .composer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 4px 10px;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 8px 8px 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
}

.composer-main {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.composer-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 0;
  width: 100%;
}

.ai-enhance {
  appearance: none;
  align-self: flex-start;
  margin: 0 auto 0 0;
  padding: 0 4px 2px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.ai-enhance:hover {
  color: var(--sg-blue-4);
}

.ai-enhance[hidden] {
  display: none !important;
}

.ai-enhance:disabled {
  cursor: wait;
  opacity: 0.65;
}

.shell-full .composer-card:focus-within {
  border-color: var(--sg-blue-3);
  box-shadow: 0 0 0 3px rgba(74, 107, 232, 0.14), 0 8px 28px rgba(0, 0, 0, 0.07);
}

.shell-full .composer-card #input {
  width: 100%;
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  padding: 10px 4px 10px 0;
  min-height: 44px;
  max-height: none;
  line-height: 1.45;
}

.shell-full .composer-card #input.is-long {
  min-height: 76px;
}

.shell-full .composer-card .send {
  width: 38px;
  height: 38px;
  margin: 0 0 0 auto;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
}

.shell-full .composer-card .send:hover {
  background: var(--sg-blue-4);
}

.shell-full .composer-card .send svg {
  width: 16px;
  height: 16px;
}

.shell-full .hub {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 8px 20px 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

body.hub-chat-view .shell-full .hub {
  flex: 0 1 auto;
}

.shell-full .ticket-sheet {
  animation: none;
}


.shell-full .ticket-sheet:not([hidden]) {
  display: block;
  max-width: none;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 12px 4px 56px;
  box-shadow: none;
}

body.ticket-active {
  background: #fff;
}

body.ticket-active .shell-full .dock {
  background: linear-gradient(180deg, transparent 0%, #fff 24px, #fff 100%);
}

body.ticket-active .hub {
  display: none !important;
}


body.ticket-active .shell-full,
body.ticket-active .ticket-view,
body.ticket-active .dock-guide,
body.ticket-active .dock-inner,
body.ticket-active .chrome .top {
  width: min(1080px, 100%);
}

.ticket-head {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0 0 8px;
  padding: 0 0 4px;
  border-bottom: 0;
}

.ticket-kicker {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: none;
  color: inherit;
  cursor: pointer;
}

.ticket-kicker[data-kind="open"] {
  font-style: italic;
  opacity: 0.72;
}

.ticket-kicker:hover {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}


/* Kind-Dropdown */
.kind-dropdown {
  position: absolute;
  z-index: 200;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kind-option {
  background: none;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink);
  font-weight: 500;
}

.kind-option:hover {
  background: rgba(0, 0, 0, 0.04);
}

.kind-option.is-selected {
  background: rgba(74, 107, 232, 0.12);
  color: var(--sg-blue-4);
}

.kind-dropdown-hint {
  margin: 6px 8px 2px;
  font-size: 0.68rem;
  color: var(--muted, #888);
  line-height: 1.4;
}

/* Feld-Lookup (Jira User/Komponenten) */
.systems-input {
  flex: 1;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.88rem;
  background: var(--surface, #fff);
  color: var(--fg, #111);
  outline: none;
}

.systems-input:focus {
  border-color: var(--accent, #2563eb);
}

.field-edit-lookup {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: grid;
  gap: 8px;
  min-width: min(280px, calc(100vw - 48px));
  max-width: min(360px, calc(100vw - 48px));
  padding: 8px;
  background: var(--bg-elev, #fff);
  border: 1px solid var(--line, #e5e5e5);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.08);
}

.field-edit-lookup:has(.comp-tree) {
  min-width: min(440px, calc(100vw - 32px));
  max-width: min(480px, calc(100vw - 32px));
  padding: 12px;
  border-radius: 16px;
  background: #fff;
}

.ticket-meta-item,
.ticket-meta-item dd {
  position: relative;
}

.field-lookup-input {
  width: 100%;
}

.field-lookup-search {
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.88rem;
  box-sizing: border-box;
}

.field-lookup-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.field-lookup-list.is-tree,
.field-tags-body:has(.comp-tree) {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.comp-tree {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
}

.jira-suggest .comp-tree,
.field-edit-lookup .comp-tree {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 8px 8px;
}

.comp-tree-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 6px 8px;
}

.comp-tree-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.comp-tree-list {
  max-height: min(42vh, 380px);
  overflow: auto;
  padding: 0 2px 4px;
  background: #fff;
}

.comp-tree-row {
  display: grid;
  grid-template-columns: 22px 18px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
  padding: 8px 10px 8px calc(6px + (var(--d, 0) * 16px));
  border-radius: 10px;
}

.comp-tree-row.is-pick {
  cursor: pointer;
}

.comp-tree-row.is-pick:hover,
.comp-tree-row.is-folder:hover {
  background: #f4f4f1;
}

.comp-tree-row.is-on {
  background: rgba(10, 26, 79, 0.08);
}

.comp-tree-row.is-root.is-folder {
  margin-top: 2px;
}

.comp-tree-row.is-root.is-folder .comp-tree-name {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.comp-tree-chev,
.comp-tree-check {
  appearance: none;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  line-height: 1;
}

.comp-tree-chev {
  display: grid;
  place-items: center;
  margin-top: 2px;
}

.comp-tree-chev::before {
  content: "";
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-left-color: currentColor;
  margin-left: 3px;
  transform-origin: 35% 50%;
  transition: transform 0.15s var(--ease);
}

.comp-tree-chev.is-open::before {
  transform: rotate(90deg);
}

.comp-tree-chev.is-leaf {
  visibility: hidden;
}

.comp-tree-check {
  margin-top: 3px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
}

.comp-tree-check.is-on {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2.5px #fff;
}

.comp-tree-check.is-folder {
  border: 0;
  background: transparent;
}

.comp-tree-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-top: 1px;
}

.comp-tree-name {
  font-size: 0.86rem;
  font-weight: 550;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.comp-tree-row.is-folder:not(.is-pick) .comp-tree-name {
  font-weight: 650;
}

.comp-tree-desc {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}

.comp-tree-mark {
  display: none;
}

.field-lookup-item {
  text-align: left;
}

.field-lookup-empty {
  font-size: 0.82rem;
  color: var(--muted, #777);
}

.field-tags-hint {
  margin: 0 0 4px;
  width: 100%;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

.jira-suggest .field-tags-hint {
  margin: 0 0 2px;
  padding: 0 2px;
}


.ticket-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  max-width: none;
  margin: 0;
  padding: 8px 0 4px;
}

.ticket-hero .ticket-eyebrow {
  max-width: 38rem;
}

.ticket-eyebrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.4em;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.ticket-eyebrow-sep {
  color: var(--ink);
  font-weight: 500;
}

.ticket-eyebrow-sep[hidden] {
  display: none !important;
}

.ticket-aside {
  display: none;
}

.ticket-jira {
  margin: 0;
  display: inline;
}

.ticket-jira[hidden] {
  display: none !important;
}

.ticket-jira-key {
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  letter-spacing: inherit;
}

.ticket-jira-key[href] {
  cursor: pointer;
}

.ticket-jira-key[href]:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ticket-author {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  min-width: 0;
}

.ticket-priority {
  position: relative;
  cursor: default;
}

.ticket-priority.is-editable {
  cursor: pointer;
}

.ticket-priority.is-fixed {
  cursor: default;
  pointer-events: none;
}

.ticket-priority.is-editable:hover .ticket-author-name {
  background: rgba(200, 218, 255, 0.45);
  border-radius: 8px;
}

.ticket-priority .field-edit-chips {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 8;
  justify-content: flex-end;
  min-width: 220px;
  padding: 8px;
  background: var(--bg-elev, #fff);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.08);
  border-radius: 10px;
}

.ticket-priority .ticket-author-name[data-level="low"] {
  color: var(--muted);
}

.ticket-priority .ticket-author-name[data-level="medium"] {
  color: var(--ink);
}

.ticket-priority .ticket-author-name[data-level="high"] {
  color: var(--warn);
}

.ticket-priority .ticket-author-name[data-level="critical"] {
  color: #b42318;
}

.ticket-author-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticket-author-name {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 1px 4px;
  margin: 0 -4px;
}

.ticket-headline:not([hidden]) {
  padding-bottom: 0;
}

.ticket-headline.is-pending {
  visibility: hidden;
}

.ticket-headline {
  margin: 0;
  width: 100%;
  min-width: 0;
  font-family: var(--font);
  font-size: clamp(2rem, 4.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--ink);
  text-align: center;
  overflow-wrap: anywhere;
}

.ticket-headline:not([hidden]) {
  padding-bottom: 0;
}

.ticket-headline.is-pending {
  visibility: hidden;
}

.ticket-meta {
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  justify-items: stretch;
  box-sizing: border-box;
}

.ticket-meta[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .ticket-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ticket-meta {
    grid-template-columns: 1fr 1fr;
    padding: 10px;
    gap: 8px;
  }
  .shell-full .ticket-sheet:not([hidden]) {
    padding: 20px 16px 24px;
  }
}

.ticket-meta-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}

.ticket-meta-item[hidden] {
  display: none !important;
}

.ticket-meta-item dt {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticket-meta-item dd {
  margin: 0;
  min-width: 0;
  width: 100%;
}

.ticket-meta-item[data-key="start"] { order: 1; }
.ticket-meta-item[data-key="end"] { order: 2; }
.ticket-meta-item[data-key="sponsor"] { order: 3; }
.ticket-meta-item[data-key="nonprofit"] { order: 4; }
.ticket-meta-item[data-key="components"] {
  order: 5;
  min-width: 0;
}

.ticket-meta-item[data-key="start"] .ticket-row-value,
.ticket-meta-item[data-key="end"] .ticket-row-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.ticket-meta-item[data-key="nonprofit"] .ticket-row-value {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.05);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
}

.ticket-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}

.ticket-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(17, 17, 17, 0.035);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 550;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.field-edit-lookup.is-tags {
  position: static;
  left: auto;
  top: auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 8px;
  z-index: 1;
}

.field-edit-lookup.is-tags:has(.comp-tree),
.field-edit-lookup.is-tags .comp-tree {
  min-width: 0;
  max-width: 100%;
}

.ticket-meta-item .ticket-row-value {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  text-align: left;
  overflow-wrap: anywhere;
}

.ticket-meta-item.is-pending .ticket-row-value-pending {
  visibility: hidden;
}

.ticket-section {
  margin: 18px 0 0;
  padding: 0;
  border-top: 0;
}

.ticket-section[hidden] {
  display: none !important;
}

.ticket-split {
  display: none;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
  margin: 28px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
}

.ticket-split:has(> .ticket-section:not([hidden])) {
  display: grid;
  grid-template-columns: 1fr;
}

.ticket-split > .ticket-section {
  margin: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#ticket-files.ticket-section {
  margin-top: 32px;
  padding: 28px 0 0;
  border: 0;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 0;
  background: transparent;
}

.ticket-file-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 14px;
}

.ticket-file-gallery[hidden] {
  display: none !important;
}

.ticket-file-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: fit-content;
  max-width: min(220px, 100%);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
}

.ticket-file-card-media {
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  display: block;
  width: fit-content;
  max-width: 100%;
  background: #f3f3f3;
  line-height: 0;
}

.ticket-file-card-media.is-loading {
  width: 160px;
  height: 120px;
  background: linear-gradient(90deg, #eee 25%, #f7f7f7 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.ticket-file-card-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(220px, 100%);
  max-height: 150px;
  object-fit: contain;
  vertical-align: top;
}

.ticket-file-card-media img:not([src]),
.ticket-file-card-media img[src=""] {
  opacity: 0;
  width: 160px;
  height: 120px;
}

.ticket-file-card-body {
  display: grid;
  gap: 2px;
  padding: 8px 10px 10px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.ticket-file-card-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-file-card-meta {
  font-size: 0.7rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-file-card-actions {
  display: flex;
  gap: 8px;
  padding: 0 10px 10px;
}

.ticket-file-card-actions .ticket-file-remove,
.ticket-file-card-actions .ticket-file-open {
  font-size: 0.72rem;
}

.ticket-file-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
  overflow: hidden;
}

.ticket-file-list:empty {
  display: none;
}

.ticket-file-empty {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.ticket-file-empty[hidden] {
  display: none !important;
}

.ticket-file {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink);
  background: transparent;
}

.ticket-file:last-child {
  border-bottom: 0;
}

.ticket-file:hover {
  background: rgba(255, 255, 255, 0.9);
}

.ticket-file-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #eef2ff;
  color: var(--sg-blue-5);
}

.ticket-file-icon[data-kind="pdf"] {
  background: #fde8e8;
  color: #a11f1f;
}
.ticket-file-icon[data-kind="sheet"] {
  background: #e7f6ec;
  color: #1a7a3a;
  padding: 0;
  overflow: hidden;
}
.ticket-file-sheets-logo {
  width: 28px;
  height: 28px;
  display: block;
}
.ticket-file-icon[data-kind="doc"] {
  background: #e8f0fe;
  color: #1f4fd6;
}
.ticket-file-icon[data-kind="archive"] {
  background: #f3f0e8;
  color: #7a5b1a;
}
.ticket-file-icon[data-kind="image"] {
  background: #f3e8ff;
  color: #6b21a8;
}

.ticket-file-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ticket-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

button.ticket-file-name {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

button.ticket-file-name:hover,
a.ticket-file-name:hover {
  text-decoration: underline;
}

.ticket-file-meta {
  font-size: 0.74rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-file-remove,
.ticket-file-open {
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ticket-file-remove:hover,
.ticket-file-open:hover {
  color: var(--ink);
}

.file-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(10, 10, 10, 0.82);
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 24px;
  gap: 12px;
}

.file-lightbox[hidden] {
  display: none !important;
}

.file-lightbox-close {
  justify-self: end;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.file-lightbox img {
  max-width: min(1100px, 92vw);
  max-height: min(78vh, 900px);
  object-fit: contain;
  border-radius: 8px;
  background: #111;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.file-lightbox-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  text-align: center;
  max-width: min(720px, 92vw);
}

.file-add {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}

.file-add:hover {
  color: var(--ink);
}

.ticket-section-title {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: none;
  color: var(--ink);
  text-align: left;
  padding-bottom: 8px;
  border-bottom: 2px solid #111;
}

.ticket-section-sub {
  margin: -8px 0 10px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.ticket-section-hint {
  margin: 0 0 14px;
  max-width: none;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  text-align: left;
}

.ticket-costs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  align-items: start;
  gap: 14px 20px;
}

.ticket-costs .ticket-meta-item {
  min-width: 0;
}

.ticket-costs .ticket-meta-item dd,
.ticket-costs .ticket-meta-item .ticket-row-value {
  font-variant-numeric: tabular-nums;
}

.effort-sheet {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  justify-items: start;
}

.effort-sheet .btn {
  justify-self: start;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.86rem;
}

.effort-sheet-link {
  margin: 0;
  font-size: 0.78rem;
  word-break: break-all;
}

.effort-sheet-link a {
  color: inherit;
}

.effort-sheet-page {
  min-height: 100dvh;
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
}

button.status-update-open {
  margin: 0;
  background-image: none;
  padding: 2px 8px;
}

.status-update-page {
  min-height: 100dvh;
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
}

.status-update-chrome {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 22px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-update-chrome-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-update-chrome-actions .btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.effort-sheet-page .status-update-chrome-actions {
  position: fixed;
  top: 14px;
  right: max(20px, calc((100vw - 1080px) / 2 + 20px));
  z-index: 40;
  background: #fff;
  padding: 4px 2px 4px 10px;
}

.effort-sheet-page .status-update-chrome-actions .status-update-save {
  margin: 0;
}

.status-update-chrome .brand {
  color: inherit;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.status-update-main {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 12px 20px 56px;
}

.status-update-page .ticket-hero {
  align-items: center;
  text-align: center;
  gap: 2px;
  margin: 4px 0 22px;
}

.su-kicker {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.su-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.su-meta-key {
  margin: 0;
  font-size: 0.84rem;
}

.status-update-stand {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.status-update-save {
  margin: 8px 0 0;
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
  cursor: pointer;
}

.status-update-save:hover:not(:disabled) {
  color: var(--ink);
}

.status-update-save:disabled {
  opacity: 0.4;
  cursor: default;
}

.status-update-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 28px;
  align-items: start;
  margin-top: 18px;
}

.status-update-sheet {
  padding: 0;
}

.status-update-board {
  display: block;
  min-height: 12rem;
  margin: 0 0 8px;
}

.su-hero .ticket-headline {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: center;
  font-size: clamp(2.15rem, 4.6vw, 2.9rem);
  line-height: 1.05;
}

.su-hero-status {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0 0;
}

.su-stand {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.su-onepager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 36px;
  margin-top: 8px;
}

.status-update-page .su-card,
.status-update-page .su-wide,
.status-update-page .su-write {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.su-wide {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.status-update-page .su-card h2,
.status-update-page .su-write h2,
.status-update-page .su-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #111;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: none;
  color: var(--ink);
}

.su-card p,
.su-card li {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.su-card ul {
  margin: 8px 0 0;
  padding-left: 1.1rem;
}

.su-roles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 0;
  margin: 0;
}

.su-roles > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
}

.su-roles dt {
  font-size: 0.75rem;
  color: var(--muted);
}

.su-roles dd {
  margin: 0;
  font-weight: 650;
}

.su-onepager label,
.su-write label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.su-onepager textarea,
.su-mile input,
.status-update-page .su-cost .stand-ist {
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 0;
  padding: 6px 0;
  width: 100%;
  background: transparent;
  text-align: left;
}

.su-onepager textarea {
  resize: vertical;
  min-height: 2.6rem;
}

.su-miles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.status-update-page .su-miles .su-mile {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}

.su-write {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-update-page .su-cost .su-row {
  grid-template-columns: minmax(6.5rem, 1.2fr) repeat(3, minmax(4.2rem, 1fr));
}

.status-update-page .su-cost .su-head span {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 800px) {
  .su-onepager,
  .su-roles,
  .su-hero-row {
    grid-template-columns: 1fr;
    display: grid;
  }
}

.status-update-board .su-compare {
  display: block;
}

.status-update-board .su-panel {
  display: block;
}

.status-update-board .su-table {
  display: grid;
  width: 100%;
}

.status-update-frozen {
  margin: 14px 0 0;
  color: var(--muted);
}

.status-update-side {
  position: sticky;
  top: 22px;
  display: grid;
  align-content: start;
}

.status-update-snapshots {
  display: grid;
  gap: 2px;
  align-content: start;
}

.status-update-snapshots > p {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.su-snap {
  display: grid;
  gap: 2px;
  font: inherit;
  text-align: left;
  border: 0;
  border-radius: 10px;
  padding: 8px 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.su-snap-when {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.su-snap-when span:last-child,
.su-snap-delta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
}

.su-snap.is-on {
  background: transparent;
  box-shadow: inset 2px 0 0 var(--ink);
  border-radius: 0;
}

.su-snap-now {
  margin-bottom: 6px;
  font-weight: 600;
}

.su-snap-empty {
  margin: 8px 8px 0;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.4;
  color: var(--muted);
}

.status-update-delta {
  margin: 8px 0 0;
  max-width: 40rem;
  line-height: 1.45;
  color: var(--ink);
}

.su-compare {
  display: grid;
  gap: 0;
}

.stand-board-live {
  margin-top: 8px;
}

.stand-board-live .su-panel-head h3 {
  margin: 0;
  font: inherit;
}

.su-panel {
  padding: 18px 0 8px;
}

.su-panel + .su-panel {
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.su-panel-head,
.status-update-notes h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(107, 107, 107, 0.95);
}

.su-col {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.su-table {
  display: grid;
}

.su-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1.1fr) 1fr 1fr;
  gap: 12px;
  align-items: center;
  min-height: 2rem;
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

.su-row > span:nth-child(2),
.su-row > span:nth-child(3),
.su-ist {
  text-align: right;
}

.su-ist {
  display: flex;
  justify-content: flex-end;
}

.su-head {
  min-height: 1.6rem;
  border-bottom-color: transparent;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.su-line.is-sum {
  font-weight: 600;
  color: var(--ink);
}

.su-reason {
  margin-top: 16px;
}

.su-reason p {
  margin: 0 0 4px;
  line-height: 1.4;
}

.status-update-page .stand-ist {
  width: 100%;
  height: 1.6rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: right;
  color: var(--ink);
}

.status-update-page .stand-note-input {
  width: 100%;
  text-align: left;
}

@media (max-width: 900px) {
  .status-update-head,
  .status-update-layout,
  .su-compare,
  .su-split {
    grid-template-columns: 1fr;
    display: grid;
  }

  .status-update-head {
    display: grid;
  }

  .status-update-side,
  .status-update-snapshots {
    position: static;
  }
}

.status-update-kicker,
.status-update-lead {
  margin: 0;
}

.status-update-kicker {
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--muted);
}

.status-update-lead {
  max-width: 46rem;
  margin-top: 14px;
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
}

.status-update-health {
  display: inline-flex;
  margin: 0;
}

.status-update-lead {
  margin-top: 12px;
}

.status-update-health select {
  appearance: none;
  margin: 0;
  padding: 4px 22px 4px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 550;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999999' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 10px 6px;
}

.status-update-health[data-health="green"] select,
.status-update-health[data-health="done"] select {
  color: #15803d;
  background-color: rgba(22, 163, 74, 0.16);
  border-color: rgba(22, 163, 74, 0.45);
}

.status-update-health[data-health="blue"] select {
  color: #1d4ed8;
  background-color: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.42);
}

.status-update-health[data-health="yellow"] select {
  color: #a16207;
  background-color: rgba(234, 179, 8, 0.22);
  border-color: rgba(202, 138, 4, 0.5);
}

.status-update-health[data-health="red"] select {
  color: #b91c1c;
  background-color: rgba(220, 38, 38, 0.14);
  border-color: rgba(220, 38, 38, 0.42);
}

.status-update-health[data-health="white"] select {
  color: #525252;
  background-color: rgba(17, 17, 17, 0.06);
  border-color: rgba(17, 17, 17, 0.22);
}

.status-update-notes {
  display: grid;
  gap: 18px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.status-update-notes label {
  display: grid;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-update-notes textarea {
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  line-height: 1.45;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 0;
  padding: 4px 0 8px;
  background: transparent;
  resize: none;
  overflow: hidden;
}

.status-update-error {
  margin: 0;
  color: #b91c1c;
}

.effort-sheet-chrome {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 10px;
}

.effort-sheet-chrome .brand {
  text-decoration: none;
}

.effort-sheet-chrome-meta {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.effort-sheet-main {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  padding: 28px 32px 28px;
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.04);
  box-sizing: border-box;
}

.effort-sheet-head {
  margin: 0 0 22px;
  padding: 4px 0 18px;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.effort-sheet-head h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.effort-sheet-kicker,
.effort-sheet-note {
  margin: 0;
  color: var(--muted);
}

.effort-sheet-kicker {
  margin: 0 0 8px;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--muted);
}

.effort-sheet-note {
  margin: 0 auto;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 40rem;
  text-wrap: balance;
}

.effort-sheet-note + .effort-sheet-note {
  margin-top: 0.45em;
}

.kalk {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 0 0 8px;
}

.kalk-block {
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.09);
  border-radius: 16px;
  padding: 20px 22px 18px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.03);
}

.kalk-block.is-cit {
  background: #fcfcfd;
}

.kalk-block header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.kalk-head {
  min-width: 0;
}

.kalk-block h2 {
  margin: 0;
  font-family: var(--font);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.3;
  color: var(--ink);
}

.kalk-plus {
  display: inline;
  margin-left: 0.3em;
  font-family: inherit;
  font-size: 1em;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--muted);
}

/* Phase steht über dem Blocktitel und ist genauso groß und präsent. */
.kalk-phase {
  margin: 0 0 4px;
  font-family: var(--font);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  text-transform: none;
  color: var(--ink);
}

.kalk-badge {
  flex: 0 0 auto;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kalk-block.is-cit .kalk-badge {
  background: #fff;
  color: var(--ink);
  border-color: rgba(17, 17, 17, 0.12);
}

.kalk-rate {
  margin: 0 0 16px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.kalk-table {
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 12px;
  background: #fff;
}

.kalk-table table {
  width: 100%;
  border-collapse: collapse;
}

.kalk-table th,
.kalk-table td {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.88rem;
  line-height: 1.45;
  vertical-align: top;
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

.kalk-table tbody tr:last-child td {
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

.kalk-table th {
  background: #fafafa;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.kalk-table th:first-child,
.kalk-table td:first-child {
  width: 9.2rem;
  border-right: 1px solid rgba(17, 17, 17, 0.06);
  font-variant-numeric: tabular-nums;
}

.kalk-table.is-pt th:first-child,
.kalk-table.is-pt td:first-child,
.kalk-table.is-money th:first-child,
.kalk-table.is-money td:first-child {
  width: 12.5rem;
}

.kalk-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kalk-qty [data-col="menge"] {
  flex: 1 1 auto;
  min-width: 2.4rem;
  min-height: 1.4em;
  outline: none;
}

.kalk-qty [data-col="menge"]:focus {
  box-shadow: inset 0 -1px 0 rgba(17, 17, 17, 0.45);
}

.kalk-qty select {
  flex: 0 0 auto;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
}

.kalk-table tbody tr:nth-child(even) td {
  background: transparent;
}

.kalk-table td[contenteditable="true"] {
  outline: none;
  min-height: 2.1em;
}

.kalk-table td[contenteditable="true"]:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.18);
}

.kalk-table tfoot td {
  padding: 0;
  border-bottom: 0;
  background: #fafafa;
}

.kalk-add {
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.kalk-add:hover {
  color: var(--ink);
  background: rgba(17, 17, 17, 0.03);
}

.kalk-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 2px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: #fafafa;
  color: var(--ink);
}

.kalk-totals div {
  min-width: 0;
}

.kalk-totals dt {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.kalk-totals dd {
  margin: 5px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.kalk-totals .is-sum dd {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kalk-bar {
  position: sticky;
  bottom: 0;
  margin: 18px 0 0;
  padding: 16px 0 4px;
  display: flex;
  gap: 10px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%);
}

.kalk-bar .btn {
  flex: 1;
  font-size: 0.92rem;
  padding: 12px 16px;
  border-radius: 10px;
}

@media (max-width: 640px) {
  .effort-sheet-chrome {
    width: calc(100% - 28px);
  }
  .effort-sheet-main {
    width: calc(100% - 28px);
    padding: 20px 16px 22px;
  }

  .kalk-bar {
    flex-direction: column;
  }
}

.effort-sheet-toolbar {
  margin: 18px 0 12px;
}

.effort-sheet-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elev);
  box-shadow: 0 20px 48px rgba(17, 17, 17, 0.06);
}

.effort-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.95rem;
}

.effort-grid th,
.effort-grid td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  min-width: 8rem;
}

.effort-grid .effort-corner,
.effort-grid .effort-row-num,
.effort-grid .effort-col-letters th {
  width: 2.6rem;
  min-width: 2.6rem;
  max-width: 2.6rem;
  padding: 6px 0;
  text-align: center;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  user-select: none;
}

.effort-grid .effort-col-letters th {
  background: var(--bg);
  color: var(--muted);
}

.effort-grid thead tr:not(.effort-col-letters) th {
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
}

.effort-grid thead tr:not(.effort-col-letters) .effort-row-num {
  background: var(--accent);
  color: rgba(255, 255, 255, 0.45);
}

.effort-grid td {
  background: var(--bg-elev);
}

.effort-grid td:focus {
  outline: 2px solid var(--sg-blue-3);
  outline-offset: -2px;
  background: #fff;
}

.effort-grid td.is-sum {
  color: var(--muted);
  background: rgba(10, 26, 79, 0.05);
  font-weight: 600;
  text-align: right;
}

.effort-sheet-share {
  padding: 24px;
}

.effort-sheet-share table {
  width: 100%;
  border-collapse: collapse;
}

.effort-sheet-share th,
.effort-sheet-share td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

.ticket-meta-item.is-readonly {
  cursor: default;
}

.ticket-overview.ticket-section {
  margin-top: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  gap: 18px;
  box-sizing: border-box;
  justify-items: stretch;
}

.ticket-overview-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  min-width: 0;
  width: 100%;
  text-align: left;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.ticket-overview .ticket-section-title {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: none;
  color: var(--ink);
}

.ticket-overview-meta {
  display: none !important;
}

.ticket-overview-meta:empty {
  display: none;
}

.ticket-overview .ticket-section-hint {
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(17, 17, 17, 0.03);
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(107, 107, 107, 0.95);
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.ticket-overview-grid.ticket-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  width: 100%;
}

.ticket-overview-grid .ticket-block {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-width: 0;
  justify-items: stretch;
  text-align: left;
}

.ticket-overview-grid .ticket-block:first-child,
.ticket-overview-grid .ticket-block.is-lead {
  padding: 10px 0;
  gap: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ticket-overview-grid .ticket-block.is-lead + .ticket-block {
  border-top: 0;
}

.ticket-overview-grid .ticket-block dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticket-overview-grid .ticket-block.is-lead dt {
  font-size: 0.68rem;
  color: var(--muted);
}

.ticket-overview-grid .ticket-block dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.ticket-overview-grid .ticket-prose {
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: pre-wrap;
  width: 100%;
  max-width: none;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left;
}

.ticket-overview-grid .ticket-block.is-lead .ticket-prose {
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
  max-width: none;
}

.ticket-overview-grid .ticket-block.is-empty .ticket-prose,
.ticket-overview-grid .ticket-block.is-incomplete .ticket-prose {
  color: rgba(107, 107, 107, 0.8);
  font-weight: 400;
  font-style: italic;
}

.ticket-overview-grid .ticket-block.is-editable:hover {
  border-color: transparent;
  box-shadow: none;
}

.ticket-overview-grid .ticket-block.is-editable:hover .ticket-prose {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.ticket-overview-grid .ticket-block.is-lead.is-editable:hover {
  background: transparent;
}

.ticket-overview-grid .ticket-ai {
  margin-top: 2px;
  font-size: 0.72rem;
  opacity: 0.85;
}

.ticket-overview-grid .ticket-ai:hover {
  opacity: 1;
}


.ticket-block.is-incomplete,
.ticket-row.is-incomplete {
  outline: none;
  box-shadow: inset 0 -1px 0 rgba(180, 83, 9, 0.35);
  border-radius: 0;
}

.ticket-overview-grid .ticket-block.is-incomplete {
  border-color: rgba(180, 83, 9, 0.28);
  box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.12);
}

.ticket-block.is-lead {
  padding: 0 0 4px;
  background: transparent;
  border: 0;
  border-radius: 0;
  gap: 8px;
}

.ticket-block[hidden] {
  display: none !important;
}

.ticket-block dt {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticket-headline.is-editable,
.ticket-meta-item.is-editable,
.ticket-block.is-editable,
.ticket-row.is-editable {
  cursor: text;
}

.ticket-headline.is-editable:hover,
.ticket-block.is-editable:hover .ticket-prose,
.ticket-row.is-editable:hover .ticket-row-value {
  background: rgba(17, 17, 17, 0.035);
  border-radius: 8px;
}

.ticket-meta-item.is-editable:hover {
  border-color: rgba(17, 17, 17, 0.14);
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.03);
}

.ticket-meta-item.is-editable:hover .ticket-row-value {
  background: transparent;
}

.ticket-team {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 24px;
  padding: 4px 0 0;
  width: 100%;
  text-align: left;
  justify-items: stretch;
}

.ticket-team.ticket-context {
  grid-template-columns: 1fr;
  gap: 14px;
}

.ticket-team .ticket-meta-item,
.ticket-costs .ticket-meta-item {
  align-items: flex-start;
}

.ticket-team .ticket-meta-item {
  min-width: 0;
  gap: 6px;
}

.ticket-team .ticket-meta-item dt {
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  line-height: 1.2;
}

.ticket-team .ticket-meta-item dd {
  min-width: 0;
  width: 100%;
}

.ticket-team .ticket-row-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 550;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ticket-team .ticket-tags {
  gap: 6px;
}

.ticket-team[hidden] {
  display: none !important;
}

.ticket-solution {
  grid-template-columns: minmax(0, 1fr);
  gap: 20px 0;
}

@media (max-width: 900px) {
  .ticket-team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }
}

.ticket-headline.is-editing,
.ticket-row-value.is-editing {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  border-radius: 6px;
  padding: 2px 6px;
  min-width: 2rem;
}

.ticket-block dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.ticket-block .ticket-ai {
  margin-top: 0;
}

.field-edit-chips {
  padding: 0;
}

.ticket-prose {
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.45;
  white-space: pre-wrap;
  width: 100%;
  text-align: left;
}

.ticket-block.is-lead .ticket-prose {
  font-size: 0.95rem;
  line-height: 1.55;
}

.ticket-block.is-pending .ticket-row-value-pending {
  visibility: hidden;
}

.ticket-fields {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ticket-fields:empty {
  display: none;
}

.ticket-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11.5rem) minmax(0, 1fr);
  gap: 10px 16px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.ticket-row:first-child {
  border-top: 0;
}

.ticket-row dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.ticket-row dd {
  margin: 0;
  min-width: 0;
}

@media (max-width: 640px) {
  .ticket-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

.ticket-row-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  word-break: break-word;
}

.ticket-row.is-pending .ticket-row-value-pending {
  visibility: hidden;
}

.ticket-row-value-in {
  animation: rise 0.35s var(--ease) both;
}

.title-flight {
  position: fixed;
  z-index: 50;
  max-width: min(560px, calc(100vw - 48px));
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translate(0, -50%);
  animation: titleLift 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes titleLift {
  0% {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
  }
  55% {
    opacity: 0.95;
    transform: translate(calc(var(--dx) * 0.72), calc(-50% + var(--dy) * 0.72)) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translate(var(--dx), calc(-50% + var(--dy))) scale(1);
  }
}

body.field-flow:not(.ticket-active) {
  background: #fff;
}

body.field-flow:not(.ticket-active) .hub {
  display: none !important;
}

body.field-flow:not(.ticket-active) .ticket-view {
  display: none;
}

body.field-flow:not(.ticket-active) .shell-full {
  flex: 1;
  min-height: 0;
  justify-content: center;
}

body.field-flow:not(.ticket-active) .shell-full .dock {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 28px 20px 48px;
  background: transparent;
  position: static;
}

body.field-flow:not(.ticket-active) .dock-guide,
body.field-flow:not(.ticket-active) .dock-inner {
  width: 100%;
  margin: 0;
}

body.field-flow:not(.ticket-active) .dock-guide {
  margin-bottom: 18px;
}

body.field-flow:not(.ticket-active) .field-prompt-text {
  font-size: clamp(1.55rem, 3.6vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

body.field-flow:not(.ticket-active) .shell-full .composer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0 8px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--line-strong);
  border-radius: 0;
  padding: 4px 0 8px;
  box-shadow: none;
}

body.field-flow:not(.ticket-active) .shell-full .composer-card .composer-main {
  grid-column: 1;
}

body.field-flow:not(.ticket-active) .shell-full .composer-card .composer-bar {
  grid-column: 2;
  grid-row: 1;
  width: auto;
  min-height: 0;
  align-self: end;
}

body.field-flow:not(.ticket-active) .shell-full .composer-card:focus-within {
  border-color: var(--ink);
  box-shadow: none;
}

body.field-flow:not(.ticket-active) .shell-full .composer-card #input {
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 10px 0 8px;
  min-height: 44px;
}

body.field-flow:not(.ticket-active) .shell-full .composer-card .send {
  width: 36px;
  height: 36px;
  margin: 0 0 2px;
  border-radius: 10px;
}

body.ticket-active.field-flow .field-prompt-text {
  font-size: 1.05rem;
  font-weight: 600;
}

body.ticket-active.field-flow .shell-full .dock {
  background: linear-gradient(180deg, transparent 0%, #fff 20px, #fff 100%);
}

body.ticket-active.field-flow .shell-full .composer-card {
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  box-shadow: none;
  padding: 8px 10px 8px 14px;
}

body.ticket-active.field-flow .shell-full .composer-card:focus-within {
  border-color: rgba(17, 17, 17, 0.28);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

body.intake-open {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

body.intake-open .chrome {
  flex: 0 0 auto;
}

body.intake-open .shell-full {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  gap: 12px;
  overflow: hidden;
  padding-bottom: 16px;
}

body.intake-open .hub,
body.intake-open .detail {
  display: none !important;
}

body.intake-open .shell-full > #stage {
  display: flex;
  flex: 1;
  min-height: 0;
  width: min(720px, 100%);
  margin: 0 auto;
  background: transparent;
}

body.intake-open .shell-full .dock {
  width: min(720px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding: 16px 0 0;
}

body.intake-open .shell-full #input {
  overflow-y: auto;
}

/* Intake: Frage + Antwortfeld als ein Sheet */
body.intake-open .dock:has(#form:not(.hidden)) {
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 16px;
  padding: 16px 16px 14px;
  box-sizing: border-box;
}

body.intake-open .dock:has(#form:not(.hidden)) .dock-guide {
  width: 100%;
  margin: 0 0 12px;
}

body.intake-open .dock:has(#form:not(.hidden)) .dock-inner {
  width: 100%;
  margin: 0;
  gap: 10px;
}

body.intake-open .field-prompt {
  padding: 0;
}

body.intake-open .field-prompt:not([hidden])::before {
  content: "Frage";
  display: block;
  margin: 0 0 6px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

body.intake-open .field-prompt-text {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  font-family: var(--font);
  font-size: 1.06rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.intake-open #stage .msg.bot {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--ink);
  padding: 2px 0;
}

body.intake-open #stage .msg.user {
  align-self: flex-end;
  max-width: min(92%, 36rem);
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 14px 14px 4px 14px;
  padding: 10px 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: none;
}

body.intake-open #stage .msg.prose {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
}

body.intake-open #stage .panel {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 14px;
  box-shadow: none;
  padding: 16px 16px 14px;
}

body.intake-open #stage .panel-kicker,
body.intake-open #stage .turn-meta {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

body.intake-open .suggestion,
body.intake-open .choice-row .suggestion {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 7px 12px;
}

body.intake-open .suggestion:hover {
  background: rgba(17, 17, 17, 0.03);
  border-color: var(--line-strong);
  color: var(--ink);
}

body.intake-open .suggestion.on,
body.intake-open .suggestion.is-selected,
body.intake-open .suggestion.go:not(:disabled),
body.intake-open .choice-row .suggestion.is-selected,
body.intake-open .choice-row .suggestion.go:not(:disabled) {
  background: rgba(31, 56, 194, 0.1);
  border-color: rgba(31, 56, 194, 0.28);
  color: var(--sg-blue-4);
  box-shadow: none;
}

body.intake-open .suggestion.is-selected:hover {
  background: rgba(31, 56, 194, 0.14);
  border-color: rgba(31, 56, 194, 0.35);
  color: var(--sg-blue-4);
}

body.intake-open .jira-suggest.is-tags-multi {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 14px;
  box-shadow: none;
  padding: 12px;
}

body.intake-open .jira-create {
  margin: 8px 0 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  box-shadow: none;
  transition: background 0.15s ease;
}

body.intake-open .jira-create:hover:not(:disabled) {
  background: var(--sg-blue-4);
  filter: none;
}

body.intake-open .shell-full .composer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: end;
  gap: 6px 10px;
  background: #f6f6f6;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 10px 10px 14px;
  box-shadow: none;
  min-width: 0;
}

body.intake-open .shell-full .composer-card .composer-main {
  grid-column: 1 / -1;
  grid-row: 1;
}

body.intake-open .shell-full .composer-card .composer-bar {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  justify-content: flex-end;
  gap: 10px;
  min-height: 36px;
}

body.intake-open .shell-full .composer-card:focus-within {
  background: #fff;
  border-color: rgba(17, 17, 17, 0.2);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.04);
}

body.intake-open .shell-full .composer-card #input {
  width: 100%;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  padding: 4px 0 2px;
  min-height: 44px;
  max-height: none;
  line-height: 1.45;
  color: var(--ink);
}

body.intake-open .shell-full .composer-card #input::placeholder {
  color: rgba(107, 107, 107, 0.75);
  font-weight: 400;
}

body.intake-open .shell-full .composer-card #input.is-long {
  min-height: 88px;
}

body.intake-open .shell-full .composer-card .send {
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
}

body.intake-open .shell-full .composer-card .send:hover {
  background: var(--sg-blue-4);
}

body.intake-open .shell-full .composer-card .send svg {
  width: 15px;
  height: 15px;
}

body.intake-open .ai-enhance {
  font-size: 0.7rem;
  color: var(--muted);
  margin-right: auto;
}

body.intake-open .ai-enhance:hover {
  color: var(--ink);
}

body.intake-open .empty-title {
  font-family: var(--font);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}

body.intake-open .empty-sub {
  font-size: 0.9rem;
  color: var(--muted);
}

body.ticket-open .shell-full > #stage {
  display: none;
}

body:has(.shell-full) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body:has(.shell-full) .chrome {
  flex: 0 0 auto;
}

body:has(.shell-full) .shell-full {
  flex: 1;
  min-height: 0;
}

body.ticket-open .dock {
  display: none;
}

.title-flight {
  position: fixed;
  z-index: 50;
  max-width: min(640px, calc(100vw - 32px));
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translate(0, -50%);
  animation: titleLift 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes titleLift {
  0% {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
  }
  55% {
    opacity: 0.95;
    transform: translate(calc(var(--dx) * 0.72), calc(-50% + var(--dy) * 0.72)) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translate(var(--dx), calc(-50% + var(--dy))) scale(1);
  }
}

.grid tbody tr.ticket-row-pending .row-title {
  visibility: hidden;
}

.grid tbody tr.ticket-row-in {
  animation: rise 0.35s var(--ease) both;
}

body.intake-open:not(.ticket-active):not(.ticket-ready) .dock:has(#form.hidden) {
  display: none;
}

.ticket-jira-create {
  margin: 28px 0 8px;
}

.hub {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  animation: rise 0.5s var(--ease) both;
}

.hub-kicker {
  margin: 0;
  padding: 2px 0 8px;
  border-bottom: 2px solid transparent;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(107, 107, 107, 0.55);
  line-height: 1.2;
  cursor: default;
  user-select: none;
  pointer-events: none;
}

.hub-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 2px 0 12px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
}

.hub-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-left: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.hub-bar .hub-search,
.hub-bar .search {
  margin-left: auto;
  min-width: min(220px, 42vw);
  max-width: 280px;
}

.hub-view-btn {
  margin: 0;
  padding: 2px 0 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.hub-view-btn + .hub-view-btn {
  border-left: 0;
}

.hub-view-btn.is-active {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border-bottom-color: var(--ink);
}

.hub-view-btn:hover:not(.is-active) {
  color: var(--ink);
  background: transparent;
}

.hub-view-btn:focus-visible,
.hub-view-icon:focus-visible,
.jira-create:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.hub-view-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
}

.hub-view-tools[hidden] {
  display: none;
}

.hub-view-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.hub-view-icon:hover,
.hub-view-icon.is-active {
  color: var(--ink);
  background: rgba(17, 17, 17, 0.06);
}

.hub[data-view="board"] .table-wrap {
  display: none !important;
}

.hub[data-view="report"] > .table-wrap {
  display: none !important;
}

.hub[data-view="report"] .hub-report:not([hidden]) {
  display: flex;
}

.hub[data-view="list"] .hub-board,
.hub[data-view="list"] .hub-board-fade,
.hub[data-view="list"] .hub-board-hint {
  display: none !important;
}
.hub[data-view="list"] .hub-chat,
.hub[data-view="board"] .hub-chat,
.hub[data-view="report"] .hub-chat,
.hub[data-view="inbox"] .hub-chat {
  display: none !important;
}


.hub[data-view="chat"] .table-wrap,
.hub[data-view="chat"] .hub-board,
.hub[data-view="chat"] .hub-board-fade,
.hub[data-view="chat"] .hub-board-hint,
.hub[data-view="chat"] .hub-foot,
.hub[data-view="chat"] .search {
  display: none !important;
}

.hub[data-view="inbox"] .hub-board,
.hub[data-view="inbox"] .hub-board-fade,
.hub[data-view="inbox"] .hub-board-hint {
  display: none !important;
}

.hub[data-view="inbox"] .table-wrap {
  display: block !important;
}

.hub[data-view="chat"] {
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.hub-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  width: 100%;
  gap: 0;
  padding-top: 0;
}

.hub-chat-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  gap: 0;
  max-width: min(720px, 100%);
  margin: 0 auto;
  width: 100%;
}

.hub-chat-panel:not(.is-empty) {
  min-height: min(68vh, calc(100dvh - 200px));
}

.hub-chat-panel.is-empty {
  justify-content: flex-start;
  padding-top: 36px;
}

.hub-chat-panel.is-empty .hub-chat-toolbar {
  position: static;
}

.hub-chat-panel.is-empty .hub-chat-thread {
  flex: 0 0 0;
  padding: 0;
  overflow: hidden;
}

.hub-chat-panel.is-empty .hub-chat-suggest {
  justify-content: center;
}

.hub-chat-dock {
  position: relative;
  flex: 0 0 auto;
}

.hub-chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: stretch;
  gap: 12px;
  padding: 0 0 6px;
  border-bottom: 0;
  min-height: 24px;
  flex: 0 0 auto;
}

.hub-chat-progress {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-chat-progress strong {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
}

.hub-chat-reset,
.hub-chat-tool {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(17, 17, 17, 0.38);
  cursor: pointer;
}

.hub-chat-reset:hover,
.hub-chat-tool:hover {
  color: var(--ink);
}

.hub-chat-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1 1 auto;
  width: 100%;
  margin: 0;
  opacity: 0.9;
}

.hub-chat-draft {
  flex: 0 0 auto;
  margin: 0 0 10px;
  padding: 14px 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 12px;
  background: #fff;
}

.hub-chat-draft[hidden],
.hub-chat-draft-title[hidden],
.hub-chat-draft-body[hidden],
.hub-chat-draft-create[hidden] {
  display: none;
}

.hub-chat-draft-kicker {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.hub-chat-draft-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

.hub-chat-draft-body {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.85rem;
  line-height: 1.45;
  color: rgba(17, 17, 17, 0.78);
}

.hub-chat-draft-create {
  appearance: none;
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.hub-chat-history-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.hub-chat-history-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 240px;
  max-width: min(360px, calc(100vw - 24px));
  max-height: min(320px, 50vh);
  overflow: auto;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.1);
}

.hub-chat-history-menu[hidden] {
  display: none;
}

.hub-chat-history-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: none;
  padding: 8px 10px;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.hub-chat-history-item:hover,
.hub-chat-history-item.is-current {
  background: rgba(17, 17, 17, 0.05);
}

.hub-chat-history-item-title {
  font-size: 0.82rem;
  line-height: 1.25;
}

.hub-chat-history-item-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.hub-chat-history-empty {
  margin: 0;
  padding: 10px 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.hub-chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 0 16px;
  scroll-behavior: smooth;
}

.hub-chat-actions,
.hub-chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 0 10px;
}

.hub-chat-form {
  margin: 0;
  padding: 0 0 4px;
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  background: transparent;
  z-index: 2;
}

.hub-chat-jump {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.08);
}

.hub-chat-jump[hidden] {
  display: none;
}

.hub-chat-edit-hint {
  margin: 0 0 6px;
  font-size: 0.75rem;
  color: var(--muted);
}

.hub-chat-edit-hint[hidden] {
  display: none;
}

.hub-chat-bubble {
  max-width: min(92%, 640px);
  animation: rise 0.35s var(--ease) both;
}

.hub-chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.hub-chat-bubble.is-user {
  align-self: flex-end;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.45;
}

.hub-chat-bubble.is-user p {
  padding: 10px 14px;
  border-radius: 18px;
  background: #f4f4f5;
}

.hub-chat-bubble.is-assistant {
  align-self: stretch;
  max-width: 100%;
  padding: 2px 0;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: -0.011em;
  line-height: 1.55;
  color: var(--ink);
}

.hub-chat-md p,
.hub-chat-md ul,
.hub-chat-md ol {
  margin: 0 0 0.55em;
}

.hub-chat-md p:last-child,
.hub-chat-md ul:last-child,
.hub-chat-md ol:last-child {
  margin-bottom: 0;
}

.hub-chat-md ul,
.hub-chat-md ol {
  padding-left: 1.2em;
}

.hub-chat-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: rgba(17, 17, 17, 0.05);
  border-radius: 4px;
  padding: 0 4px;
}

.hub-chat-md a {
  color: inherit;
}

.hub-chat-turn-tools {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}

.hub-chat-bubble.is-user .hub-chat-turn-tools {
  justify-content: flex-end;
}

.hub-chat-turn-tools button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(17, 17, 17, 0.45);
  font: inherit;
  font-size: 0.75rem;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.hub-chat-turn-tools button:hover {
  background: rgba(17, 17, 17, 0.06);
  color: var(--ink);
}

.hub-chat-bubble.is-assistant p {
  color: inherit;
}

.hub-chat-bubble.is-thinking {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.hub-chat-bubble.is-thinking .hub-chat-dots {
  display: inline-flex;
  gap: 5px;
}

.hub-chat-bubble.is-thinking .hub-chat-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 1.2s ease-in-out infinite;
}

.hub-chat-bubble.is-thinking .hub-chat-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.hub-chat-bubble.is-thinking .hub-chat-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.hub-chat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.hub-chat-link {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.hub-chat-link:hover {
  border-color: var(--line-strong);
}

.hub-chat-action,
.hub-chat-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.hub-chat-chip {
  background: transparent;
  color: var(--muted);
}

.hub-chat-action:hover,
.hub-chat-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.hub-chat-action.is-primary,
.hub-chat-chip-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.hub-chat-action.is-primary:hover,
.hub-chat-chip-primary:hover {
  background: var(--sg-blue-4);
  border-color: var(--sg-blue-4);
  color: #fff;
}

.hub-chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
  background: #f3f3f4;
  border: 1px solid rgba(17, 17, 17, 0.22);
  border-radius: 14px;
  padding: 6px 8px 6px 14px;
  box-shadow: none;
}

.hub-chat-composer:focus-within {
  border-color: rgba(17, 17, 17, 0.55);
  background: #fff;
  box-shadow: none;
}

.hub-chat-note {
  margin: 6px 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
  color: rgba(17, 17, 17, 0.42);
}

.hub-chat-composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 160px;
  resize: none;
  padding: 10px 4px 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.45;
  color: var(--ink);
}

.hub-chat-composer textarea::placeholder {
  color: rgba(17, 17, 17, 0.55);
}

.hub-chat-send {
  appearance: none;
  width: 32px;
  height: 32px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hub-chat-send:hover:not(:disabled) {
  background: #2a2a2a;
}

.hub-chat-send:disabled {
  opacity: 0.28;
  cursor: default;
}

.hub-chat-send .hub-chat-stop-icon {
  display: none;
}

.hub-chat-send.is-stop .hub-chat-send-icon {
  display: none;
}

.hub-chat-send.is-stop .hub-chat-stop-icon {
  display: block;
}

/* Chat: unteres Dock ausblenden (kein „Neuen Change anlegen“). */
body.hub-chat-view .dock {
  display: none !important;
}

body:has(#hub[data-view="board"]:not([hidden])):not(.ticket-active):not(.field-flow) {
  overflow-x: hidden;
}

.hub[data-view="board"] {
  gap: 12px;
  position: relative;
  overflow: visible;
}

.hub[data-view="board"] .hub-board {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 16px 28px 16px;
  box-sizing: border-box;
}

.hub[data-view="board"] .hub-board-fade {
  right: calc((100% - 100vw) / 2);
}

.hub[data-view="board"] .hub-board-hint {
  right: calc((100% - 100vw) / 2 + 24px);
}

.hub-report {
  display: none;
  flex-direction: column;
  gap: 28px;
  min-height: 0;
  padding: 6px 0 36px;
}

.hub-report[hidden] {
  display: none !important;
}

.hub-report-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 36px;
}

.hub-report-kpi span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.hub-report-kpi strong {
  display: block;
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hub-report-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 650;
}

.hub-report-wrap {
  flex: none;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 8px 10px 12px;
}

.hub-report-table {
  table-layout: auto;
  font-size: 0.78rem;
}

.hub-report-table thead th {
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: right;
  white-space: normal;
}

.hub-report-table th:first-child,
.hub-report-table td:first-child {
  text-align: left;
}

.hub-report-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hub-report-table tr.is-sum td {
  font-weight: 650;
}

.hub-report-table tbody tr[data-id] {
  cursor: pointer;
}

@media (max-width: 800px) {
  .hub-report-kpis {
    grid-template-columns: 1fr;
  }
}

.hub-board {
  display: flex;
  gap: 0;
  align-items: stretch;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 0;
  flex: 1 1 auto;
  padding: 8px 0 12px;
  scroll-snap-type: none;
  scrollbar-width: thin;
}

.hub-board[hidden] {
  display: none !important;
}

.hub-board-fade {
  position: absolute;
  top: 56px;
  right: 0;
  bottom: 36px;
  width: 56px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.85) 55%,
    rgba(255, 255, 255, 0.98) 100%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hub[data-view="board"] .hub-board-fade.is-visible {
  opacity: 1;
}

.hub-board-hint {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  z-index: 3;
  display: none;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hub[data-view="board"] .hub-board-hint.is-visible {
  display: inline-flex;
  opacity: 1;
}

.hub-board-hint::after {
  content: "›";
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
}

.hub-col {
  flex: 1 1 0;
  min-width: 240px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: calc(100dvh - 200px);
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 0;
  padding: 0 22px 0 0;
  overflow: hidden;
  box-sizing: border-box;
}

.hub-col:last-child {
  border-right: 0;
  padding-right: 0;
}

.hub-col + .hub-col {
  margin-left: 0;
  padding-left: 22px;
}

@media (max-width: 900px) {
  .hub-col {
    flex: 0 0 44vw;
    min-width: 180px;
    max-width: 240px;
    height: auto;
    max-height: calc(100dvh - 200px);
    padding-right: 18px;
  }
}

.hub-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0 12px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
  flex: 0 0 auto;
}

.hub-col-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-col-count {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(107, 107, 107, 0.75);
  font-variant-numeric: tabular-nums;
}

.hub-col-mine {
  font-size: 0.68rem;
  font-weight: 450;
  color: var(--muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.hub-col-head-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.hub-col-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  scrollbar-width: thin;
}

.hub-col-empty {
  margin: 4px 0 0;
  padding: 14px 2px;
  font-size: 0.78rem;
  color: rgba(107, 107, 107, 0.7);
}

.hub-card {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  margin: 0;
  padding: 18px 2px 16px;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  box-shadow: none;
  overflow: hidden;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  transition: box-shadow 0.15s ease;
}

.hub-card > * {
  min-width: 0;
  max-width: 100%;
}

.hub-card:hover {
  background: transparent;
  border-color: rgba(17, 17, 17, 0.07);
  box-shadow: none;
}

.hub-card.is-hub-focus {
  outline: none;
  border-color: rgba(17, 17, 17, 0.07);
  box-shadow: inset 2px 0 0 var(--ink);
}

.hub-card.is-waiting {
  background: rgba(161, 92, 0, 0.045);
  box-shadow: inset 3px 0 0 rgba(161, 92, 0, 0.55);
}

.hub-card.is-waiting .row-dot {
  box-shadow: none;
}

.grid tbody tr.is-waiting {
  background: rgba(161, 92, 0, 0.045);
  box-shadow: inset 3px 0 0 rgba(161, 92, 0, 0.55);
}

.grid tbody tr.is-waiting .row-dot {
  box-shadow: none;
}

.grid tbody tr.is-waiting .row-dot[data-health="white"] {
  box-shadow: inset 0 0 0 1.5px rgba(17, 17, 17, 0.28);
}

.ticket-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 4px;
  min-height: 2.4rem;
}

.ticket-back,
.ticket-nav-action {
  appearance: none;
  border: 0;
  background: none;
  padding: 6px 0;
  margin: 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
}

.ticket-nav-action {
  margin-left: auto;
  color: var(--muted);
}

.hub[data-view="chat"] .hub-owner {
  display: none;
}

.hub-owner select {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.82rem;
}

.phase-row,
.phase-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.phase-own select,
.phase-search input,
.phase-hit {
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
}

.phase-list {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phase-list li {
  display: flex;
  gap: 12px;
  align-items: center;
}

.phase-open,
.phase-remove,
.phase-hit {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.phase-open {
  font-weight: 650;
}

.phase-remove,
.phase-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.phase-hits {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.ticket-back:hover {
  color: var(--ink);
}

.ticket-nav-context {
  font-size: 0.78rem;
  color: var(--muted);
}

.ticket-nav-context:not([hidden])::before {
  content: "·";
  margin-right: 10px;
  opacity: 0.45;
}

.hub-card .row-change {
  gap: 0 10px;
  align-items: start;
}

.hub-card .row-dot {
  margin-top: 0.4em;
}

.hub-card .row-title {
  max-width: 100%;
  flex: 1 1 auto;
  white-space: normal;
  overflow: hidden;
  text-overflow: unset;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.hub-card .row-cue {
  flex: 1 1 auto;
  max-width: 100%;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.86rem;
  line-height: 1.4;
}

.hub-card .row-cue.is-next {
  display: -webkit-box;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--warn);
}

.hub-card .row-meta {
  font-size: 0.68rem;
}

.hub-card-title {
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.01em;
  max-height: calc(1.35em * 3);
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.hub-card-cue {
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--muted);
  max-height: calc(1.35em * 2);
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.hub-card-cue.is-next {
  color: var(--warn);
  font-weight: 400;
  padding: 4px 8px 4px 7px;
  border-radius: 6px;
  background: rgba(161, 92, 0, 0.09);
  box-shadow: inset 3px 0 0 var(--warn);
}

.hub-card-key {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: rgba(107, 107, 107, 0.65);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-card-todo {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-items: start;
  margin-top: 2px;
  padding: 2px 0;
}

.hub-card-todo-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.hub-card-todo-check:hover {
  background: rgba(17, 17, 17, 0.05);
}

.hub-card-todo-mark {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  box-sizing: border-box;
  background: rgba(17, 17, 17, 0.06);
}

.hub-card-todo-text {
  font-size: 0.76rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  max-height: calc(1.35em * 2);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hub-card-todo-who {
  font-size: 0.64rem;
  line-height: 1.3;
  color: rgba(107, 107, 107, 0.85);
  padding-top: 2px;
  white-space: nowrap;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 200px;
  max-width: 20rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  padding: 0;
  color: var(--muted);
}

.search .search-icon {
  color: var(--muted);
  font-size: 0.8rem;
  min-width: 1em;
}

.search:focus-within {
  color: var(--ink);
  border-color: var(--accent);
}

.search-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  padding: 8px 0;
  width: 100%;
}

.search input::placeholder {
  color: var(--muted);
}

.search input::-webkit-search-cancel-button {
  appearance: none;
}

.kbd {
  font: inherit;
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 1px 5px;
}

.hub-bar select {
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 10px;
}

.btn-sm {
  padding: 9px 12px;
  font-size: 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
}

.chip span {
  font-weight: 600;
  color: var(--ink);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chip.active span {
  color: #fff;
}

.table-wrap {
  position: relative;
  flex: 1;
  min-height: 120px;
  overflow: auto;
  background: transparent;
  border: 0;
}

.grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.88rem;
}

.grid thead {
  display: none;
}

.grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line-strong);
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
}

.hub-report-table.grid {
  table-layout: auto;
  font-size: 0.78rem;
}

.hub-report-table.grid thead {
  display: table-header-group;
}

.hub-report-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.hub-report-clear {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.hub-report-clear:hover {
  color: var(--ink);
}

.hub-report-table.grid thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  cursor: pointer;
  color: var(--muted);
  padding: 14px 16px 12px;
  text-align: right;
  letter-spacing: 0.01em;
  text-transform: none;
  font-size: 0.7rem;
  font-weight: 650;
  white-space: normal;
  line-height: 1.3;
  border-bottom: 1px solid var(--line);
}

.hub-report-table.grid tbody td {
  padding: 14px 16px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  border-top: 0;
  border-bottom: 1px solid #f2f2f2;
}

.hub-report-table.grid tbody tr:hover td {
  background: #fafafa;
}

.hub-report-table.grid tr.is-sum:hover td {
  background: #fff;
}

.hub-report-table.grid tbody td.is-total {
  font-weight: 650;
}

.hub-report-table.grid tr.is-sum td {
  font-weight: 650;
  border-bottom: 0;
  border-top: 1px solid var(--ink);
  background: #fff;
}

.hub-report-table.grid thead th[data-active="desc"]::after {
  content: " ↓";
}

.hub-report-table.grid thead th[data-active="asc"]::after {
  content: " ↑";
}

.hub-report-table td.is-name {
  cursor: pointer;
}

.hub-report-table td.is-name span {
  display: block;
}

.hub-report-table .report-hint {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}

.hub-report-table td.is-quiet {
  color: #d0d0d0;
}

.hub-report-table tr.is-picked td.is-name {
  box-shadow: inset 2px 0 0 var(--ink);
}

.hub-report-table.grid thead th:first-child,
.hub-report-table.grid tbody td:first-child {
  text-align: left;
  padding-left: 18px;
}

.hub-report-table.grid thead th:last-child,
.hub-report-table.grid tbody td:last-child {
  padding-right: 18px;
}

.grid thead th > button,
.grid thead th > span {
  display: block;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  padding: 11px 12px;
}

.grid thead th > button {
  cursor: pointer;
}

.grid thead th > button:hover {
  color: var(--ink);
}

.grid thead th[data-active="asc"] > button::after {
  content: " ↑";
  color: var(--ink);
}

.grid thead th[data-active="desc"] > button::after {
  content: " ↓";
  color: var(--ink);
}

.grid tbody td {
  border-top: 0;
  padding: 18px 4px 16px;
  vertical-align: top;
}

.grid tbody tr {
  cursor: pointer;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
}

.grid tbody tr:hover {
  background: rgba(17, 17, 17, 0.035);
}

.grid tbody tr:hover .row-title {
  color: var(--ink);
}

.grid tbody tr.cursor,
.grid tbody tr.is-hub-focus {
  background: rgba(17, 17, 17, 0.05);
  box-shadow: inset 2px 0 0 var(--ink);
}

.grid tbody tr.cursor .row-title,
.grid tbody tr.is-hub-focus .row-title {
  font-weight: 700;
}

.col-status {
  display: none;
}

.grid tbody td:first-child {
  width: auto;
  min-width: 0;
}

.col-ref,
.col-date {
  white-space: nowrap;
  width: 1%;
}

.col-kind,
.col-user {
  color: var(--muted);
  white-space: nowrap;
}

.ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

.row-change {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 14px;
  align-items: start;
  min-width: 0;
  width: 100%;
}

.row-dot {
  grid-column: 1;
  grid-row: 2;
  width: 8px;
  height: 8px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
  box-shadow: none;
}

.row-dot[data-health="green"],
.row-dot[data-health="done"] {
  background: #16a34a;
}

.row-dot[data-health="blue"] {
  background: #2563eb;
}

.row-dot[data-health="yellow"] {
  background: #eab308;
}

.row-dot[data-health="red"] {
  background: #dc2626;
}

.row-dot[data-health="white"] {
  background: #e5e5e5;
  box-shadow: inset 0 0 0 1.5px rgba(17, 17, 17, 0.35);
}

.row-stack {
  grid-column: 2;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.row-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0 10px;
  min-width: 0;
  width: 100%;
}

.row-title {
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.025em;
  line-height: 1.22;
  color: var(--ink);
  min-width: 0;
  max-width: none;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.row-cue {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  min-width: 0;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.row-cue.is-next {
  color: var(--warn);
  font-weight: 500;
  display: -webkit-box;
  max-width: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.row-meta {
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.comment-stand {
  margin: 0;
  padding: 16px 0 18px;
  border: 0;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 0;
  background: transparent;
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  justify-items: stretch;
  text-align: left;
  transition: opacity 0.2s var(--ease);
}
.comment-stand[hidden] {
  display: none !important;
}
.comment-stand.is-waiting .comment-stand-lead {
  box-shadow: inset 3px 0 0 var(--ink);
  padding-left: 14px;
}
.comment-stand-lead {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.comment-stand-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
  min-width: 0;
}
.comment-stand-label {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.comment-stand-health-wrap {
  display: inline-flex;
  min-width: 0;
}

.comment-stand-health {
  appearance: none;
  margin: 0;
  padding: 2px 20px 2px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999999' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 10px 6px;
  max-width: 100%;
}

.comment-stand[data-health] {
  background: transparent;
  border-color: transparent;
}

.comment-stand[data-health="green"] .comment-stand-lead,
.comment-stand[data-health="done"] .comment-stand-lead {
  box-shadow: inset 4px 0 0 #16a34a;
  padding-left: 14px;
}
.comment-stand[data-health="blue"] .comment-stand-lead {
  box-shadow: inset 4px 0 0 #2563eb;
  padding-left: 14px;
}
.comment-stand[data-health="yellow"] .comment-stand-lead {
  box-shadow: inset 4px 0 0 #eab308;
  padding-left: 14px;
}
.comment-stand[data-health="red"] .comment-stand-lead {
  box-shadow: inset 4px 0 0 #dc2626;
  padding-left: 14px;
}
.comment-stand[data-health="white"] .comment-stand-lead {
  box-shadow: inset 4px 0 0 #a3a3a3;
  padding-left: 14px;
}

.comment-stand[data-health="green"] .comment-stand-health,
.comment-stand[data-health="done"] .comment-stand-health {
  color: #15803d;
  background-color: rgba(22, 163, 74, 0.16);
  border-color: rgba(22, 163, 74, 0.45);
}

.comment-stand[data-health="blue"] .comment-stand-health {
  color: #1d4ed8;
  background-color: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.42);
}

.comment-stand[data-health="yellow"] .comment-stand-health {
  color: #a16207;
  background-color: rgba(234, 179, 8, 0.22);
  border-color: rgba(202, 138, 4, 0.5);
}

.comment-stand[data-health="red"] .comment-stand-health {
  color: #b91c1c;
  background-color: rgba(220, 38, 38, 0.14);
  border-color: rgba(220, 38, 38, 0.42);
}

.comment-stand[data-health="white"] .comment-stand-health {
  color: #525252;
  background-color: rgba(17, 17, 17, 0.06);
  border-color: rgba(17, 17, 17, 0.22);
}
.comment-stand-meta {
  margin: 0;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 450;
  letter-spacing: 0.01em;
  color: rgba(107, 107, 107, 0.85);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comment-stand-meta:empty {
  display: none;
}
.comment-stand-headline {
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.comment-stand-headline[hidden],
.comment-stand-headline:empty {
  display: none !important;
}
.comment-ablauf {
  margin: 0;
  max-width: 46rem;
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  text-align: left;
  overflow-wrap: anywhere;
}
.comment-ablauf:empty,
.comment-ablauf.is-empty {
  display: none;
}
.comment-todos-wrap {
  display: grid;
  gap: 6px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
}
.comment-todos-wrap[hidden] {
  display: none !important;
}
.comment-todos-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.comment-todos-count {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(107, 107, 107, 0.75);
}
.comment-todos {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}
.comment-todo {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: start;
  margin: 0;
  padding: 4px 2px;
  list-style: none;
  border-radius: 10px;
  transition: opacity 0.2s var(--ease), background 0.15s var(--ease);
}
.comment-todo-delete {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  padding: 6px 2px 2px;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, color 0.12s ease, visibility 0.12s ease;
  align-self: start;
  white-space: nowrap;
}
.comment-todo:hover .comment-todo-delete,
.comment-todo:focus-within .comment-todo-delete {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.comment-todo-delete:hover,
.comment-todo-delete:focus-visible {
  color: var(--ink);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (hover: none) {
  .comment-todo-delete {
    opacity: 0.7;
    visibility: visible;
    pointer-events: auto;
  }
}
.comment-todo.is-mine {
  background: rgba(17, 17, 17, 0.025);
}
.comment-todo.is-done {
  opacity: 0.45;
}
.comment-todo-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
}
.comment-todo-check:hover {
  background: rgba(17, 17, 17, 0.04);
}
.comment-todo-check:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.16);
}
.comment-todo-mark {
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(17, 17, 17, 0.28);
  border-radius: 50%;
  background: transparent;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.comment-todo.is-mine .comment-todo-mark {
  border-color: var(--ink);
}
.comment-todo.is-done .comment-todo-mark {
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: inset 0 0 0 3px #fff;
}
.comment-todo-body {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 4px 4px 4px 0;
}
.comment-todo-text {
  margin: 0;
  padding: 1px 4px;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
  outline: none;
  caret-color: var(--ink);
}
.comment-todo.is-mine .comment-todo-text {
  font-weight: 500;
}
.comment-todo.is-done .comment-todo-text {
  text-decoration: line-through;
  color: rgba(107, 107, 107, 0.9);
  font-weight: 400;
}
.comment-todo-text:focus {
  background: rgba(17, 17, 17, 0.035);
}
.comment-todo-text:empty::before {
  content: "Todo…";
  color: rgba(107, 107, 107, 0.55);
}
.comment-todo-assignee {
  margin: 0;
  padding: 0 4px;
  font-size: 0.66rem;
  line-height: 1.3;
  font-weight: 450;
  letter-spacing: 0.01em;
  color: rgba(107, 107, 107, 0.8);
  border-radius: 4px;
  outline: none;
  min-height: 1.1em;
  caret-color: var(--ink);
}
.comment-todo-assignee:focus {
  background: rgba(17, 17, 17, 0.035);
  color: var(--ink);
}
.comment-todo-assignee:empty::before {
  content: attr(data-placeholder);
  color: rgba(107, 107, 107, 0.55);
}
.comment-todo.is-done .comment-todo-assignee {
  opacity: 0.7;
}
.comment-todo-add {
  justify-self: start;
  margin: 4px 0 0;
  padding: 6px 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.comment-todo-add:hover {
  color: var(--ink);
}
.comment-todo-text[data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: rgba(107, 107, 107, 0.55);
}
.ticket-comments {
  margin-top: 32px;
  padding: 28px 0 0;
  border: 0;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 0;
  background: transparent;
  display: grid;
  gap: 14px;
  justify-items: stretch;
}

.ticket-comments[hidden],
body.ticket-creating .ticket-comments {
  display: none;
}
.ticket-comments-head {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  text-align: left;
}
.ticket-comments .ticket-section-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: none;
  color: var(--ink);
  border-bottom: 0;
  padding-bottom: 0;
}
.ticket-comments .comment-count {
  display: none !important;
}
.ticket-comments .comment-count[hidden] {
  display: none !important;
}
.ticket-comments .comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-height: min(360px, 42vh);
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.ticket-comments .comment-empty {
  margin: 0;
  padding: 18px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.45em;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: left;
  line-height: 1.4;
}
.ticket-comments .comment-empty strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}
.ticket-comments .comment-empty span {
  line-height: inherit;
  max-width: none;
}
.ticket-comments .comment-day {
  list-style: none;
  margin: 12px 0 4px;
  padding: 0;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.ticket-comments .comment-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
  background: transparent;
  text-align: left;
}
.ticket-comments .comment-item.is-follow {
  padding-top: 6px;
}
.ticket-comments .comment-item.is-follow .comment-avatar,
.ticket-comments .comment-item.is-follow .comment-meta strong {
  visibility: hidden;
}
.ticket-comments .comment-item:last-child {
  border-bottom: 0;
}
.ticket-comments .comment-item:hover {
  background: transparent;
}
.ticket-comments .comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: var(--sg-blue-5);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.ticket-comments .comment-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.ticket-comments .comment-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.ticket-comments .comment-meta strong {
  color: var(--ink);
  font-weight: 650;
  font-size: 0.8rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-comments .comment-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 1.2em;
}
.ticket-comments .comment-when {
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}
.ticket-comments .comment-delete {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  padding: 2px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, color 0.12s ease, visibility 0.12s ease;
}
.ticket-comments .comment-item:hover .comment-delete,
.ticket-comments .comment-item:focus-within .comment-delete {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ticket-comments .comment-delete:hover,
.ticket-comments .comment-delete:focus-visible {
  color: var(--ink);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (hover: none) {
  .ticket-comments .comment-delete {
    opacity: 0.7;
    visibility: visible;
    pointer-events: auto;
  }
}
.ticket-comments .comment-body {
  margin: 0;
  white-space: normal;
  line-height: 1.4;
  font-size: 0.82rem;
  color: var(--ink);
}
.ticket-comments .comment-body a {
  color: var(--sg-blue-4);
}
.ticket-comments .comment-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84em;
  background: rgba(0, 0, 0, 0.04);
  padding: 0.05em 0.3em;
  border-radius: 4px;
}
.ticket-comments .comment-at {
  color: var(--sg-blue-4);
  font-weight: 600;
}
.ticket-comments .comment-form {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  width: auto;
}
.ticket-comments .comment-form-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(107, 107, 107, 0.95);
  text-align: left;
}
.ticket-comments .comment-compose {
  position: relative;
}
.ticket-comments .comment-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 84px;
  border-radius: 12px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 12px 14px;
  outline: none;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ticket-comments .comment-form textarea:focus {
  border-color: rgba(17, 17, 17, 0.28);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}
.ticket-comments .comment-form textarea::placeholder {
  color: var(--muted);
}
.ticket-comments .comment-mention {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 40;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 4px;
  display: grid;
  gap: 2px;
  max-height: 180px;
  overflow: auto;
}
.ticket-comments .comment-mention[hidden] {
  display: none !important;
}
.ticket-comments .comment-mention-item {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  color: var(--ink);
}
.ticket-comments .comment-mention-item:hover {
  background: rgba(74, 107, 232, 0.08);
}
.ticket-comments .comment-preview {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f5f5;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.45;
}
.ticket-comments .comment-preview::before {
  content: "Vorschau";
  display: block;
  margin-bottom: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ticket-comments .comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ticket-comments .comment-form-hint {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
  min-height: 1.2em;
}

.ticket-comments .comment-form-hint[hidden] {
  display: none !important;
}

.ticket-comments .comment-visit-split {
  list-style: none;
  margin: 0;
  padding: 14px 14px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ticket-comments .comment-visit-split::before,
.ticket-comments .comment-visit-split::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.ticket-comments .comment-item.is-focus-target {
  outline: none;
}

.ticket-comments .comment-form-actions .btn {
  margin-left: auto;
  min-width: 7rem;
}

.row-main {
  display: flex;
  align-items: baseline;
  gap: 10px 14px;
  min-width: 0;
}

.row-missing {
  flex: 0 1 14em;
  max-width: 14em;
  font-size: 0.75rem;
  color: var(--warn);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-blurb {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}

.marker {
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
}

select.inline {
  appearance: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  max-width: 12em;
  cursor: pointer;
}

select.inline:hover,
select.inline:focus {
  color: var(--ink);
  border: 0;
  background: transparent;
  outline: none;
}

select.inline.prio-critical,
select.inline.prio-high {
  color: #b42318;
  font-weight: 600;
}

.state {
  padding: 48px 20px 28px;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.state-loading {
  text-align: left;
  padding: 12px;
}

.skeleton-row {
  height: 38px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #f2f2f0 25%, #e9e9e6 37%, #f2f2f0 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

.state-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.state-sub {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.state-sub a {
  color: var(--ink);
}

.hub-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 6px;
}

.hub-sync {
  font-size: 0.78rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hub-sync[data-state="busy"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: hubPulse 1.1s ease-in-out infinite;
}
.hub-sync[data-state="ok"] {
  color: var(--ok);
}
.hub-sync[data-state="ok"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}
.hub-sync[data-state="err"] {
  color: var(--warn);
}
@keyframes hubPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.hub-offline {
  font-size: 0.78rem;
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, 0.25);
  padding: 4px 8px;
  border-radius: 999px;
}

.row-cue[title] {
  cursor: help;
}

.ticket-comments .comment-mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.comment-mention-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #e8e8e8;
  display: inline-grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: #444;
  overflow: hidden;
}

.comment-mention-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-item.is-pending {
  opacity: 0.72;
}

.comment-item.is-failed {
  outline: 1px solid rgba(180, 35, 24, 0.35);
}

.comment-retry {
  border: 0;
  background: transparent;
  color: #b42318;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 96px));
  transform: translate(-50%, 12px);
  z-index: 80;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  padding: 10px 12px 10px 16px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
  max-width: min(480px, calc(100vw - 32px));
  text-align: center;
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast.err {
  background: #b42318;
}

.toast-action {
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.toast-action[hidden] {
  display: none !important;
}

.count {
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.detail[hidden],
.hub[hidden] {
  display: none !important;
}

body.ticket-open {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

html:has(body.ticket-open) {
  overflow: hidden;
  height: 100dvh;
}

body.ticket-open .chrome {
  flex: 0 0 auto;
  padding: 14px 20px 0;
}

body.ticket-open .shell-full {
  flex: 1;
  min-height: 0;
  width: min(1240px, 100%);
  padding: 12px 20px 16px;
  overflow: hidden;
}

body.ticket-open .detail {
  flex: 1;
  min-height: 0;
}

body.ticket-open .chrome .brand {
  font-size: 1.1rem;
}

.detail {
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 2px 0 0;
  outline: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  animation: rise 0.35s var(--ease) both;
}

.detail-stack {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ticket-chat-slot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.ticket-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  flex: 1;
}

.ticket-chat[hidden] {
  display: none !important;
}

.ticket-chat-log {
  display: flex;
  visibility: hidden;
  pointer-events: none;
  overflow: auto;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  flex: 1 1 auto;
}

.ticket-chat.is-open .ticket-chat-log {
  visibility: visible;
  pointer-events: auto;
}

.ticket-chat .msg {
  max-width: 100%;
}

.ticket-chat .msg.user {
  font-size: 0.8rem;
  padding: 6px 10px;
}

.ticket-chat .msg.bot {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  color: var(--ink);
  padding: 0;
  white-space: pre-wrap;
}

.ticket-chat .msg.thinking {
  font-size: 0.78rem;
}

.ticket-chat-form {
  display: flex;
  align-items: center;
  margin: 0;
  flex: 0 0 auto;
}

.ticket-chat-form textarea {
  appearance: none;
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.82rem;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  outline: none;
  padding: 6px 0;
  resize: none;
  min-height: 2rem;
  height: 2rem;
  line-height: 1.4;
  field-sizing: fixed;
  overflow: hidden;
}

.ticket-chat-form textarea:focus {
  border-bottom-color: var(--ink);
  outline: none;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.detail-head {
  flex: 0 0 auto;
}

.detail-kicker {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.detail-back {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
}

.detail-back::before {
  content: "← ";
}

.detail-back:hover {
  color: var(--ink);
}

.detail-ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.detail-kicker .sync,
.detail-kicker .detail-jira {
  font-size: 0.75rem;
}

.detail-kicker .sync {
  margin-left: auto;
}

.detail-kicker .notice {
  margin: 0;
  min-width: 0;
  flex: 1 1 12rem;
  white-space: normal;
}

.detail-jira {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.detail-jira:hover {
  text-decoration: underline;
}

.detail-delete {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}

.detail-delete:hover {
  color: #b42318;
}

.detail-head h2 {
  margin: 8px 0 0;
  min-width: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.2;
  overflow: visible;
  white-space: normal;
}

.status-live {
  margin: 10px 0 0;
  max-width: 46rem;
}

.status-live dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.status-live.is-empty dd {
  color: var(--muted);
}

.detail-side .status-ablauf {
  display: grid;
  gap: 4px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.detail-side .status-ablauf dt {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
}

.detail-side .status-ablauf dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.detail-side .status-ablauf.is-empty dd {
  color: var(--muted);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 14px;
}

.meta-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  padding: 0 22px;
  border-left: 1px solid var(--line);
}

.meta-cluster:first-child {
  padding-left: 0;
  border-left: 0;
}

.detail-meta label,
.detail-meta .field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 0;
  border: 0;
}

.detail-meta label,
.detail-meta .field dt {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
}

.detail-meta .field-display {
  font-size: 0.9rem;
  line-height: 1.3;
  padding: 0;
  margin: 0;
}

.detail-meta .field-control,
.detail-meta select.inline {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  max-width: none;
  width: auto;
  min-width: 0;
  cursor: pointer;
}

.detail-meta select.inline:hover {
  border: 0;
  background: transparent;
}

.notice {
  margin: 8px 0 0;
  padding: 0;
  background: transparent;
  color: var(--warn);
  font-size: 0.75rem;
  line-height: 1.3;
}

.notice-err {
  color: #b42318;
}

.detail-board {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.9fr);
  gap: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.detail-main,
.detail-side {
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: 22px 24px;
}

.detail-side {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #fafaf8;
}

.detail-side .group-plain {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.detail-side .group-plain > h3,
.detail-side .group-plain > .fields {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
}

.detail-side .group-plain > .status-ablauf {
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
}

.detail-extra {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.detail-tab {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.detail-tab:hover {
  color: var(--ink);
  background: rgba(10, 26, 79, 0.05);
}

.detail-tab.is-on {
  color: var(--ink);
  background: var(--bg-elev);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tab-count {
  margin-left: 4px;
  font-weight: 400;
  color: var(--muted);
}

.detail-sheet {
  display: none;
}

.detail-sheet.is-open {
  display: block;
  margin-top: 8px;
  max-height: min(70vh, 100%);
  overflow: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.detail .group-plain h3 {
  margin: 0 0 12px;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
}

.field-lead {
  padding: 0 0 14px;
}

.detail .field-lead .field-display {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.5;
  display: block;
  overflow: visible;
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  padding: 4px 0 8px;
}

.detail .fields {
  margin: 0;
}

.detail .field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 8px 0;
  border-top: 0;
}

.detail .detail-meta .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}

.detail .fields .field + .field {
  border-top: 0;
}

.detail .field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  padding: 0;
}

.detail .field-grid .field {
  border-top: 0;
  padding: 0;
}

.detail .benefit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
  margin: 8px 0 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail .benefit-grid .field {
  border-top: 0;
  padding: 0;
  background: none;
}

.detail .benefit-grid .field-display {
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .field-pair,
  .detail .benefit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .field-pair,
  .detail .field-grid,
  .detail .benefit-grid {
    grid-template-columns: 1fr;
  }

  .detail-kicker {
    flex-wrap: wrap;
  }

  .detail-board {
    grid-template-columns: 1fr;
  }

  .detail-side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.detail .field-edit dt {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
}

.detail .field-value {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 0.95rem;
}

.detail .field-slot {
  margin: 0;
}

.detail .field-display {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink);
  white-space: pre-wrap;
  cursor: pointer;
  border-radius: 4px;
}

.detail .field-prose .field-display {
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.45;
  display: block;
  overflow: visible;
}

.detail .field-display:hover {
  background: transparent;
  box-shadow: inset 0 -1px 0 var(--line-strong);
}

.detail .field-display:focus-visible {
  outline: 2px solid var(--sg-blue-3);
  outline-offset: 2px;
}

.detail .field-display.empty {
  color: var(--muted);
  font-style: normal;
  font-family: var(--font);
  font-size: 0.82rem;
}

.detail .field-control {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
}

.detail textarea.field-control {
  min-height: 64px;
  height: auto;
  max-height: none;
  resize: none;
  overflow: hidden;
  field-sizing: content;
  white-space: pre-wrap;
}

.detail .field-prose textarea.field-control {
  font-family: var(--serif);
  min-height: 80px;
}

.detail .field-control:focus {
  outline: 2px solid var(--sg-blue-3);
  outline-offset: 1px;
}

.detail .ki-hint {
  display: none;
}

.detail-loading {
  color: var(--muted);
  font-size: 0.9rem;
}

.raw-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--muted);
}

.comment {
  padding: 12px 0;
}

.comment + .comment {
  border-top: 1px solid var(--line);
}

.comment-head {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.comment-body {
  margin: 4px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.comment-form textarea {
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 6px 0;
  resize: none;
  overflow: hidden;
  field-sizing: content;
  min-height: 2.2em;
}

.comment-form textarea:focus {
  outline: 2px solid var(--sg-blue-3);
  outline-offset: 1px;
}

.comment-form button {
  align-self: flex-end;
}

.status-card {
  margin: 0 0 12px;
  padding: 0 0 0 12px;
  background: none;
  border-radius: 0;
  border-left: 2px solid var(--line-strong);
}

.status-card.rag-green {
  border-left-color: var(--ok);
}

.status-card.rag-amber,
.status-card.rag-yellow {
  border-left-color: var(--warn);
}

.status-card.rag-red {
  border-left-color: #b42318;
}

.status-card.rag-blue {
  border-left-color: #2563eb;
}

.status-extra {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.status-form-meta {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 8px 12px;
  align-items: end;
}

.status-form-meta label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.68rem;
  color: var(--muted);
}

.status-form-meta select,
.status-form-meta input {
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 4px 0;
}

@media (max-width: 640px) {
  .status-form-meta {
    grid-template-columns: 1fr;
  }
}

.status-facts {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.status-facts dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-facts dd {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--ink);
}

.milestones {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 0.82rem;
  color: var(--muted);
}

.status-note {
  margin: 8px 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.status-note strong {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 2px;
}

.sync {
  color: var(--muted);
}

.sync-synced {
  color: var(--ok);
}

.sync-failed,
.sync-dead {
  color: #b42318;
}

.hint.err {
  color: #b42318;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}

@media (max-width: 900px) {
  .chrome {
    padding: 20px 14px 0;
  }

  body.ticket-open .chrome {
    padding: 8px 14px 0;
  }

  body.intake-open .chrome {
    padding: 8px 14px 0;
  }

  .shell-full {
    padding: 20px 14px;
  }

  body.ticket-open .shell-full {
    padding: 6px 14px 8px;
  }

  body.ticket-open .detail-board {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .grid thead {
    display: none;
  }

  .grid,
  .grid tbody {
    display: block;
    width: auto;
  }

  .grid tbody tr {
    display: block;
    background: #fff;
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 14px;
    margin-bottom: 10px;
    padding: 12px 14px;
    width: auto;
  }

  .grid tbody td {
    border: 0;
    display: block;
    padding: 0;
    width: auto;
  }

  .grid tbody td:first-child {
    grid-column: auto;
    min-width: 0;
  }

  .grid tbody td.col-status {
    display: none;
  }

  .grid tbody td::before {
    display: none;
  }

  .col-ref,
  .col-date {
    width: auto;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}













@keyframes pulse {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.group-title {
  margin: 1.2rem 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted, #667);
}

.ki-hint {
  display: block;
  font-size: 0.7rem;
  color: var(--muted, #667);
  margin-bottom: 0.15rem;
}

button.edit-field {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  white-space: pre-wrap;
}

button.edit-field.empty {
  color: var(--muted);
  font-style: italic;
  text-decoration: none;
}

.field-editor {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(17, 17, 17, 0.35);
  display: grid;
  place-items: center;
  padding: 20px;
}

.field-editor form {
  width: min(520px, 100%);
  background: var(--bg-elev);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.18);
}

.field-editor h3 {
  margin: 0;
  font-size: 1rem;
}

.field-editor textarea,
.field-editor select,
.field-editor input {
  font: inherit;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--ink);
}

.field-editor textarea {
  min-height: 140px;
  resize: vertical;
}

.field-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 560px) {
  .chrome {
    padding: 20px 16px 0;
  }

  .shell {
    padding: 20px 16px 20px;
    gap: 20px;
  }

  .field {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .tag {
    display: none;
  }
}

.comment-ablauf + .comment-stand-table {
  margin-top: 18px;
}

.comment-stand-table {
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
}

.comment-stand-table .ticket-overview-head {
  margin-bottom: 4px;
}

.comment-stand-table #ticket-stand-board {
  min-height: 4rem;
}

.stand-fold {
  margin: 4px 0 0;
}

.stand-fold summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  cursor: pointer;
  list-style: none;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stand-fold summary::-webkit-details-marker {
  display: none;
}

.stand-fold summary::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid currentColor;
}

.stand-fold[open] summary::before {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  border-bottom: 0;
}

.stand-board {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr) minmax(0, 1fr) minmax(12rem, 1.05fr);
  column-gap: 18px;
  margin-top: 14px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
}

.stand-h {
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  background: transparent;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.stand-block {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span var(--n);
  align-items: center;
  min-width: 0;
}

.stand-kicker {
  margin: 0;
  align-self: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stand-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.68rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.stand-pill.is-green {
  color: #15803d;
  background: rgba(22, 163, 74, 0.16);
  border-color: rgba(22, 163, 74, 0.45);
}

.stand-pill.is-red {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.14);
  border-color: rgba(220, 38, 38, 0.42);
}

.stand-pill.is-blue {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.42);
}

.stand-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 1.85rem;
  padding: 0;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
  font-size: 0.86rem;
  color: var(--ink);
}

.stand-line span:first-child {
  color: var(--muted);
}

.stand-line span:last-child {
  font-weight: 550;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.stand-ist[type="date"] {
  width: 9.4rem;
}

.stand-ist {
  width: auto;
  min-width: 4.2rem;
  max-width: 100%;
  height: 1.5rem;
  margin: 0;
  padding: 0 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-weight: 550;
  letter-spacing: -0.02em;
  text-align: right;
  color: var(--ink);
}

.stand-ist:hover,
.stand-ist:focus {
  background: rgba(17, 17, 17, 0.04);
  outline: none;
}

.stand-note-input {
  display: block;
  width: 100%;
  margin-top: 8px;
  text-align: left;
  font-weight: 400;
}

.stand-line:first-child {
  border-top: 0;
}

.stand-line.is-sum {
  font-weight: 650;
}

.stand-line.is-sum span:first-child {
  color: var(--ink);
}

.stand-note-body {
  grid-row: 1 / -1;
  align-self: start;
  min-width: 0;
}

.stand-edit {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.stand-edit label {
  display: grid;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stand-edit textarea {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  line-height: 1.45;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 0;
  padding: 4px 0 8px;
  background: transparent;
  resize: none;
  overflow: hidden;
  width: 100%;
}

.stand-edit-hint {
  margin: -8px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.stand-note p,
.stand-next p {
  margin: 0 0 6px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}

.stand-next .stand-kicker {
  margin-bottom: 4px;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
}

.stand-empty {
  color: var(--muted);
}

.stand-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-top: 12px;
}

.stand-form[hidden] {
  display: none;
}

.stand-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.stand-form input,
.stand-form select,
.stand-form textarea {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--bg);
}

.stand-span {
  grid-column: 1 / -1;
}

#stand-pt-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.stand-form-actions {
  display: flex;
  justify-content: flex-end;
}

#ticket-stand-add {
  margin-top: 8px;
}

@media (max-width: 800px) {
  .stand-board,
  .stand-form,
  #stand-pt-fields {
    grid-template-columns: 1fr;
  }
}


.ticket-row.is-gap {
  outline: 1px solid rgba(161, 92, 0, 0.35);
  outline-offset: 2px;
  border-radius: 8px;
  background: rgba(161, 92, 0, 0.04);
}
