:root {
  --ink: #142421;
  --ink-soft: #566763;
  --ink-faint: #82908d;
  --paper: #f6f7f3;
  --surface: #ffffff;
  --surface-soft: #f0f3ee;
  --line: #dfe5df;
  --line-dark: #cbd5cd;
  --forest: #0c1d1b;
  --forest-2: #14302b;
  --teal: #177d69;
  --teal-bright: #4cc9a5;
  --mint: #dff5ec;
  --amber: #e79f37;
  --amber-soft: #fff0d5;
  --coral: #d96854;
  --coral-soft: #fde9e5;
  --blue: #4d78ba;
  --blue-soft: #e9f0fb;
  --shadow: 0 14px 40px rgba(22, 45, 39, 0.07);
  --shadow-deep: 0 24px 70px rgba(2, 20, 16, 0.18);
  --radius: 18px;
  --radius-sm: 11px;
  --sidebar: 252px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0%, rgba(87, 180, 151, 0.06), transparent 28rem),
    var(--paper);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

button {
  cursor: pointer;
}

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

h1,
h2,
h3 {
  letter-spacing: -0.025em;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  color: #dfece7;
  overflow-y: auto;
  background:
    linear-gradient(155deg, rgba(68, 164, 136, 0.12), transparent 38%),
    var(--forest);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand > span:last-child {
  display: grid;
  line-height: 1.15;
}

.brand strong {
  color: #fff;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.brand small {
  margin-top: 4px;
  color: #8fb2a8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
}

.brand-mark span {
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(106, 222, 188, 0.32);
  border-radius: inherit;
}

.brand-mark span:nth-child(2) {
  inset: 9px;
  border-color: rgba(106, 222, 188, 0.55);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 5px;
  width: 2px;
  height: 15px;
  background: var(--amber);
  border-radius: 2px;
  transform: rotate(48deg);
  transform-origin: bottom;
}

.brand-mark i {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(231, 159, 55, 0.55);
}

.main-nav {
  display: grid;
  gap: 5px;
  margin-top: 48px;
}

.main-nav > a {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 44px;
  padding: 0 13px;
  color: #9eb6af;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  transition: 160ms ease;
}

.main-nav > a:hover {
  color: #e5f3ee;
  background: rgba(255, 255, 255, 0.045);
}

.main-nav > a.active {
  color: #fff;
  background: rgba(81, 198, 166, 0.13);
  border-color: rgba(91, 210, 177, 0.13);
}

.main-nav > a.active::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: auto;
  background: var(--teal-bright);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--teal-bright);
}

.nav-icon {
  width: 23px;
  color: #72aa9a;
  font-size: 18px;
  text-align: center;
}

.nav-section-label {
  margin: 28px 13px 8px;
  color: #58766e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 30px;
}

.agent-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
}

.agent-state > span:last-child {
  display: grid;
}

.agent-state strong {
  font-size: 11px;
  font-weight: 700;
}

.agent-state small {
  color: #728e86;
  font-size: 9px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #60d6a8;
  border: 2px solid rgba(96, 214, 168, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(96, 214, 168, 0.08);
}

.user-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-radius: 11px;
  transition: 160ms ease;
}

.user-tile:hover {
  background: rgba(255, 255, 255, 0.045);
}

.avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: #d9fff3;
  background: linear-gradient(145deg, #267963, #174c42);
  border: 1px solid rgba(117, 225, 193, 0.24);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}

.avatar.small {
  width: 31px;
  height: 31px;
}

.avatar.xl {
  width: 76px;
  height: 76px;
  margin: 0 auto;
  border-radius: 22px;
  font-size: 28px;
}

.user-tile-copy {
  min-width: 0;
  display: grid;
  line-height: 1.35;
}

.user-tile-copy strong {
  max-width: 130px;
  overflow: hidden;
  color: #e4f0ec;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-tile-copy small {
  color: #769188;
  font-size: 10px;
}

.user-chevron {
  margin-left: auto;
  color: #648078;
}

.mobile-header,
.sidebar-scrim {
  display: none;
}

.main-content {
  grid-column: 2;
  min-width: 0;
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
  padding: 42px clamp(28px, 4vw, 66px) 70px;
}

.standalone-content {
  width: 100%;
  min-height: 100vh;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.page-header.compact {
  align-items: center;
}

.page-header h1 {
  margin-bottom: 7px;
  font-size: clamp(29px, 3vw, 42px);
  line-height: 1.08;
}

.page-header p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.page-lead {
  margin-top: 15px !important;
  color: var(--ink-soft) !important;
  font-size: 16px;
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--teal);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #70cdb2;
}

.header-actions,
.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.header-actions form,
.inline-actions form {
  margin: 0;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(17, 50, 42, 0.08);
}

.button.primary {
  color: #fff;
  background: var(--forest-2);
  border-color: var(--forest-2);
  box-shadow: 0 9px 20px rgba(15, 51, 44, 0.14);
}

.button.primary:hover {
  background: #19463b;
}

.button.secondary {
  color: #225e50;
  background: #edf7f3;
  border-color: #cce5dc;
}

.button.ghost {
  color: var(--ink-soft);
  background: transparent;
}

.button.danger {
  color: #fff;
  background: #b74e3d;
  border-color: #b74e3d;
}

.button.text-danger {
  color: var(--coral);
  background: transparent;
  border-color: transparent;
}

.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
}

.button.large {
  min-height: 50px;
}

.button.wide {
  width: 100%;
}

.text-link,
.row-link {
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.panel {
  min-width: 0;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #ebefeb;
}

.panel-heading h2 {
  margin-bottom: 3px;
  font-size: 17px;
}

.panel-heading p {
  margin-bottom: 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 22px;
}

.metric-card {
  position: relative;
  min-height: 145px;
  padding: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(22, 45, 39, 0.045);
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -50px;
  width: 105px;
  height: 105px;
  background: rgba(42, 146, 119, 0.05);
  border-radius: 50%;
}

.metric-card.accent-green {
  border-top-color: #72bc8a;
}

.metric-card.accent-amber {
  border-top-color: var(--amber);
}

.metric-card.accent-coral {
  border-top-color: var(--coral);
}

.metric-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.metric-card-top i {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--teal);
  background: var(--mint);
  border-radius: 8px;
  font-style: normal;
}

.metric-card > strong {
  display: block;
  margin: 13px 0 1px;
  font-size: 32px;
  line-height: 1;
}

.metric-card > strong small {
  font-size: 14px;
}

.metric-card > strong.metric-text {
  min-height: 32px;
  font-size: 16px;
  line-height: 1.2;
}

.metric-card > small {
  color: var(--ink-faint);
  font-size: 10px;
}

.compact-metrics .metric-card {
  min-height: 126px;
}

.content-grid {
  display: grid;
  gap: 20px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.75fr);
}

.task-detail-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
}

.source-admin-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.65fr);
  align-items: start;
}

.task-list,
.run-list {
  padding: 5px 10px 12px;
}

.task-row,
.run-row {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 70px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf0ed;
  border-radius: 10px;
  transition: 150ms ease;
}

.task-row:last-child,
.run-row:last-child {
  border-bottom-color: transparent;
}

.task-row:hover,
.run-row:hover {
  background: #f5f8f5;
}

.task-signal {
  position: relative;
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border: 1px solid #cad8d3;
  border-radius: 50%;
}

.task-signal::before,
.task-signal::after {
  content: "";
  position: absolute;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.42;
}

.task-signal::before {
  inset: 6px;
}

.task-signal::after {
  inset: 12px;
  background: currentColor;
}

.task-signal i {
  position: absolute;
  left: 14px;
  top: 3px;
  width: 1px;
  height: 12px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: bottom;
}

.task-signal.on {
  color: var(--teal);
  background: #eff9f5;
  border-color: #bddfd4;
}

.task-signal.off {
  color: #9da7a4;
  background: #f5f6f5;
}

.task-signal.large {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.task-signal.large::before {
  inset: 8px;
}

.task-signal.large::after {
  inset: 17px;
}

.task-signal.large i {
  left: 20px;
  top: 5px;
  height: 15px;
}

.task-row-main,
.run-main {
  min-width: 0;
  display: grid;
  flex: 1;
}

.task-row-main strong,
.run-main strong {
  margin-bottom: 2px;
  font-size: 13px;
}

.task-row-main small,
.run-main small {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row-meta {
  display: grid;
  min-width: 132px;
  text-align: right;
}

.task-row-meta small {
  color: var(--ink-faint);
  font-size: 9px;
}

.task-row-meta strong {
  font-size: 10px;
  font-weight: 600;
}

.row-arrow {
  color: #a5b1ad;
  font-size: 20px;
}

.activity-panel {
  display: flex;
  flex-direction: column;
  padding-bottom: 15px;
}

.activity-panel > .button {
  width: calc(100% - 30px);
  margin: auto 15px 0;
}

.activity-list {
  display: grid;
  padding: 9px 18px 16px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 2px;
  border-bottom: 1px solid #edf0ed;
}

.activity-item > span:last-child {
  display: grid;
}

.activity-item strong {
  font-size: 11px;
}

.activity-item small {
  color: var(--ink-faint);
  font-size: 9px;
}

.status-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  background: #97a39f;
  border-radius: 50%;
}

.status-dot.success {
  background: #43ad7c;
}

.status-dot.warning {
  background: var(--amber);
}

.status-dot.danger {
  background: var(--coral);
}

.status-dot.info {
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.insight-banner {
  display: grid;
  grid-template-columns: auto minmax(250px, 0.8fr) minmax(300px, 1fr);
  align-items: center;
  gap: 20px;
  margin-top: 22px;
  padding: 21px 24px;
  color: #dbece7;
  background:
    linear-gradient(90deg, rgba(79, 195, 162, 0.08), transparent 70%),
    var(--forest);
  border-radius: 15px;
}

.insight-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--amber);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.insight-banner small {
  color: #6e978c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.insight-banner h3 {
  margin: 3px 0 0;
  font-size: 14px;
}

.insight-banner p {
  margin: 0;
  color: #85a49b;
  font-size: 11px;
}

.empty-state {
  display: grid;
  justify-items: center;
  padding: 70px 25px;
  text-align: center;
}

.empty-state.compact {
  padding: 42px 22px;
}

.empty-state h2,
.empty-state h3 {
  margin: 14px 0 5px;
}

.empty-state p {
  max-width: 450px;
  margin-bottom: 20px;
  color: var(--ink-faint);
}

.empty-radar,
.research-animation {
  position: relative;
  width: 62px;
  height: 62px;
  color: var(--teal);
  border: 1px solid #bcdacf;
  border-radius: 50%;
}

.empty-radar span,
.research-animation span {
  position: absolute;
  inset: 13px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.5;
}

.empty-radar i,
.research-animation i {
  position: absolute;
  left: 30px;
  top: 9px;
  width: 2px;
  height: 22px;
  background: var(--amber);
  transform: rotate(50deg);
  transform-origin: bottom;
}

.empty-note {
  margin: 25px;
  color: var(--ink-faint);
  text-align: center;
}

.flash {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 760px;
  margin: 0 0 20px auto;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.flash > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
}

.flash p {
  flex: 1;
  margin: 0;
  font-size: 12px;
}

.flash button {
  color: var(--ink-faint);
  background: transparent;
  border: 0;
  font-size: 18px;
}

.flash-success {
  border-left-color: var(--teal);
}

.flash-success > span {
  color: var(--teal);
  background: var(--mint);
}

.flash-error {
  border-left-color: var(--coral);
}

.flash-error > span {
  color: var(--coral);
  background: var(--coral-soft);
}

.flash-info {
  border-left-color: var(--blue);
}

.flash-info > span {
  color: var(--blue);
  background: var(--blue-soft);
}

.form-error {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  color: #9c3d2f;
  background: var(--coral-soft);
  border: 1px solid #f2c8c0;
  border-radius: 9px;
  font-size: 11px;
}

.form-error > span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #fff;
  background: var(--coral);
  border-radius: 50%;
  font-weight: 800;
}

.page-error {
  margin-bottom: 18px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

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

.field.span-2,
.span-2 {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.field > span,
.field legend {
  color: #354641;
  font-size: 11px;
  font-weight: 700;
}

.field em {
  color: var(--ink-faint);
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
}

.field input,
.field textarea,
.field select,
.danger-zone input {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fbfcfa;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  outline: none;
  transition: 140ms ease;
}

.field textarea {
  min-height: auto;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.danger-zone input:focus {
  background: #fff;
  border-color: #65a997;
  box-shadow: 0 0 0 3px rgba(65, 155, 130, 0.1);
}

.field input:disabled {
  color: var(--ink-faint);
  background: #f0f2ef;
}

.field > small,
.field-help {
  margin: 0;
  color: var(--ink-faint);
  font-size: 9px;
}

fieldset.field {
  padding: 0;
  border: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 5px;
}

.form-panel {
  padding: 24px;
}

.form-panel > .panel-heading {
  margin: -24px -24px 22px;
}

.form-panel.narrow {
  max-width: 640px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.65fr);
  gap: 20px;
  align-items: start;
}

.settings-wide {
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.55fr);
}

.account-summary {
  padding: 28px;
  text-align: center;
}

.account-summary h2 {
  margin: 13px 0 0;
}

.account-summary > p {
  color: var(--ink-faint);
}

.definition-list {
  display: grid;
  gap: 0;
  margin: 22px 0;
  text-align: left;
}

.definition-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid #e9eeea;
}

.definition-list dt {
  color: var(--ink-faint);
  font-size: 10px;
}

.definition-list dd {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 22px;
  border-bottom: 1px solid #ebefeb;
}

.table-toolbar > div {
  display: flex;
  gap: 13px;
  align-items: center;
}

.table-toolbar strong {
  font-size: 12px;
}

.table-toolbar span {
  color: var(--ink-faint);
  font-size: 10px;
}

.responsive-table {
  overflow-x: auto;
}

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

th {
  padding: 12px 16px;
  color: var(--ink-faint);
  background: #fafbf9;
  border-bottom: 1px solid #e9ede9;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf0ed;
  color: var(--ink-soft);
  font-size: 11px;
  white-space: nowrap;
}

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

tbody tr:hover td {
  background: #fbfcfa;
}

td > small,
.table-title + small,
.table-note {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9px;
}

.table-title {
  color: var(--ink);
  font-weight: 700;
}

.table-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-user > span:last-child {
  display: grid;
}

.table-user strong {
  color: var(--ink);
  font-size: 11px;
}

.table-user small {
  color: var(--ink-faint);
  font-size: 9px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #d6dcda;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.success {
  color: #257659;
  background: var(--mint);
  border-color: #c3e7da;
}

.badge.warning {
  color: #93621d;
  background: var(--amber-soft);
  border-color: #efd7ad;
}

.badge.danger {
  color: #a34636;
  background: var(--coral-soft);
  border-color: #f0c9c2;
}

.badge.info {
  color: #3e659e;
  background: var(--blue-soft);
  border-color: #cedbf0;
}

.badge.neutral {
  color: #66736f;
  background: #f1f3f1;
}

.card-list {
  display: grid;
  gap: 13px;
  padding: 16px;
}

.research-card {
  padding: 20px;
  background: #fff;
  border: 1px solid #e3e8e4;
  border-radius: 14px;
  transition: 160ms ease;
}

.research-card:hover {
  border-color: #c8d8d1;
  box-shadow: 0 10px 26px rgba(22, 45, 39, 0.06);
}

.research-card-head {
  display: flex;
  gap: 14px;
}

.research-card-head > div:last-child {
  min-width: 0;
  flex: 1;
}

.research-card h2 {
  margin: 0;
  font-size: 17px;
}

.research-card-head p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.title-line h2,
.title-line h3 {
  margin: 0;
}

.research-card-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid #edf0ed;
  border-bottom: 1px solid #edf0ed;
}

.research-card-meta > span {
  display: grid;
}

.research-card-meta small {
  color: var(--ink-faint);
  font-size: 9px;
}

.research-card-meta strong {
  margin-top: 2px;
  font-size: 10px;
}

.research-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.source-pills span {
  padding: 4px 8px;
  color: #587069;
  background: #f1f5f2;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 700;
}

.task-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 20px;
  align-items: start;
}

.form-main,
.detail-stack {
  display: grid;
  gap: 18px;
}

.form-section {
  position: relative;
  padding: 26px;
}

.section-number {
  position: absolute;
  top: 24px;
  right: 25px;
  color: #dae2de;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.section-heading {
  margin-bottom: 25px;
  padding-right: 45px;
}

.section-heading h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.section-heading p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.sticky-card {
  position: sticky;
  top: 24px;
}

.form-sidebar .sticky-card {
  padding: 21px;
}

.sticky-card h3 {
  margin-bottom: 18px;
  font-size: 15px;
}

.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 9px 0;
}

.switch-row.bordered {
  margin-top: 7px;
  padding: 15px;
  background: #f7f9f6;
  border: 1px solid #e3e8e4;
  border-radius: 11px;
}

.switch-row > span {
  display: grid;
}

.switch-row strong {
  font-size: 11px;
}

.switch-row small {
  color: var(--ink-faint);
  font-size: 9px;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-row i {
  position: relative;
  width: 39px;
  height: 22px;
  flex: 0 0 39px;
  background: #c9d0cd;
  border-radius: 999px;
  transition: 160ms ease;
}

.switch-row i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: 160ms ease;
}

.switch-row input:checked + i {
  background: var(--teal);
}

.switch-row input:checked + i::after {
  transform: translateX(17px);
}

.form-summary {
  display: grid;
  gap: 0;
  margin: 18px 0;
  padding: 5px 0;
  border-top: 1px solid #e7ebe8;
  border-bottom: 1px solid #e7ebe8;
}

.form-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
}

.form-summary span {
  color: var(--ink-faint);
  font-size: 9px;
}

.form-summary strong {
  font-size: 9px;
}

.privacy-note {
  margin: 10px 0 0;
  color: var(--ink-faint);
  font-size: 8px;
  text-align: center;
}

.source-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.choice-card {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 150px;
  padding: 17px;
  background: #fafbf9;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: 150ms ease;
}

.choice-card:has(input:checked) {
  background: #f1f9f6;
  border-color: #8fc7b7;
  box-shadow: inset 0 0 0 1px #8fc7b7;
}

.choice-card input {
  position: absolute;
  opacity: 0;
}

.choice-check {
  position: absolute;
  top: 11px;
  right: 11px;
  display: none;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-size: 10px;
}

.choice-card:has(input:checked) .choice-check {
  display: grid;
}

.choice-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 17px;
  place-items: center;
  color: var(--teal);
  background: var(--mint);
  border-radius: 9px;
  font-size: 16px;
  font-weight: 800;
}

.choice-card strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.choice-card small {
  color: var(--ink-faint);
  font-size: 9px;
}

.advanced-block {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.advanced-block summary {
  padding: 13px 15px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.advanced-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  padding: 17px;
  border-top: 1px solid var(--line);
}

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

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px;
  background: #f7f9f6;
  border: 1px solid #e5e9e6;
  border-radius: 8px;
}

.check-row input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--teal);
}

.check-row > span {
  display: grid;
}

.check-row strong {
  font-size: 10px;
}

.check-row small {
  color: var(--ink-faint);
  font-size: 8px;
}

.inline-check {
  margin-top: 17px;
}

.weekday-picker {
  display: flex;
  gap: 7px;
}

.weekday-picker label {
  cursor: pointer;
}

.weekday-picker input {
  position: absolute;
  opacity: 0;
}

.weekday-picker span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink-soft);
  background: #f7f9f6;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
}

.weekday-picker input:checked + span {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

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

.title-with-status {
  display: flex;
  align-items: center;
  gap: 14px;
}

.source-strategy-list {
  display: grid;
  gap: 9px;
  padding: 18px;
}

.source-strategy-list > div {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  color: #8c9794;
  background: #f6f7f5;
  border-radius: 9px;
}

.source-strategy-list > div.enabled {
  color: var(--ink);
  background: #eff8f4;
}

.source-strategy-list > div > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  background: #fff;
  border-radius: 7px;
}

.source-strategy-list strong {
  font-size: 10px;
}

.source-strategy-list small {
  color: inherit;
  font-size: 8px;
}

.tag-block {
  padding: 0 18px 18px;
}

.tag-block > small {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-faint);
  font-size: 9px;
}

.delivery-block {
  padding: 0 18px 18px;
}

.delivery-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: #50645f;
  background: #f6f8f6;
  border: 1px solid #e2e8e4;
  border-radius: 10px;
}

.delivery-state.configured {
  color: #315c50;
  background: #eff8f4;
  border-color: #d8e9e2;
}

.delivery-state-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--teal);
  background: #fff;
  border: 1px solid #e1e9e5;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.delivery-state-copy {
  display: grid;
  gap: 2px;
}

.delivery-state-copy strong {
  color: var(--ink);
  font-size: 10px;
}

.delivery-state-copy small {
  color: var(--ink-faint);
  font-size: 8px;
}

.delivery-state-label {
  padding: 3px 7px;
  color: #62746f;
  background: #fff;
  border: 1px solid #e1e7e4;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 800;
}

.delivery-addresses {
  margin-top: 10px;
}

.action-panel {
  padding: 20px;
}

.action-panel h2 {
  font-size: 15px;
}

.danger-zone {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #ecdfdc;
}

.danger-zone summary {
  color: var(--coral);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.danger-zone p {
  margin: 11px 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.danger-zone form {
  display: grid;
  gap: 8px;
}

.run-stats {
  display: grid;
  min-width: 45px;
  text-align: center;
}

.run-stats strong {
  font-size: 13px;
}

.run-stats small {
  color: var(--ink-faint);
  font-size: 8px;
}

.status-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  background: #f0f2f1;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
}

.status-icon.success {
  color: var(--teal);
  background: var(--mint);
}

.status-icon.danger {
  color: var(--coral);
  background: var(--coral-soft);
}

.status-icon.warning {
  color: #a06a1b;
  background: var(--amber-soft);
}

.status-icon.info {
  color: var(--blue);
  background: var(--blue-soft);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--ink-faint);
  font-size: 9px;
}

.breadcrumb a {
  color: var(--teal);
}

.run-status-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 17px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.run-status-card.success {
  border-left-color: var(--teal);
}

.run-status-card.danger {
  border-left-color: var(--coral);
}

.run-status-card.warning {
  border-left-color: var(--amber);
}

.run-status-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--teal);
  background: var(--mint);
  border-radius: 10px;
  font-weight: 800;
}

.run-status-copy > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.run-status-copy p {
  margin: 2px 0 7px;
  color: var(--ink-faint);
  font-size: 9px;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  background: #edf0ee;
  border-radius: 999px;
}

.progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright));
  border-radius: inherit;
}

.run-status-meta {
  display: grid;
  min-width: 55px;
  text-align: center;
}

.run-status-meta small {
  color: var(--ink-faint);
  font-size: 8px;
}

.run-status-meta strong {
  font-size: 18px;
}

.error-panel {
  margin-bottom: 20px;
  padding: 20px;
  border-color: #efcbc5;
}

.error-panel h2 {
  color: var(--coral);
  font-size: 15px;
}

.error-panel pre {
  overflow-x: auto;
  padding: 13px;
  color: #733d34;
  background: #fff6f4;
  border-radius: 8px;
  font-size: 10px;
  white-space: pre-wrap;
}

.research-in-progress {
  display: grid;
  justify-items: center;
  padding: 60px 30px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.research-animation {
  width: 78px;
  height: 78px;
  animation: radar-pulse 2s ease-in-out infinite;
}

.research-animation span {
  inset: 17px;
}

.research-animation span:nth-child(2) {
  inset: 30px;
  background: var(--teal);
}

.research-animation i {
  left: 38px;
  top: 11px;
  height: 28px;
  animation: radar-sweep 2.2s linear infinite;
}

@keyframes radar-sweep {
  to {
    transform: rotate(410deg);
  }
}

@keyframes radar-pulse {
  50% {
    box-shadow: 0 0 0 12px rgba(32, 132, 107, 0.05);
  }
}

.research-in-progress h2 {
  margin: 20px 0 5px;
}

.research-in-progress > p {
  color: var(--ink-faint);
}

.event-stream {
  width: min(100%, 680px);
  margin-top: 20px;
  padding: 12px 18px;
  text-align: left;
  background: #f7f9f7;
  border-radius: 11px;
}

.event-stream > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #e9edea;
}

.event-stream > div:last-child {
  border-bottom: 0;
}

.event-stream p,
.event-stream small {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.event-stream > div > span {
  color: var(--teal);
}

.report-document {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 50px;
  padding: clamp(32px, 5vw, 62px);
  color: #e8f2ef;
  background:
    radial-gradient(circle at 85% 25%, rgba(78, 202, 165, 0.17), transparent 16rem),
    linear-gradient(135deg, #102925, #0b1c1a);
}

.report-hero h2 {
  margin-bottom: 13px;
  font-size: 31px;
}

.report-hero p:last-child {
  margin: 0;
  color: #a7beb7;
  font-size: 14px;
  line-height: 1.9;
}

.report-score-card {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 170px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
}

.report-score-card small,
.report-score-card span {
  color: #7fa49a;
  font-size: 9px;
}

.report-score-card strong {
  font-size: 44px;
  line-height: 1.1;
}

.mini-orbit {
  position: absolute;
  right: -25px;
  bottom: -25px;
  width: 85px;
  height: 85px;
  border: 1px solid rgba(86, 208, 172, 0.18);
  border-radius: 50%;
}

.mini-orbit i {
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(86, 208, 172, 0.22);
  border-radius: 50%;
}

.report-section {
  padding: clamp(29px, 4vw, 50px);
  border-bottom: 1px solid #e8ece9;
}

.report-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 25px;
}

.report-section-heading > span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
}

.report-section-heading h2 {
  margin-bottom: 2px;
  font-size: 21px;
}

.report-section-heading p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
}

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

.highlight-card {
  position: relative;
  padding: 22px;
  background: #f8faf8;
  border: 1px solid #e3e9e4;
  border-radius: 13px;
}

.highlight-number {
  color: #b5c1bd;
  font-size: 10px;
  font-weight: 800;
}

.highlight-card h3 {
  margin: 9px 0;
  font-size: 16px;
}

.highlight-card > p {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.75;
}

.why-box {
  padding: 11px 12px;
  background: #eef6f2;
  border-left: 2px solid var(--teal);
  border-radius: 0 7px 7px 0;
}

.why-box strong {
  color: var(--teal);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.why-box p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.citation-line {
  display: flex;
  gap: 5px;
  margin-top: 13px;
}

.citation-line a {
  display: grid;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  place-items: center;
  color: var(--teal);
  background: #fff;
  border: 1px solid #cfe0da;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 700;
}

.two-column-report {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.7fr);
  gap: 45px;
}

.trend-list {
  display: grid;
  gap: 9px;
}

.trend-list article {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #fafbfa;
  border: 1px solid #e6eae7;
  border-radius: 11px;
}

.trend-direction {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  color: var(--teal);
  background: var(--mint);
  border-radius: 8px;
  font-weight: 800;
}

.trend-direction.down {
  color: var(--coral);
  background: var(--coral-soft);
}

.trend-direction.stable {
  color: var(--blue);
  background: var(--blue-soft);
}

.trend-direction.new {
  color: #9a661a;
  background: var(--amber-soft);
}

.trend-list h3 {
  margin-bottom: 4px;
  font-size: 12px;
}

.trend-list h3 small {
  margin-left: 7px;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 500;
}

.trend-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.chart-card {
  align-self: start;
  padding: 20px;
  background: #f8faf8;
  border: 1px solid #e3e8e4;
  border-radius: 14px;
}

.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chart-heading h3 {
  margin: 0;
  font-size: 13px;
}

.chart-heading span {
  color: var(--ink-faint);
  font-size: 8px;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 45px 1fr 22px;
  align-items: center;
  gap: 8px;
  font-size: 8px;
}

.bar-row > div {
  height: 7px;
  overflow: hidden;
  background: #e2e8e4;
  border-radius: 999px;
}

.bar-row i,
.entity-meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2c9579, #66c7aa);
  border-radius: inherit;
}

.bar-row strong {
  text-align: right;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 88px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: #dce4df;
}

.timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 72px 12px 1fr;
  gap: 11px;
  min-height: 53px;
}

.timeline time {
  color: var(--ink-faint);
  font-size: 9px;
  text-align: right;
}

.timeline i {
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 3px;
  background: #fff;
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.timeline p {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
}

.timeline small {
  color: var(--ink-faint);
  font-size: 8px;
}

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

.entity-grid article {
  padding: 15px;
  background: #fafbfa;
  border: 1px solid #e5e9e6;
  border-radius: 11px;
}

.entity-grid article > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entity-grid article > div:first-child > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--teal);
  background: var(--mint);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
}

.entity-grid article > div:first-child > div {
  min-width: 0;
  flex: 1;
}

.entity-grid h3 {
  margin: 0;
  font-size: 11px;
}

.entity-grid small {
  color: var(--ink-faint);
  font-size: 7px;
}

.entity-grid article > div:first-child > strong {
  font-size: 10px;
}

.entity-meter {
  height: 3px;
  margin: 12px 0;
  background: #e4e9e6;
  border-radius: 999px;
}

.entity-grid article > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 8px;
}

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

.source-index article {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  padding: 12px;
  background: #fafbfa;
  border: 1px solid #e6eae7;
  border-radius: 9px;
  scroll-margin-top: 20px;
}

.source-id {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--teal);
  background: var(--mint);
  border-radius: 7px;
  font-size: 8px;
  font-weight: 800;
}

.source-index a {
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.source-index p {
  margin: 4px 0;
  color: var(--ink-soft);
  font-size: 8px;
}

.source-index small {
  color: var(--ink-faint);
  font-size: 7px;
}

.report-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  padding: 30px 50px;
  background: #f4f6f3;
}

.report-notes h3 {
  font-size: 11px;
}

.report-notes p,
.report-notes li {
  color: var(--ink-soft);
  font-size: 8px;
}

.report-notes ul {
  margin: 0;
  padding-left: 17px;
}

.source-admin-list {
  display: grid;
}

.source-admin-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  padding: 17px 22px;
  border-bottom: 1px solid #ebefeb;
}

.source-admin-list article:last-child {
  border-bottom: 0;
}

.source-logo {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: var(--teal);
  background: var(--mint);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
}

.source-admin-list h3 {
  font-size: 12px;
}

.source-admin-list a {
  color: var(--teal);
  font-size: 9px;
}

.source-admin-list p {
  margin: 3px 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.source-admin-list small {
  color: var(--ink-faint);
  font-size: 8px;
}

.source-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.danger-card {
  padding: 22px;
  border-color: #edcbc5;
}

.danger-card h2 {
  color: #9f4334;
  font-size: 15px;
}

.danger-card > p {
  color: var(--ink-faint);
  font-size: 9px;
}

.system-card {
  padding: 24px;
  color: #e3f0ec;
  background:
    radial-gradient(circle at 90% 0%, rgba(82, 205, 168, 0.17), transparent 12rem),
    var(--forest);
  border-color: var(--forest);
}

.system-icon {
  display: grid;
  width: 39px;
  height: 39px;
  margin-bottom: 18px;
  place-items: center;
  color: var(--amber);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.system-card h2 {
  font-size: 17px;
}

.system-card .definition-list > div {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.system-card .definition-list dt,
.system-card p {
  color: #77978e;
}

.system-card p {
  font-size: 9px;
}

.auth-page {
  min-height: 100vh;
  overflow-x: hidden;
  color: #dfeae7;
  background: #071310;
}

.auth-ambient {
  position: fixed;
  width: 500px;
  height: 500px;
  filter: blur(100px);
  border-radius: 50%;
  pointer-events: none;
}

.ambient-one {
  left: -260px;
  top: -180px;
  background: rgba(35, 134, 106, 0.2);
}

.ambient-two {
  right: -300px;
  bottom: -280px;
  background: rgba(205, 145, 57, 0.09);
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(420px, 0.8fr);
  min-height: 100vh;
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(38px, 6vw, 76px);
  overflow: hidden;
  background:
    linear-gradient(125deg, transparent, rgba(39, 126, 103, 0.06)),
    repeating-radial-gradient(circle at 75% 50%, transparent 0 79px, rgba(82, 192, 161, 0.045) 80px 81px);
}

.auth-story::after {
  content: "";
  position: absolute;
  right: 16%;
  top: 23%;
  width: 1px;
  height: 35%;
  background: linear-gradient(transparent, rgba(235, 173, 78, 0.7), transparent);
  transform: rotate(47deg);
  transform-origin: bottom;
}

.auth-story-copy {
  max-width: 610px;
  margin: auto 0;
}

.auth-story-copy h1 {
  margin-bottom: 24px;
  color: #f5faf8;
  font-size: clamp(47px, 6vw, 82px);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.06em;
}

.auth-story-copy > p:last-child {
  max-width: 520px;
  color: #7f9b92;
  font-size: 14px;
  line-height: 1.8;
}

.auth-signal-card {
  display: flex;
  align-items: center;
  gap: 13px;
  align-self: flex-start;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}

.signal-orbit {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(84, 207, 171, 0.35);
  border-radius: 50%;
}

.signal-orbit span {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(84, 207, 171, 0.5);
  border-radius: 50%;
}

.signal-orbit i {
  position: absolute;
  left: 15px;
  top: 7px;
  width: 3px;
  height: 3px;
  background: var(--amber);
  border-radius: 50%;
}

.auth-signal-card > div:last-child {
  display: grid;
}

.auth-signal-card small {
  color: #66857c;
  font-size: 8px;
}

.auth-signal-card strong {
  font-size: 10px;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  color: var(--ink);
  background: #f4f6f2;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.login-card {
  width: min(100%, 390px);
  padding: 38px;
  background: #fff;
  border: 1px solid #e1e7e2;
  border-radius: 20px;
  box-shadow: var(--shadow-deep);
}

.login-heading {
  margin-bottom: 26px;
}

.login-heading h2 {
  margin-bottom: 6px;
  font-size: 29px;
}

.login-heading > p:last-child {
  color: var(--ink-faint);
  font-size: 11px;
}

.login-card .button {
  min-height: 47px;
}

.login-help {
  margin: 20px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
  text-align: center;
}

.error-page {
  display: grid;
  min-height: 65vh;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.error-code {
  color: #cad5d0;
  font-size: 80px;
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
}

.error-page h1 {
  margin: 15px 0 7px;
}

.error-page p {
  max-width: 480px;
  color: var(--ink-faint);
}

.error-page code {
  margin-bottom: 20px;
  color: var(--ink-faint);
  font-size: 9px;
}

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

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

  .form-sidebar {
    order: -1;
  }

  .form-sidebar .sticky-card {
    position: static;
  }

  .form-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-summary > div {
    display: grid;
  }

  .two-column-report {
    grid-template-columns: 1fr;
  }

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

  .auth-shell {
    grid-template-columns: 1fr 460px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    transform: translateX(-102%);
    transition: 200ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    visibility: hidden;
    background: rgba(3, 15, 12, 0.48);
    opacity: 0;
    transition: 180ms ease;
  }

  .sidebar-scrim.visible {
    visibility: visible;
    opacity: 1;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    height: 58px;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: rgba(246, 247, 243, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }

  .mobile-brand {
    font-weight: 800;
  }

  .icon-button {
    width: 34px;
    height: 34px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
  }

  .main-content {
    padding: 27px 20px 55px;
  }

  .dashboard-grid,
  .task-detail-grid,
  .source-admin-grid,
  .settings-grid,
  .settings-wide {
    grid-template-columns: 1fr;
  }

  .insight-banner {
    grid-template-columns: auto 1fr;
  }

  .insight-banner > p {
    grid-column: 2;
  }

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

  .auth-story {
    min-height: 360px;
    padding: 36px;
  }

  .auth-story-copy {
    margin-top: 70px;
  }

  .auth-story-copy h1 {
    font-size: 49px;
  }

  .auth-signal-card {
    display: none;
  }

  .auth-form-panel {
    padding: 35px 20px 65px;
  }
}

@media (max-width: 650px) {
  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions > .button,
  .header-actions > form {
    flex: 1;
  }

  .header-actions form .button {
    width: 100%;
  }

  .metric-grid,
  .field-grid,
  .source-choice-grid,
  .advanced-content,
  .highlight-grid,
  .entity-grid,
  .source-index,
  .report-notes {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 123px;
  }

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

  .research-card-footer,
  .source-admin-list article {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-row-meta {
    display: none;
  }

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

  .weekday-picker {
    flex-wrap: wrap;
  }

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

  .report-hero {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .report-score-card {
    min-height: 130px;
  }

  .report-section {
    padding: 27px 20px;
  }

  .report-notes {
    padding: 27px 20px;
  }

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

  .run-status-meta {
    display: none;
  }

  .insight-banner {
    display: none;
  }

  .source-admin-list article {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .source-actions {
    grid-column: 2;
  }

  .login-card {
    padding: 27px;
  }

  .auth-story {
    min-height: 300px;
  }

  .auth-story-copy {
    margin-top: 50px;
  }

  .auth-story-copy h1 {
    font-size: 40px;
  }

  .auth-story-copy > p:last-child {
    display: none;
  }
}

@media print {
  .sidebar,
  .mobile-header,
  .header-actions,
  .run-status-card,
  .page-header,
  .flash {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main-content {
    max-width: none;
    padding: 0;
  }

  .report-document {
    border: 0;
    box-shadow: none;
  }
}
