:root {
  --primary: #4f46e5;
  --primary-strong: #3730a3;
  --primary-soft: #a5b4fc;
  --primary-dim: #eef0ff;
  --toc: #0ea5e9;
  --toc-text: #0369a1;
  --tob: #7c3aed;
  --ok: #16a34a;
  --ok-text: #15803d;
  --warn: #d97706;
  --warn-text: #b45309;
  --danger: #dc2626;
  --danger-text: #b91c1c;
  --ink: #111827;
  --muted: #64748b;
  --muted-dark: #475569;
  --line: #e4e7ec;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.055);
  --shadow-raised: 0 18px 50px rgba(55, 48, 163, 0.13), 0 3px 10px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 232px;
  flex-direction: column;
  padding: 22px 14px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 6px 0 30px rgba(15, 23, 42, 0.025);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 6px 30px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(145deg, #635bff, #4338ca);
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.24), inset 0 1px rgba(255, 255, 255, 0.24);
  color: white;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.owner-preview-switcher {
  margin: -14px 4px 18px;
  padding: 11px;
  border: 1px solid #ddd9ff;
  border-radius: 13px;
  background: linear-gradient(145deg, #f8f7ff, #f2f0ff);
  box-shadow: 0 7px 18px rgba(79, 70, 229, 0.07);
}

.owner-preview-switcher[hidden],
.owner-preview-mobile[hidden],
.owner-preview-banner[hidden] {
  display: none;
}

.owner-preview-switcher-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 7px;
}

.owner-preview-switcher-heading span {
  color: #6559d9;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.owner-preview-switcher-heading strong {
  color: #312e81;
  font-size: 12px;
  font-weight: 900;
}

.owner-preview-switcher label {
  position: relative;
  display: block;
}

.owner-preview-switcher select {
  width: 100%;
  height: 36px;
  appearance: none;
  padding: 0 30px 0 10px;
  border: 1px solid #c9c4ff;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: #25215d;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.owner-preview-switcher select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.owner-preview-switcher label svg {
  position: absolute;
  top: 10px;
  right: 9px;
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
  color: #6559d9;
  pointer-events: none;
}

.owner-preview-switcher > small {
  display: block;
  margin-top: 7px;
  color: #716f8c;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
}

body.is-owner-preview .owner-preview-switcher {
  border-color: #f3c969;
  background: linear-gradient(145deg, #fffbeb, #fff7d8);
  box-shadow: 0 7px 18px rgba(180, 116, 10, 0.1);
}

body.is-owner-preview .owner-preview-switcher-heading span,
body.is-owner-preview .owner-preview-switcher-heading strong,
body.is-owner-preview .owner-preview-switcher label svg {
  color: #92400e;
}

body.is-owner-preview .owner-preview-switcher select {
  border-color: #eac15e;
  color: #78350f;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-label {
  margin: 0 12px 8px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.nav-label-work {
  margin-top: 24px;
}

.nav-item {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted-dark);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  color: #64748b;
}

.nav-item:hover {
  background: #f7f7fb;
  color: var(--ink);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary), #5b52ee);
  box-shadow: 0 7px 18px rgba(79, 70, 229, 0.2);
  color: white;
}

.nav-item.active svg {
  color: white;
}

.nav-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  margin-left: auto;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: auto;
}

.sync-state {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 6px;
  padding: 10px 11px;
  border: 1px solid #dcfce7;
  border-radius: 10px;
  background: #f7fef9;
}

.sync-state[data-sync="saving"] {
  border-color: #fde68a;
  background: #fffbeb;
}

.sync-state[data-sync="error"] {
  border-color: #fecaca;
  background: #fff7f7;
}

.sync-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 2px solid #bbf7d0;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.08);
}

.sync-state[data-sync="saving"] .sync-dot {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.sync-state[data-sync="error"] .sync-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.remote-boot {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: radial-gradient(circle at 50% 35%, #f3f1ff 0, #f8fafc 42%, #eef1f6 100%);
  color: var(--ink);
}

.remote-boot[hidden] {
  display: none;
}

.remote-boot-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 17px;
  background: linear-gradient(145deg, #635bff, #4338ca);
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.26);
  color: white;
  font-size: 16px;
  font-weight: 900;
}

.remote-boot strong {
  font-size: 16px;
  font-weight: 900;
}

.remote-boot small {
  color: var(--muted);
  font-size: 12px;
}

.sync-state span:last-child,
.profile-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.sync-state strong,
.profile-copy strong {
  font-size: 13px;
  font-weight: 800;
}

.sync-state small,
.profile-copy small {
  color: var(--muted);
  font-size: 11px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 8px 0;
  border-top: 1px solid var(--line);
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #111827;
  color: white;
  font-size: 14px;
  font-weight: 800;
}

.quiet-icon {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.workspace {
  min-height: 100vh;
  margin-left: 232px;
}

.topbar {
  display: flex;
  height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid rgba(228, 231, 236, 0.9);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.title-block {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.eyebrow,
.section-kicker {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.title-block h1 {
  margin: 4px 0 0;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.today-mobile,
.mobile-brand,
.mobile-nav {
  display: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.owner-preview-mobile {
  display: none;
}

.owner-preview-banner {
  position: sticky;
  top: 0;
  z-index: 19;
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 11px;
  padding: 7px 30px;
  border-bottom: 1px solid #f0c45d;
  background: rgba(255, 248, 221, 0.97);
  box-shadow: 0 6px 18px rgba(146, 64, 14, 0.08);
  color: #78350f;
  backdrop-filter: blur(14px);
}

.owner-preview-banner-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #f0c45d;
  border-radius: 10px;
  background: #fffdf5;
  font-size: 16px;
}

.owner-preview-banner-copy {
  display: grid;
  min-width: 0;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 9px;
}

.owner-preview-banner-copy small {
  grid-column: 1;
  color: #a16207;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.owner-preview-banner-copy strong {
  grid-column: 2;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-preview-banner-copy > span {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: #9a5b0b;
  font-size: 11px;
  font-weight: 700;
}

.owner-preview-return {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 0 13px;
  border: 1px solid #d9a62f;
  border-radius: 9px;
  background: #fff;
  color: #78350f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.owner-preview-return:hover {
  border-color: #b7791f;
  background: #fffcf2;
}

.owner-preview-return svg {
  width: 15px;
  height: 15px;
}

.search {
  position: relative;
  display: flex;
  width: 220px;
  height: 38px;
  align-items: center;
}

.search svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #94a3b8;
}

.search input {
  width: 100%;
  height: 100%;
  padding: 0 38px 0 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
  color: var(--ink);
  font-size: 14px;
}

.search input::placeholder {
  color: #94a3b8;
}

.search kbd {
  position: absolute;
  right: 9px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: #94a3b8;
  font-size: 12px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
}

.icon-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--muted-dark);
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--danger);
  box-sizing: content-box;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 1px solid transparent;
  background: var(--primary);
  box-shadow: 0 5px 13px rgba(79, 70, 229, 0.18);
  color: white;
}

.primary-button:hover {
  background: var(--primary-strong);
}

.secondary-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted-dark);
}

.danger-button {
  border: 1px solid #dc2626;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 5px 13px rgba(220, 38, 38, 0.16);
}

.danger-button:hover {
  border-color: #b91c1c;
  background: #b91c1c;
}

.primary-button svg,
.secondary-button svg {
  width: 16px;
  height: 16px;
}

.dashboard {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 30px 38px;
}

.welcome-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.welcome-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.welcome-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.launch-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid #ddd9ff;
  border-radius: 999px;
  background: #f5f3ff;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 700;
}

.launch-pill strong {
  font-size: 14px;
  font-weight: 900;
}

.launch-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, 0.9fr);
  gap: 16px;
}

.card,
.focus-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.focus-card {
  position: relative;
  display: flex;
  min-height: 288px;
  overflow: hidden;
  flex-direction: column;
  padding: 23px 25px 18px;
  border-color: #d8d6ff;
  background:
    radial-gradient(circle at 92% 15%, rgba(165, 180, 252, 0.26), transparent 31%),
    linear-gradient(155deg, #ffffff 14%, #f8f7ff 64%, #f0efff 100%);
  box-shadow: var(--shadow-raised);
}

.focus-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--primary), #818cf8);
  content: "";
}

.focus-glow {
  position: absolute;
  top: -100px;
  right: -60px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(79, 70, 229, 0.08);
  border-radius: 50%;
}

.focus-head,
.focus-labels,
.progress-copy,
.metric-head,
.metric-value-row,
.metric-foot,
.card-heading {
  display: flex;
  align-items: center;
}

.focus-head {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: 12px;
}

.focus-labels {
  gap: 8px;
}

.focus-kicker {
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.pill,
.source-chip,
.metric-status,
.freshness,
.status-pill,
.next-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 800;
}

.pill {
  min-height: 23px;
  padding: 0 9px;
  font-size: 12px;
}

.pill-toc {
  background: #e0f2fe;
  color: var(--toc-text);
}

.pill-tob {
  background: #ede9fe;
  color: #6d28d9;
}

.pill-ops {
  background: #dcfce7;
  color: #047857;
}

.source-chip {
  min-height: 23px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 11px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.focus-content {
  position: relative;
  z-index: 1;
  margin-top: 17px;
}

.focus-context {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.focus-content h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(24px, 2.1vw, 32px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.28;
}

.focus-reason {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted-dark);
  font-size: 13px;
}

.focus-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 9px;
  margin-top: 15px;
}

.complete-button {
  background: #3730a3;
}

.focus-progress {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 16px;
}

.progress-copy {
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.progress-copy strong {
  color: var(--primary-strong);
  font-size: 12px;
}

.progress-track,
.metric-progress {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e9f3;
}

.progress-track span,
.metric-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #818cf8);
}

.attention-card {
  min-height: 288px;
  padding: 19px 19px 15px;
}

.card-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-heading h2 {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.card-heading p {
  margin: 0;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.attention-row {
  display: grid;
  width: 100%;
  min-height: 55px;
  grid-template-columns: 31px minmax(0, 1fr) auto 15px;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  padding: 7px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.attention-row:hover {
  background: #f8fafc;
}

.attention-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
}

.attention-icon svg {
  width: 15px;
  height: 15px;
}

.danger-icon {
  background: #fef2f2;
  color: var(--danger-text);
}

.warn-icon {
  background: #fff7ed;
  color: var(--warn-text);
}

.hearing-icon {
  background: #f5f3ff;
  color: #6d28d9;
}

.attention-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.attention-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-count {
  min-width: 22px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row-arrow {
  width: 14px;
  height: 14px;
  color: #94a3b8;
}

.risk-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #fff7ed;
  color: #9a3412;
}

.risk-note p {
  margin: 0;
  font-size: 11px;
}

.risk-note strong {
  margin-right: 4px;
  font-weight: 900;
}

.risk-bar {
  width: 3px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--warn);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 16px;
}

.metric-card {
  min-height: 144px;
  padding: 15px 16px 13px;
}

.metric-head {
  justify-content: space-between;
  gap: 8px;
}

.metric-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}

.metric-status,
.freshness {
  min-height: 20px;
  padding: 0 7px;
  font-size: 11px;
}

.status-warn {
  background: #fff7ed;
  color: var(--warn-text);
}

.status-good {
  background: #f0fdf4;
  color: var(--ok-text);
}

.freshness {
  background: #f1f5f9;
  color: var(--muted);
}

.metric-value-row {
  gap: 7px;
  margin-top: 8px;
}

.metric-value {
  color: #0f172a;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.metric-value span {
  margin-left: 2px;
  color: var(--muted-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.metric-delta,
.metric-target {
  align-self: flex-end;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 700;
}

.metric-target,
.delta-flat {
  color: var(--muted);
}

.delta-up {
  color: var(--ok-text);
}

.metric-progress {
  margin-top: 14px;
  overflow: visible;
}

.metric-progress span {
  background: var(--warn);
}

.metric-progress i {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 11px;
  border-radius: 2px;
  background: #94a3b8;
}

.metric-foot {
  justify-content: space-between;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.metric-foot strong {
  color: var(--muted-dark);
  font-weight: 800;
}

.pillar-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.toc-dot {
  background: var(--toc);
}

.tob-dot {
  background: var(--tob);
}

.sparkline {
  height: 31px;
  margin-top: 4px;
}

.sparkline svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.spark-line {
  fill: none;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.spark-area {
  stroke: none;
}

.spark-toc {
  fill: rgba(14, 165, 233, 0.1);
}

.line-toc {
  stroke: var(--toc);
}

.spark-tob {
  fill: rgba(124, 58, 237, 0.09);
}

.line-tob {
  stroke: var(--tob);
}

.inline-icon {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.runway-scale {
  position: relative;
  display: flex;
  height: 6px;
  gap: 2px;
  margin-top: 16px;
}

.runway-scale span {
  height: 100%;
}

.scale-risk {
  width: 25%;
  order: 1;
  border-radius: 999px 0 0 999px;
  background: #fecaca;
}

.scale-watch {
  width: 25%;
  order: 2;
  background: #fed7aa;
}

.scale-safe {
  width: 50%;
  order: 3;
  border-radius: 0 999px 999px 0;
  background: #bbf7d0;
}

.runway-scale i {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 14px;
  border: 2px solid white;
  border-radius: 3px;
  background: var(--ok-text);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
  box-sizing: content-box;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.8fr);
  gap: 13px;
  margin-top: 16px;
}

.agenda-card,
.roadmap-card {
  min-height: 252px;
  padding: 17px 18px;
}

.compact-heading {
  margin-bottom: 11px;
}

.mini-tabs {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: #f1f3f6;
}

.mini-tab {
  min-height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.mini-tab.active {
  background: white;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.09);
  color: var(--primary-strong);
}

.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.agenda-row {
  display: grid;
  min-height: 49px;
  grid-template-columns: 21px 7px minmax(0, 1fr) auto 26px;
  align-items: center;
  gap: 9px;
  padding: 5px 7px 5px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.agenda-row:hover {
  border-color: var(--line);
  background: #fafbfc;
}

.agenda-critical {
  border-color: #fee2e2;
  background: #fffafa;
}

.task-check {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  padding: 0;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

.task-check svg {
  width: 11px;
  height: 11px;
}

.task-check-done {
  border-color: var(--ok);
  background: var(--ok);
  color: white;
}

.agenda-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.agenda-main strong,
.agenda-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-main strong {
  font-size: 13px;
  font-weight: 800;
}

.agenda-main small {
  color: var(--muted);
  font-size: 11px;
}

.agenda-done strong {
  color: var(--muted);
  text-decoration: line-through;
}

.status-pill {
  min-height: 21px;
  padding: 0 8px;
  font-size: 11px;
}

.status-danger {
  background: #fef2f2;
  color: var(--danger-text);
}

.status-progress {
  background: var(--primary-dim);
  color: var(--primary-strong);
}

.status-complete {
  background: #f0fdf4;
  color: var(--ok-text);
}

.row-button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.row-button svg {
  width: 13px;
  height: 13px;
}

.roadmap-list {
  margin: 3px 0 0;
  padding: 0;
  list-style: none;
}

.roadmap-step {
  position: relative;
  display: grid;
  min-height: 43px;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
}

.roadmap-step:not(:last-child)::before {
  position: absolute;
  top: 20px;
  bottom: -2px;
  left: 10px;
  width: 1px;
  background: #dbe0ea;
  content: "";
}

.roadmap-node {
  position: relative;
  z-index: 1;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: white;
}

.roadmap-node svg {
  width: 11px;
  height: 11px;
}

.roadmap-step.done .roadmap-node {
  border-color: var(--ok);
  background: #f0fdf4;
  color: var(--ok-text);
}

.roadmap-step.current .roadmap-node {
  border: 5px solid var(--primary);
  box-shadow: 0 0 0 4px var(--primary-dim);
}

.roadmap-step span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding-top: 1px;
}

.roadmap-step-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 1px 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.roadmap-step-title:focus-visible {
  border-radius: 5px;
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.roadmap-step strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roadmap-step small {
  color: var(--muted);
  font-size: 11px;
}

.next-chip {
  min-height: 19px;
  padding: 0 7px;
  background: var(--primary);
  color: white;
  font-size: 11px;
}

.demo-badge {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  margin-left: 5px;
  padding: 0 7px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: var(--primary-dim);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  vertical-align: 3px;
}

.focus-card,
.progress-track span,
.attention-row,
.agenda-row {
  transition: border-color 180ms ease, background 180ms ease, opacity 180ms ease, width 260ms ease;
}

.focus-card.focus-complete {
  border-color: #bbf7d0;
  background:
    radial-gradient(circle at 92% 15%, rgba(134, 239, 172, 0.2), transparent 31%),
    linear-gradient(155deg, #ffffff 14%, #f5fff8 64%, #ecfdf3 100%);
}

.focus-card.focus-complete::before {
  background: linear-gradient(var(--ok), #4ade80);
}

.focus-card.focus-complete .complete-button {
  background: var(--ok);
  box-shadow: 0 5px 13px rgba(22, 163, 74, 0.18);
}

.ops-dot {
  background: #f59e0b;
}

.agenda-main-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.status-waiting {
  background: #fff7ed;
  color: var(--warn-text);
}

.exception-cleared {
  opacity: 0.56;
}

.risk-note.risk-cleared {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.risk-note.risk-cleared .risk-bar {
  background: var(--ok);
}

.risk-note.risk-cleared p,
.risk-note.risk-cleared strong {
  color: var(--ok-text);
}

.agenda-empty {
  display: flex;
  min-height: 162px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
  text-align: center;
}

.agenda-empty .empty-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--primary-dim);
  color: var(--primary);
}

.agenda-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.agenda-empty small {
  margin-top: 2px;
  font-size: 11px;
}

body.layer-open {
  overflow: hidden;
}

.demo-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  backdrop-filter: blur(3px);
}

.demo-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.demo-panel {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: #fff;
  box-shadow: -24px 0 70px rgba(15, 23, 42, 0.18);
}

.demo-drawer {
  width: min(470px, 100%);
  height: 100%;
  padding: 28px;
  transform: translateX(28px);
  transition: transform 220ms ease;
}

.demo-overlay.is-open .demo-drawer {
  transform: translateX(0);
}

.demo-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: min(760px, calc(100% - 48px));
  align-self: center;
  margin: auto;
  padding: 28px;
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.25);
  transform: translateY(14px) scale(0.985);
  transition: transform 220ms ease;
}

.demo-overlay.is-open .demo-dialog {
  transform: translateY(0) scale(1);
}

.demo-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.demo-panel-kicker {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.demo-panel-header h2 {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.demo-panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.demo-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span,
.field > label {
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea,
.mobile-search-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input,
.field select {
  height: 42px;
  padding: 0 12px;
}

.field textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.mobile-search-field input:focus {
  outline: 0;
  border-color: #a5b4fc;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.11);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 8px;
}

.task-delete-button {
  margin-right: auto;
  border-color: #fecaca;
  color: #b91c1c;
}

.task-delete-button:hover {
  border-color: #fca5a5;
  background: #fff1f2;
}

.task-delete-summary {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.task-delete-summary > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-delete-summary > strong {
  color: #172033;
  font-size: 17px;
}

.task-delete-summary > p,
.task-delete-warning > p {
  margin: 0;
  color: var(--muted-dark);
  font-size: 13px;
  line-height: 1.65;
}

.task-delete-warning {
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff7f7;
}

.task-delete-warning > strong {
  display: block;
  margin-bottom: 4px;
  color: #b91c1c;
  font-size: 14px;
}

.task-detail-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -9px 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.pillar-label {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-weight: 900;
}

.pillar-toc {
  background: #e0f2fe;
  color: var(--toc-text);
}

.pillar-tob {
  background: #f3e8ff;
  color: #6d28d9;
}

.pillar-ops {
  background: #fff7ed;
  color: var(--warn-text);
}

.exception-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exception-task {
  display: grid;
  width: 100%;
  min-height: 66px;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.exception-task:hover {
  border-color: #c7d2fe;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.exception-task-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
}

.exception-task-icon svg {
  width: 17px;
  height: 17px;
}

.exception-task-icon.overdue {
  background: #fef2f2;
  color: var(--danger);
}

.exception-task-icon.stale {
  background: #fff7ed;
  color: var(--warn);
}

.exception-task-icon.hearing {
  background: var(--primary-dim);
  color: var(--primary);
}

.exception-task-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.exception-task-copy strong,
.exception-task-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exception-task-copy strong {
  font-size: 13px;
  font-weight: 800;
}

.exception-task-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.exception-task .row-arrow {
  width: 14px;
  color: #94a3b8;
}

.drawer-empty {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.drawer-empty > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 9px;
  border-radius: 50%;
  background: #f0fdf4;
  color: var(--ok);
  font-size: 20px;
  font-weight: 900;
}

.drawer-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.drawer-empty small {
  margin-top: 3px;
  font-size: 12px;
}

.drawer-empty.compact {
  min-height: 130px;
}

.reset-demo-button {
  display: block;
  margin: 24px auto 0;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.drawer-roadmap {
  margin: 0;
  padding: 0;
  list-style: none;
}

.drawer-roadmap-item {
  position: relative;
  display: grid;
  min-height: 66px;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
}

.drawer-roadmap-item::before {
  position: absolute;
  top: 21px;
  bottom: -2px;
  left: 11px;
  width: 2px;
  background: #e2e8f0;
  content: "";
}

.drawer-roadmap-item:last-child::before {
  display: none;
}

.drawer-roadmap-node {
  z-index: 1;
  width: 24px;
  height: 24px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
}

.drawer-roadmap-item.done .drawer-roadmap-node {
  border: 6px solid var(--ok);
}

.drawer-roadmap-item.current .drawer-roadmap-node {
  border: 6px solid var(--primary);
  box-shadow: 0 0 0 4px var(--primary-dim);
}

.drawer-roadmap-item > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  padding-top: 1px;
}

.drawer-roadmap-item > button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 1px 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.drawer-roadmap-item > button:focus-visible {
  border-radius: 5px;
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.drawer-roadmap-item strong {
  font-size: 14px;
  font-weight: 800;
}

.drawer-roadmap-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.drawer-roadmap-item em {
  min-height: 21px;
  padding: 2px 8px 0;
  border-radius: 999px;
  background: var(--primary-dim);
  color: var(--primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.drawer-roadmap-item.done em {
  background: #f0fdf4;
  color: var(--ok-text);
}

.roadmap-callout,
.preview-note {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #dfe1ff;
  border-radius: 12px;
  background: #f8f8ff;
  color: var(--muted-dark);
  font-size: 12px;
}

.roadmap-callout {
  flex-direction: column;
  gap: 2px;
}

.roadmap-callout strong {
  color: var(--primary-strong);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.mobile-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-search-field svg {
  position: absolute;
  left: 13px;
  z-index: 1;
  width: 17px;
  color: #94a3b8;
}

.mobile-search-field input {
  height: 46px;
  padding: 0 14px 0 41px;
}

.mobile-search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.mobile-search-results > button {
  display: flex;
  width: 100%;
  min-height: 57px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.mobile-search-results > button > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.mobile-search-results strong,
.mobile-search-results small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-search-results strong {
  font-size: 13px;
}

.mobile-search-results small {
  color: var(--muted);
  font-size: 11px;
}

.mobile-search-results svg {
  width: 14px;
  flex: 0 0 auto;
  color: #94a3b8;
}

.search-more {
  margin: 4px 0 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.mobile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mobile-menu-list > button {
  display: grid;
  width: 100%;
  min-height: 61px;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.mobile-menu-list > button > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.mobile-menu-list strong {
  font-size: 13px;
}

.mobile-menu-list small {
  color: var(--muted);
  font-size: 11px;
}

.mobile-menu-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-dim);
  color: var(--primary);
}

.mobile-menu-icon svg {
  width: 17px;
  height: 17px;
}

.mobile-menu-list .row-arrow {
  width: 14px;
  color: #94a3b8;
}

.preview-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.preview-board > div {
  display: flex;
  min-height: 124px;
  flex-direction: column;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
}

.preview-board span,
.preview-board small {
  color: var(--muted);
  font-size: 11px;
}

.preview-board strong {
  margin: 8px 0 auto;
  font-size: 27px;
  letter-spacing: -0.05em;
}

.preview-note {
  align-items: flex-start;
  margin-top: 14px;
}

.preview-note > span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.preview-note p {
  margin: 0;
}

.preview-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--primary-strong);
}

.demo-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 130;
  min-width: 190px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: #172033;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.22);
  color: white;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.demo-toast[data-tone="success"] {
  background: #166534;
}

.demo-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Multi-page demo: business board and calendar */
.module-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 30px 48px;
}

.module-page[hidden],
.dashboard[hidden] {
  display: none;
}

.module-shell {
  min-width: 0;
}

.module-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 17px;
}

.module-kicker {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.module-intro h2 {
  margin: 4px 0 2px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.module-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.module-add {
  min-height: 40px;
  flex: 0 0 auto;
}

.board-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.board-kpi-card {
  position: relative;
  display: grid;
  min-height: 91px;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 2px 10px;
  overflow: hidden;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.board-kpi-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--kpi-color);
  content: "";
}

.board-kpi-card:hover,
.board-kpi-card.active {
  border-color: color-mix(in srgb, var(--kpi-color) 42%, white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.board-kpi-card.active {
  background: color-mix(in srgb, var(--kpi-color) 5%, white);
}

.board-kpi-card > span {
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}

.board-kpi-card > strong {
  grid-row: span 2;
  color: var(--kpi-color);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

.board-kpi-card > strong small {
  margin-left: 2px;
  font-size: 11px;
  letter-spacing: 0;
}

.board-kpi-card > em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.board-controls {
  margin-top: 12px;
  padding: 9px 11px;
}

.board-view-row,
.board-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.board-filter-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eef0f4;
}

.board-view-tabs,
.board-pillar-chips,
.calendar-mode-tabs,
.calendar-pillar-tabs,
.history-filters {
  display: flex;
  gap: 3px;
}

.board-view-tabs {
  overflow-x: auto;
  padding: 2px;
  border-radius: 9px;
  background: #f1f3f7;
  scrollbar-width: none;
}

.board-view-tabs::-webkit-scrollbar {
  display: none;
}

.board-view-tab {
  min-height: 31px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.board-view-tab.active {
  background: white;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
  color: var(--primary-strong);
}

.board-view-select-wrap {
  display: none;
}

.board-pillar-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.board-pillar-chip small {
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: var(--muted);
  font-size: 11px;
}

.board-pillar-chip.active {
  border-color: #c7d2fe;
  background: var(--primary-dim);
  color: var(--primary-strong);
}

.pillar-chip-toc.active {
  border-color: #bae6fd;
  background: #e0f2fe;
  color: var(--toc-text);
}

.pillar-chip-tob.active {
  border-color: #ddd6fe;
  background: #f3e8ff;
  color: #6d28d9;
}

.board-done-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.board-done-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

.board-view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 17px 2px 9px;
}

.board-view-heading h3 {
  margin: 1px 0 0;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.board-view-heading > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.status-neutral {
  background: #f1f5f9;
  color: var(--muted-dark);
}

.pillar-border-toc {
  border-left-color: var(--toc) !important;
}

.pillar-border-tob {
  border-left-color: var(--tob) !important;
}

.pillar-border-ops {
  border-left-color: #f59e0b !important;
}

.pillar-bg-toc {
  background: var(--toc) !important;
}

.pillar-bg-tob {
  background: var(--tob) !important;
}

.pillar-bg-ops {
  background: #f59e0b !important;
}

.module-empty {
  display: flex;
  min-height: 270px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.module-empty > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 14px;
  background: var(--primary-dim);
  color: var(--primary);
}

.module-empty strong {
  color: var(--ink);
  font-size: 15px;
}

.module-empty small {
  margin-top: 3px;
  font-size: 12px;
}

.module-empty button {
  margin-top: 13px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--primary-dim);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

/* Initiative view */
.initiative-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 11px;
}

.initiative-band {
  overflow: hidden;
  padding: 0;
  border-left-width: 3px;
}

.initiative-band-head {
  display: grid;
  min-height: 70px;
  grid-template-columns: minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 10px;
  padding: 11px 12px 8px;
}

.initiative-title-button {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.initiative-title-static {
  cursor: default;
}

.initiative-title-button > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.initiative-title-button small {
  color: var(--muted);
  font-size: 11px;
}

.initiative-title-button strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.initiative-progress-copy {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
}

.initiative-progress-copy strong {
  color: var(--primary-strong);
  font-size: 15px;
}

.initiative-progress-copy small {
  color: var(--muted);
  font-size: 11px;
}

.initiative-child-add,
.group-add,
.branch-toggle {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.initiative-child-add {
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--primary);
}

.initiative-child-add svg,
.group-add svg {
  width: 14px;
  height: 14px;
}

.initiative-progress-track {
  height: 3px;
  background: #eef0f5;
}

.initiative-progress-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #818cf8);
}

.initiative-groups {
  padding: 8px;
  background: #fafbfc;
}

.initiative-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.initiative-group + .initiative-group,
.initiative-group + .board-task-row {
  margin-top: 6px;
}

.initiative-group-head {
  display: grid;
  min-height: 42px;
  grid-template-columns: 22px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
}

.branch-toggle {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.branch-toggle svg {
  width: 12px;
  height: 12px;
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.initiative-group.expanded .branch-toggle svg {
  transform: rotate(90deg);
}

.group-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.group-title span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-title small {
  color: var(--muted);
  font-size: 11px;
}

.group-add {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.initiative-task-list {
  padding: 3px 6px 6px 28px;
  border-top: 1px solid #eef0f4;
}

.board-task-row {
  display: grid;
  min-height: 38px;
  grid-template-columns: 19px 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 4px 5px;
  border-radius: 7px;
}

.board-task-row:hover {
  background: #f8fafc;
}

.board-task-row.is-done {
  opacity: 0.72;
}

.board-task-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.board-task-main strong,
.board-task-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-task-main strong {
  font-size: 11px;
  font-weight: 800;
}

.board-task-main small {
  color: var(--muted);
  font-size: 11px;
}

.initiative-empty {
  margin: 7px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

/* List view */
.board-list {
  overflow: hidden;
}

.board-list-head,
.board-list-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 100px 88px 76px;
  align-items: center;
  gap: 10px;
}

.board-list-head {
  min-height: 34px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.board-list-row {
  width: 100%;
  min-height: 46px;
  padding: 6px 13px;
  border: 0;
  border-bottom: 1px solid #eef0f4;
  background: white;
  color: var(--muted-dark);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.board-list-row:last-child {
  border-bottom: 0;
}

.board-list-row:hover {
  background: #fafbfc;
}

.list-title {
  display: grid;
  min-width: 0;
  grid-template-columns: 7px 70px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.list-title em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.list-title strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-due {
  font-weight: 800;
}

.list-due.danger {
  color: var(--danger-text);
}

/* Timeline view */
.timeline-desktop {
  min-width: 850px;
  overflow: hidden;
}

.timeline-axis,
.timeline-lane {
  display: grid;
  grid-template-columns: 190px minmax(650px, 1fr);
}

.timeline-axis {
  min-height: 36px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.timeline-axis > div {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
}

.timeline-axis i {
  padding: 11px 0 0 5px;
  border-left: 1px solid #e8ebf1;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.timeline-lane {
  min-height: 70px;
  border-bottom: 1px solid #eef0f4;
}

.timeline-lane:last-child {
  border-bottom: 0;
}

.timeline-lane > button,
.timeline-lane-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: white;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.timeline-lane > button > span:last-child,
.timeline-lane-label > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.timeline-lane > button strong,
.timeline-lane-label strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-lane > button small,
.timeline-lane-label small {
  color: var(--muted);
  font-size: 11px;
}

.timeline-lane-label {
  cursor: default;
}

.timeline-standalone-lane .timeline-point {
  top: 30px;
}

.timeline-track {
  position: relative;
  overflow: hidden;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), #eef0f4 calc(10% - 1px), #eef0f4 10%);
}

.timeline-today {
  position: absolute;
  inset: 0 auto 0;
  z-index: 1;
  width: 2px;
  background: rgba(220, 38, 38, 0.55);
}

.timeline-bar {
  position: absolute;
  top: 20px;
  z-index: 2;
  height: 25px;
  overflow: hidden;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: white;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.timeline-point {
  position: absolute;
  top: 50px;
  z-index: 3;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
  transform: translateX(-50%);
  cursor: pointer;
}

.timeline-point.done {
  background: var(--ok);
  box-shadow: 0 0 0 1px var(--ok);
}

.timeline-mobile {
  display: none;
}

/* Flow view */
.flow-board {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scrollbar-width: thin;
}

.flow-card {
  display: flex;
  width: 220px;
  min-height: 246px;
  flex: 0 0 220px;
  flex-direction: column;
  padding: 15px;
  border-left-width: 3px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.flow-step {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.flow-card > strong {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 900;
}

.flow-card > small {
  color: var(--muted);
  font-size: 11px;
}

.flow-progress {
  height: 4px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f4;
}

.flow-progress span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.flow-progress-copy {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.flow-progress-copy em {
  color: var(--primary-strong);
  font-style: normal;
  font-weight: 800;
}

.flow-task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 0;
}

.flow-task {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--muted-dark);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-task > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-task.done {
  color: var(--muted);
  text-decoration: line-through;
}

.flow-standalone-card {
  cursor: default;
}

.flow-standalone-task {
  display: grid;
  width: 100%;
  min-height: 25px;
  grid-template-columns: 7px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--muted-dark);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.flow-standalone-task > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-standalone-task.done {
  color: var(--muted);
  text-decoration: line-through;
}

.flow-more {
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.flow-connector {
  display: grid;
  width: 45px;
  height: 80px;
  flex: 0 0 45px;
  place-items: center;
  color: #94a3b8;
}

.flow-connector svg {
  width: 18px;
}

/* History and reverse views */
.history-filters {
  width: fit-content;
  margin-bottom: 9px;
  padding: 2px;
  border-radius: 8px;
  background: #f1f3f7;
}

.history-filters button,
.calendar-mode-tabs button,
.calendar-pillar-tabs button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.history-filters button.active,
.calendar-mode-tabs button.active,
.calendar-pillar-tabs button.active {
  background: white;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.09);
  color: var(--primary-strong);
}

.history-list {
  overflow: hidden;
}

.history-list > button {
  display: grid;
  width: 100%;
  min-height: 57px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #eef0f4;
  background: white;
  text-align: left;
  cursor: pointer;
}

.history-list > button:last-child {
  border-bottom: 0;
}

.history-check {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #f0fdf4;
  color: var(--ok);
}

.history-check svg {
  width: 14px;
}

.history-list > button > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.history-list strong {
  font-size: 12px;
  font-weight: 800;
}

.history-list small,
.history-list time {
  color: var(--muted);
  font-size: 11px;
}

.reverse-board {
  overflow: hidden;
}

.reverse-goal {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #ddd6fe;
  background: linear-gradient(110deg, #3730a3, #5b4ee8);
  color: white;
}

.reverse-goal > span {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 11px;
  font-size: 11px;
  font-weight: 900;
}

.reverse-goal strong {
  font-size: 16px;
  font-weight: 900;
}

.reverse-goal small {
  margin-left: auto;
  color: #e0e7ff;
  font-size: 11px;
}

.reverse-board ol {
  margin: 0;
  padding: 8px 14px 12px;
  list-style: none;
}

.reverse-board li {
  position: relative;
}

.reverse-board li:not(:last-child)::before {
  position: absolute;
  top: 38px;
  bottom: -10px;
  left: 14px;
  width: 2px;
  background: #e2e8f0;
  content: "";
}

.reverse-board li > button {
  display: grid;
  width: 100%;
  min-height: 61px;
  grid-template-columns: 29px minmax(0, 1fr) auto 72px;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  border: 0;
  background: white;
  text-align: left;
  cursor: pointer;
}

.reverse-node {
  z-index: 1;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: white;
}

.reverse-node.done {
  border-color: var(--ok);
  background: var(--ok);
  color: white;
}

.reverse-node svg {
  width: 13px;
}

.reverse-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.reverse-main small {
  color: var(--muted);
  font-size: 11px;
}

.reverse-main strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reverse-board li em {
  color: var(--primary-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

/* Calendar */
.calendar-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  min-height: 176px;
  overflow: hidden;
}

.calendar-hero-main {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(135deg, #fff 35%, #f8f7ff 100%);
}

.calendar-date-block {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid #d9d6ff;
  border-radius: 14px;
  background: white;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.1);
}

.calendar-date-block span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.calendar-date-block strong {
  margin: 2px 0;
  font-size: 43px;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1;
}

.calendar-date-block small {
  color: var(--muted);
  font-size: 11px;
}

.calendar-focus-block {
  display: flex;
  min-width: 0;
  justify-content: center;
  flex-direction: column;
}

.calendar-focus-block > span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.calendar-focus-block > button {
  max-width: 100%;
  margin-top: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.calendar-today-tasks {
  display: flex;
  gap: 5px;
  overflow: hidden;
  margin-top: 12px;
}

.calendar-chip {
  display: inline-flex;
  min-width: 0;
  max-width: 210px;
  min-height: 27px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.calendar-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-chip.done {
  color: var(--muted);
  text-decoration: line-through;
}

.calendar-empty-copy {
  color: var(--muted);
  font-size: 11px;
}

.calendar-hero-side {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: stretch;
  padding: 16px;
  gap: 14px;
}

.calendar-overdue {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
}

.calendar-overdue.has-risk {
  background: #fef2f2;
  color: var(--danger-text);
}

.calendar-overdue svg {
  width: 15px;
}

.calendar-overdue strong {
  margin-top: 4px;
  font-size: 23px;
  line-height: 1;
}

.calendar-overdue small {
  font-size: 11px;
  font-weight: 800;
}

.calendar-hero-side > div {
  display: flex;
  min-width: 0;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.calendar-hero-side > div > span {
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 900;
}

.calendar-hero-side .calendar-chip {
  max-width: 100%;
}

.calendar-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 9px 11px;
}

.calendar-control-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.calendar-control-group > button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--muted-dark);
  cursor: pointer;
}

.calendar-control-group > button:first-child svg {
  transform: rotate(180deg);
}

.calendar-control-group svg {
  width: 12px;
}

.calendar-control-group .calendar-today-button {
  display: inline-flex;
  width: auto;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 800;
}

.calendar-control-group strong {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 800;
}

.calendar-mode-tabs,
.calendar-pillar-tabs {
  padding: 2px;
  border-radius: 8px;
  background: #f1f3f7;
}

.calendar-desktop {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 12px;
}

.calendar-week {
  overflow: hidden;
}

.calendar-week > header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.calendar-week > header > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-week > header > div:first-child > span {
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 900;
}

.calendar-theme {
  max-width: 330px;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 7px;
  background: white;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.calendar-theme.has-value {
  border-style: solid;
  border-color: #d9d6ff;
  background: var(--primary-dim);
  color: var(--primary-strong);
}

.calendar-band-markers {
  display: flex;
  min-width: 0;
  justify-content: flex-end;
  gap: 5px;
  overflow: hidden;
}

.calendar-band-markers button {
  max-width: 160px;
  min-height: 23px;
  overflow: hidden;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  min-height: 26px;
  align-items: center;
  border-bottom: 1px solid #eef0f4;
  background: #fcfdfe;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  min-width: 0;
  min-height: 105px;
  padding: 7px;
  border-right: 1px solid #eef0f4;
  background: white;
  color: inherit;
  text-align: left;
}

.calendar-day:last-child {
  border-right: 0;
}

.calendar-day:hover,
.calendar-day.selected {
  background: #f8f8ff;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--primary);
}

.calendar-day.past {
  background: #fafbfc;
}

.calendar-date-button {
  display: grid;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.calendar-day-num {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  margin-bottom: 5px;
  border-radius: 50%;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 900;
}

.calendar-day.today .calendar-day-num {
  background: var(--primary);
  color: white;
}

.calendar-event {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 2px 3px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.calendar-event:hover,
.calendar-event:focus-visible {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.calendar-event span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-event.done {
  color: var(--muted);
  text-decoration: line-through;
}

.calendar-day-events {
  max-height: 82px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.calendar-mobile {
  display: none;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  cursor: pointer;
}

.check-field input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.check-field > span {
  display: flex;
  flex-direction: column;
}

.check-field strong {
  font-size: 12px;
}

.check-field small {
  color: var(--muted);
  font-size: 11px;
}

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

  .work-grid {
    grid-template-columns: 1fr;
  }

  .initiative-board {
    grid-template-columns: 1fr;
  }

  .calendar-hero {
    grid-template-columns: 1fr;
  }

  .calendar-hero-main {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .calendar-hero-side {
    grid-template-columns: 110px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .sidebar {
    display: none;
  }

  .workspace {
    margin-left: 0;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 62px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.92);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-brand .icon-button {
    width: 36px;
    height: 36px;
    border: 0;
  }

  .brand-mark-small {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 11px;
  }

  .title-block {
    position: absolute;
    left: 50%;
    align-items: center;
    transform: translateX(-50%);
  }

  .title-block .eyebrow {
    display: none;
  }

  .title-block h1 {
    margin: 0;
    font-size: 16px;
  }

  .today-mobile {
    display: inline;
    margin-top: 1px;
    color: var(--muted);
    font-size: 12px;
  }

  .owner-preview-mobile {
    display: block;
  }

  .owner-preview-mobile select {
    width: 94px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #c9c4ff;
    border-radius: 9px;
    outline: 0;
    background: #f8f7ff;
    color: #312e81;
    font-size: 12px;
    font-weight: 800;
  }

  body.is-owner-preview .owner-preview-mobile select {
    border-color: #e5b84e;
    background: #fff9e5;
    color: #78350f;
  }

  .owner-preview-banner {
    top: 62px;
    min-height: 50px;
    gap: 8px;
    padding: 6px 12px;
  }

  .owner-preview-banner-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 14px;
  }

  .owner-preview-banner-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
  }

  .owner-preview-banner-copy strong {
    max-width: 36vw;
    font-size: 12px;
  }

  .owner-preview-banner-copy > span {
    display: none;
  }

  .owner-preview-return {
    min-height: 34px;
    padding: 0 9px;
    font-size: 11px;
  }

  .search,
  .notification {
    display: none;
  }

  .add-button {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 10px;
  }

  .add-button span {
    display: none;
  }

  .dashboard {
    padding: 13px 12px 24px;
  }

  .welcome-row {
    align-items: flex-start;
    margin-bottom: 11px;
  }

  .welcome-title {
    max-width: 215px;
    font-size: 14px;
  }

  .welcome-sub {
    font-size: 12px;
  }

  .launch-pill {
    min-height: 29px;
    padding: 0 10px;
    font-size: 0;
  }

  .launch-pill strong {
    font-size: 13px;
  }

  .focus-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .focus-card {
    min-height: 316px;
    padding: 18px 17px 15px;
  }

  .source-chip {
    max-width: 145px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
  }

  .focus-content {
    margin-top: 20px;
  }

  .section-kicker,
  .focus-kicker,
  .focus-context {
    font-size: 13px;
  }

  .focus-content h2 {
    font-size: 26px;
    line-height: 1.3;
  }

  .focus-reason {
    margin-top: 9px;
    font-size: 14px;
  }

  .focus-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 18px;
  }

  .focus-actions button {
    min-height: 42px;
  }

  .attention-card {
    min-height: 0;
  }

  .attention-copy strong {
    font-size: 14px;
  }

  .attention-copy small,
  .risk-note p {
    font-size: 13px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .metric-card {
    min-height: 142px;
    padding: 13px;
  }

  .metric-label {
    font-size: 13px;
  }

  .metric-status,
  .freshness,
  .metric-target,
  .metric-delta,
  .metric-foot {
    font-size: 12px;
  }

  .metric-value {
    font-size: 23px;
  }

  .agenda-card,
  .roadmap-card {
    padding: 15px 13px;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    display: grid;
    height: calc(64px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, 1fr);
    align-items: start;
    padding: 7px 7px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
  }

  .mobile-nav a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
  }

  .mobile-nav a svg {
    width: 19px;
    height: 19px;
  }

  .mobile-nav a.active {
    color: var(--primary);
  }

  .mobile-add {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    justify-self: center;
    margin-top: -20px;
    border: 4px solid var(--canvas);
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    color: white;
  }

  .mobile-add svg {
    width: 22px;
    height: 22px;
  }

  .module-page {
    padding: 13px 12px 26px;
  }

  .module-intro {
    align-items: flex-start;
    margin-bottom: 11px;
  }

  .module-intro h2 {
    margin-top: 2px;
    font-size: 18px;
  }

  .module-intro p {
    max-width: 320px;
    font-size: 12px;
    line-height: 1.6;
  }

  .module-add {
    display: none;
  }

  .board-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .board-kpi-card {
    min-height: 76px;
    padding: 11px 12px;
  }

  .board-kpi-card > strong {
    font-size: 22px;
  }

  .board-controls {
    position: sticky;
    top: 70px;
    z-index: 12;
    margin-top: 9px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
  }

  .board-view-tabs {
    display: none;
  }

  .board-view-select-wrap {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .board-view-select-wrap span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .board-view-select-wrap select {
    width: min(230px, 68vw);
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f8fafc;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
  }

  .board-filter-row {
    align-items: center;
    overflow: hidden;
  }

  .board-pillar-chips {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .board-pillar-chip {
    flex: 0 0 auto;
  }

  .board-done-toggle {
    flex: 0 0 auto;
  }

  .board-view-heading {
    margin-top: 14px;
  }

  .board-view-heading h3 {
    font-size: 16px;
  }

  .initiative-band-head {
    min-height: 72px;
    padding: 11px 10px 8px;
  }

  .initiative-title-button strong {
    font-size: 15px;
  }

  .initiative-group-head {
    min-height: 48px;
  }

  .group-title span {
    font-size: 13px;
  }

  .group-title small,
  .board-task-main small {
    font-size: 11px;
  }

  .board-task-row {
    min-height: 45px;
  }

  .board-task-main strong {
    font-size: 13px;
  }

  .board-list-head {
    display: none;
  }

  .board-list-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 8px;
    min-height: 64px;
    padding: 9px 11px;
  }

  .board-list-row > span:nth-child(2) {
    display: none;
  }

  .board-list-row > .status-pill {
    grid-column: 2;
    grid-row: 1;
  }

  .board-list-row > .list-due {
    grid-column: 2;
    grid-row: 2;
    font-size: 11px;
    text-align: right;
  }

  .list-title {
    grid-row: span 2;
    grid-template-columns: 7px 58px minmax(0, 1fr);
  }

  .list-title strong {
    font-size: 13px;
  }

  .timeline-desktop {
    display: none;
  }

  .timeline-mobile {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  .timeline-mobile-card {
    padding: 13px;
    border-left-width: 3px;
  }

  .timeline-mobile-head {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
  }

  .timeline-mobile-head > span:first-child {
    display: flex;
    flex-direction: column;
  }

  .timeline-mobile-head strong {
    font-size: 15px;
  }

  .timeline-mobile-head small {
    color: var(--muted);
    font-size: 11px;
  }

  .timeline-mobile-line {
    position: relative;
    height: 5px;
    margin: 12px 0 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef0f4;
  }

  .timeline-mobile-line span {
    display: block;
    width: 62%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
  }

  .timeline-mobile-card > div:last-child {
    display: flex;
    flex-direction: column;
  }

  .timeline-mobile-card > div:last-child button {
    display: grid;
    min-height: 40px;
    grid-template-columns: 7px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 5px 2px;
    border: 0;
    border-bottom: 1px solid #eef0f4;
    background: transparent;
    color: inherit;
    text-align: left;
  }

  .timeline-mobile-card > div:last-child button:last-child {
    border-bottom: 0;
  }

  .timeline-mobile-card > div:last-child button span {
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .timeline-mobile-card > div:last-child button small {
    color: var(--muted);
    font-size: 11px;
  }

  .flow-board {
    align-items: stretch;
    overflow: visible;
    flex-direction: column;
    padding-bottom: 2px;
  }

  .flow-card {
    width: 100%;
    min-height: 0;
    flex-basis: auto;
    padding: 14px;
  }

  .flow-task-list {
    margin-top: 10px;
  }

  .flow-task {
    font-size: 12px;
  }

  .flow-connector {
    width: 100%;
    height: 34px;
    flex-basis: 34px;
  }

  .flow-connector svg {
    transform: rotate(90deg);
  }

  .history-list > button {
    min-height: 66px;
  }

  .history-list strong {
    font-size: 13px;
  }

  .history-list small,
  .history-list time {
    font-size: 11px;
  }

  .reverse-goal {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .reverse-goal small {
    width: 100%;
    margin-left: 51px;
    margin-top: -14px;
  }

  .reverse-board ol {
    padding: 8px 10px 12px;
  }

  .reverse-board li > button {
    min-height: 72px;
    grid-template-columns: 29px minmax(0, 1fr) auto;
  }

  .reverse-board li > button > .status-pill {
    grid-column: 3;
    grid-row: 1;
  }

  .reverse-board li em {
    grid-column: 2 / 4;
    font-size: 11px;
    text-align: left;
  }

  .calendar-intro p {
    max-width: 330px;
  }

  .calendar-hero {
    display: block;
    min-height: 0;
  }

  .calendar-hero-main {
    grid-template-columns: 73px minmax(0, 1fr);
    gap: 12px;
    padding: 13px;
  }

  .calendar-date-block {
    min-height: 100px;
  }

  .calendar-date-block strong {
    font-size: 34px;
  }

  .calendar-focus-block > button {
    font-size: 16px;
    line-height: 1.45;
  }

  .calendar-today-tasks {
    overflow-x: auto;
  }

  .calendar-chip {
    min-height: 31px;
    flex: 0 0 auto;
    font-size: 11px;
  }

  .calendar-hero-side {
    grid-template-columns: 80px minmax(0, 1fr);
    min-height: 100px;
    padding: 10px 13px;
  }

  .calendar-controls {
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 9px;
    padding: 9px;
  }

  .calendar-control-group {
    grid-column: 1 / -1;
  }

  .calendar-control-group strong {
    margin-left: auto;
  }

  .calendar-mode-tabs button,
  .calendar-pillar-tabs button {
    min-height: 32px;
    font-size: 11px;
  }

  .calendar-desktop {
    display: none;
  }

  .calendar-mobile {
    display: block;
    margin-top: 9px;
  }

  .calendar-day-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    box-shadow: var(--shadow);
  }

  .calendar-day-strip button {
    display: flex;
    min-width: 0;
    min-height: 69px;
    align-items: center;
    flex-direction: column;
    padding: 6px 2px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
  }

  .calendar-day-strip button.selected {
    background: var(--primary-dim);
    color: var(--primary-strong);
  }

  .calendar-day-strip button.today strong {
    background: var(--primary);
    color: white;
  }

  .calendar-day-strip span {
    font-size: 11px;
    font-weight: 800;
  }

  .calendar-day-strip strong {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    margin-top: 3px;
    border-radius: 50%;
    color: var(--ink);
    font-size: 14px;
  }

  .calendar-day-strip small {
    display: flex;
    min-height: 8px;
    gap: 2px;
    margin-top: 3px;
  }

  .calendar-day-strip small i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
  }

  .calendar-agenda,
  .calendar-upcoming {
    margin-top: 9px;
    padding: 13px;
  }

  .calendar-agenda-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .calendar-agenda-head span {
    color: var(--muted);
    font-size: 11px;
  }

  .calendar-agenda-head h3,
  .calendar-upcoming-head h3 {
    margin: 1px 0 0;
    font-size: 16px;
    font-weight: 900;
  }

  .calendar-agenda-head button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    color: white;
  }

  .calendar-agenda-head button svg {
    width: 16px;
  }

  .calendar-agenda > .calendar-theme {
    width: 100%;
    max-width: none;
    min-height: 34px;
    margin-top: 10px;
    text-align: left;
  }

  .calendar-agenda-list {
    margin-top: 9px;
  }

  .calendar-agenda-row {
    display: grid;
    width: 100%;
    min-height: 59px;
    grid-template-columns: 51px 7px minmax(0, 1fr) auto 14px;
    align-items: center;
    gap: 7px;
    padding: 7px 3px;
    border: 0;
    border-bottom: 1px solid #eef0f4;
    background: white;
    color: inherit;
    text-align: left;
  }

  .calendar-agenda-row:last-child {
    border-bottom: 0;
  }

  .calendar-agenda-time {
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
  }

  .calendar-agenda-row > span:nth-child(3) {
    display: flex;
    min-width: 0;
    flex-direction: column;
  }

  .calendar-agenda-row strong,
  .calendar-agenda-row small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calendar-agenda-row strong {
    font-size: 12px;
  }

  .calendar-agenda-row small {
    color: var(--muted);
    font-size: 11px;
  }

  .calendar-agenda-row > svg {
    width: 12px;
    color: #94a3b8;
  }

  .calendar-agenda-empty {
    display: flex;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--muted);
    text-align: center;
  }

  .calendar-agenda-empty strong {
    color: var(--ink);
    font-size: 13px;
  }

  .calendar-agenda-empty small {
    margin-top: 2px;
    font-size: 11px;
  }

  .calendar-upcoming-head {
    margin-bottom: 6px;
  }

  .calendar-upcoming > button {
    display: grid;
    width: 100%;
    min-height: 54px;
    grid-template-columns: 42px 7px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 8px;
    padding: 6px 2px;
    border: 0;
    border-bottom: 1px solid #eef0f4;
    background: white;
    color: inherit;
    text-align: left;
  }

  .calendar-upcoming time {
    color: var(--primary-strong);
    font-size: 11px;
    font-weight: 900;
  }

  .calendar-upcoming > button > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
  }

  .calendar-upcoming strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calendar-upcoming small {
    color: var(--muted);
    font-size: 11px;
  }

  .calendar-upcoming svg {
    width: 12px;
    color: #94a3b8;
  }

  .demo-overlay {
    align-items: flex-end;
  }

  .demo-drawer,
  .demo-dialog {
    width: 100%;
    height: auto;
    max-height: 91%;
    align-self: flex-end;
    margin: 0;
    padding: 21px 18px calc(22px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -24px 70px rgba(15, 23, 42, 0.18);
    transform: translateY(30px);
  }

  .demo-overlay.is-open .demo-drawer,
  .demo-overlay.is-open .demo-dialog {
    transform: translateY(0);
  }

  .demo-panel-header {
    margin-bottom: 19px;
  }

  .demo-panel-header h2 {
    font-size: 21px;
  }

  .demo-panel-header p {
    font-size: 12px;
  }

  .demo-toast {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 12px;
    min-width: 0;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .module-intro p,
  .board-kpi-card > em {
    display: none;
  }

  .board-kpi-card {
    min-height: 66px;
  }

  .initiative-progress-copy small {
    display: none;
  }

  .calendar-hero-main {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }

  .calendar-date-block {
    min-height: 92px;
  }

  .calendar-hero-side {
    min-height: 88px;
  }

  .metric-head {
    align-items: flex-start;
  }

  .metric-status,
  .freshness {
    padding: 0 5px;
  }

  .metric-target,
  .metric-delta {
    font-size: 12px;
  }

  .agenda-row {
    grid-template-columns: 21px 7px minmax(0, 1fr) auto;
  }

  .agenda-row .row-button {
    display: none;
  }

  .demo-badge {
    display: none;
  }

  .demo-form {
    grid-template-columns: 1fr;
  }

  .field,
  .field-wide {
    grid-column: 1;
  }

  .preview-board {
    grid-template-columns: 1fr;
  }

  .preview-board > div {
    min-height: 82px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
  }

  .task-delete-button {
    grid-column: 1 / -1;
    margin-right: 0;
  }
}

/* Manual library: explicit hierarchy with one calm, dense list surface */
.operations-manual-filter,
.operations-manual-subfilter {
  display: none;
}

.operations-manual-workspace {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.operations-manual-tree {
  position: sticky;
  top: 14px;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .035);
}

.operations-manual-tree-head {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 7px 9px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.operations-manual-tree-head > button {
  display: grid !important;
  width: 26px;
  min-height: 26px !important;
  place-items: center;
  padding: 0 !important;
  border: 1px solid #dbe2ea !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #4f46e5 !important;
  font-size: 16px !important;
}

.operations-manual-tree-branch {
  display: grid;
  align-content: start;
  gap: 3px;
  margin: 0 0 2px 8px;
  padding: 2px 0 0 9px;
  border-left: 1px solid #dbe3f0;
}

.operations-manual-tree-branch.is-knowledge {
  border-left-color: #c7d2fe;
}

.operations-manual-tree button,
.operations-manual-filter button,
.operations-manual-subfilter button {
  display: flex;
  min-height: 35px;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  font-size: 11.5px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.operations-manual-tree button:hover,
.operations-manual-tree button.is-active,
.operations-manual-filter button.is-active,
.operations-manual-subfilter button.is-active {
  border-color: #cdd5ff;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: #4338ca;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .08);
}

.operations-manual-tree button.is-knowledge-root span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.operations-manual-tree button.is-knowledge-root small {
  color: #818cf8;
  font-size: 10px;
}

.operations-manual-tree button.is-level-two {
  margin-left: 2px;
}

.operations-manual-tree strong,
.operations-manual-filter strong,
.operations-manual-subfilter strong {
  min-width: 19px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #e2e8f0;
  font-size: 9px;
  text-align: center;
}

.operations-manual-library {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
}

.operations-manual-library-head {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px;
  border-bottom: 1px solid #e8edf4;
}

.operations-manual-library-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.operations-manual-library-head strong {
  overflow: hidden;
  color: #172033;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-manual-library-head span {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
}

.operations-manual-library-head small {
  color: #94a3b8;
  font-size: 10px;
}

.operations-manual-mobile-add-group {
  display: none;
}

.operations-manual-columns,
.operations-manual-row {
  display: grid;
  grid-template-columns: 24px minmax(260px, 1fr) 170px 144px 58px 32px;
  align-items: center;
  column-gap: 8px;
}

.operations-manual-columns {
  min-height: 30px;
  padding: 0 10px;
  border-bottom: 1px solid #edf1f6;
  background: #fbfcfe;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .05em;
}

.operations-manual-groups {
  display: grid;
  min-width: 0;
  align-content: start;
}

.operations-manual-group {
  min-width: 0;
  border-bottom: 1px solid #e8edf4;
}

.operations-manual-group:last-child {
  border-bottom: 0;
}

.operations-manual-group > header {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 12px;
  background: #f7f9fc;
}

.operations-manual-group > header > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.operations-manual-group > header small {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 800;
}

.operations-manual-group > header span {
  color: #263247;
  font-size: 12.5px;
  font-weight: 900;
}

.operations-manual-group > header strong {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 9px;
  text-align: center;
}

.operations-manual-group > header button,
.operations-manual-row button {
  min-height: 25px;
  padding: 0 7px;
  border: 1px solid #dbe2ea;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.operations-manual-group > header > div + div {
  opacity: .18;
  transition: opacity .15s ease;
}

.operations-manual-group:hover > header > div + div,
.operations-manual-group:focus-within > header > div + div {
  opacity: 1;
}

.operations-manual-group > header button:disabled {
  cursor: default;
  opacity: .35;
}

.operations-manual-list {
  min-width: 0;
}

.operations-manual-row {
  min-height: 58px;
  padding: 6px 10px;
  border-top: 1px solid #edf1f6;
  transition: background .15s ease, box-shadow .15s ease;
}

.operations-manual-row:hover {
  background: #fafbff;
}

.operations-manual-copy {
  display: grid;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.operations-manual-row .operations-manual-copy-button {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.operations-manual-copy strong,
.operations-manual-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-manual-copy strong {
  color: #172033;
  font-size: 13.5px;
  line-height: 1.35;
}

.operations-manual-copy:hover strong {
  color: #4f46e5;
}

.operations-manual-copy small {
  margin-top: 2px;
  color: #7b8799;
  font-size: 10.5px;
  line-height: 1.35;
}

.operations-manual-row-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: #64748b;
  white-space: nowrap;
}

.operations-manual-row-meta > span {
  padding: 3px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #536176;
  font-size: 9px;
  font-weight: 800;
}

.operations-manual-row-meta > span.scope-biz {
  background: #eef2ff;
  color: #4f46e5;
}

.operations-manual-row-meta > span.scope-growth {
  background: #ecfdf5;
  color: #047857;
}

.operations-manual-row-meta > span.scope-ops {
  background: #fff7ed;
  color: #c2410c;
}

.operations-manual-row-meta small {
  overflow: hidden;
  color: #94a3b8;
  font-size: 9px;
  text-overflow: ellipsis;
}

.operations-manual-status {
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 8px;
}

.operations-manual-source-badge {
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 8px;
  vertical-align: 1px;
}

.operations-manual-group-pill {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 28px !important;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  overflow: hidden;
  padding: 0 8px !important;
  border: 1px solid #e0e5ec !important;
  border-radius: 999px !important;
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 800;
  white-space: nowrap;
}

.operations-manual-group-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.operations-manual-group-pill b {
  color: #94a3b8;
  font-size: 11px;
}

.operations-manual-group-pill.is-static {
  justify-content: flex-start;
}

.operations-manual-open {
  color: #4f46e5;
  font-size: 10.5px;
  font-weight: 900;
  text-decoration: none;
}

.operations-manual-open:hover {
  color: #3730a3;
}

.operations-manual-row .operations-manual-open-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4f46e5;
  white-space: nowrap;
}

.operations-manual-row .operations-manual-open-button:hover {
  color: #3730a3;
}

.operations-manual-more {
  min-width: 30px;
  padding: 0 !important;
  border-color: transparent !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-size: 13px !important;
  opacity: .25;
}

.operations-manual-row:hover .operations-manual-more,
.operations-manual-row:focus-within .operations-manual-more {
  opacity: 1;
}

.operations-manual-drag {
  min-width: 24px;
  padding: 0 !important;
  border-color: transparent !important;
  background: transparent !important;
  color: #94a3b8 !important;
  cursor: grab !important;
  opacity: .28;
}

.operations-manual-row:hover .operations-manual-drag {
  opacity: .9;
}

.operations-manual-drag:active {
  cursor: grabbing !important;
}

.operations-manual-row.is-drop-target {
  outline: 0;
  box-shadow: inset 0 3px #6366f1;
}

.operations-manual-tree button.is-drop-target,
.operations-manual-group.is-drop-target {
  outline: 2px solid #6366f1;
  outline-offset: -2px;
  background: #eef2ff;
}

.operations-manual-drop-empty {
  min-height: 42px;
  margin: 0;
  padding: 13px 14px;
  border-top: 1px dashed #dbe3ef;
  color: #94a3b8;
  font-size: 11px;
}

.operations-manual-source {
  margin: 0;
  padding: 0;
  border: 0;
}

.operations-manual-source > legend {
  margin-bottom: 7px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}

.operations-manual-source > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.operations-manual-source label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.operations-manual-source input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.operations-manual-source label > span {
  display: grid;
  min-height: 70px;
  align-content: center;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.operations-manual-source label > span::before {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 15px;
  height: 15px;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  content: "";
}

.operations-manual-source strong {
  color: #172033;
  font-size: 13px;
}

.operations-manual-source small {
  padding-right: 18px;
  color: #7b8799;
  font-size: 10px;
  line-height: 1.45;
}

.operations-manual-source input:checked + span {
  border-color: #818cf8;
  background: #f7f7ff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .09);
}

.operations-manual-source input:checked + span::before {
  border: 4px solid #6366f1;
  background: #fff;
}

.operations-manual-source input:focus-visible + span {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.operations-manual-source-panel[hidden] {
  display: none;
}

.operations-manual-source-panel input[type="file"] {
  height: auto;
  min-height: 46px;
  padding: 5px;
  cursor: pointer;
}

.operations-manual-source-panel input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #ede9fe;
  color: #5b21b6;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.operations-manual-video-file-state {
  color: #64748b;
  font-size: 10px;
}

.operations-manual-video-file-state.is-error {
  color: #b91c1c;
}

.operations-manual-video-player {
  display: grid;
  gap: 14px;
}

.operations-manual-video-player video {
  width: 100%;
  max-height: min(64vh, 620px);
  border-radius: 13px;
  background: #0f172a;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

.operations-manual-video-player > div:not(.form-actions) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: #64748b;
  font-size: 10px;
}

.operations-manual-video-player > div strong {
  overflow: hidden;
  color: #263247;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-manual-video-player .form-actions {
  padding-top: 0;
}

@media (max-width: 760px) {
  .operations-manual-source > div {
    grid-template-columns: 1fr;
  }

  .operations-manual-filter {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    margin-bottom: 8px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .operations-manual-filter::-webkit-scrollbar {
    display: none;
  }

  .operations-manual-filter button {
    flex: 0 0 auto;
  }

  .operations-manual-subfilter {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    margin: -2px 0 8px;
    padding: 6px 7px;
    border: 1px solid #e4e8f1;
    border-radius: 10px;
    background: #f8fafc;
    scrollbar-width: none;
  }

  .operations-manual-subfilter::-webkit-scrollbar {
    display: none;
  }

  .operations-manual-subfilter > span {
    flex: 0 0 auto;
    padding: 0 3px;
    color: #64748b;
    font-size: 9px;
    font-weight: 900;
  }

  .operations-manual-subfilter button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 8px;
    font-size: 10.5px;
  }

  .operations-manual-workspace {
    display: block;
  }

  .operations-manual-tree {
    display: none;
  }

  .operations-manual-library {
    border-radius: 12px;
  }

  .operations-manual-library-head {
    min-height: 48px;
    padding: 0 12px;
  }

  .operations-manual-library-head small,
  .operations-manual-columns {
    display: none;
  }

  .operations-manual-library-head .operations-manual-mobile-add-group {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 9px;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: #f8f7ff;
    color: #4f46e5;
    font-size: 10px;
    font-weight: 900;
  }

  .operations-manual-group > header {
    min-height: 42px;
    padding: 6px 10px;
  }

  .operations-manual-group > header > div + div {
    opacity: 1;
  }

  .operations-manual-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "copy open more"
      "meta group group";
    row-gap: 8px;
    min-height: 84px;
    padding: 9px 11px;
  }

  .operations-manual-drag,
  .operations-manual-drag-spacer {
    display: none;
  }

  .operations-manual-copy {
    grid-area: copy;
  }

  .operations-manual-row-meta {
    grid-area: meta;
  }

  .operations-manual-group-pill {
    grid-area: group;
    width: auto;
    max-width: 138px;
  }

  .operations-manual-open {
    grid-area: open;
  }

  .operations-manual-more {
    grid-area: more;
    opacity: 1;
  }

  .operations-manual-row-meta small {
    display: none;
  }
}

/* Dense routine workspace: one-line operations ledger */
.operations-routine-summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 7px;
  padding: 8px 12px;
  border: 1px solid #dfe3ff;
  border-radius: 11px;
  background: linear-gradient(135deg, #fff, #f7f7ff);
}

.operations-routine-summary .operations-kicker {
  margin-bottom: 1px;
  font-size: 8px;
}

.operations-routine-summary h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.operations-routine-summary h2 small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.operations-routine-summary p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.operations-routine-summary-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.operations-routine-progress {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid #e2e5f5;
  border-radius: 8px;
  background: #fff;
}

.operations-routine-progress small {
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
}

.operations-routine-progress strong {
  color: #312e81;
  font-size: 14px;
}

.operations-routine-summary .compact-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.operations-routine-filter.is-dense {
  flex-wrap: nowrap;
  gap: 5px;
  margin-bottom: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.operations-routine-filter.is-dense button {
  min-height: 31px;
  flex: 0 0 auto;
  gap: 6px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 12px;
}

.operations-routine-filter.is-dense button strong {
  min-width: 18px;
  height: 18px;
  font-size: 9px;
}

.operations-classification-note.is-compact {
  min-height: 30px;
  gap: 7px;
  margin-bottom: 7px;
  padding: 4px 8px;
  border-radius: 8px;
}

.operations-classification-note.is-compact > span {
  padding: 3px 6px;
  font-size: 9px;
}

.operations-classification-note.is-compact p {
  font-size: 10px;
}

.operations-routine-groups.is-dense {
  gap: 8px;
}

.operations-routine-groups.is-dense .operations-routine-group {
  position: relative;
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.03);
  scrollbar-width: thin;
}

.operations-routine-groups.is-dense .operations-routine-group.is-dragging {
  opacity: 0.46;
}

.operations-routine-groups.is-dense .operations-routine-group.is-group-drop-target::before {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 8px;
  left: 8px;
  height: 4px;
  border-radius: 999px;
  background: #4f46e5;
  content: "";
}

.operations-routine-groups.is-dense .operations-routine-group.is-group-drop-target.is-drop-after::before {
  top: auto;
  bottom: 0;
}

.operations-routine-groups.is-dense .operations-routine-group > header {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: min(100%, 800px);
  min-height: 38px;
  padding: 5px 8px;
  border-left-width: 4px;
}

.operations-routine-groups.is-dense .operations-routine-group-title {
  gap: 7px;
}

.operations-routine-group-drag {
  display: grid;
  width: 20px;
  height: 25px;
  place-content: center;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: grab;
}

.operations-routine-group-drag:hover {
  background: rgba(255, 255, 255, 0.8);
}

.operations-routine-group-drag:active {
  cursor: grabbing;
}

.operations-routine-group-drag span {
  display: block;
  width: 11px;
  height: 2px;
  border-radius: 999px;
  background: var(--routine-tone);
}

.operations-routine-groups.is-dense .operations-group-mark {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  font-size: 11px;
}

.operations-routine-groups.is-dense .operations-routine-group > header h2 {
  font-size: 14px;
  letter-spacing: 0;
}

.operations-routine-groups.is-dense .operations-routine-group > header .operations-count {
  min-width: 20px;
  height: 20px;
  font-size: 9px;
}

.operations-group-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.operations-group-actions > button {
  min-height: 25px;
  padding: 0 7px;
  border: 1px solid #c7d2fe;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--routine-tone);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.operations-group-actions > button:disabled {
  cursor: default;
  opacity: 0.3;
}

.operations-group-actions .operations-group-delete {
  border-color: #fecaca;
  color: #b91c1c;
}

.operations-routine-groups.is-dense .operations-routine-list {
  min-width: 820px;
}

.operations-routine-groups.is-dense .operations-rule-row {
  min-height: 44px;
  grid-template-columns: 20px 28px minmax(205px, 1fr) 122px 116px 128px 136px;
  gap: 5px;
  padding: 3px 7px;
}

.operations-routine-groups.is-dense .operations-rule-row.is-dragging {
  opacity: 0.42;
}

.operations-routine-groups.is-dense .operations-rule-row.is-drop-target {
  position: relative;
  background: #eef2ff;
}

.operations-routine-groups.is-dense .operations-rule-row.is-drop-target::before {
  position: absolute;
  top: -2px;
  right: 7px;
  left: 7px;
  height: 3px;
  border-radius: 999px;
  background: #4f46e5;
  content: "";
}

.operations-routine-groups.is-dense .operations-routine-list.is-drop-target,
.operations-routine-groups.is-dense .operations-routine-group.is-drop-target {
  box-shadow: inset 0 0 0 2px #818cf8;
}

.operations-routine-groups.is-dense .operations-routine-drag {
  display: grid;
  width: 20px;
  height: 28px;
  place-content: center;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: grab;
}

.operations-routine-groups.is-dense .operations-routine-drag:hover {
  background: #eef2ff;
}

.operations-routine-groups.is-dense .operations-routine-drag:active {
  cursor: grabbing;
}

.operations-routine-groups.is-dense .operations-routine-drag span {
  display: block;
  width: 11px;
  height: 2px;
  border-radius: 999px;
  background: #94a3b8;
}

.operations-routine-groups.is-dense .operations-routine-drag.is-disabled {
  opacity: 0.28;
}

.operations-routine-groups.is-dense .operations-routine-check {
  width: 26px;
  height: 26px;
  border-width: 1.5px;
  font-size: 13px;
}

.operations-routine-groups.is-dense .operations-rule-copy {
  gap: 0;
  padding: 1px 0;
}

.operations-routine-groups.is-dense .operations-rule-copy strong {
  font-size: 15px;
  line-height: 1.25;
}

.operations-routine-groups.is-dense .operations-rule-copy small {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.2;
}

.operations-routine-groups.is-dense .operations-rule-copy small > span {
  max-width: 105px;
  overflow: hidden;
  padding: 2px 5px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 800;
  text-overflow: ellipsis;
}

.operations-routine-groups.is-dense .operations-rule-assignee {
  gap: 0;
}

.operations-routine-groups.is-dense .operations-rule-assignee > span {
  display: none;
}

.operations-routine-groups.is-dense .operations-rule-assignee select {
  min-height: 30px;
  padding: 0 24px 0 8px;
  border-width: 1px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 850;
}

.operations-routine-groups.is-dense .operations-rule-assignee > strong {
  min-height: 30px;
  gap: 5px;
  padding: 0 7px 0 4px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-routine-groups.is-dense .operations-rule-assignee > strong i {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 9px;
}

.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-0 select,
.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-0 > strong {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #5b21b6;
}

.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-1 select,
.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-1 > strong {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-2 select,
.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-2 > strong {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-3 select,
.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-3 > strong {
  border-color: #fdba74;
  background: #fff7ed;
  color: #c2410c;
}

.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-4 select,
.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-4 > strong {
  border-color: #f9a8d4;
  background: #fdf2f8;
  color: #be185d;
}

.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-5 select,
.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-5 > strong {
  border-color: #5eead4;
  background: #f0fdfa;
  color: #0f766e;
}

.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-6 select,
.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-6 > strong {
  border-color: #facc15;
  background: #fefce8;
  color: #a16207;
}

.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-7 select,
.operations-routine-groups.is-dense .operations-rule-assignee.assignee-tone-7 > strong {
  border-color: #67e8f9;
  background: #ecfeff;
  color: #0e7490;
}

.operations-routine-groups.is-dense .operations-date-strip {
  gap: 0;
}

.operations-routine-groups.is-dense .routine-date-dot {
  width: 22px;
  gap: 0;
  padding: 0;
  border-radius: 5px;
}

.operations-routine-groups.is-dense .routine-date-dot small {
  font-size: 7px;
  line-height: 1;
}

.operations-routine-groups.is-dense .routine-date-dot span {
  width: 15px;
  height: 15px;
  font-size: 8px;
}

.operations-routine-groups.is-dense .operations-row-group select {
  width: 100%;
  min-height: 30px;
  padding: 0 23px 0 7px;
  border: 1px solid #dbe2ea;
  border-radius: 7px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 750;
}

.operations-routine-groups.is-dense .operations-rule-tools {
  gap: 2px;
}

.operations-routine-groups.is-dense .operations-rule-tools a,
.operations-routine-groups.is-dense .operations-rule-tools button {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 10px;
}

.operations-routine-groups.is-dense .operations-rule-tools button:disabled {
  cursor: default;
  opacity: 0.28;
}

.operations-routine-groups.is-dense .operations-rule-tools .is-danger {
  color: #b91c1c;
}

.operations-routine-groups.is-dense .operations-rule-tools .is-danger:hover {
  background: #fef2f2;
}

.operations-routine-groups.is-dense .operations-routine-drop-empty {
  min-height: 38px;
  padding: 11px;
  color: #94a3b8;
  font-size: 10px;
  text-align: center;
}

.operations-delete-warning {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid #fecaca;
  border-radius: 11px;
  background: #fff7f7;
  color: #7f1d1d;
}

.operations-delete-warning strong {
  font-size: 14px;
}

.operations-delete-warning p {
  margin: 0;
  color: #991b1b;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .operations-routine-summary {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
  }

  .operations-routine-summary p {
    display: none;
  }

  .operations-routine-summary-actions {
    justify-content: space-between;
  }

  .operations-routine-groups.is-dense .operations-routine-list,
  .operations-routine-groups.is-dense .operations-routine-group > header {
    min-width: 760px;
  }

  .operations-routine-groups.is-dense .operations-rule-row {
    min-height: 44px;
    grid-template-columns: 20px 28px minmax(195px, 1fr) 118px 112px 120px 132px;
    gap: 4px;
    padding: 3px 6px;
  }

  .operations-routine-groups.is-dense .operations-routine-drag[draggable="true"] {
    display: none;
  }

  .operations-routine-groups.is-dense .operations-routine-drag[draggable="true"] + .operations-routine-check {
    grid-column: 2;
  }

  .operations-routine-group-drag[draggable="true"] {
    display: none;
  }
}

body.auth-pending,
body.auth-required {
  overflow: hidden;
}

body.auth-pending .app-shell,
body.auth-pending .mobile-nav,
body.auth-required .app-shell,
body.auth-required .mobile-nav {
  display: none;
}

body.auth-authenticated .auth-gate {
  display: none;
}

.auth-gate {
  position: fixed;
  z-index: 4000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 28px;
  background:
    radial-gradient(circle at 15% 10%, rgba(54, 85, 255, 0.17), transparent 31%),
    radial-gradient(circle at 88% 88%, rgba(31, 184, 137, 0.13), transparent 28%),
    #f5f7fb;
}

.auth-card {
  width: min(100%, 460px);
  border: 1px solid rgba(23, 34, 59, 0.09);
  border-radius: 26px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(29, 41, 72, 0.16);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 34px;
}

.auth-brand > span:last-child {
  display: grid;
  gap: 1px;
}

.auth-brand strong {
  color: #17213a;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.auth-brand small {
  color: #8a93a7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.auth-copy h1 {
  margin: 8px 0 9px;
  color: #121a2e;
  font-size: clamp(25px, 5vw, 32px);
  letter-spacing: -0.045em;
}

.auth-copy p {
  margin: 0;
  color: #727c91;
  font-size: 13px;
  line-height: 1.75;
}

.auth-checking {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  margin-top: 28px;
  border-radius: 14px;
  padding: 0 15px;
  color: #59647a;
  background: #f3f5f9;
  font-size: 12px;
}

.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #d9deea;
  border-top-color: #4b58e8;
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-form {
  display: grid;
  gap: 15px;
  margin-top: 28px;
}

.auth-form[hidden],
.auth-checking[hidden],
.auth-gate[hidden] {
  display: none;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: #4d5870;
  font-size: 11px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dfe3ec;
  border-radius: 13px;
  padding: 0 14px;
  color: #17213a;
  background: #fff;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.auth-form input:focus {
  border-color: #6872eb;
  box-shadow: 0 0 0 3px rgba(75, 88, 232, 0.12);
}

.auth-submit {
  justify-content: center;
  width: 100%;
  min-height: 49px;
  margin-top: 3px;
}

.auth-error {
  margin: -3px 0 0;
  border-radius: 11px;
  padding: 10px 12px;
  color: #b02d3e;
  background: #fff0f2;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.auth-change-note {
  display: grid;
  gap: 4px;
  border-left: 3px solid #4b58e8;
  padding: 8px 12px;
  color: #687289;
  background: #f5f6ff;
  font-size: 11px;
  line-height: 1.5;
}

.auth-change-note strong {
  color: #303b57;
  font-size: 12px;
}

.auth-recovery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  border-top: 1px solid #eceef4;
  padding-top: 16px;
  font-size: 10px;
}

.auth-recovery span {
  color: #9aa2b2;
  font-weight: 800;
}

.auth-recovery a {
  color: #5965d9;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 600px) {
  .auth-gate {
    align-items: start;
    padding: 18px;
  }

  .auth-card {
    margin-top: 5vh;
    border-radius: 21px;
    padding: 24px 20px;
  }

  .auth-brand {
    margin-bottom: 28px;
  }
}

/* Team operations: members, personal work, playbooks and recurring rules */
.nav {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav [hidden],
.mobile-nav [hidden] {
  display: none;
}

.operations-hero {
  display: flex;
  min-height: 154px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
  padding: 26px 28px;
  overflow: hidden;
  border: 1px solid #dfe3ff;
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 8%, rgba(99, 91, 255, 0.17), transparent 35%),
    linear-gradient(135deg, #fff 0%, #f8f8ff 65%, #f1f0ff 100%);
  box-shadow: 0 12px 34px rgba(45, 48, 112, 0.07);
}

.operations-kicker {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.operations-hero h2,
.operations-card h2 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.025em;
}

.operations-hero h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.operations-hero > div:first-child > p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.operations-hero-side {
  display: flex;
  min-width: 310px;
  align-items: flex-end;
  flex-direction: column;
  gap: 14px;
}

.operations-metrics {
  display: flex;
  gap: 8px;
}

.operations-metrics > span {
  display: grid;
  min-width: 78px;
  padding: 9px 12px;
  border: 1px solid rgba(99, 91, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.operations-metrics small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.operations-metrics strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 20px;
}

.operations-stack {
  display: grid;
  gap: 14px;
}

.operations-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.operations-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.operations-task-section {
  overflow: hidden;
}

.operations-task-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #edf0f4;
}

.operations-task-section > header h2 {
  font-size: 16px;
}

.operations-count {
  display: grid;
  min-width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 999px;
  background: #f1f0ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.operations-task-list {
  display: grid;
}

.operations-task-row {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 10px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.operations-task-row:last-child {
  border-bottom: 0;
}

.operations-task-row:hover {
  background: #fafaff;
}

.operations-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #cbd5e1;
}

.operations-status-dot.status-doing {
  background: #6366f1;
}

.operations-status-dot.status-done {
  background: #16a34a;
}

.operations-status-dot.status-waiting {
  background: #f59e0b;
}

.operations-status-dot.status-overdue,
.operations-task-row.is-overdue .operations-status-dot {
  background: #ef4444;
}

.operations-task-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.operations-task-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-task-copy small,
.operations-manual-inline {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-work-kind {
  display: inline-flex;
  min-height: 19px;
  align-items: center;
  margin-right: 7px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}

.operations-work-kind.kind-group {
  background: #fff1e8;
  color: #b45309;
}

.operations-manual-inline {
  color: #4f46e5;
  font-weight: 700;
}

.operations-manual-card,
.operations-member-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 20px;
}

.operations-card-top,
.operations-card-meta,
.operations-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.operations-category,
.operations-visibility,
.operations-role,
.operations-status {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f1f0ff;
  color: #4f46e5;
  font-size: 10px;
  font-weight: 850;
}

.operations-visibility {
  background: #f1f5f9;
  color: #64748b;
}

.operations-manual-card h2 {
  margin-top: 18px;
  font-size: 19px;
}

.operations-manual-card > p,
.operations-rule-card p,
.operations-member-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.operations-manual-card > p {
  min-height: 60px;
}

.operations-card-meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #edf0f4;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.operations-card-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.operations-card-actions .primary-button,
.operations-card-actions .secondary-button {
  min-height: 36px;
  padding: 0 13px;
  font-size: 11px;
  text-decoration: none;
}

.operations-rule-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
}

.operations-rule-card.is-paused,
.operations-member-card.is-paused {
  background: #fafafa;
  opacity: 0.72;
}

.operations-rule-main {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 12px;
}

.operations-rule-main h2 {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-rule-main p {
  margin: 5px 0 0;
}

.operations-status {
  flex: 0 0 auto;
  background: #f1f5f9;
  color: #64748b;
}

.operations-status.is-active {
  background: #dcfce7;
  color: #15803d;
}

.operations-rule-manuals,
.operations-linked-manuals {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.operations-rule-manuals a,
.operations-linked-manuals :is(a, button) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: #f5f4ff;
  color: #4f46e5;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.operations-rule-manuals > span {
  color: var(--muted);
  font-size: 11px;
}

.operations-member-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.operations-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: 11px;
  line-height: 1.6;
}

.operations-notice strong {
  flex: 0 0 auto;
}

.operations-member-card {
  min-height: 240px;
}

.operations-person {
  display: grid;
  min-width: 0;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.operations-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #635bff, #4338ca);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.operations-person h2 {
  font-size: 17px;
}

.operations-person p {
  overflow: hidden;
  margin: 3px 0 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-role.role-owner {
  background: #ede9fe;
  color: #6d28d9;
}

.operations-role.role-manager {
  background: #dbeafe;
  color: #1d4ed8;
}

.operations-role.role-member {
  background: #ecfdf5;
  color: #047857;
}

.operations-scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.operations-scope-list span {
  padding: 5px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: var(--muted-dark);
  font-size: 10px;
  font-weight: 800;
}

.operations-responsibility {
  min-height: 39px;
}

.operations-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.operations-empty > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #f1f0ff;
  color: var(--primary);
  font-weight: 900;
}

.operations-empty strong {
  color: var(--ink);
  font-size: 15px;
}

.operations-empty p {
  max-width: 460px;
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}

.operations-spinner {
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: operations-spin 800ms linear infinite;
}

@keyframes operations-spin {
  to {
    transform: rotate(360deg);
  }
}

.operations-checks {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.operations-checks legend,
.operations-task-links-head > span {
  margin-bottom: 6px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}

.operations-checks > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.operations-checks label {
  position: relative;
  cursor: pointer;
}

.operations-checks input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.operations-checks label span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 750;
}

.operations-checks input:checked + span {
  border-color: #a5b4fc;
  background: #eef2ff;
  color: #4338ca;
}

.operations-task-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid #dfe3ff;
  border-radius: 13px;
  background: #fafaff;
}

.operations-task-links-head,
.operations-task-links .operations-checks,
.operations-task-links .operations-linked-manuals {
  grid-column: 1 / -1;
}

.operations-task-links-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.operations-task-links-head > span {
  margin: 0;
}

.operations-task-links-head small {
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.operations-linked-manuals :is(a, button) svg {
  width: 12px;
  height: 12px;
}

.operations-readonly-task {
  display: grid;
  gap: 9px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafbfc;
}

.operations-readonly-task p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.operations-readonly-task span {
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 750;
}

.operations-compact-hero {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 18px 22px;
  border: 1px solid #dfe3ff;
  border-radius: 17px;
  background: linear-gradient(135deg, #fff, #f6f5ff);
  box-shadow: 0 8px 24px rgba(45, 48, 112, 0.055);
}

.operations-compact-hero h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  letter-spacing: -0.025em;
}

.operations-compact-hero p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.operations-compact-metrics {
  display: flex;
  gap: 7px;
}

.operations-compact-metrics > span {
  display: grid;
  min-width: 86px;
  padding: 8px 11px;
  border: 1px solid #e2e5f5;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.88);
}

.operations-compact-metrics small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.operations-compact-metrics strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 20px;
  white-space: nowrap;
}

.worklog-hero .operations-compact-metrics > span {
  min-width: 112px;
}

.operations-routine-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.operations-routine-filter button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid #dfe3ea;
  border-radius: 11px;
  background: #fff;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.operations-routine-filter button:hover {
  border-color: #a5b4fc;
  background: #fafaff;
  color: #4338ca;
}

.operations-routine-filter button.is-active {
  border-color: #6366f1;
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 5px 14px rgba(79, 70, 229, 0.18);
}

.operations-routine-filter button strong {
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.operations-routine-filter button.is-active strong {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.operations-classification-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 11px;
  background: #eff6ff;
  color: #334155;
}

.operations-classification-note > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 7px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.operations-classification-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.operations-routine-groups {
  display: grid;
  gap: 16px;
}

.operations-routine-group {
  --routine-tone: #4f46e5;
  --routine-soft: #eef2ff;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
}

.operations-routine-group.tone-1 {
  --routine-tone: #0284c7;
  --routine-soft: #e0f2fe;
}

.operations-routine-group.tone-2 {
  --routine-tone: #059669;
  --routine-soft: #d1fae5;
}

.operations-routine-group.tone-3 {
  --routine-tone: #d97706;
  --routine-soft: #fef3c7;
}

.operations-routine-group.tone-4 {
  --routine-tone: #db2777;
  --routine-soft: #fce7f3;
}

.operations-routine-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-left: 5px solid var(--routine-tone);
  border-bottom: 1px solid #edf0f4;
  background: linear-gradient(90deg, var(--routine-soft), #fff 58%);
}

.operations-routine-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.operations-group-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--routine-tone);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.operations-routine-group > header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.015em;
}

.operations-routine-group > header .operations-kicker {
  margin-bottom: 3px;
  color: var(--routine-tone);
  font-size: 10px;
}

.operations-workstream > h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 10px 18px 8px;
  border-top: 1px solid #eef1f5;
  background: #fbfcfe;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.025em;
}

.operations-workstream > h3 small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.operations-routine-list {
  display: grid;
}

.operations-rule-row {
  display: grid;
  min-height: 68px;
  grid-template-columns: 38px minmax(190px, 1fr) minmax(145px, 190px) minmax(210px, auto) 64px;
  align-items: center;
  gap: 12px;
  padding: 9px 14px 9px 16px;
  border-top: 1px solid #f0f2f5;
  background: #fff;
}

.operations-rule-row:hover {
  background: #fbfbff;
}

.operations-rule-row.is-paused {
  background: #fafafa;
  opacity: 0.66;
}

.operations-routine-check {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #94a3b8;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}

.operations-routine-check:hover:not(:disabled) {
  border-color: #6366f1;
  color: #4f46e5;
}

.operations-routine-check.is-done {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.operations-routine-check:disabled {
  cursor: default;
  opacity: 0.45;
}

.operations-my-routines {
  overflow: hidden;
  padding: 0;
}

.operations-my-routines > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid #edf0f4;
  background: linear-gradient(90deg, #fafaff, #fff);
}

.operations-my-routines > header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.operations-my-routine-list {
  display: grid;
}

.operations-my-routine-row {
  display: grid;
  min-height: 56px;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-bottom: 1px solid #f0f2f5;
  background: #fff;
}

.operations-my-routine-row:last-child {
  border-bottom: 0;
}

.operations-my-routine-row.is-done {
  background: #f8fdf9;
}

.operations-my-routine-row > :is(a, .operations-manual-icon-button) {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.operations-my-routine-row > :is(a, .operations-manual-icon-button):hover {
  background: #f1f3f8;
}

.operations-my-routine-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.operations-my-routine-copy strong,
.operations-my-routine-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-my-routine-copy strong {
  color: var(--ink);
  font-size: 16px;
}

.operations-my-routine-copy small {
  color: var(--muted);
  font-size: 13px;
}

.operations-my-routine-row.is-done .operations-my-routine-copy strong {
  color: #64748b;
  text-decoration: line-through;
}

.operations-rule-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.operations-rule-copy strong,
.operations-rule-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-rule-copy strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.operations-rule-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.operations-rule-assignee {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.operations-rule-assignee > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.operations-rule-assignee > strong {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: #1e293b;
  font-size: 15px;
}

.operations-rule-assignee > strong i {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.operations-rule-assignee select {
  width: 100%;
  min-height: 40px;
  padding: 0 34px 0 11px;
  border: 1.5px solid #a5b4fc;
  border-radius: 9px;
  background-color: #f8f7ff;
  color: #312e81;
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
}

.operations-rule-assignee select:hover,
.operations-rule-assignee select:focus {
  border-color: #4f46e5;
  outline: 3px solid rgba(99, 102, 241, 0.13);
}

.operations-rule-assignee select:disabled {
  cursor: wait;
  opacity: 0.6;
}

.operations-date-strip {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.routine-date-dot {
  display: grid;
  width: 29px;
  gap: 1px;
  justify-items: center;
  padding: 2px 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.routine-date-dot small {
  font-size: 10px;
  font-weight: 750;
}

.routine-date-dot span {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 900;
}

.routine-date-dot.status-done span {
  background: #dcfce7;
  color: #15803d;
}

.routine-date-dot.status-missed span {
  background: #fee2e2;
  color: #b91c1c;
}

.routine-date-dot.status-excused span {
  background: #e2e8f0;
  color: #475569;
}

.operations-rule-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.operations-rule-tools a,
.operations-rule-tools button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #f6f7fb;
  color: #64748b;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.operations-muted {
  color: #cbd5e1;
}

.billing-filter {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.billing-filter label {
  display: grid;
  gap: 4px;
}

.billing-filter label > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.billing-filter input,
.billing-filter select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #d8dde6;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.worklog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.65fr);
  align-items: start;
  gap: 14px;
}

.worklog-sheet-card {
  min-width: 0;
  overflow: hidden;
  padding: 0;
}

.worklog-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px;
}

.worklog-section-head h2,
.worklog-section-head p {
  margin: 0;
}

.worklog-section-head h2 {
  color: var(--ink);
  font-size: 17px;
}

.worklog-section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.worklog-save-state {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eefbf4;
  color: #168252;
  font-size: 9px;
  font-weight: 850;
}

.worklog-table-wrap {
  max-height: calc(100vh - 300px);
  overflow: auto;
  border-block: 1px solid #e8ebf0;
}

.worklog-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.worklog-table th,
.worklog-table td {
  height: 45px;
  padding: 5px 7px;
  border-right: 1px solid #eef0f4;
  border-bottom: 1px solid #eef0f4;
  background: #fff;
}

.worklog-table thead th {
  position: sticky;
  z-index: 3;
  top: 0;
  height: 36px;
  background: #f7f8fb;
  color: #667085;
  font-size: 9px;
  font-weight: 850;
  text-align: left;
}

.worklog-table thead th:first-child {
  left: 0;
  z-index: 4;
  width: 86px;
}

.worklog-table thead th:nth-child(2),
.worklog-table thead th:nth-child(3) {
  width: 116px;
  text-align: center;
}

.worklog-table tbody th {
  position: sticky;
  z-index: 2;
  left: 0;
  width: 86px;
  background: #fafbfc;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
}

.worklog-table tbody th strong {
  font-size: 14px;
}

.worklog-table tbody th span {
  margin-left: 5px;
  color: var(--muted);
  font-size: 9px;
}

.worklog-table tbody th small {
  float: right;
  color: #2667d8;
  font-size: 8px;
  font-weight: 850;
}

.worklog-table tr.is-weekend th {
  color: #c14d56;
}

.worklog-table tr.is-today th,
.worklog-table tr.is-today td {
  background: #f1f6ff;
}

.worklog-table input {
  width: 100%;
  height: 33px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}

.worklog-table td:nth-child(2) input,
.worklog-table td:nth-child(3) input {
  text-align: right;
}

.worklog-table input:hover {
  border-color: #dce2eb;
  background: #fff;
}

.worklog-table input:focus {
  border-color: #8ab4f8;
  outline: 3px solid rgba(69, 130, 236, 0.12);
  background: #fff;
}

.worklog-table input:disabled {
  color: #667085;
  opacity: 1;
}

.worklog-sheet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 17px;
  background: #fff;
}

.worklog-sheet-actions span {
  color: var(--muted);
  font-size: 9px;
}

.worklog-fixed-list {
  display: grid;
  gap: 11px;
}

.worklog-fixed-list > .worklog-section-head {
  padding: 4px 2px 0;
}

.worklog-fixed-card {
  padding: 15px;
}

.worklog-fixed-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.worklog-fixed-card > header > div,
.worklog-fixed-card > header > span {
  display: grid;
  gap: 3px;
}

.worklog-fixed-card > header > div strong {
  color: var(--ink);
  font-size: 13px;
}

.worklog-fixed-card > header small {
  color: var(--muted);
  font-size: 9px;
}

.worklog-fixed-card > header > span {
  text-align: right;
}

.worklog-fixed-card > header b {
  color: #b42318;
  font-size: 15px;
}

.worklog-day-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 14px;
}

.worklog-day-picker label {
  cursor: pointer;
}

.worklog-day-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.worklog-day-picker span {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.worklog-day-picker span strong {
  font-size: 11px;
}

.worklog-day-picker span small {
  color: var(--muted);
  font-size: 8px;
}

.worklog-day-picker span em {
  color: #16805d;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
}

.worklog-day-picker label.has-record {
  cursor: default;
}

.worklog-day-picker label.has-record span {
  border-color: #b8dfd0;
  background: #effaf6;
  color: #116149;
}

.worklog-day-picker input:checked + span {
  border-color: #ef9a9a;
  background: #fff1f2;
  color: #b42318;
  box-shadow: inset 0 0 0 1px #ef9a9a;
}

.worklog-day-picker input:focus-visible + span {
  outline: 3px solid rgba(69, 130, 236, 0.2);
}

.worklog-fixed-card form > p,
.worklog-no-fixed p {
  margin: 12px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.worklog-fixed-card form > .secondary-button {
  width: 100%;
}

.worklog-no-fixed {
  padding: 17px;
}

.worklog-locked {
  margin-bottom: 12px;
}

.billing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.65fr);
  align-items: start;
  gap: 14px;
}

.billing-main,
.billing-side {
  display: grid;
  gap: 12px;
}

.billing-agreement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
}

.billing-terms-card,
.billing-agreements-card {
  padding: 16px 17px;
}

.billing-terms-card > header,
.billing-agreements-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.billing-terms-card h2,
.billing-terms-card p,
.billing-agreements-card h2,
.billing-agreements-card p {
  margin: 0;
}

.billing-terms-card h2,
.billing-agreements-card h2 {
  color: var(--ink);
  font-size: 16px;
}

.billing-terms-card p,
.billing-agreements-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.billing-terms-card.is-missing {
  border-color: #f2d6a2;
  background: #fffdf8;
}

.billing-agreements-card > div {
  display: grid;
  margin: 13px -17px -16px;
  border-top: 1px solid #edf0f4;
}

.billing-agreement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 9px 15px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.billing-agreement-row:hover {
  background: #fafbff;
}

.billing-agreement-row > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.billing-agreement-row strong {
  color: var(--ink);
  font-size: 12px;
}

.billing-agreement-row small,
.billing-agreement-row b {
  color: var(--muted);
  font-size: 9px;
}

.billing-agreement-row b {
  color: var(--muted-dark);
  font-weight: 750;
}

.billing-agreement h2,
.billing-invoice h2,
.billing-records h2,
.billing-side h2 {
  font-size: 16px;
}

.billing-agreement p,
.billing-invoice p,
.billing-side p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.billing-agreement.is-missing {
  border-color: #fde68a;
  background: #fffbeb;
}

.billing-invoice,
.billing-records,
.billing-routine-summary,
.billing-spot-card {
  padding: 17px;
}

.billing-invoice-head,
.billing-records > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.invoice-draft {
  background: #f1f5f9;
  color: #475569;
}

.invoice-submitted {
  background: #fef3c7;
  color: #92400e;
}

.invoice-approved,
.invoice-paid {
  background: #dcfce7;
  color: #15803d;
}

.invoice-lines {
  display: grid;
  margin-top: 14px;
  border-top: 1px solid #edf0f4;
}

.invoice-lines > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0f4;
  font-size: 12px;
}

.invoice-lines > div > span {
  display: grid;
  color: var(--ink);
  font-weight: 750;
}

.invoice-lines small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.invoice-totals {
  display: grid;
  justify-content: end;
  min-width: 250px;
  margin: 12px 0 0 auto;
}

.invoice-totals > div {
  display: grid;
  grid-template-columns: 100px 110px;
  padding: 4px 0;
  color: var(--muted-dark);
  font-size: 11px;
}

.invoice-totals dt,
.invoice-totals dd {
  margin: 0;
}

.invoice-totals dd {
  text-align: right;
  font-weight: 800;
}

.invoice-totals .is-total {
  margin-top: 5px;
  padding-top: 9px;
  border-top: 1px solid #cbd5e1;
  color: var(--ink);
  font-size: 14px;
}

.billing-actions {
  flex-wrap: wrap;
}

.billing-records > header {
  align-items: center;
  margin-bottom: 8px;
}

.compact-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 10px;
}

.billing-entry-list {
  display: grid;
  margin: 0 -17px -17px;
}

.billing-entry-row {
  display: grid;
  min-height: 50px;
  grid-template-columns: 45px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 0;
  border-top: 1px solid #edf0f4;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.billing-entry-row:hover {
  background: #fbfbff;
}

.billing-entry-row > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.billing-entry-row strong {
  color: var(--ink);
  font-size: 12px;
}

.billing-entry-row small,
.billing-entry-date {
  color: var(--muted);
  font-size: 9px;
}

.billing-empty-row {
  padding: 22px;
  border-top: 1px solid #edf0f4;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.billing-routine-summary > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 14px 0;
}

.billing-routine-summary > div > span {
  display: grid;
  padding: 8px;
  border-radius: 9px;
  background: #f7f8fb;
}

.billing-routine-summary small {
  color: var(--muted);
  font-size: 8px;
}

.billing-routine-summary strong {
  color: var(--ink);
  font-size: 16px;
}

.billing-side .secondary-button {
  width: 100%;
  margin-top: 12px;
  text-decoration: none;
}

.billing-profile-card {
  display: grid;
  align-content: start;
  gap: 7px;
}

.billing-profile-card h2,
.billing-profile-card p {
  margin: 0;
}

.billing-profile-card h2 {
  color: var(--ink);
  font-size: 15px;
}

.billing-profile-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.billing-profile-card.is-missing {
  border-color: #f2d6a2;
  background: #fffdf8;
}

.billing-profile-privacy {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5f7fb;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.billing-invoice-warning {
  margin: 12px 0 0;
  padding: 9px 11px;
  border: 1px solid #f2d6a2;
  border-radius: 9px;
  background: #fffaf0;
  color: #9a5b13;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.55;
}

.invoice-print-sheet {
  width: min(100%, 760px);
  margin: 14px auto;
  padding: 42px;
  border: 1px solid #dfe3e8;
  border-radius: 4px;
  background: #fff;
  color: #172033;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.09);
}

.invoice-print-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid #222b45;
}

.invoice-print-title span {
  color: #697386;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.invoice-print-title h1 {
  margin: 2px 0 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.invoice-print-title dl,
.invoice-print-summary dl {
  display: grid;
  min-width: 230px;
  gap: 6px;
  margin: 0;
}

.invoice-print-title dl > div,
.invoice-print-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.invoice-print-title dt,
.invoice-print-summary dt {
  color: #697386;
  font-size: 10px;
}

.invoice-print-title dd,
.invoice-print-summary dd {
  margin: 0;
  font-size: 11px;
  font-weight: 750;
}

.invoice-print-parties {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 34px;
  min-height: 150px;
  padding: 26px 0 20px;
}

.invoice-print-parties strong {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
}

.invoice-print-parties p {
  margin: 2px 0;
  color: #526074;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-line;
}

.invoice-issuer {
  text-align: right;
}

.invoice-print-total {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 18px;
  border-radius: 5px;
  background: #f2f4f8;
}

.invoice-print-total span {
  font-size: 11px;
  font-weight: 750;
}

.invoice-print-total strong {
  font-size: 24px;
}

.invoice-print-total small {
  margin-left: 5px;
  color: #697386;
  font-size: 9px;
}

.invoice-print-lines {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
  table-layout: fixed;
}

.invoice-line-description {
  width: 54%;
}

.invoice-line-quantity {
  width: 28%;
}

.invoice-line-amount {
  width: 18%;
}

.invoice-print-lines th,
.invoice-print-lines td {
  padding: 10px 9px;
  border-bottom: 1px solid #dfe3e8;
  text-align: left;
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.invoice-print-lines th {
  background: #f7f8fa;
  color: #526074;
  font-weight: 800;
}

.invoice-print-lines th:last-child,
.invoice-print-lines td:last-child {
  text-align: right;
  white-space: nowrap;
}

.invoice-print-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  margin-top: 22px;
}

.invoice-payment h2 {
  margin: 0 0 7px;
  font-size: 11px;
}

.invoice-payment p {
  margin: 3px 0;
  color: #526074;
  font-size: 9px;
  line-height: 1.55;
  white-space: pre-line;
}

.invoice-print-summary dl > div {
  padding: 3px 0;
}

.invoice-print-summary dl .is-total {
  margin-top: 5px;
  padding-top: 10px;
  border-top: 2px solid #222b45;
}

.invoice-print-summary dl .is-total dt,
.invoice-print-summary dl .is-total dd {
  color: #172033;
  font-size: 14px;
  font-weight: 850;
}

.invoice-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: min(100%, 760px);
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .operations-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations-rule-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .operations-rule-manuals {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .operations-rule-row {
    grid-template-columns: 38px minmax(165px, 1fr) minmax(135px, 170px) minmax(160px, auto) 64px;
  }

  .billing-layout {
    grid-template-columns: 1fr;
  }

  .worklog-layout {
    grid-template-columns: 1fr;
  }

  .worklog-table-wrap {
    max-height: 620px;
  }

  .billing-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-profile-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .operations-hero {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }

  .operations-hero-side {
    min-width: 0;
    align-items: stretch;
  }

  .operations-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operations-metrics > span {
    min-width: 0;
  }

  .operations-card-grid,
  .operations-member-grid {
    grid-template-columns: 1fr;
  }

  .operations-task-row {
    grid-template-columns: 9px minmax(0, 1fr) 16px;
    gap: 9px;
    padding: 14px;
  }

  .operations-task-row .status-pill {
    display: none;
  }

  .operations-task-copy strong,
  .operations-task-copy small,
  .operations-manual-inline {
    white-space: normal;
  }

  .operations-rule-card {
    grid-template-columns: 1fr;
  }

  .operations-rule-manuals {
    grid-column: auto;
    grid-row: auto;
  }

  .operations-rule-card .operations-card-actions {
    justify-content: stretch;
  }

  .operations-rule-card .operations-card-actions button {
    flex: 1;
  }

  .operations-task-links {
    grid-template-columns: 1fr;
  }

  .operations-compact-hero {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    padding: 15px;
  }

  .operations-compact-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operations-compact-metrics > span {
    min-width: 0;
  }

  .operations-rule-row {
    min-height: 0;
    grid-template-columns: 38px minmax(0, 1fr) 54px;
    gap: 10px;
    padding: 12px;
  }

  .operations-rule-assignee {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .operations-rule-assignee select {
    max-width: 100%;
  }

  .operations-date-strip {
    grid-column: 2 / -1;
    grid-row: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .operations-rule-tools {
    grid-column: 3;
    grid-row: 1;
  }

  .operations-routine-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .operations-routine-filter button {
    flex: 0 0 auto;
  }

  .operations-classification-note {
    align-items: flex-start;
  }

  .billing-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .worklog-section-head,
  .worklog-sheet-actions,
  .billing-terms-card > header,
  .billing-agreements-card > header {
    align-items: stretch;
    flex-direction: column;
  }

  .worklog-sheet-actions .primary-button,
  .billing-terms-card .secondary-button,
  .billing-agreements-card .secondary-button {
    width: 100%;
  }

  .worklog-table-wrap {
    max-height: 64vh;
  }

  .worklog-day-picker {
    gap: 4px;
  }

  .billing-agreement-row {
    grid-template-columns: minmax(0, 1fr) 16px;
  }

  .billing-agreement-row > b {
    grid-column: 1;
    grid-row: 2;
  }

  .billing-agreement-row > .row-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .billing-filter .secondary-button {
    grid-column: 1 / -1;
  }

  .billing-side {
    grid-template-columns: 1fr;
  }

  .billing-profile-card {
    grid-column: auto;
  }

  .invoice-print-sheet {
    padding: 22px 18px;
  }

  .invoice-print-title,
  .invoice-print-summary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .invoice-print-parties {
    grid-template-columns: 1fr;
  }

  .invoice-issuer {
    text-align: left;
  }

  .invoice-print-title dl,
  .invoice-print-summary dl {
    min-width: 0;
  }

  .billing-agreement {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-totals {
    width: 100%;
    min-width: 0;
  }

  .invoice-totals > div {
    grid-template-columns: 1fr auto;
  }

  .billing-entry-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .billing-entry-row .row-arrow {
    display: none;
  }
}

@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  body.invoice-printing * {
    visibility: hidden !important;
  }

  body.invoice-printing .invoice-print-sheet,
  body.invoice-printing .invoice-print-sheet * {
    visibility: visible !important;
  }

  body.invoice-printing .invoice-print-sheet {
    position: absolute;
    top: 0;
    left: 0;
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 15mm;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Strategy-first calendar, mission grouping, and reversible mobile views */
.date-field-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.field .date-field-control input {
  min-width: 0;
}

.date-field-control button {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.initiative-mission-stack {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.initiative-mission-section {
  overflow: hidden;
  border: 1px solid #d9d6ff;
  border-left-width: 4px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.82), rgba(255, 255, 255, 0.96) 48%);
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.06);
}

.initiative-mission-unassigned {
  border-color: #d8dee8;
  border-style: dashed;
  background: #f8fafc;
}

.initiative-mission-head {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px 11px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.72);
}

.initiative-mission-head > button,
.initiative-mission-head > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.initiative-mission-unassigned .initiative-mission-head > div:first-child {
  cursor: default;
}

.initiative-mission-head span {
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.initiative-mission-unassigned .initiative-mission-head span {
  color: var(--warn-text);
}

.initiative-mission-head h4 {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.initiative-mission-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.initiative-mission-head > strong,
.initiative-mission-head > div:last-child {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 900;
}

.initiative-mission-head > div:last-child small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.initiative-mission-section > .initiative-board {
  padding: 12px;
}

.initiative-band.is-manual-order {
  position: relative;
}

.initiative-order-tools {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 3px 8px;
  border-top: 1px solid #eef0f4;
  background: #fffdf7;
}

.initiative-order-tools > span {
  margin-right: auto;
  color: var(--warn-text);
  font-size: 9px;
  font-weight: 800;
}

.initiative-order-tools button {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  color: var(--muted-dark);
  cursor: pointer;
}

.initiative-order-tools button:disabled {
  opacity: 0.35;
  cursor: default;
}

.initiative-order-tools button:first-of-type svg {
  transform: rotate(180deg);
}

.initiative-order-tools svg {
  width: 10px;
}

.initiative-order-tools [data-initiative-drag] {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  cursor: grab;
}

.initiative-order-tools [data-initiative-drag] span {
  width: 10px;
  height: 1px;
  background: currentColor;
}

.initiative-band.is-dragging {
  opacity: 0.45;
}

.initiative-band.is-drop-target {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.mission-flow-step-arrow {
  position: absolute;
  top: 10px;
  left: -49px;
  z-index: 3;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #a5b4fc;
  border-radius: 50%;
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.14);
}

.mission-flow-step-arrow svg {
  width: 13px;
  height: 13px;
}

.mission-flow-edges > path {
  stroke: #6366f1;
  stroke-width: 2.5;
  filter: drop-shadow(0 1px 1px rgba(79, 70, 229, 0.18));
}

.mission-flow-edges marker path {
  fill: #4f46e5;
}

.mobile-experience-toggle {
  display: none;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #c7d2fe;
  border-radius: 9px;
  background: var(--primary-dim);
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.calendar-intro-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-hero {
  grid-template-columns: minmax(0, 1.5fr) minmax(270px, 0.55fr);
  grid-template-areas:
    "main side"
    "context side"
    "week side"
    "today today";
  min-height: 0;
}

.calendar-hero-main {
  grid-area: main;
}

.calendar-hero-side {
  grid-area: side;
  grid-template-columns: 1fr;
  border-left: 1px solid var(--line);
  background: #fcfdff;
}

.calendar-strategy-context {
  grid-area: context;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 20px 13px;
  background: linear-gradient(135deg, #fff 35%, #f8f7ff 100%);
}

.calendar-strategy-context > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e6e7f2;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
}

.calendar-strategy-context > div > span,
.calendar-strategy-week > span,
.calendar-today-section-head > span,
.calendar-standalone-tasks > span {
  display: block;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.calendar-strategy-context > div > strong {
  display: block;
  margin: 3px 0 6px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-strategy-context > div > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
}

.calendar-strategy-context small {
  color: var(--muted);
  font-size: 10px;
}

.calendar-context-chip {
  display: inline-flex;
  min-width: 0;
  max-width: 220px;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border: 1px solid #d9d6ff;
  border-radius: 999px;
  background: var(--primary-dim);
  color: var(--primary-strong);
  cursor: pointer;
}

.calendar-context-chip span {
  flex: 0 0 auto;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.calendar-context-chip strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-mission-tag {
  display: inline-flex;
  min-width: 0;
  max-width: 190px;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid #d9d6ff;
  border-radius: 999px;
  background: white;
  color: var(--primary-strong);
  cursor: pointer;
}

.calendar-mission-tag span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-strategy-week {
  grid-area: week;
  padding: 0 20px 16px;
  background: linear-gradient(135deg, #fff 35%, #f8f7ff 100%);
}

.calendar-strategy-week > div {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 5px;
}

.calendar-strategy-week button {
  display: flex;
  min-width: 0;
  min-height: 54px;
  flex-direction: column;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-strategy-week button.today {
  border-color: #a5b4fc;
  background: var(--primary-dim);
}

.calendar-strategy-week button span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.calendar-strategy-week button strong {
  font-size: 12px;
}

.calendar-strategy-week button small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted-dark);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-strategy-today {
  grid-area: today;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  background: white;
}

.calendar-today-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-today-section-head small {
  color: var(--muted);
  font-size: 10px;
}

.calendar-today-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 7px;
  margin-top: 7px;
}

.calendar-today-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}

.calendar-today-group summary {
  display: grid;
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) auto 13px;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  list-style: none;
  cursor: pointer;
}

.calendar-today-group summary::-webkit-details-marker {
  display: none;
}

.calendar-today-group summary > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.calendar-today-group summary strong,
.calendar-today-group summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-today-group summary strong {
  font-size: 12px;
}

.calendar-today-group summary small {
  color: var(--muted);
  font-size: 9px;
}

.calendar-today-group summary svg {
  width: 11px;
  color: var(--muted);
  transform: rotate(90deg);
  transition: transform 160ms ease;
}

.calendar-today-group[open] summary svg {
  transform: rotate(-90deg);
}

.calendar-today-group > div {
  padding: 3px 8px 8px;
  border-top: 1px solid #eef0f4;
  background: white;
}

.calendar-today-group > div > button:not(.calendar-open-big-task),
.calendar-standalone-tasks > button {
  display: grid;
  width: 100%;
  min-height: 42px;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 5px 2px;
  border: 0;
  border-bottom: 1px solid #eef0f4;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-today-group > div > button > span,
.calendar-standalone-tasks > button > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.calendar-today-group > div > button strong,
.calendar-today-group > div > button small,
.calendar-standalone-tasks > button strong,
.calendar-standalone-tasks > button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-today-group > div > button strong,
.calendar-standalone-tasks > button strong {
  font-size: 11px;
}

.calendar-today-group > div > button small,
.calendar-standalone-tasks > button small {
  color: var(--muted);
  font-size: 9px;
}

.calendar-today-group > div > button.done strong {
  color: var(--muted);
  text-decoration: line-through;
}

.calendar-open-big-task {
  width: 100%;
  min-height: 30px;
  margin-top: 5px;
  border: 1px solid #d9d6ff;
  border-radius: 7px;
  background: var(--primary-dim);
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.calendar-standalone-tasks {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.calendar-standalone-tasks > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.calendar-week-missions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.calendar-week-missions > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.calendar-week-missions > small {
  color: var(--muted);
  font-size: 10px;
}

.calendar-initiative-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 45px;
  border-bottom: 1px solid #eef0f4;
  background: #fbfcff;
}

.calendar-row-label {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 6px 9px;
  border-right: 1px solid #eef0f4;
}

.calendar-row-label strong {
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 900;
}

.calendar-row-label small {
  color: var(--muted);
  font-size: 8px;
}

.calendar-big-task-label {
  min-height: 31px;
  border-right: 0;
  border-bottom: 1px solid #eef0f4;
  background: white;
}

.calendar-initiative-lanes {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 29px;
  gap: 3px 0;
  padding: 5px 3px;
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc((100% / 7) - 1px), #eef0f4 calc((100% / 7) - 1px), #eef0f4 calc(100% / 7));
}

.calendar-initiative-bar {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  margin: 0 2px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  color: white;
  text-align: left;
  cursor: pointer;
}

.calendar-initiative-bar.is-clipped-start {
  margin-left: 0;
  border-radius: 0 6px 6px 0;
}

.calendar-initiative-bar.is-clipped-end {
  margin-right: 0;
  border-radius: 6px 0 0 6px;
}

.calendar-initiative-bar.is-clipped-start.is-clipped-end {
  border-radius: 0;
}

.calendar-initiative-bar span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-initiative-bar small {
  flex: 0 0 auto;
  opacity: 0.86;
  font-size: 8px;
}

.calendar-initiative-empty {
  display: flex;
  align-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: 10px;
}

.calendar-event[draggable="true"] {
  cursor: grab;
}

.calendar-event.is-dragging {
  opacity: 0.4;
}

.calendar-day.is-drop-target {
  background: var(--primary-dim);
  box-shadow: inset 0 0 0 2px var(--primary);
}

@media (max-width: 980px) {
  .initiative-mission-section > .initiative-board {
    grid-template-columns: 1fr;
  }

  .calendar-hero {
    grid-template-columns: minmax(0, 1fr) 250px;
  }

  .calendar-today-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .mobile-experience-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .initiative-mission-head {
    min-height: 70px;
    padding: 11px 12px;
  }

  .initiative-mission-head h4 {
    font-size: 15px;
  }

  .initiative-mission-head > div:last-child small {
    display: none;
  }

  .initiative-mission-section > .initiative-board {
    padding: 8px;
  }

  .mission-flow-shell.mobile-enhanced .mission-flow-scroll {
    overflow-x: auto;
    padding: 1px;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
  }

  .mission-flow-shell.mobile-enhanced .mission-flow-canvas {
    display: grid;
    min-width: var(--flow-min-width);
    grid-template-columns: repeat(var(--flow-columns), minmax(280px, 1fr));
    gap: 56px;
    padding: 10px 13px 18px;
  }

  .mission-flow-shell.mobile-enhanced .mission-flow-edges {
    display: block;
  }

  .mission-flow-shell.mobile-enhanced .mission-flow-column {
    padding-left: 0;
    border-left: 0;
    scroll-snap-align: start;
  }

  .mission-flow-shell.mobile-enhanced .mission-flow-column > header {
    justify-content: space-between;
  }

  .mission-flow-shell.mobile-enhanced .mission-flow-node::before,
  .mission-flow-shell.mobile-enhanced .mission-flow-node::after {
    display: block;
  }

  .mission-flow-shell.mobile-enhanced .mission-flow-node::before {
    left: -5px;
    width: 8px;
    height: 8px;
  }

  .mission-flow-shell.mobile-enhanced .mission-flow-step-arrow {
    left: -43px;
  }

  .mission-flow-shell.mobile-legacy .mission-flow-step-arrow {
    display: none;
  }

  .calendar-intro-actions {
    width: 100%;
  }

  .calendar-intro-actions .module-add {
    flex: 1 1 auto;
  }

  .calendar-hero {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "context"
      "week"
      "today"
      "side";
  }

  .calendar-hero-side {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .calendar-strategy-context {
    grid-template-columns: 1fr;
    padding: 0 13px 10px;
  }

  .calendar-strategy-week {
    padding: 0 13px 13px;
    overflow-x: auto;
  }

  .calendar-strategy-week > div {
    min-width: 620px;
  }

  .calendar-strategy-today {
    padding: 12px 13px 14px;
  }

  .calendar-today-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .calendar-today-groups {
    grid-template-columns: 1fr;
  }

  .calendar-module.mobile-legacy .calendar-strategy-context,
  .calendar-module.mobile-legacy .calendar-strategy-week,
  .calendar-module.mobile-legacy .calendar-strategy-today {
    display: none;
  }

  .calendar-week-missions {
    max-width: 55%;
    overflow-x: auto;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .date-field-control {
    grid-template-columns: 1fr;
  }

  .date-field-control button {
    min-height: 36px;
  }

  .initiative-mission-head {
    align-items: flex-start;
  }

  .initiative-mission-head > strong,
  .initiative-mission-head > div:last-child {
    font-size: 9px;
  }

  .initiative-order-tools > span {
    max-width: 120px;
  }
}

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

/* -------------------------------------------------------------------------- */
/* Readability hierarchy
   実データは11pxを下限にし、一覧で最初に探す名称は13〜17pxまで引き上げる。 */
/* -------------------------------------------------------------------------- */
.agenda-main strong {
  font-size: 15px;
  line-height: 1.35;
}

.roadmap-step strong,
.history-list strong,
.reverse-main strong,
.calendar-agenda-row strong,
.calendar-upcoming strong,
.timeline-lane > button strong,
.timeline-lane-label strong,
.timeline-mobile-card > div:last-child button span {
  font-size: 13px;
  line-height: 1.35;
}

.initiative-title-button strong {
  font-size: 17px;
  line-height: 1.3;
}

.group-title span {
  font-size: 13px;
  line-height: 1.35;
}

.board-task-main strong {
  font-size: 15px;
  line-height: 1.35;
}

.list-title strong {
  font-size: 14px;
  line-height: 1.35;
}

.board-list-row {
  font-size: 12px;
}

.metric-head {
  flex-wrap: wrap;
}

.metric-label {
  white-space: nowrap;
}

.metric-status,
.freshness {
  flex-shrink: 0;
}

@media (max-width: 980px) {
  .title-block h1 {
    font-size: 18px;
  }

  .welcome-title {
    font-size: 16px;
  }

  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
}

/* Mission hierarchy and DAG flow */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.mission-flow-shell {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.mission-flow-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 2px 2px;
}

.mission-flow-intro h4 {
  margin: 3px 0 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.mission-flow-intro p {
  max-width: 680px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.mission-flow-intro p strong {
  color: var(--primary-strong);
}

.mission-flow-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.mission-flow-actions > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.mission-flow-actions button {
  min-height: 36px;
}

.mission-flow-actions svg {
  width: 14px;
}

.mission-flow-scroll {
  position: relative;
  min-width: 0;
  overflow-x: auto;
  padding: 1px;
  border-radius: 14px;
  scrollbar-color: #c7d2fe transparent;
  scrollbar-width: thin;
}

.mission-flow-scroll:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.mission-flow-canvas {
  position: relative;
  display: grid;
  min-width: max(100%, var(--flow-min-width));
  grid-template-columns: repeat(var(--flow-columns), minmax(310px, 1fr));
  align-items: start;
  gap: 72px;
  padding: 14px 16px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(79, 70, 229, 0.025) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgba(79, 70, 229, 0.025) 1px, transparent 1px) 0 0 / 24px 24px,
    #fafbff;
}

.mission-flow-edges {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.mission-flow-edges > path {
  fill: none;
  stroke: var(--primary-soft);
  stroke-width: 2;
  marker-end: url("#mission-flow-arrow");
  vector-effect: non-scaling-stroke;
}

.mission-flow-edges marker path {
  fill: var(--primary-soft);
  stroke: none;
}

.mission-flow-column {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.mission-flow-column > header {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 3px;
}

.mission-flow-column > header span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.mission-flow-column > header small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mission-flow-column-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mission-flow-node {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border-left-width: 3px;
  box-shadow: var(--shadow-raised);
}

.mission-flow-node::before,
.mission-flow-node::after {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--primary-soft);
  box-shadow: 0 0 0 1px var(--primary-soft);
  content: "";
  transform: translateY(-50%);
}

.mission-flow-node::before {
  left: -5px;
}

.mission-flow-node::after {
  right: -5px;
}

.mission-flow-relation {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -3px 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.mission-flow-relation span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-flow-relation em {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--primary-dim);
  color: var(--primary-strong);
  font-style: normal;
}

.mission-flow-node-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.mission-flow-node-head > button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.mission-label {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--primary-dim);
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.mission-flow-node-head strong {
  margin-top: 5px;
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.mission-flow-node-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mission-flow-progress {
  margin-top: 13px;
  padding: 10px;
  border-radius: 9px;
  background: #f8f8ff;
}

.mission-flow-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 800;
}

.mission-flow-progress > div strong {
  color: var(--primary-strong);
  font-size: 13px;
}

.mission-flow-progress .flow-progress {
  display: block;
  margin-top: 7px;
}

.mission-flow-progress > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.mission-initiative-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 12px;
}

.mission-initiative-list > span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.mission-initiative-list > button {
  display: grid;
  min-height: 48px;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 5px 4px;
  border: 0;
  border-top: 1px solid #eef0f4;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.mission-initiative-list > button:hover {
  background: var(--primary-dim);
}

.mission-initiative-list > button > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.mission-initiative-list > button strong,
.mission-initiative-list > button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-initiative-list > button strong {
  font-size: 12px;
  font-weight: 800;
}

.mission-initiative-list > button small {
  color: var(--muted);
  font-size: 10px;
}

.mission-initiative-list > button .status-pill {
  min-height: 20px;
  padding: 0 6px;
  font-size: 10px;
}

.mission-initiative-list > p {
  margin: 0;
  padding: 10px 4px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
}

.mission-initiative-list > em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-align: right;
}

.mission-flow-node footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.mission-flow-node footer button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted-dark);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.mission-flow-node footer button:last-child {
  border-color: #c7d2fe;
  background: var(--primary-dim);
  color: var(--primary-strong);
}

.mission-flow-node footer svg {
  width: 12px;
  height: 12px;
}

.mission-flow-onboarding {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-style: dashed;
  background: linear-gradient(135deg, white, #f8f8ff);
}

.mission-flow-onboarding-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 13px;
  background: var(--primary);
  color: white;
  font-size: 17px;
  font-weight: 900;
}

.mission-flow-onboarding strong {
  font-size: 14px;
  font-weight: 900;
}

.mission-flow-onboarding p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.mission-flow-onboarding button {
  white-space: nowrap;
}

.mission-unassigned {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border-style: dashed;
  background: #fbfcfe;
}

.mission-unassigned > div:first-child {
  display: flex;
  flex-direction: column;
}

.mission-unassigned > div:first-child > span {
  color: var(--warn-text);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.mission-unassigned > div:first-child strong {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 900;
}

.mission-unassigned > div:first-child small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.mission-unassigned > div:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.mission-unassigned > div:last-child > button {
  display: grid;
  min-width: 0;
  min-height: 48px;
  grid-template-columns: 7px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.mission-unassigned > div:last-child > button > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.mission-unassigned > div:last-child strong,
.mission-unassigned > div:last-child small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-unassigned > div:last-child strong {
  font-size: 11px;
}

.mission-unassigned > div:last-child small {
  color: var(--muted);
  font-size: 10px;
}

.mission-unassigned > div:last-child svg {
  width: 12px;
  color: #94a3b8;
}

/* Mission form fields */
.field-hint {
  color: var(--muted);
  font-size: 10px;
}

.mission-predecessor-field {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}

.mission-predecessor-field[hidden] {
  display: none;
}

.mission-predecessor-field legend {
  padding: 0 4px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}

.mission-predecessor-field > p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
}

.mission-predecessor-field > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.mission-predecessor-field > div > label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.mission-predecessor-field input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.mission-predecessor-field label > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.mission-predecessor-field label strong,
.mission-predecessor-field label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-predecessor-field label strong {
  font-size: 11px;
}

.mission-predecessor-field label small,
.mission-predecessor-field > div > small {
  color: var(--muted);
  font-size: 10px;
}

/* Big-task-only calendar */
.calendar-kind-lock {
  display: flex;
  min-height: 32px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 2px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: var(--primary-dim);
}

.calendar-kind-lock strong {
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 900;
}

.calendar-kind-lock small {
  color: var(--muted);
  font-size: 9px;
}

.calendar-event {
  min-height: 25px;
  margin-top: 2px;
  padding: 3px 5px;
  border-left: 2px solid var(--primary-soft);
  border-radius: 5px;
  background: #f8f8ff;
}

@media (max-width: 980px) {
  .mission-flow-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .mission-flow-actions {
    width: 100%;
    justify-content: space-between;
  }

  .mission-unassigned {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .mission-flow-scroll {
    overflow: visible;
    padding: 0;
  }

  .mission-flow-canvas {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 14px;
    padding: 10px;
  }

  .mission-flow-edges {
    display: none;
  }

  .mission-flow-column {
    padding-left: 17px;
    border-left: 2px solid #c7d2fe;
  }

  .mission-flow-column > header {
    justify-content: flex-start;
    gap: 9px;
  }

  .mission-flow-column-list {
    gap: 10px;
  }

  .mission-flow-node {
    width: 100%;
  }

  .mission-flow-node::before {
    left: -23px;
    width: 10px;
    height: 10px;
  }

  .mission-flow-node::after {
    display: none;
  }

  .mission-flow-relation {
    min-height: 28px;
  }

  .mission-flow-node footer button {
    min-height: 42px;
  }

  .mission-unassigned > div:last-child {
    grid-template-columns: 1fr;
  }

  .mission-flow-onboarding {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .mission-flow-onboarding-mark {
    width: 42px;
    height: 42px;
  }

  .mission-flow-onboarding button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .calendar-controls {
    grid-template-columns: 1fr auto;
  }

  .calendar-kind-lock {
    grid-column: 1;
    grid-row: 2;
    align-items: flex-start;
    border: 0;
    background: transparent;
    padding-left: 2px;
  }

  .calendar-pillar-tabs {
    grid-column: 2;
    grid-row: 2;
  }

  .calendar-agenda-time {
    font-size: 9px;
    line-height: 1.15;
  }
}

@media (max-width: 430px) {
  .mission-flow-intro h4 {
    font-size: 16px;
  }

  .mission-flow-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .mission-flow-actions button {
    width: 100%;
  }

  .mission-flow-canvas {
    padding: 8px;
  }

  .mission-flow-column {
    padding-left: 14px;
  }

  .mission-flow-node {
    padding: 12px;
  }

  .mission-flow-node::before {
    left: -20px;
  }

  .mission-flow-node footer {
    grid-template-columns: 1fr;
  }

  .mission-predecessor-field > div {
    grid-template-columns: 1fr;
  }
}

/* Revenue-engine channel cockpit */
.nav-label-insights {
  margin-top: 24px;
}

.channel-module {
  --channel-navy: #172033;
  --channel-teal: #0f9f83;
}

.channel-intro {
  align-items: center;
}

.channel-intro-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.channel-freshness {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #d8f0e7;
  border-radius: 999px;
  background: #f2fbf7;
  color: var(--ok-text);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.channel-freshness i,
.channel-update-state i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.channel-freshness.is-empty {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: var(--muted);
}

.channel-freshness.is-empty i {
  background: #94a3b8;
  box-shadow: none;
}

.channel-toolbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 7px 9px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
}

.channel-view-tabs,
.channel-period-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.channel-view-tabs button,
.channel-period-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.channel-view-tabs button.active {
  background: var(--primary-dim);
  color: var(--primary-strong);
}

.channel-period-tabs {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
}

.channel-period-tabs button {
  min-height: 29px;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 10px;
}

.channel-period-tabs button.active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  color: var(--ink);
}

.channel-setup {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding: 20px;
  border-color: #d9d7ff;
  background:
    radial-gradient(circle at 92% 20%, rgba(165, 180, 252, 0.22), transparent 26%),
    linear-gradient(135deg, #fff, #f8f7ff);
}

.channel-setup-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--primary), #675ef2);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.22);
  color: #fff;
}

.channel-setup-mark svg {
  width: 24px;
  height: 24px;
}

.channel-setup > div:nth-child(2) > span {
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.channel-setup h3 {
  margin: 3px 0 2px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.channel-setup p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.channel-setup ol {
  display: flex;
  gap: 10px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.channel-setup li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.channel-setup li > i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #d7dce5;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.channel-setup li.done > i {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--ok-text);
}

.channel-setup li svg {
  width: 12px;
  height: 12px;
}

.channel-setup li > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.channel-setup li strong {
  font-size: 10px;
}

.channel-setup li small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.channel-kpi {
  position: relative;
  display: grid;
  min-height: 124px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  overflow: hidden;
  padding: 18px;
}

.channel-kpi::after {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--channel-accent);
  content: "";
}

.channel-kpi.tone-violet {
  --channel-accent: #8b5cf6;
  --channel-soft: #f3efff;
}

.channel-kpi.tone-sky {
  --channel-accent: var(--toc);
  --channel-soft: #ecf8fe;
}

.channel-kpi.tone-green {
  --channel-accent: var(--channel-teal);
  --channel-soft: #ecfaf6;
}

.channel-kpi.tone-indigo {
  --channel-accent: var(--primary);
  --channel-soft: var(--primary-dim);
}

.channel-kpi-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  background: var(--channel-soft);
  color: var(--channel-accent);
}

.channel-kpi-icon svg {
  width: 19px;
  height: 19px;
}

.channel-kpi > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.channel-kpi > div > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.channel-kpi > div > strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-kpi > div > small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.channel-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.channel-section-head > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.channel-section-head > div > span {
  color: var(--primary);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.channel-section-head h3 {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.channel-section-head > small {
  color: var(--muted);
  font-size: 9px;
}

.channel-section-head > button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.channel-section-head > button svg {
  width: 13px;
  height: 13px;
}

.channel-funnel-card {
  margin-bottom: 16px;
  padding: 19px 20px 21px;
}

.channel-funnel {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) 76px minmax(145px, 1fr) 76px minmax(145px, 1fr) 76px minmax(145px, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.channel-funnel-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.65;
}

.channel-stage {
  position: relative;
  display: flex;
  min-height: 142px;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--stage-line);
  border-radius: 13px;
  background:
    radial-gradient(circle at 92% 10%, var(--stage-glow), transparent 38%),
    var(--stage-bg);
}

.channel-stage::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--stage-color);
  content: "";
}

.channel-stage.stage-x {
  --stage-color: #0f172a;
  --stage-line: #d7dce5;
  --stage-bg: #fbfcfd;
  --stage-glow: rgba(15, 23, 42, 0.07);
}

.channel-stage.stage-line {
  --stage-color: #06c755;
  --stage-line: #ccefd9;
  --stage-bg: #f8fef9;
  --stage-glow: rgba(6, 199, 85, 0.11);
}

.channel-stage.stage-lead {
  --stage-color: var(--toc);
  --stage-line: #cdeaf8;
  --stage-bg: #f8fcff;
  --stage-glow: rgba(14, 165, 233, 0.1);
}

.channel-stage.stage-sale {
  --stage-color: var(--primary);
  --stage-line: #d9d7ff;
  --stage-bg: #faf9ff;
  --stage-glow: rgba(79, 70, 229, 0.12);
}

.channel-stage > span {
  color: var(--stage-color);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.channel-stage > strong {
  margin-top: 2px;
  font-size: 11px;
}

.channel-stage > b {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 1;
}

.channel-stage > small {
  margin-top: 9px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-rate {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.channel-rate > span {
  display: flex;
  width: 100%;
  align-items: center;
  color: var(--primary);
}

.channel-rate > span::before,
.channel-rate > span::after {
  height: 1px;
  flex: 1;
  background: #c7d2fe;
  content: "";
}

.channel-rate svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.channel-rate strong {
  margin-top: 5px;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}

.channel-rate small {
  color: var(--muted);
  font-size: 7px;
  white-space: nowrap;
}

.channel-rate.is-empty {
  opacity: 0.55;
}

.channel-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.channel-decision,
.channel-trend {
  min-height: 246px;
  padding: 19px 20px;
}

.channel-decision-status {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted-dark);
  font-size: 9px;
  font-weight: 900;
}

.channel-decision-status.warn {
  background: #fff7ed;
  color: var(--warn-text);
}

.channel-decision-status.good {
  background: #f0fdf4;
  color: var(--ok-text);
}

.channel-decision-status.setup {
  background: var(--primary-dim);
  color: var(--primary-strong);
}

.channel-decision-body {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-top: 23px;
}

.channel-decision-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: var(--primary-dim);
  color: var(--primary);
}

.channel-decision-icon svg {
  width: 20px;
  height: 20px;
}

.channel-decision-body strong {
  display: block;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
}

.channel-decision-body p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.channel-target-progress {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.channel-target-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
}

.channel-target-progress > div strong {
  font-size: 11px;
}

.channel-target-progress > span {
  display: block;
  height: 7px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f4;
}

.channel-target-progress > span > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
}

.channel-target-progress > small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.channel-bars {
  display: flex;
  height: 125px;
  align-items: flex-end;
  gap: 5px;
  margin-top: 18px;
  padding: 10px 3px 0;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 30px, #f1f3f7 31px);
}

.channel-bars > span {
  display: flex;
  min-width: 5px;
  height: 100%;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  gap: 4px;
}

.channel-bars i {
  width: min(15px, 78%);
  min-height: 5px;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, #42c9a7, var(--channel-teal));
}

.channel-bars small {
  color: #94a3b8;
  font-size: 7px;
}

.channel-trend-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
}

.channel-trend-foot strong {
  color: var(--ink);
  font-size: 12px;
}

.channel-empty-chart {
  display: flex;
  height: 170px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
  text-align: center;
}

.channel-empty-chart > span {
  width: 74%;
  height: 55px;
  border-bottom: 2px solid #e1e5ed;
  background: linear-gradient(160deg, transparent 46%, #e9ecf2 47%, #e9ecf2 51%, transparent 52%);
}

.channel-empty-chart strong {
  margin-top: 12px;
  color: var(--muted-dark);
  font-size: 11px;
}

.channel-empty-chart small {
  margin-top: 3px;
  font-size: 8px;
}

.channel-account-table {
  overflow: hidden;
  margin-bottom: 16px;
}

.channel-account-table > header {
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
}

.channel-scroll-hint {
  display: none;
}

.channel-table-scroll {
  overflow-x: auto;
}

.channel-table-head,
.channel-table-row {
  display: grid;
  min-width: 890px;
  grid-template-columns: minmax(230px, 1.35fr) repeat(5, minmax(82px, 0.62fr)) minmax(86px, 0.58fr);
  align-items: center;
  gap: 10px;
  padding: 10px 19px;
}

.channel-table-head {
  background: #f8fafc;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
}

.channel-table-row {
  width: 100%;
  min-height: 63px;
  border: 0;
  border-top: 1px solid #edf0f4;
  background: #fff;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}

.channel-table-row:hover {
  background: #fafaff;
}

.channel-table-row > strong {
  font-size: 11px;
  font-weight: 850;
}

.channel-account-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.channel-account-identity > i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--account-color), white 65%);
  border-radius: 10px;
  background: color-mix(in srgb, var(--account-color), white 89%);
  color: color-mix(in srgb, var(--account-color), black 22%);
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
}

.channel-account-identity > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.channel-account-identity strong,
.channel-account-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-account-identity strong {
  font-size: 10px;
}

.channel-account-identity small {
  color: var(--muted);
  font-size: 8px;
}

.channel-account-identity.is-large > i {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  font-size: 11px;
}

.channel-account-identity.is-large strong {
  font-size: 15px;
}

.channel-account-identity.is-large small {
  font-size: 10px;
}

.channel-update-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.channel-update-state i {
  width: 6px;
  height: 6px;
  background: #cbd5e1;
  box-shadow: none;
}

.channel-update-state.is-ready {
  color: var(--ok-text);
}

.channel-update-state.is-ready i {
  background: var(--ok);
}

.channel-source-health {
  margin-bottom: 16px;
  overflow: hidden;
}

.channel-source-health > header {
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
}

.channel-source-health > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.channel-source-card,
.channel-source-xops {
  min-width: 0;
  padding: 17px;
  border-right: 1px solid var(--line);
}

.channel-source-health article:last-child {
  border-right: 0;
}

.channel-source-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.channel-source-card > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #f1f5f9;
  color: var(--muted-dark);
  font-size: 7px;
  font-weight: 950;
}

.channel-source-card strong,
.channel-source-xops strong {
  display: block;
  font-size: 11px;
}

.channel-source-card p,
.channel-source-xops p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
}

.channel-source-card > em {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  gap: 5px;
  grid-column: 2;
  justify-self: start;
  margin-top: 8px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.channel-source-card > em i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #94a3b8;
}

.channel-source-card > em.manual {
  background: #fff7ed;
  color: var(--warn-text);
}

.channel-source-card > em.manual i {
  background: var(--warn);
}

.channel-source-card > em.ready {
  background: #ecfdf5;
  color: #047857;
}

.channel-source-card > em.ready i {
  background: #10b981;
}

.channel-source-card > em.partial {
  background: #fffbeb;
  color: #b45309;
}

.channel-source-card > em.partial i {
  background: #f59e0b;
}

.channel-source-card > em.error {
  background: #fef2f2;
  color: #b91c1c;
}

.channel-source-card > em.error i {
  background: #ef4444;
}

.channel-source-xops {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-content: start;
  gap: 9px;
  background: #fafaff;
}

.channel-source-xops > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-dim);
  color: var(--primary);
}

.channel-source-xops > span svg {
  width: 17px;
  height: 17px;
}

.channel-source-xops > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  grid-column: 2;
  justify-self: start;
  margin-top: 8px;
  color: var(--primary);
  font-size: 8px;
  font-weight: 900;
  text-decoration: none;
}

.channel-source-xops > a svg {
  width: 11px;
  height: 11px;
}

.channel-account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.channel-account-card {
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--account-color);
}

.channel-account-card > header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.channel-account-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.channel-account-metrics > div {
  display: flex;
  min-height: 75px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
  background: #fff;
}

.channel-account-metrics span {
  color: var(--muted);
  font-size: 8px;
}

.channel-account-metrics strong {
  margin-top: 4px;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.channel-account-card-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 11px 13px;
  background: #fbfcfe;
}

.channel-account-card-foot button {
  min-height: 33px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted-dark);
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.channel-account-card-foot button:last-child {
  border-color: #d9d7ff;
  background: var(--primary-dim);
  color: var(--primary-strong);
}

.channel-account-detail {
  margin-bottom: 16px;
  overflow: hidden;
  border-top: 4px solid var(--account-color);
}

.channel-account-detail > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.channel-account-detail > header > div {
  display: flex;
  gap: 7px;
}

.channel-account-detail > header a {
  text-decoration: none;
}

.channel-account-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.channel-account-detail-grid > div {
  display: flex;
  min-height: 105px;
  flex-direction: column;
  justify-content: center;
  padding: 15px 20px;
  border-right: 1px solid var(--line);
}

.channel-account-detail-grid > div:last-child {
  border-right: 0;
}

.channel-account-detail-grid span,
.channel-account-detail-grid small {
  color: var(--muted);
  font-size: 8px;
}

.channel-account-detail-grid strong {
  margin: 5px 0 3px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.channel-account-mini-chart {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  align-items: end;
  gap: 14px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.channel-account-mini-chart > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.channel-account-mini-chart > div {
  display: flex;
  height: 45px;
  align-items: flex-end;
  gap: 4px;
}

.channel-account-mini-chart i {
  min-width: 4px;
  height: 4px;
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--account-color), white 10%);
}

.channel-account-mini-chart small {
  color: var(--muted);
  font-size: 9px;
}

.channel-no-results {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 16px;
  color: var(--muted);
}

.channel-no-results strong {
  color: var(--muted-dark);
  font-size: 13px;
}

.channel-no-results small {
  margin-top: 4px;
  font-size: 10px;
}

.channel-plan-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.channel-plan-kpi {
  position: relative;
  min-height: 140px;
  padding: 17px;
}

.channel-plan-kpi > span,
.channel-plan-kpi > small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.channel-plan-kpi > strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-plan-kpi > small {
  margin-top: 2px;
}

.channel-plan-kpi > div {
  height: 7px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f4;
}

.channel-plan-kpi > div i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
}

.channel-plan-kpi > em {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--primary-dim);
  color: var(--primary-strong);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.channel-plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.55fr);
  gap: 16px;
  margin-bottom: 16px;
}

.channel-reverse-plan,
.channel-forecast,
.channel-rate-plan {
  padding: 19px 20px;
}

.channel-reverse-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, auto));
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.channel-reverse-flow > div {
  display: flex;
  min-height: 105px;
  justify-content: center;
  flex-direction: column;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfe;
}

.channel-reverse-flow > div > span,
.channel-reverse-flow > div > small {
  color: var(--muted);
  font-size: 7px;
}

.channel-reverse-flow > div > strong {
  margin: 5px 0 3px;
  font-size: 18px;
  font-weight: 900;
}

.channel-reverse-flow > span {
  display: flex;
  align-items: center;
  flex-direction: column;
  color: var(--primary);
  text-align: center;
}

.channel-reverse-flow > span svg {
  width: 15px;
  height: 15px;
}

.channel-reverse-flow > span strong {
  margin-top: 4px;
  font-size: 9px;
}

.channel-reverse-flow > span small {
  color: var(--muted);
  font-size: 6px;
  white-space: nowrap;
}

.channel-plan-note {
  margin: 18px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
}

.channel-plan-empty {
  display: flex;
  min-height: 250px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.channel-plan-empty > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-dim);
  color: var(--primary);
}

.channel-plan-empty > span svg {
  width: 22px;
  height: 22px;
}

.channel-plan-empty strong {
  max-width: 430px;
  margin-top: 13px;
  font-size: 13px;
}

.channel-plan-empty small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.channel-plan-empty button {
  margin-top: 15px;
}

.channel-forecast-main {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 21px;
  padding: 19px 8px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 15%, rgba(165, 180, 252, 0.2), transparent 54%),
    #fafaff;
}

.channel-forecast-main > span,
.channel-forecast-main > small {
  color: var(--muted);
  font-size: 8px;
}

.channel-forecast-main > strong {
  margin: 5px 0 3px;
  font-size: 29px;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.channel-forecast dl {
  margin: 12px 0 0;
}

.channel-forecast dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
}

.channel-forecast dt {
  color: var(--muted);
}

.channel-forecast dd {
  margin: 0;
  font-weight: 900;
}

.channel-forecast > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 7px;
}

.channel-rate-plan {
  margin-bottom: 16px;
}

.channel-rate-plan > div:last-child {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 17px;
}

.channel-rate-plan article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfe;
}

.channel-rate-plan article > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 3px 10px;
}

.channel-rate-plan article span {
  color: var(--muted);
  font-size: 8px;
}

.channel-rate-plan article strong {
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: 21px;
  font-weight: 900;
}

.channel-rate-plan article small {
  color: var(--muted);
  font-size: 7px;
}

.channel-rate-plan article > span {
  display: block;
  height: 6px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf3;
}

.channel-rate-plan article > span i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.channel-input-group {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
}

.channel-input-group legend {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 8px;
  padding: 0 5px;
}

.channel-input-group legend > span {
  grid-row: 1 / 3;
  color: var(--primary);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.13em;
}

.channel-input-group legend > strong {
  color: var(--ink);
  font-size: 11px;
}

.channel-input-group legend > small {
  color: var(--muted);
  font-size: 8px;
}

.channel-input-group > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 5px;
}

.channel-input-group .field > small {
  color: var(--muted);
  font-size: 8px;
}

.channel-form-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #d9d7ff;
  border-radius: 10px;
  background: #f8f8ff;
}

.channel-form-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--primary);
}

.channel-form-note p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.channel-form-note strong {
  display: block;
  color: var(--primary-strong);
  font-size: 9px;
}

@media (max-width: 1180px) {
  .channel-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .channel-intro-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .channel-kpi-grid,
  .channel-plan-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-funnel {
    grid-template-columns: minmax(130px, 1fr) 58px minmax(130px, 1fr) 58px minmax(130px, 1fr) 58px minmax(130px, 1fr);
    gap: 5px;
  }

  .channel-source-health > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-source-health article:nth-child(2) {
    border-right: 0;
  }

  .channel-source-health article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .channel-account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-reverse-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .channel-reverse-flow > span {
    transform: none;
  }
}

@media (max-width: 900px) {
  .channel-setup {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .channel-setup-mark {
    width: 46px;
    height: 46px;
  }

  .channel-setup > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .channel-funnel {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .channel-stage {
    min-height: 112px;
  }

  .channel-rate {
    display: grid;
    grid-template-columns: 38px 58px minmax(0, 1fr);
    justify-content: center;
    justify-items: start;
    gap: 8px;
    padding: 0 18px;
    text-align: left;
  }

  .channel-rate > span {
    width: 38px;
    transform: rotate(90deg);
  }

  .channel-rate strong {
    margin-top: 0;
  }

  .channel-overview-grid,
  .channel-plan-grid {
    grid-template-columns: 1fr;
  }

  .channel-account-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-account-detail-grid > div:nth-child(2) {
    border-right: 0;
  }

  .channel-account-detail-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .channel-rate-plan > div:last-child {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .channel-scroll-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
  }

  .channel-scroll-hint svg {
    width: 12px;
    height: 12px;
  }

  .channel-table-head > :first-child,
  .channel-table-row > :first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: inherit;
    box-shadow: 8px 0 12px -12px rgba(15, 23, 42, 0.5);
  }

  .channel-intro-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .channel-freshness {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .channel-intro-actions button {
    width: 100%;
  }

  .channel-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .channel-view-tabs,
  .channel-period-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .channel-view-tabs button,
  .channel-period-tabs button {
    width: 100%;
  }

  .channel-setup {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .channel-setup ol {
    align-items: stretch;
    flex-direction: column;
  }

  .channel-setup-mark {
    display: none;
  }

  .channel-kpi-grid,
  .channel-plan-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .channel-kpi {
    min-height: 121px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    padding: 14px;
  }

  .channel-kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .channel-kpi-icon svg {
    width: 16px;
    height: 16px;
  }

  .channel-kpi > div > strong {
    font-size: 19px;
  }

  .channel-funnel-card,
  .channel-decision,
  .channel-trend,
  .channel-reverse-plan,
  .channel-forecast,
  .channel-rate-plan {
    padding: 15px;
  }

  .channel-account-grid {
    grid-template-columns: 1fr;
  }

  .channel-account-detail > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .channel-account-detail > header > div {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .channel-account-detail > header .secondary-button {
    padding: 0 8px;
    font-size: 10px;
  }

  .channel-account-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .channel-account-detail-grid > div {
    min-height: 92px;
    padding: 12px;
  }

  .channel-account-detail-grid strong {
    font-size: 19px;
  }

  .channel-account-mini-chart {
    grid-template-columns: 1fr;
  }

  .channel-source-health > div {
    grid-template-columns: 1fr;
  }

  .channel-source-health article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .channel-source-health article:last-child {
    border-bottom: 0;
  }

  .channel-reverse-flow {
    grid-template-columns: 1fr;
  }

  .channel-reverse-flow > span {
    display: grid;
    grid-template-columns: 25px 45px 1fr;
    justify-items: start;
    padding-left: 15px;
    text-align: left;
  }

  .channel-reverse-flow > span svg {
    transform: rotate(90deg);
  }

  .channel-input-group > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .channel-intro-actions {
    grid-template-columns: 1fr;
  }

  .channel-freshness {
    grid-column: auto;
  }

  .channel-kpi-grid,
  .channel-plan-kpis {
    grid-template-columns: 1fr;
  }

  .channel-kpi {
    min-height: 102px;
  }

  .channel-account-detail > header > div,
  .channel-account-detail-grid {
    grid-template-columns: 1fr;
  }

  .channel-account-detail-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .channel-account-detail-grid > div:last-child {
    border-bottom: 0;
  }
}
