:root {
  color-scheme: light;
  --navy-950: #071321;
  --navy-900: #0b1c2f;
  --navy-850: #10263d;
  --navy-800: #17324d;
  --blue-700: #185ca8;
  --blue-600: #176cc1;
  --blue-100: #e3f0fd;
  --teal-700: #087b72;
  --teal-100: #dff5f1;
  --purple-700: #6941a5;
  --purple-100: #efe7fa;
  --amber-800: #8b4b00;
  --amber-100: #fff0cc;
  --red-700: #b42332;
  --red-100: #fde7e9;
  --ink-900: #142334;
  --ink-700: #42566c;
  --ink-600: #5c6f82;
  --line: #d9e2eb;
  --line-strong: #c2cfdb;
  --surface: #ffffff;
  --surface-subtle: #f3f6f9;
  --canvas: #edf2f6;
  --focus: #f5a623;
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--canvas);
  color: var(--ink-900);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--blue-700);
  border-radius: 0.55rem;
  padding: 0.62rem 0.95rem;
  background: var(--blue-700);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #104d91;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

:where(button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  padding: 0.66rem 0.75rem;
  background: #fff;
  color: var(--ink-900);
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--ink-700);
  font-size: 0.82rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border-radius: 0.4rem;
  padding: 0.7rem 1rem;
  background: #fff;
  color: var(--navy-950);
  font-weight: 800;
}

.skip-link:focus {
  top: 0.5rem;
  left: 0.5rem;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

.button-secondary {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink-900);
}

.button-secondary:hover {
  border-color: #99adbf;
  background: var(--surface-subtle);
}

.button-text,
.inline-link,
.back-link {
  min-height: auto;
  border: 0;
  padding: 0.25rem;
  background: transparent;
  color: var(--blue-700);
}

.button-text:hover,
.inline-link:hover,
.back-link:hover {
  background: var(--blue-100);
  color: #104d91;
}

.button-compact {
  min-height: 2.55rem;
  padding: 0.5rem 0.75rem;
}

.button-full {
  width: 100%;
}

.brand-mark {
  display: inline-grid;
  width: 2.55rem;
  height: 2.55rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.72rem;
  background: linear-gradient(145deg, #38bfc0, #1770c3);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 20%);
}

/* Authentication */

.boot-screen {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--navy-950);
  color: #dceaf7;
  font-weight: 700;
}

.sign-in-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(34rem, 1.2fr) minmax(30rem, 0.8fr);
  background: #fff;
}

.sign-in-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.75rem);
  background:
    linear-gradient(180deg, rgb(7 19 33 / 5%), rgb(7 19 33 / 70%)),
    radial-gradient(circle at 75% 20%, rgb(31 126 205 / 35%), transparent 28rem),
    radial-gradient(circle at 20% 75%, rgb(21 154 143 / 22%), transparent 24rem), var(--navy-950);
  color: #fff;
}

.sign-in-story::after {
  position: absolute;
  right: -8rem;
  bottom: -8rem;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 50%;
  box-shadow:
    0 0 0 5rem rgb(255 255 255 / 2%),
    0 0 0 10rem rgb(255 255 255 / 2%);
  content: "";
}

.brand-lockup,
.mobile-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-lockup > span:last-child {
  display: grid;
}

.brand-lockup strong {
  font-size: 1.1rem;
}

.brand-lockup small {
  margin-top: 0.12rem;
  color: #9fb5ca;
  font-size: 0.72rem;
}

.story-content {
  position: relative;
  z-index: 1;
  max-width: 49rem;
  margin: auto 0;
}

.story-content h1 {
  max-width: 46rem;
  margin: 1.5rem 0;
  font-size: clamp(3rem, 5.4vw, 5.5rem);
  font-weight: 680;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.story-content > p {
  max-width: 43rem;
  color: #c4d5e5;
  font-size: 1.12rem;
  line-height: 1.7;
}

.story-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.story-signals span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  background: rgb(255 255 255 / 6%);
  color: #dfebf6;
  font-size: 0.78rem;
  font-weight: 700;
}

.sign-in-story footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  color: #90a8bf;
  font-size: 0.72rem;
}

.sign-in-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 7vw, 6rem);
}

.mobile-brand {
  display: none;
  margin-bottom: 3rem;
}

.auth-form-wrap {
  width: min(100%, 27rem);
  margin: auto;
}

.auth-eyebrow,
.section-eyebrow,
.card-kicker {
  color: var(--blue-700);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-form-wrap h1 {
  margin: 0.65rem 0;
  color: var(--navy-950);
  font-size: 2rem;
  letter-spacing: -0.035em;
}

.auth-form-wrap > p {
  margin-bottom: 2rem;
  color: var(--ink-600);
  line-height: 1.6;
}

.auth-form-wrap form {
  display: grid;
  gap: 1.15rem;
}

.label-row {
  display: flex;
  min-height: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.inline-link {
  font-size: 0.78rem;
}

.form-error,
.form-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.45;
}

.form-error {
  background: var(--red-100);
  color: #861b27;
}

.form-notice {
  background: var(--teal-100);
  color: #075f58;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.2rem 0;
  color: var(--ink-600);
  font-size: 0.72rem;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.auth-help {
  margin-top: 1.5rem !important;
  text-align: center;
  font-size: 0.78rem;
}

.auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 2rem auto 0;
  color: var(--ink-600);
  font-size: 0.72rem;
}

.back-link {
  margin: 0 0 2rem -0.25rem;
}

.icon-back {
  transform: rotate(180deg);
}

/* Shell */

.application {
  min-height: 100vh;
  background: var(--canvas);
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: 16.5rem;
  flex-direction: column;
  padding: 1.25rem 0.9rem;
  background: var(--navy-950);
  color: #d8e5f1;
}

.sidebar-brand {
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.7rem;
  padding: 0 0.45rem;
}

.sidebar-brand > span:nth-child(2) {
  display: grid;
}

.sidebar-brand strong {
  color: #fff;
  font-size: 1rem;
}

.sidebar-brand small {
  color: #7891a8;
  font-size: 0.65rem;
}

.mobile-close,
.mobile-menu {
  display: none;
}

.sidebar-context {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1.3rem 0.25rem;
  border: 1px solid rgb(154 184 211 / 14%);
  border-radius: 0.65rem;
  padding: 0.75rem;
  background: rgb(255 255 255 / 4%);
}

.context-avatar,
.workspace-indicator {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.5rem;
  background: #e3f0fd;
  color: #114e89;
  font-size: 0.68rem;
  font-weight: 900;
}

.sidebar-context > span:last-child {
  display: grid;
  min-width: 0;
}

.sidebar-context small {
  color: #7690a8;
  font-size: 0.62rem;
}

.sidebar-context strong {
  overflow: hidden;
  color: #e7f0f8;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar nav {
  display: grid;
  gap: 0.18rem;
}

.nav-section-label {
  margin: 0.6rem 0.65rem 0.4rem;
  color: #68839c;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-admin-label {
  margin-top: 1rem;
}

.sidebar nav button {
  position: relative;
  min-height: 2.7rem;
  justify-content: flex-start;
  border: 0;
  padding: 0.65rem 0.7rem;
  background: transparent;
  color: #a9bed1;
  font-size: 0.79rem;
  font-weight: 650;
}

.sidebar nav button:hover {
  background: rgb(255 255 255 / 6%);
  color: #fff;
}

.sidebar nav button.nav-active {
  background: #173451;
  color: #fff;
  box-shadow: inset 3px 0 #4ebfc4;
}

.sidebar nav button b {
  display: inline-grid;
  min-width: 1.45rem;
  height: 1.3rem;
  margin-left: auto;
  place-items: center;
  border-radius: 999px;
  background: #28445e;
  color: #dce8f2;
  font-size: 0.62rem;
}

.sidebar-footer {
  display: grid;
  gap: 0.45rem;
  margin-top: auto;
  border-top: 1px solid rgb(154 184 211 / 12%);
  padding-top: 1rem;
}

.sidebar-footer > div,
.sidebar-help {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem;
}

.sidebar-footer > div {
  color: #4bd0b9;
}

.sidebar-footer > div span {
  display: grid;
}

.sidebar-footer strong {
  color: #d9ece8;
  font-size: 0.68rem;
}

.sidebar-footer small {
  color: #6f8b9f;
  font-size: 0.6rem;
}

.sidebar-help {
  min-height: 2.4rem;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: #90a9bf;
  font-size: 0.72rem;
}

.sidebar-help:hover {
  background: rgb(255 255 255 / 5%);
}

.workspace-area {
  min-height: 100vh;
  margin-left: 16.5rem;
}

.context-bar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  min-height: 4.4rem;
  grid-template-columns: minmax(12rem, 16rem) minmax(14rem, 32rem) 1fr;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem clamp(1rem, 2.2vw, 2rem);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(12px);
}

.workspace-picker {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.workspace-picker-label {
  display: grid;
  min-width: 0;
}

.workspace-picker-label small {
  color: var(--ink-600);
  font-size: 0.62rem;
}

.workspace-picker-label strong {
  overflow: hidden;
  color: var(--ink-900);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-picker select {
  position: absolute;
  inset: 0;
  min-height: 0;
  opacity: 0;
  cursor: pointer;
}

.picker-chevron {
  margin-left: auto;
  transform: rotate(90deg);
  color: var(--ink-600);
}

.global-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-600);
}

.global-search input {
  min-height: 2.55rem;
  padding-left: 2.35rem;
  padding-right: 3rem;
  background: var(--surface-subtle);
}

.global-search > svg {
  position: absolute;
  z-index: 1;
  left: 0.75rem;
}

.global-search kbd {
  position: absolute;
  right: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  padding: 0.16rem 0.35rem;
  background: #fff;
  color: var(--ink-600);
  font-size: 0.62rem;
  font-weight: 600;
}

.context-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.state-picker select {
  min-height: 2.35rem;
  padding: 0.45rem 1.8rem 0.45rem 0.65rem;
  font-size: 0.7rem;
}

.icon-button {
  position: relative;
  width: 2.5rem;
  min-height: 2.5rem;
  border-color: var(--line);
  padding: 0;
  background: #fff;
  color: var(--ink-700);
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.icon-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  display: grid;
  min-width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--red-700);
  color: #fff;
  font-size: 0.55rem;
}

.profile-button {
  min-height: 2.6rem;
  border: 0;
  padding: 0.2rem;
  background: transparent;
  color: var(--ink-900);
}

.profile-button:hover {
  background: var(--surface-subtle);
}

.profile-button > span:first-child {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-800);
  color: #fff;
  font-size: 0.65rem;
}

.profile-name {
  display: grid;
  text-align: left;
}

.profile-name strong {
  font-size: 0.72rem;
}

.profile-name small {
  max-width: 9rem;
  overflow: hidden;
  color: var(--ink-600);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.profile-button > svg {
  transform: rotate(90deg);
}

.profile-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.65rem);
  right: 0;
  display: grid;
  width: 15rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.65rem;
  background: #fff;
  box-shadow: 0 1rem 2.5rem rgb(16 38 61 / 16%);
}

.profile-menu > strong,
.profile-menu > span {
  padding: 0.25rem 0.45rem;
}

.profile-menu > span {
  overflow: hidden;
  color: var(--ink-600);
  font-size: 0.68rem;
  text-overflow: ellipsis;
}

.profile-menu button {
  min-height: 2.3rem;
  justify-content: flex-start;
  border: 0;
  margin-top: 0.25rem;
  padding: 0.5rem;
  background: transparent;
  color: var(--ink-900);
  font-size: 0.72rem;
}

.profile-menu button:hover {
  background: var(--surface-subtle);
}

.mobile-view-title {
  display: none;
}

.main-canvas {
  width: min(100%, 100rem);
  min-height: calc(100vh - 4.4rem);
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 2.5rem);
}

.main-canvas:focus {
  outline: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  margin: 0.2rem 0 0;
  color: var(--navy-950);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  letter-spacing: -0.025em;
}

.main-canvas > .section-heading h2 {
  font-size: clamp(2rem, 3vw, 2.7rem);
  letter-spacing: -0.045em;
}

.section-heading p {
  max-width: 50rem;
  margin: 0.35rem 0 0;
  color: var(--ink-600);
  font-size: 0.85rem;
  line-height: 1.55;
}

.heading-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.6rem;
}

.screen-content {
  display: grid;
  gap: 1.5rem;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.2rem;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(17 38 59 / 3%);
}

/* Status and common data components */

.status-label {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 1.55rem;
  align-items: center;
  gap: 0.32rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.status-neutral {
  border-color: #c8d7e5;
  background: #eaf1f7;
  color: #31546f;
}

.status-positive {
  border-color: #b1e2db;
  background: var(--teal-100);
  color: #06665e;
}

.status-warning {
  border-color: #f0ce89;
  background: var(--amber-100);
  color: #784100;
}

.status-urgent {
  border-color: #f1b5bc;
  background: var(--red-100);
  color: #8e1d29;
}

.status-ai {
  border-color: #d7c2ef;
  background: var(--purple-100);
  color: #59328f;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(10rem, 1fr));
  gap: 0.75rem;
}

.metric-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  padding: 0.9rem;
  background: #fff;
}

.metric-card-top {
  display: flex;
  min-height: 2rem;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
}

.metric-card-top > span:first-child {
  color: var(--ink-600);
  font-size: 0.66rem;
  font-weight: 750;
}

.metric-card > strong {
  display: block;
  margin: 0.3rem 0 0;
  color: var(--navy-950);
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.metric-card small {
  color: var(--ink-600);
  font-size: 0.61rem;
}

.mini-chart {
  display: block;
  width: 100%;
  margin: 0.25rem 0;
  overflow: visible;
}

.mini-chart polyline {
  fill: none;
  stroke: var(--blue-600);
  stroke-width: 2;
}

.mini-chart.chart-positive polyline {
  stroke: var(--teal-700);
}

.mini-chart.chart-warning polyline {
  stroke: var(--amber-800);
}

.mini-chart.chart-urgent polyline {
  stroke: var(--red-700);
}

.mini-chart.chart-ai polyline {
  stroke: var(--purple-700);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.75rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-subtle);
  color: var(--ink-600);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f8fafc;
}

.align-right {
  text-align: right;
}

.primary-cell {
  display: grid;
  gap: 0.2rem;
  min-width: 11rem;
}

.primary-cell strong,
.primary-cell span {
  color: var(--ink-900);
}

.primary-cell small {
  color: var(--ink-600);
}

.table-link {
  display: grid;
  min-height: auto;
  justify-content: flex-start;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink-900);
  text-align: left;
}

.table-link:hover {
  background: transparent;
  color: var(--blue-700);
}

.table-link small {
  margin-top: 0.2rem;
  color: var(--ink-600);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.65rem;
  background: #fff;
}

.search-control {
  position: relative;
  display: flex;
  min-width: min(100%, 18rem);
  flex: 1;
  align-items: center;
}

.search-control svg {
  position: absolute;
  left: 0.7rem;
  color: var(--ink-600);
}

.search-control input {
  min-height: 2.55rem;
  padding-left: 2.2rem;
  background: var(--surface-subtle);
}

.filter-select {
  width: auto;
}

.filter-select select {
  min-width: 8.5rem;
  min-height: 2.55rem;
  padding: 0.5rem 1.7rem 0.5rem 0.65rem;
  font-size: 0.72rem;
}

.loading-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.skeleton-card {
  display: grid;
  min-height: 9rem;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 1rem;
  background: #fff;
}

.skeleton-card span {
  height: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8eef3, #f6f8fa, #e8eef3);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

.skeleton-card span:nth-child(2) {
  width: 60%;
  height: 2.2rem;
}

.skeleton-card span:nth-child(3) {
  width: 80%;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.empty-state {
  display: grid;
  min-height: 24rem;
  place-items: center;
  align-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: 0.75rem;
  padding: 2rem;
  background: #fff;
  text-align: center;
}

.empty-icon,
.error-state > span {
  display: grid;
  width: 3.3rem;
  height: 3.3rem;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-700);
}

.empty-state h3 {
  margin: 1rem 0 0.35rem;
}

.empty-state p {
  max-width: 28rem;
  color: var(--ink-600);
  line-height: 1.55;
}

.error-state {
  display: flex;
  min-height: 12rem;
  align-items: center;
  gap: 1rem;
  border: 1px solid #efbdc2;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: #fff8f8;
}

.error-state > span {
  background: var(--red-100);
  color: var(--red-700);
}

.error-state h3 {
  margin: 0;
}

.error-state p {
  margin: 0.35rem 0 0;
  color: var(--ink-600);
}

.error-state button {
  margin-left: auto;
}

/* Command centre */

.brief-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: flex-start;
  overflow: hidden;
  border: 1px solid #cfc0e5;
  border-radius: 0.8rem;
  padding: 1.25rem;
  background: radial-gradient(circle at 100% 0%, rgb(105 65 165 / 13%), transparent 22rem), #fbf9fe;
}

.brief-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--purple-700);
  content: "";
}

.brief-icon,
.action-icon,
.risk-symbol,
.assurance-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.62rem;
  background: var(--purple-100);
  color: var(--purple-700);
}

.brief-card h3 {
  margin: 0.35rem 0;
  font-size: 1.05rem;
}

.brief-card p {
  max-width: 75rem;
  margin-bottom: 0.75rem;
  color: var(--ink-700);
  font-size: 0.82rem;
  line-height: 1.55;
}

.brief-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  color: var(--ink-600);
  font-size: 0.66rem;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(15rem, 0.8fr);
  gap: 1rem;
}

.equal-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack-list,
.approval-list,
.compact-coverage {
  display: grid;
}

.risk-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  min-height: 4.6rem;
  gap: 0.75rem;
  align-items: center;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 0.75rem 0.25rem;
  background: transparent;
  color: var(--ink-900);
  text-align: left;
}

.risk-row:hover {
  background: var(--surface-subtle);
}

.risk-symbol {
  width: 2.1rem;
  height: 2.1rem;
}

.risk-symbol-urgent {
  background: var(--red-100);
  color: var(--red-700);
}

.risk-symbol-warning {
  background: var(--amber-100);
  color: var(--amber-800);
}

.risk-row > span:nth-child(2),
.risk-owner {
  display: grid;
  gap: 0.25rem;
}

.risk-row strong {
  font-size: 0.78rem;
}

.risk-row small {
  color: var(--ink-600);
  font-size: 0.65rem;
  font-weight: 500;
}

.risk-owner {
  justify-items: end;
}

.sla-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.ring-progress {
  display: grid;
  width: 7rem;
  height: 7rem;
  place-content: center;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, white 76%, transparent 77% 99%),
    conic-gradient(var(--amber-800) 91.4%, #e5ebf0 0);
  text-align: center;
}

.ring-progress span {
  font-size: 1.3rem;
  font-weight: 850;
}

.ring-progress small {
  color: var(--ink-600);
  font-size: 0.6rem;
}

.sla-score > div:last-child {
  display: grid;
  gap: 0.45rem;
  color: var(--ink-600);
  font-size: 0.7rem;
}

.sla-score > div:last-child strong {
  color: var(--red-700);
}

.approval-list article {
  display: grid;
  gap: 0.35rem;
  border-top: 1px solid var(--line);
  padding: 0.75rem 0;
}

.approval-list article > strong {
  font-size: 0.78rem;
}

.approval-list article > small,
.approval-list article > div > span {
  color: var(--ink-600);
  font-size: 0.64rem;
}

.approval-list article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.channel-chip,
.tag-list span {
  width: max-content;
  border-radius: 0.28rem;
  padding: 0.2rem 0.4rem;
  background: var(--surface-subtle);
  color: var(--ink-700);
  font-size: 0.58rem;
  font-weight: 750;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.action-grid > button,
.template-grid > button {
  min-height: 5rem;
  justify-content: flex-start;
  border-color: var(--line);
  padding: 0.85rem;
  background: #fff;
  color: var(--ink-900);
  text-align: left;
}

.action-grid > button:hover,
.template-grid > button:hover {
  border-color: #9db6cb;
  background: #f8fafc;
}

.action-grid button > span:nth-child(2),
.template-grid button > span {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.action-grid strong,
.template-grid strong {
  font-size: 0.75rem;
}

.action-grid small,
.template-grid small {
  color: var(--ink-600);
  font-size: 0.6rem;
}

.action-grid button > svg:last-child,
.template-grid button > svg:last-child {
  margin-left: auto;
  color: var(--ink-600);
}

.action-icon {
  width: 2.1rem;
  height: 2.1rem;
  background: var(--blue-100);
  color: var(--blue-700);
}

.action-positive {
  background: var(--teal-100);
  color: var(--teal-700);
}

.action-urgent {
  background: var(--red-100);
  color: var(--red-700);
}

.action-ai {
  background: var(--purple-100);
  color: var(--purple-700);
}

.opportunity-panel > article {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}

.opportunity-panel h3 {
  margin: 0.6rem 0 0.25rem;
  font-size: 0.9rem;
}

.opportunity-panel p {
  color: var(--ink-600);
  font-size: 0.72rem;
  line-height: 1.5;
}

.compact-coverage > button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 4rem;
  gap: 0.65rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 0.65rem 0;
  background: transparent;
  color: var(--ink-900);
  text-align: left;
}

.compact-coverage > button:hover {
  background: var(--surface-subtle);
}

.source-mark {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.45rem;
  background: var(--navy-800);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 900;
}

.compact-coverage button > span:nth-child(2) {
  display: grid;
  gap: 0.25rem;
}

.compact-coverage strong {
  font-size: 0.72rem;
  line-height: 1.35;
}

.compact-coverage small {
  color: var(--ink-600);
  font-size: 0.6rem;
}

/* Listen and media */

.analysis-grid,
.media-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.7fr);
  gap: 1rem;
}

.volume-chart {
  width: 100%;
  min-height: 12rem;
}

.volume-chart line {
  stroke: #dce5ed;
  stroke-width: 1;
}

.volume-chart polyline {
  fill: none;
  stroke-width: 3;
}

.line-total {
  stroke: var(--blue-600);
}

.line-negative {
  stroke: var(--red-700);
}

.chart-point {
  fill: var(--red-700);
  stroke: #fff;
  stroke-width: 3;
}

.volume-chart text {
  fill: var(--red-700);
  font-size: 11px;
  font-weight: 800;
}

.chart-legend {
  display: flex;
  gap: 1rem;
  color: var(--ink-600);
  font-size: 0.65rem;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chart-legend i {
  width: 0.7rem;
  height: 0.18rem;
  border-radius: 999px;
}

.legend-blue {
  background: var(--blue-600);
}

.legend-red {
  background: var(--red-700);
}

.narrative-panel > button {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 3.7rem;
  gap: 0.5rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 0.65rem 0;
  background: transparent;
  color: var(--ink-900);
  text-align: left;
}

.narrative-panel > button:hover {
  background: var(--surface-subtle);
}

.narrative-panel > button > span:first-child {
  display: grid;
  gap: 0.2rem;
}

.narrative-panel strong {
  font-size: 0.7rem;
}

.narrative-panel small {
  color: var(--ink-600);
  font-size: 0.6rem;
}

.result-count {
  color: var(--ink-600);
  font-size: 0.72rem;
}

.mention-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.mention-card {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  padding: 1rem;
  background: #fff;
}

.mention-source {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.6rem;
}

.mention-source > div {
  display: grid;
  min-width: 0;
}

.mention-source > div strong {
  font-size: 0.72rem;
}

.mention-source > div span {
  color: var(--ink-600);
  font-size: 0.58rem;
}

.mention-source > .status-label {
  margin-left: auto;
}

.mention-card h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.mention-card > p {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.72rem;
  line-height: 1.55;
}

.mention-meta,
.mention-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.mention-meta {
  color: var(--ink-600);
  font-size: 0.6rem;
}

.mention-footer {
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #fff;
}

.summary-stat {
  display: grid;
  gap: 0.25rem;
  border-right: 1px solid var(--line);
  padding: 1rem;
}

.summary-stat:last-child {
  border-right: 0;
}

.summary-stat > span {
  color: var(--ink-600);
  font-size: 0.62rem;
  font-weight: 700;
}

.summary-stat strong {
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.summary-stat small {
  color: var(--ink-600);
  font-size: 0.6rem;
}

.province-bars,
.message-bars {
  display: grid;
  gap: 0.8rem;
}

.province-bars > div {
  display: grid;
  grid-template-columns: 7rem 1fr 2rem;
  gap: 0.6rem;
  align-items: center;
  color: var(--ink-700);
  font-size: 0.68rem;
}

.province-bars > div > div {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef4;
}

.province-bars i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue-600);
}

.province-bars strong {
  text-align: right;
}

.progress-row {
  display: grid;
  gap: 0.4rem;
}

.progress-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-700);
  font-size: 0.67rem;
}

.progress-track {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf2;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue-600);
}

.progress-positive span {
  background: var(--teal-700);
}

.progress-warning span {
  background: var(--amber-800);
}

.progress-urgent span {
  background: var(--red-700);
}

/* Inbox */

.inbox-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.status-count {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.8rem;
  background: #fff;
}

.status-count strong {
  font-size: 1.2rem;
}

.status-count span {
  color: var(--ink-600);
  font-size: 0.65rem;
  font-weight: 700;
}

.count-warning {
  border-left: 4px solid var(--amber-800);
}

.count-urgent {
  border-left: 4px solid var(--red-700);
}

.count-ai {
  border-left: 4px solid var(--purple-700);
}

.count-positive {
  border-left: 4px solid var(--teal-700);
}

.inbox-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.72fr) minmax(28rem, 1.28fr);
  gap: 1rem;
}

.case-list {
  padding: 0;
}

.case-list > button {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 0;
  padding: 0.85rem;
  background: #fff;
  color: var(--ink-900);
  text-align: left;
}

.case-list > button:hover,
.case-list > button.selected-case {
  border-left-color: var(--blue-600);
  background: #f1f7fc;
}

.avatar {
  display: inline-grid;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.7rem;
  font-weight: 850;
}

.case-list button > span:nth-child(2) {
  display: grid;
  gap: 0.23rem;
}

.case-title {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
}

.case-list strong,
.case-list b {
  font-size: 0.7rem;
}

.case-list b {
  font-weight: 700;
}

.case-list small {
  color: var(--ink-600);
  font-size: 0.58rem;
}

.case-status {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.conversation-header h2 {
  margin: 0.3rem 0;
  font-size: 1.1rem;
}

.conversation-header p {
  margin: 0;
  color: var(--ink-600);
  font-size: 0.65rem;
}

.message-thread {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0;
}

.message-thread article {
  display: flex;
  gap: 0.65rem;
}

.message-thread article > div {
  max-width: 75%;
  border-radius: 0.65rem;
  padding: 0.75rem;
  background: var(--surface-subtle);
}

.message-thread strong {
  font-size: 0.68rem;
}

.message-thread time {
  margin-left: 0.5rem;
  color: var(--ink-600);
  font-size: 0.58rem;
}

.message-thread p {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  line-height: 1.5;
}

.message-thread .internal-note {
  flex-direction: row-reverse;
}

.message-thread .internal-note > div {
  background: var(--amber-100);
}

.ai-suggestion {
  border: 1px solid #d8c6ec;
  border-radius: 0.65rem;
  padding: 0.85rem;
  background: #fbf8fe;
}

.ai-suggestion > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--purple-700);
  font-size: 0.7rem;
}

.ai-suggestion .status-label {
  margin-left: auto;
}

.ai-suggestion p {
  margin: 0.65rem 0;
  font-size: 0.73rem;
  line-height: 1.5;
}

.ai-suggestion small {
  color: var(--ink-600);
  font-size: 0.58rem;
}

.response-composer {
  margin-top: 1rem;
}

.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

/* Publish */

.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.segmented-control {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 0.55rem;
  padding: 0.2rem;
  background: #fff;
}

.segmented-control button {
  min-height: 2rem;
  border: 0;
  padding: 0.35rem 0.75rem;
  background: transparent;
  color: var(--ink-700);
  font-size: 0.66rem;
}

.segmented-control button:hover,
.segmented-control button.active {
  background: var(--navy-800);
  color: #fff;
}

.calendar-panel {
  padding: 0;
}

.calendar-days {
  display: grid;
  min-width: 60rem;
  grid-template-columns: repeat(5, 1fr);
}

.calendar-days > section {
  min-height: 29rem;
  border-right: 1px solid var(--line);
  padding: 0.65rem;
  background: #fff;
}

.calendar-days > section:last-child {
  border-right: 0;
}

.calendar-days > section.today {
  background: #f5f9fd;
}

.calendar-days section > header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0.2rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 850;
}

.calendar-days header small {
  color: var(--blue-700);
}

.calendar-event {
  display: grid;
  width: 100%;
  min-height: 7rem;
  justify-content: stretch;
  gap: 0.35rem;
  border: 1px solid #c9d9e6;
  border-left: 4px solid var(--blue-600);
  margin-top: 0.6rem;
  padding: 0.65rem;
  background: #f5f9fd;
  color: var(--ink-900);
  text-align: left;
}

.calendar-event:hover {
  background: #eaf3fb;
}

.calendar-event.event-positive {
  border-left-color: var(--teal-700);
  background: #f0faf8;
}

.calendar-event.event-warning {
  border-left-color: var(--amber-800);
  background: #fff9ea;
}

.calendar-event.event-urgent {
  border-left-color: var(--red-700);
  background: #fff5f6;
}

.calendar-event time,
.calendar-event small {
  color: var(--ink-600);
  font-size: 0.57rem;
}

.calendar-event strong {
  font-size: 0.69rem;
  line-height: 1.35;
}

.calendar-event .status-label {
  margin-top: 0.25rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: 0.31rem;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 0.7rem 4rem 1fr;
  gap: 0.6rem;
  padding: 0.65rem 0;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.2rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue-600);
  box-shadow: 0 0 0 1px var(--blue-600);
}

.marker-positive {
  background: var(--teal-700);
  box-shadow: 0 0 0 1px var(--teal-700);
}

.marker-warning {
  background: var(--amber-800);
  box-shadow: 0 0 0 1px var(--amber-800);
}

.marker-ai {
  background: var(--purple-700);
  box-shadow: 0 0 0 1px var(--purple-700);
}

.timeline time {
  color: var(--ink-600);
  font-size: 0.61rem;
}

.timeline strong {
  font-size: 0.7rem;
}

.timeline p {
  margin: 0.2rem 0 0;
  color: var(--ink-600);
  font-size: 0.62rem;
  line-height: 1.4;
}

/* Archive */

.archive-assurance {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #b5dfd9;
  border-radius: 0.7rem;
  padding: 0.85rem 1rem;
  background: #effaf8;
}

.assurance-icon {
  width: 2.2rem;
  height: 2.2rem;
  background: var(--teal-100);
  color: var(--teal-700);
}

.archive-assurance > div {
  display: grid;
  gap: 0.2rem;
}

.archive-assurance strong {
  font-size: 0.78rem;
}

.archive-assurance p {
  margin: 0;
  color: var(--ink-600);
  font-size: 0.64rem;
}

.archive-assurance .status-label {
  margin-left: auto;
}

.retention-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.retention-grid .summary-stat:nth-child(2n) {
  border-right: 0;
}

.retention-grid .summary-stat:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

/* KPI */

.kpi-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.7fr) minmax(25rem, 1.3fr);
  gap: 1rem;
}

.kpi-list > button {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.6rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 0.8rem 0.3rem;
  background: #fff;
  color: var(--ink-900);
  text-align: left;
}

.kpi-list > button:hover,
.kpi-list > button.selected-kpi {
  background: #f2f7fb;
}

.kpi-list button > span:first-child {
  display: grid;
  gap: 0.25rem;
}

.kpi-list strong {
  font-size: 0.75rem;
}

.kpi-list small {
  color: var(--ink-600);
  font-size: 0.61rem;
  line-height: 1.4;
}

.kpi-detail > h2 {
  margin: 0.4rem 0;
}

.kpi-detail > p {
  color: var(--ink-600);
  font-size: 0.76rem;
}

.definition-grid,
.evidence-metadata {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin: 1rem 0;
}

.definition-grid > div,
.evidence-metadata > div {
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.75rem;
  background: var(--surface-subtle);
}

.definition-grid dt,
.evidence-metadata dt {
  color: var(--ink-600);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.definition-grid dd,
.evidence-metadata dd {
  margin: 0.35rem 0 0;
  color: var(--ink-900);
  font-size: 0.68rem;
  line-height: 1.45;
}

.formula-breakdown {
  display: grid;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

/* Reports */

.report-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.5fr);
  gap: 2rem;
  overflow: hidden;
  border-radius: 0.8rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background:
    radial-gradient(circle at 90% 0%, rgb(48 118 184 / 35%), transparent 24rem), var(--navy-900);
  color: #fff;
}

.report-feature > div:first-child {
  align-self: center;
}

.report-feature .card-kicker {
  display: block;
  margin: 1.2rem 0 0.5rem;
  color: #82c6ff;
}

.report-feature h2 {
  max-width: 42rem;
  margin-bottom: 0.6rem;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.report-feature p {
  max-width: 42rem;
  color: #c1d2e2;
  font-size: 0.78rem;
  line-height: 1.6;
}

.report-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.report-feature .button-secondary {
  border-color: #5c7690;
  background: transparent;
  color: #fff;
}

.report-feature .button-secondary:hover {
  background: rgb(255 255 255 / 8%);
}

.report-preview {
  display: grid;
  min-height: 18rem;
  align-content: center;
  border-radius: 0.4rem;
  padding: 1.5rem;
  background: #fff;
  color: var(--ink-900);
  box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 25%);
  transform: rotate(1.5deg);
}

.report-preview > span {
  color: var(--blue-700);
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.report-preview > strong {
  margin-top: 0.35rem;
  font-size: 1.1rem;
}

.report-preview > div {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: end;
  gap: 0.4rem;
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}

.report-preview b {
  font-size: 1.2rem;
}

.report-preview small {
  color: var(--ink-600);
  font-size: 0.55rem;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.template-grid > button > svg:first-child {
  color: var(--blue-700);
}

/* Settings */

.settings-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 0.35fr) minmax(28rem, 1.65fr);
  gap: 1rem;
  align-items: start;
}

.settings-nav {
  display: grid;
  padding: 0.55rem;
}

.settings-nav button {
  min-height: 2.75rem;
  justify-content: flex-start;
  border: 0;
  padding: 0.65rem;
  background: #fff;
  color: var(--ink-700);
  font-size: 0.7rem;
}

.settings-nav button:hover,
.settings-nav button.active {
  background: var(--blue-100);
  color: #104d91;
}

.settings-nav button svg:last-child {
  margin-left: auto;
}

.settings-form {
  display: grid;
  gap: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

fieldset {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 1rem;
}

legend {
  padding: 0 0.4rem;
  color: var(--ink-900);
  font-size: 0.75rem;
  font-weight: 850;
}

.check-control {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.check-control input {
  width: 1rem;
  min-height: 1rem;
  margin-top: 0.15rem;
  accent-color: var(--blue-700);
}

.check-control span {
  display: grid;
  gap: 0.2rem;
}

.check-control small {
  color: var(--ink-600);
  font-weight: 500;
}

.connector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.connector-grid article {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.65rem;
}

.connector-grid article > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.connector-grid strong {
  font-size: 0.7rem;
}

.connector-grid small {
  color: var(--ink-600);
  font-size: 0.56rem;
}

.connector-grid .status-label {
  margin-left: auto;
}

/* Drawer and modal */

.drawer-scrim,
.navigation-scrim {
  position: fixed;
  z-index: 69;
  inset: 0;
  width: 100%;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: rgb(7 19 33 / 45%);
}

.evidence-drawer {
  position: fixed;
  z-index: 70;
  inset: 0 0 0 auto;
  width: min(30rem, 92vw);
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -1.5rem 0 4rem rgb(7 19 33 / 18%);
  transform: translateX(105%);
  transition: transform 180ms ease;
  visibility: hidden;
}

.evidence-drawer.drawer-open {
  transform: translateX(0);
  visibility: visible;
}

.evidence-drawer > header,
.modal > header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  background: rgb(255 255 255 / 96%);
}

.evidence-drawer h2,
.modal h2 {
  margin: 0.3rem 0 0;
  font-size: 1rem;
  line-height: 1.35;
}

.drawer-body {
  display: grid;
  gap: 1.2rem;
  padding: 1rem;
}

.drawer-status {
  display: flex;
  gap: 0.5rem;
}

.evidence-source-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.75rem;
  background: var(--surface-subtle);
}

.evidence-source-card > div {
  display: grid;
  gap: 0.2rem;
}

.evidence-source-card strong {
  font-size: 0.75rem;
}

.evidence-source-card span {
  color: var(--ink-600);
  font-size: 0.62rem;
}

.drawer-body blockquote {
  margin: 0;
  border-left: 4px solid var(--blue-600);
  padding: 0.8rem;
  background: #f3f8fc;
  color: var(--ink-700);
  font-size: 0.75rem;
  line-height: 1.55;
}

.drawer-body section h3 {
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}

.drawer-body section > p {
  color: var(--ink-600);
  font-size: 0.7rem;
  line-height: 1.5;
}

.drawer-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.modal {
  width: min(34rem, calc(100% - 2rem));
  max-height: min(48rem, calc(100vh - 2rem));
  overflow: auto;
  border: 0;
  border-radius: 0.8rem;
  padding: 0;
  color: var(--ink-900);
  box-shadow: 0 2rem 5rem rgb(7 19 33 / 32%);
}

.modal::backdrop {
  background: rgb(7 19 33 / 65%);
}

.modal header {
  position: static;
}

.modal header p {
  margin: 0.3rem 0 0;
  color: var(--ink-600);
  font-size: 0.7rem;
  line-height: 1.45;
}

.action-form {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* Responsive */

@media (max-width: 1250px) {
  .metric-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .action-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .context-bar {
    grid-template-columns: minmax(11rem, 14rem) minmax(12rem, 1fr) auto;
  }

  .profile-name,
  .state-picker {
    display: none;
  }
}

@media (max-width: 980px) {
  .sidebar {
    width: 15.5rem;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .sidebar.sidebar-open {
    z-index: 80;
    transform: translateX(0);
  }

  .mobile-close {
    display: inline-flex;
    width: 2.2rem;
    min-height: 2.2rem;
    border: 0;
    margin-left: auto;
    padding: 0;
    background: transparent;
    color: #dce8f3;
  }

  .navigation-scrim {
    z-index: 75;
  }

  .workspace-area {
    margin-left: 0;
  }

  .context-bar {
    grid-template-columns: auto minmax(10rem, 14rem) minmax(12rem, 1fr) auto;
  }

  .mobile-menu {
    display: inline-flex;
    width: 2.5rem;
    min-height: 2.5rem;
    border-color: var(--line);
    padding: 0;
    background: #fff;
    color: var(--ink-900);
  }

  .dashboard-columns,
  .analysis-grid,
  .media-insight-grid,
  .kpi-layout {
    grid-template-columns: 1fr;
  }

  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inbox-layout {
    grid-template-columns: minmax(15rem, 0.7fr) minmax(25rem, 1.3fr);
    overflow-x: auto;
  }

  .sign-in-page {
    grid-template-columns: minmax(25rem, 0.9fr) minmax(26rem, 1.1fr);
  }

  .sign-in-story {
    padding: 2.5rem;
  }

  .story-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
  }
}

@media (max-width: 720px) {
  .sign-in-page {
    display: block;
  }

  .sign-in-story {
    display: none;
  }

  .sign-in-panel {
    min-height: 100vh;
    justify-content: flex-start;
    padding: 1.5rem;
  }

  .mobile-brand {
    display: flex;
  }

  .auth-form-wrap {
    margin: 1rem auto auto;
  }

  .context-bar {
    min-height: 3.8rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.55rem 0.75rem;
  }

  .workspace-picker {
    justify-self: start;
  }

  .workspace-picker-label small,
  .global-search,
  .context-actions > .icon-button {
    display: none;
  }

  .profile-button > svg {
    display: none;
  }

  .profile-menu {
    top: calc(100% + 0.4rem);
  }

  .mobile-view-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 0.8rem;
    background: #fff;
    color: var(--ink-700);
    font-size: 0.7rem;
    font-weight: 800;
  }

  .main-canvas {
    padding: 1rem 0.75rem 5rem;
  }

  .main-canvas > .section-heading {
    display: grid;
  }

  .main-canvas > .section-heading h2 {
    font-size: 1.8rem;
  }

  .section-heading {
    align-items: flex-start;
  }

  .heading-actions {
    flex-wrap: wrap;
  }

  .heading-actions button {
    flex: 1;
  }

  .brief-card {
    grid-template-columns: auto 1fr;
  }

  .brief-card > .button-text {
    grid-column: 2;
    justify-self: start;
  }

  .metric-grid,
  .inbox-stats {
    display: flex;
    margin-right: -0.75rem;
    padding-right: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .metric-card {
    min-width: 12rem;
    scroll-snap-align: start;
  }

  .status-count {
    min-width: 8.5rem;
  }

  .equal-columns,
  .mention-grid,
  .settings-layout,
  .report-feature {
    grid-template-columns: 1fr;
  }

  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-bar {
    align-items: stretch;
  }

  .search-control {
    flex-basis: 100%;
  }

  .filter-select {
    flex: 1;
  }

  .filter-select select {
    min-width: 100%;
  }

  .filter-bar > .button-secondary {
    flex: 1;
  }

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-stat:nth-child(2) {
    border-right: 0;
  }

  .summary-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .inbox-layout {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .conversation-panel {
    display: none;
  }

  .calendar-toolbar {
    flex-wrap: wrap;
  }

  .calendar-panel {
    overflow-x: auto;
  }

  .report-feature {
    gap: 1rem;
  }

  .report-preview {
    min-height: 13rem;
    transform: none;
  }

  .form-grid,
  .connector-grid,
  .definition-grid,
  .evidence-metadata {
    grid-template-columns: 1fr;
  }

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

  .settings-nav {
    display: flex;
    overflow-x: auto;
  }

  .settings-nav button {
    min-width: max-content;
  }

  .settings-nav button svg:last-child {
    display: none;
  }

  .error-state {
    display: grid;
    justify-items: start;
  }

  .error-state button {
    margin-left: 0;
  }

  .drawer-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .workspace-indicator {
    width: 1.8rem;
    height: 1.8rem;
  }

  .workspace-picker-label strong {
    max-width: 8rem;
  }

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

  .brief-icon {
    display: none;
  }

  .brief-card {
    grid-template-columns: 1fr;
  }

  .brief-card > .button-text {
    grid-column: 1;
  }

  .risk-row {
    grid-template-columns: auto 1fr auto;
  }

  .risk-owner {
    grid-column: 2;
    justify-items: start;
  }

  .risk-row > svg {
    grid-column: 3;
    grid-row: 1;
  }

  .sla-score {
    align-items: flex-start;
  }

  .ring-progress {
    width: 6rem;
    height: 6rem;
  }

  .mention-footer {
    display: grid;
  }

  .mention-footer .button-text {
    justify-self: start;
  }

  .calendar-days {
    min-width: 52rem;
  }
}
