:root {
  color-scheme: light;
  --sidebar-width: 246px;
  --dock-height: 66px;
  --bg: #f5f8f7;
  --surface: #ffffff;
  --surface-subtle: #f7faf9;
  --surface-mint: #eef8f4;
  --ink: #14211d;
  --ink-strong: #0b1713;
  --muted: #64736d;
  --faint: #8b9994;
  --line: #dce6e2;
  --line-strong: #c8d7d1;
  --sidebar: #073c33;
  --sidebar-deep: #052f29;
  --sidebar-text: #edf7f3;
  --sidebar-muted: #a8c1b8;
  --green: #087b5c;
  --green-strong: #056044;
  --mint: #42c99a;
  --mint-soft: #dff5ec;
  --blue: #1c63d5;
  --blue-soft: #e8f0ff;
  --amber: #d9830d;
  --amber-soft: #fff2d9;
  --purple: #7553c7;
  --purple-soft: #eee9fb;
  --red: #d93645;
  --red-soft: #ffebed;
  --gray: #6f7b82;
  --shadow: 0 12px 30px rgba(19, 42, 34, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button,
input,
select,
dialog {
  letter-spacing: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(28, 99, 213, 0.26);
  outline-offset: 2px;
}

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

h1 {
  color: var(--ink-strong);
  font-size: clamp(24px, 2.1vw, 31px);
  line-height: 1.12;
  font-weight: 790;
}

h2 {
  color: var(--ink-strong);
  font-size: 17px;
  line-height: 1.28;
  font-weight: 760;
}

h3 {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 760;
}

.hidden {
  display: none !important;
}

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

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 100vh;
  min-height: 640px;
  overflow: auto;
  padding: 22px 14px 18px;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
}

.sidebar-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--sidebar-text);
  text-decoration: none;
}

.brand-mark {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 9px;
  display: block;
  object-fit: cover;
}

.brand-name {
  min-width: 0;
  display: grid;
  gap: 2px;
  white-space: nowrap;
}

.brand-name span {
  color: #72dcb5;
  font-size: 10px;
  line-height: 1;
  font-weight: 790;
  text-transform: uppercase;
}

.brand-name strong {
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  font-weight: 830;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 7px;
  padding: 0 13px;
  background: transparent;
  color: var(--sidebar-muted);
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: 14px;
  font-weight: 690;
  transition: background 160ms ease, color 160ms ease;
}

.nav-item > i {
  font-size: 20px;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.active {
  color: #ffffff;
  background: rgba(66, 201, 154, 0.17);
  box-shadow: inset 3px 0 0 var(--mint);
}

.nav-count {
  min-width: 23px;
  height: 21px;
  border-radius: 10px;
  padding: 0 7px;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #dff5ec;
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.help-link {
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 0;
  padding-bottom: 10px;
}

.account-chip {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 10px;
  padding: 7px 6px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #d7e9e3;
  color: var(--sidebar-deep);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.account-copy {
  min-width: 0;
}

.account-copy strong,
.account-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 720;
}

.account-copy small {
  margin-top: 3px;
  color: var(--sidebar-muted);
  font-size: 11px;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c8e87;
}

.connection-dot.connected {
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(66, 201, 154, 0.13);
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 92px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(220, 230, 226, 0.9);
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.topbar-intro {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--green);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 760;
}

.page-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.topbar-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.last-scan {
  min-height: 38px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.last-scan i {
  color: var(--ink);
  font-size: 17px;
}

.button,
.icon-button,
.text-button,
.segment-button {
  border: 0;
}

.button {
  min-height: 40px;
  border-radius: 7px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 740;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button i {
  font-size: 17px;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--green);
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(8, 123, 92, 0.17);
}

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

.button.secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

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

.button.full {
  width: 100%;
}

.button[aria-disabled="true"],
.button.is-locked,
.button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.button[aria-disabled="true"]:hover,
.button.is-locked:hover,
.button:disabled:hover {
  transform: none;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 18px;
}

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

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

.content {
  min-width: 0;
  padding: 18px 22px calc(var(--dock-height) + 4px);
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
  animation: view-in 180ms ease both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.trust-banner {
  min-height: 84px;
  border: 1px solid #b9dfcf;
  border-radius: 8px;
  background: var(--surface-mint);
  display: grid;
  grid-template-columns: minmax(290px, 1.12fr) minmax(520px, 1fr);
  align-items: stretch;
  overflow: hidden;
}

.trust-message {
  min-width: 0;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.trust-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #d5f0e4;
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex: 0 0 auto;
}

.trust-message strong,
.trust-message span {
  display: block;
}

.trust-message strong {
  color: var(--ink-strong);
  font-size: 15px;
  line-height: 1.28;
}

.trust-message span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.trust-proofs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-proof {
  min-width: 0;
  padding: 13px 16px;
  border-left: 1px solid #cce4da;
  display: flex;
  align-items: center;
  gap: 10px;
}

.trust-proof > i {
  color: var(--ink);
  font-size: 21px;
  flex: 0 0 auto;
}

.trust-proof span,
.trust-proof strong,
.trust-proof small {
  min-width: 0;
  display: block;
}

.trust-proof strong {
  font-size: 12px;
  line-height: 1.2;
}

.trust-proof small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.scan-progress {
  min-height: 60px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid #c5d9f7;
  border-radius: 8px;
  background: var(--blue-soft);
  display: grid;
  grid-template-columns: minmax(250px, auto) minmax(160px, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.scan-progress > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scan-progress strong,
.scan-progress span {
  display: block;
}

.scan-progress > div:first-child strong {
  font-size: 12px;
}

.scan-progress > div:first-child span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.scan-pulse {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--blue);
  display: grid !important;
  place-items: center;
  animation: pulse 1.4s ease infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 7px rgba(28, 99, 213, 0.11); }
}

.progress-track {
  height: 7px;
  border-radius: 4px;
  background: rgba(28, 99, 213, 0.15);
  overflow: hidden;
}

.progress-track span {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 260ms ease;
}

.inbox-map {
  margin-top: 14px;
  padding: 15px 16px 14px;
}

.section-heading,
.view-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.section-heading p,
.view-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.section-heading.compact {
  align-items: center;
}

.text-button {
  min-height: 34px;
  padding: 0 4px;
  background: transparent;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
}

.text-button:hover {
  color: #124ca8;
}

.map-empty {
  margin-top: 14px;
}

.step-list {
  min-height: 66px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.step {
  position: relative;
  min-width: 0;
  padding: 14px 14px 8px 48px;
}

.step + .step {
  border-left: 1px solid var(--line);
}

.step > span {
  position: absolute;
  top: 13px;
  left: 12px;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.step strong,
.step small {
  display: block;
}

.step strong {
  font-size: 12px;
}

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

.step.active > span,
.step.done > span {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.step.done > span::before {
  content: "\e06c";
  font-family: "Inbox Control Icons";
  font-size: 11px;
}

.step.done > span {
  font-size: 0;
}

.map-ready {
  margin-top: 13px;
}

.map-track {
  width: 100%;
  height: 31px;
  border-radius: 6px;
  background: #e6ece9;
  display: flex;
  overflow: hidden;
}

.map-segment {
  min-width: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.7);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 780;
  transition: filter 150ms ease;
}

.map-segment:hover {
  filter: brightness(0.94);
}

.map-segment.green { background: var(--green); }
.map-segment.blue { background: var(--blue); }
.map-segment.amber { background: var(--amber); }
.map-segment.purple { background: var(--purple); }
.map-segment.gray { background: var(--gray); }

.map-legend {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.legend-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 7px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border-radius: 50%;
}

.legend-dot.green { background: var(--green); }
.legend-dot.blue { background: var(--blue); }
.legend-dot.amber { background: var(--amber); }
.legend-dot.purple { background: var(--purple); }
.legend-dot.gray { background: var(--gray); }

.legend-item strong,
.legend-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.legend-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-empty {
  min-height: 360px;
  margin-top: 14px;
  padding: 34px clamp(22px, 5vw, 72px);
  display: grid;
  grid-template-columns: 120px minmax(260px, 1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: 34px;
}

.empty-visual {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  border: 1px solid #cbe1d8;
  background: var(--surface-mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 48px;
}

.status-badge {
  width: fit-content;
  min-height: 28px;
  border-radius: 14px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 740;
}

.status-badge.safe {
  background: var(--mint-soft);
  color: var(--green-strong);
}

.status-badge.neutral {
  background: #eef2f0;
  color: var(--ink);
}

.empty-copy h2 {
  margin-top: 13px;
  font-size: 23px;
}

.empty-copy > p:not(.microcopy) {
  max-width: 520px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.empty-copy .button {
  margin-top: 20px;
}

.microcopy {
  margin-top: 10px;
  color: var(--faint);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.permission-list {
  border-left: 1px solid var(--line);
  padding-left: 28px;
  display: grid;
  gap: 18px;
}

.permission-list > div,
.dialog-list > div,
.rule-row,
.setting-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
}

.permission-list > div > i,
.dialog-list > div > i,
.rule-row > i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 17px;
}

.permission-list strong,
.permission-list small,
.dialog-list strong,
.dialog-list small,
.rule-row strong,
.rule-row small {
  display: block;
}

.permission-list strong,
.dialog-list strong,
.rule-row strong {
  font-size: 12px;
}

.permission-list small,
.dialog-list small,
.rule-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.workspace-grid {
  min-height: 450px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(360px, 0.9fr);
  gap: 12px;
  align-items: stretch;
}

.opportunities-panel,
.detail-panel {
  min-width: 0;
  overflow: hidden;
}

.opportunities-heading {
  padding: 15px 16px 13px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.filter-control,
.search-control {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  display: flex;
  align-items: center;
}

.filter-control {
  position: relative;
  padding-left: 11px;
  color: var(--muted);
}

.filter-control select {
  min-width: 122px;
  height: 100%;
  border: 0;
  outline: 0;
  appearance: none;
  padding: 0 29px 0 8px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 670;
}

.filter-control .icon-chevron-down {
  position: absolute;
  right: 9px;
  pointer-events: none;
  font-size: 14px;
}

.search-control {
  position: relative;
  width: 190px;
}

.search-control input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 35px 0 11px;
  font-size: 12px;
}

.search-control input::placeholder {
  color: var(--faint);
}

.search-control i {
  position: absolute;
  right: 11px;
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
}

.search-control.grow {
  width: auto;
  flex: 1;
}

.group-table {
  min-width: 0;
}

.group-table-head,
.group-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.45fr) 84px 74px 96px minmax(128px, 1fr);
  align-items: center;
  column-gap: 10px;
}

.group-table-head {
  min-height: 35px;
  padding: 0 15px;
  color: var(--muted);
  background: #fbfcfc;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 700;
}

.group-list {
  min-height: 270px;
}

.group-row {
  width: 100%;
  min-height: 58px;
  padding: 8px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  transition: background 130ms ease, box-shadow 130ms ease;
}

.group-row:hover {
  background: #f8fbfa;
}

.group-row.active {
  position: relative;
  z-index: 1;
  background: #f5fbf8;
  box-shadow: inset 0 0 0 1.5px var(--green);
}

.group-name {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.group-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 17px;
}

.group-icon.green { color: var(--green); background: var(--mint-soft); }
.group-icon.blue { color: var(--blue); background: var(--blue-soft); }
.group-icon.amber { color: var(--amber); background: var(--amber-soft); }
.group-icon.purple { color: var(--purple); background: var(--purple-soft); }
.group-icon.gray { color: var(--gray); background: #edf1f2; }

.group-name strong,
.group-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-name strong {
  font-size: 12px;
}

.group-name small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.metric-cell {
  color: var(--ink);
  font-size: 12px;
  font-weight: 640;
}

.metric-cell.unread {
  color: var(--blue);
}

.protection-cell,
.recommendation-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.protection-cell i {
  color: var(--green);
}

.protection-cell.protected i,
.recommendation-cell.protected {
  color: var(--red);
}

.recommendation-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  flex: 0 0 auto;
}

.recommendation-cell.safe .recommendation-dot { background: var(--green); }
.recommendation-cell.protected .recommendation-dot { background: var(--red); }

.table-footer {
  min-height: 42px;
  padding: 0 12px 0 16px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  font-size: 11px;
}

.detail-panel {
  padding: 14px;
}

.detail-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

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

.detail-title h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-title p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.risk-pill {
  height: 26px;
  border-radius: 13px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 10px;
  font-weight: 740;
  white-space: nowrap;
}

.risk-pill.safe { color: var(--green); background: var(--mint-soft); }
.risk-pill.protected { color: var(--red); background: var(--red-soft); }

.detail-metrics {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-metric {
  min-width: 0;
}

.detail-metric + .detail-metric {
  border-left: 1px solid var(--line);
  padding-left: 13px;
}

.detail-metric strong,
.detail-metric small {
  display: block;
}

.detail-metric strong {
  font-size: 15px;
}

.detail-metric small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.detail-section {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-section > strong {
  display: block;
  font-size: 11px;
}

.detail-section > p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.sample-senders {
  margin-top: 7px;
  display: grid;
  gap: 6px;
}

.sample-sender {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.sample-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #edf1f0;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 760;
}

.sample-sender strong,
.sample-sender small,
.sample-sender em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sample-sender strong {
  font-size: 11px;
}

.sample-sender small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.sample-sender em {
  margin-top: 3px;
  color: var(--ink);
  font-size: 9px;
  font-style: normal;
}

.sample-sender > time {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.sample-empty {
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.safe-action-note {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid #bfdfd1;
  border-radius: 7px;
  background: var(--surface-mint);
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  gap: 8px;
  color: var(--green-strong);
}

.safe-action-note strong,
.safe-action-note small {
  display: block;
}

.safe-action-note strong {
  font-size: 11px;
}

.safe-action-note small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.detail-actions {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.detail-actions .button {
  width: 100%;
  min-height: 38px;
}

.detail-actions .button.primary {
  background: var(--blue);
  box-shadow: 0 5px 14px rgba(28, 99, 213, 0.17);
}

.detail-actions .button.primary:hover {
  background: #154fae;
}

.detail-actions .microcopy {
  margin: 0;
  justify-content: center;
}

.view-heading {
  margin-bottom: 16px;
  align-items: center;
}

.view-heading h2 {
  font-size: 24px;
}

.review-layout,
.protected-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.75fr);
  gap: 14px;
}

.review-groups-panel {
  min-width: 0;
  padding: 14px;
}

.segment {
  width: fit-content;
  min-height: 36px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f0f5f3;
  display: flex;
  gap: 2px;
}

.segment-button {
  min-height: 28px;
  border-radius: 5px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.segment-button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(19, 42, 34, 0.1);
}

.review-list {
  margin-top: 13px;
  border-top: 1px solid var(--line);
}

.review-row {
  width: 100%;
  min-height: 70px;
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.review-row:hover,
.review-row.active {
  background: #f5fbf8;
}

.review-row-copy strong,
.review-row-copy span {
  display: block;
}

.review-row-copy strong {
  font-size: 13px;
}

.review-row-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.review-row-meta {
  text-align: right;
}

.review-row-meta strong,
.review-row-meta small {
  display: block;
}

.review-row-meta strong {
  font-size: 12px;
}

.review-row-meta small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.protect-form {
  margin: 14px 0 16px;
  display: flex;
  gap: 9px;
}

.protected-panel,
.rules-panel,
.activity-panel,
.settings-panel {
  padding: 18px;
}

.protected-list,
.rules-list,
.activity-list,
.settings-list {
  display: grid;
}

.protected-row {
  min-height: 58px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

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

.protected-row > i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--green);
  display: grid;
  place-items: center;
}

.protected-row strong,
.protected-row small {
  display: block;
}

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

.protected-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.remove-protected {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  display: grid;
  place-items: center;
}

.remove-protected:hover {
  background: var(--red-soft);
  color: var(--red);
}

.rule-row {
  min-height: 68px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

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

.activity-item {
  min-height: 72px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.activity-item:first-child {
  border-top: 0;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 17px;
}

.activity-item strong,
.activity-item span,
.activity-item time {
  display: block;
}

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

.activity-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.activity-item time {
  color: var(--faint);
  font-size: 10px;
  white-space: nowrap;
}

.setting-row {
  min-height: 74px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

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

.setting-row strong,
.setting-row small {
  display: block;
}

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

.setting-row small {
  max-width: 700px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.toggle {
  position: relative;
  width: 43px;
  height: 24px;
  flex: 0 0 auto;
}

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

.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: #b9c5c1;
  transition: background 160ms ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 35, 29, 0.24);
  transition: transform 160ms ease;
}

.toggle input:checked + .toggle-track {
  background: var(--green);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(19px);
}

.toggle input:focus-visible + .toggle-track {
  outline: 3px solid rgba(28, 99, 213, 0.26);
  outline-offset: 2px;
}

.toggle input:disabled + .toggle-track {
  opacity: 0.58;
  cursor: not-allowed;
}

.empty-list {
  min-height: 190px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.empty-list > div {
  max-width: 320px;
}

.empty-list i {
  display: block;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 28px;
}

.empty-list strong,
.empty-list span {
  display: block;
}

.empty-list span {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
}

.safety-dock {
  position: fixed;
  z-index: 40;
  left: var(--sidebar-width);
  right: 0;
  bottom: 0;
  min-height: var(--dock-height);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  display: grid;
  grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr));
  box-shadow: 0 -8px 24px rgba(18, 42, 33, 0.05);
}

.dock-item {
  min-width: 0;
  padding: 9px 14px;
  border-left: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dock-item:first-child {
  border-left: 0;
}

.dock-item > i {
  color: var(--green);
  font-size: 22px;
  flex: 0 0 auto;
}

.dock-item.danger > i,
.dock-item.danger strong {
  color: var(--red);
}

.dock-item.warning > i {
  color: var(--amber);
}

.dock-item strong,
.dock-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.dock-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.safety-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(5, 47, 41, 0.24);
}

.safety-dialog::backdrop {
  background: rgba(6, 27, 23, 0.5);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dialog-head h2 {
  font-size: 20px;
}

.dialog-list {
  margin: 18px 0;
  display: grid;
  gap: 15px;
}

.action-dialog {
  width: min(560px, calc(100vw - 32px));
}

.action-dialog-summary {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.confirmation-count {
  margin-top: 16px;
  padding: 15px 18px;
  border: 1px solid #b9dfcf;
  border-radius: 7px;
  background: var(--surface-mint);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 10px;
}

.confirmation-count > span,
.confirmation-count > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.confirmation-count > strong {
  grid-row: span 2;
  color: var(--green-strong);
  font-size: 34px;
  line-height: 1;
}

.confirmation-count > small {
  margin-top: 3px;
}

.action-proof-list {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.action-dialog-error {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #efc2bd;
  border-radius: 7px;
  background: #fff5f3;
  color: var(--red);
  font-size: 11px;
  line-height: 1.45;
}

.dialog-actions-row {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
  gap: 10px;
}

.dialog-actions-row .button {
  width: 100%;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: calc(var(--dock-height) + 17px);
  max-width: min(390px, calc(100vw - 32px));
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid #b9dfcf;
  border-radius: 7px;
  background: var(--sidebar);
  color: #ffffff;
  box-shadow: 0 15px 34px rgba(5, 47, 41, 0.22);
  display: flex;
  align-items: center;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 170ms ease, transform 170ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1240px) {
  .trust-banner {
    grid-template-columns: minmax(280px, 1fr) minmax(440px, 1.15fr);
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  }

  .group-table-head,
  .group-row {
    grid-template-columns: minmax(170px, 1.4fr) 72px 64px 82px minmax(110px, 1fr);
    column-gap: 7px;
  }

  .dock-item {
    padding: 12px 10px;
  }
}

@media (max-width: 1060px) {
  :root {
    --sidebar-width: 224px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .last-scan {
    width: 100%;
    justify-content: flex-end;
  }

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

  .trust-proofs {
    border-top: 1px solid #cce4da;
  }

  .trust-proof:first-child {
    border-left: 0;
  }

  .dashboard-empty {
    grid-template-columns: 90px minmax(230px, 1fr) minmax(250px, 0.8fr);
    padding-inline: 26px;
    gap: 24px;
  }

  .empty-visual {
    width: 82px;
    height: 82px;
    font-size: 38px;
  }

  .workspace-grid,
  .review-layout,
  .protected-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    min-height: 360px;
  }

  .safety-dock {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dock-brand {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 0px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    width: 246px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

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

  .icon-button.sidebar-close,
  .icon-button.mobile-menu {
    display: grid;
  }

  .sidebar-close {
    color: var(--sidebar-muted);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(4, 29, 24, 0.5);
  }

  .app-shell.sidebar-open .sidebar-scrim {
    display: block;
  }

  .topbar {
    padding-inline: 16px;
  }

  .content {
    padding-inline: 16px;
  }

  .safety-dock {
    left: 0;
  }
}

@media (max-width: 720px) {
  :root {
    --dock-height: 0px;
  }

  .topbar {
    position: relative;
    min-height: 0;
    padding-block: 14px;
    display: grid;
    gap: 14px;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .last-scan {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .topbar-actions .button {
    width: 100%;
  }

  .topbar-actions .button.hidden + .button {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: 24px;
  }

  .content {
    padding: 14px 12px 20px;
  }

  .trust-banner {
    min-height: 0;
  }

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

  .trust-proof,
  .trust-proof:first-child {
    border-left: 0;
    border-top: 1px solid #cce4da;
  }

  .scan-progress {
    grid-template-columns: 1fr auto;
  }

  .scan-progress .progress-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .section-heading,
  .view-heading,
  .opportunities-heading {
    display: grid;
  }

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

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

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

  .step + .step {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

  .dashboard-empty {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    text-align: center;
  }

  .empty-visual,
  .status-badge,
  .empty-copy .button {
    margin-inline: auto;
  }

  .empty-copy > p:not(.microcopy),
  .microcopy {
    margin-inline: auto;
  }

  .microcopy {
    justify-content: center;
  }

  .permission-list {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 22px 0 0;
    text-align: left;
  }

  .table-tools {
    width: 100%;
  }

  .filter-control,
  .search-control {
    flex: 1;
  }

  .group-table-head {
    display: none;
  }

  .group-row {
    min-height: 76px;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 7px;
  }

  .group-row .metric-cell.messages {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .group-row .metric-cell.unread,
  .group-row .protection-cell,
  .group-row .recommendation-cell {
    display: none;
  }

  .review-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .review-row > .icon-chevron-right {
    display: none;
  }

  .protect-form {
    display: grid;
  }

  .safety-dock {
    position: static;
    min-height: 0;
    grid-template-columns: 1fr 1fr;
  }

  .dock-item {
    min-height: 72px;
    border-top: 1px solid var(--line);
  }

  .dock-brand {
    display: flex;
  }

  .toast {
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: none;
  }
}

@media (max-width: 440px) {
  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .topbar-actions > * {
    grid-column: 1;
  }

  .trust-message {
    align-items: flex-start;
  }

  .inbox-map,
  .opportunities-heading,
  .detail-panel,
  .review-groups-panel,
  .protected-panel,
  .rules-panel,
  .activity-panel,
  .settings-panel {
    padding-inline: 13px;
  }

  .table-tools {
    display: grid;
  }

  .filter-control,
  .search-control {
    width: 100%;
  }

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

  .detail-metrics {
    grid-template-columns: 1fr 1fr;
    row-gap: 12px;
  }

  .detail-metric:nth-child(3) {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 10px 0 0;
  }

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

  .dock-item {
    border-left: 0;
  }
}

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

.overnight-banner {
  border-color: var(--green-300, #86dfb1);
  background: var(--green-050, #eefbf3);
}

.activity-item .button.secondary {
  flex-shrink: 0;
  padding: 8px 14px;
}

.insights-panel .activity-item .review-row-meta {
  margin-left: auto;
  text-align: right;
}

#suggestedPanel {
  margin-top: 18px;
}

.mobile-brand {
  display: none;
}

@media (max-width: 900px) {
  .topbar-intro {
    flex-wrap: wrap;
  }

  .mobile-brand {
    display: inline-flex;
    gap: 9px;
  }

  .mobile-brand .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .mobile-brand .brand-name span {
    color: #1d9d70;
  }

  .mobile-brand .brand-name strong {
    color: var(--ink);
    font-size: 16px;
  }

  .topbar-intro > div:last-child {
    flex-basis: 100%;
  }
}

/* Mobile app bar: the brand green from the sidebar carries the whole
   top of the app when the sidebar itself is collapsed. */
@media (max-width: 900px) {
  .topbar {
    background: var(--sidebar);
    border-bottom: 1px solid var(--sidebar-deep);
  }

  .topbar .icon-button.mobile-menu {
    color: var(--sidebar-text);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
  }

  .mobile-brand .brand-name span {
    color: #72dcb5;
  }

  .mobile-brand .brand-name strong {
    color: #ffffff;
  }

  .topbar .eyebrow {
    color: var(--mint);
  }

  .topbar h1 {
    color: #ffffff;
  }

  .topbar .page-subtitle {
    color: var(--sidebar-muted);
  }

  .topbar .last-scan {
    color: var(--sidebar-muted);
  }

  .topbar .button.secondary {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.28);
    color: var(--sidebar-text);
  }

  .topbar .button.primary {
    background: var(--mint);
    border-color: var(--mint);
    color: var(--sidebar-deep);
  }
}
