:root {
  --bg: #edf3f0;
  --surface: #ffffff;
  --surface-soft: #f5f9f7;
  --sidebar: #071d1d;
  --sidebar-soft: #10302d;
  --ink: #172522;
  --muted: #6e7b77;
  --muted-2: #9ba6a2;
  --line: #e1e6df;
  --line-strong: #d2dad2;
  --accent: #dcff59;
  --accent-dark: #4ccdb6;
  --teal: #168874;
  --cyan: #54e4d0;
  --teal-soft: #e6f2ee;
  --danger: #d65b55;
  --danger-soft: #fbecea;
  --warning: #d9953d;
  --warning-soft: #fff3df;
  --positive: #4a9077;
  --positive-soft: #e8f3ef;
  --shadow: 0 12px 34px rgba(13, 44, 39, 0.065);
  --shadow-hover: 0 18px 44px rgba(11, 48, 42, 0.12);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --font: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 4%, rgba(220, 255, 89, 0.15), transparent 24rem),
    radial-gradient(circle at 35% 14%, rgba(84, 228, 208, 0.07), transparent 28rem),
    linear-gradient(rgba(28, 104, 92, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 104, 92, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(170, 204, 51, 0.32);
  outline-offset: 2px;
}

.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;
}

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: 264px;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  color: #eef5f1;
  background:
    radial-gradient(circle at 8% 3%, rgba(220, 255, 89, 0.14), transparent 17rem),
    radial-gradient(circle at 95% 72%, rgba(84, 228, 208, 0.10), transparent 18rem),
    linear-gradient(165deg, #0a2422 0%, var(--sidebar) 58%, #061717 100%);
  border-right: 1px solid rgba(84, 228, 208, 0.13);
}

.brand {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  padding: 17px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--accent);
  background: rgba(216, 242, 92, 0.10);
  border: 1px solid rgba(216, 242, 92, 0.32);
  border-radius: 12px;
}

.brand-mark svg {
  width: 28px;
}

.brand strong,
.brand span {
  display: block;
}

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

.brand span {
  margin-top: 1px;
  color: #8fa69f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.nav-list {
  display: grid;
  gap: 5px;
  padding: 18px 14px 10px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  color: #a9bbb5;
  background: transparent;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.nav-item.active {
  color: #132520;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(9, 25, 22, 0.18);
}

.nav-item.active::after {
  position: absolute;
  top: 9px;
  right: -14px;
  width: 3px;
  height: 26px;
  content: "";
  background: var(--accent);
  border-radius: 3px 0 0 3px;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: currentColor;
}

.nav-item span:not(.nav-count) {
  font-weight: 650;
}

.nav-count {
  min-width: 22px;
  margin-left: auto;
  padding: 1px 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 11px;
  text-align: center;
}

.nav-item.active .nav-count {
  color: #edf5c5;
  background: #28403a;
}

.sidebar-section {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px 10px;
}

.section-label {
  color: #708982;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.demo-pill {
  padding: 2px 7px;
  color: #b6c782;
  background: rgba(216, 242, 92, 0.08);
  border: 1px solid rgba(216, 242, 92, 0.13);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.company-search {
  position: relative;
  display: block;
  margin-bottom: 10px;
}

.company-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  color: #6f8780;
  transform: translateY(-50%);
}

.company-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 37px;
  color: #e8f0ed;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.company-search input::placeholder {
  color: #6d827c;
}

.company-list {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #345049 transparent;
}

.company-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: #9fb2ac;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.company-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.company-item.active {
  color: #fff;
  background: var(--sidebar-soft);
  border-color: rgba(216, 242, 92, 0.16);
}

.company-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #bdd25e;
  background: #263f39;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
}

.company-item.active .company-avatar {
  color: #15251f;
  background: var(--accent);
}

.company-item strong,
.company-item span {
  display: block;
  min-width: 0;
}

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

.company-item span {
  margin-top: 2px;
  color: #6f8780;
  font-size: 10px;
}

.company-skeleton {
  height: 54px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  background-size: 200% 100%;
  border-radius: 11px;
  animation: shimmer 1.5s infinite;
}

.sidebar-footer {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.system-status,
.user-card {
  display: flex;
  align-items: center;
}

.system-status {
  gap: 10px;
  padding: 2px 8px 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #87dca8;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(135, 220, 168, 0.10);
}

.system-status strong,
.system-status span {
  display: block;
}

.system-status strong {
  color: #bed0ca;
  font-size: 10px;
}

.system-status span {
  color: #5f7972;
  font-size: 9px;
}

.user-card {
  gap: 9px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 11px;
}

.avatar {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #15251f;
  background: #dbe89e;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
}

.user-card div {
  min-width: 0;
  flex: 1;
}

.user-card strong,
.user-card span {
  display: block;
}

.user-card strong {
  color: #dbe7e3;
  font-size: 10px;
}

.user-card span {
  color: #708982;
  font-size: 9px;
}

.user-card button {
  color: #708982;
  background: none;
  border: 0;
  cursor: pointer;
}

.main-area {
  min-height: 100vh;
  margin-left: 264px;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: rgba(247, 249, 245, 0.88);
  border-bottom: 1px solid rgba(208, 217, 209, 0.78);
  backdrop-filter: blur(16px);
}

.topbar-left,
.topbar-actions,
.breadcrumb,
.environment-badge {
  display: flex;
  align-items: center;
}

.breadcrumb {
  gap: 9px;
  color: #8a9692;
  font-size: 12px;
}

.breadcrumb i {
  color: #c5cdc8;
  font-style: normal;
}

.breadcrumb strong {
  color: #43524e;
}

.topbar-actions {
  gap: 8px;
}

.environment-badge {
  gap: 7px;
  margin-right: 8px;
  padding: 6px 10px;
  color: #53635e;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.environment-badge span {
  width: 6px;
  height: 6px;
  background: #4da780;
  border-radius: 50%;
}

.icon-button,
.mobile-menu {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: 160ms ease;
}

.icon-button:hover {
  border-color: #bbc8bd;
  transform: translateY(-1px);
}

.icon-button svg {
  width: 17px;
}

.mobile-menu {
  display: none;
}

.content-wrap {
  position: relative;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 30px 30px 20px;
}

.page-view {
  display: none;
  animation: fade-up 260ms ease;
}

.page-view.active {
  display: block;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 2px 0 22px;
}

.page-heading.compact {
  align-items: center;
  margin-bottom: 24px;
}

.eyebrow,
.card-kicker {
  color: var(--teal);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.page-heading h1 {
  margin: 5px 0 5px;
  color: #14231f;
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.page-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.company-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 24px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  color: #61706b;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.last-updated {
  color: #899590;
  font-size: 10px;
}

.button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

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

.button-primary {
  color: #14251f;
  background: var(--accent);
  border: 1px solid #c8df56;
  box-shadow: 0 8px 18px rgba(123, 148, 39, 0.15);
}

.button-primary:hover {
  box-shadow: 0 10px 22px rgba(123, 148, 39, 0.22);
}

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

.button-secondary {
  color: #374943;
  background: #fff;
  border: 1px solid var(--line-strong);
}

.full-width {
  width: 100%;
}

.agent-query {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
  padding: 10px 11px 10px 13px;
  background: #17312c;
  border: 1px solid rgba(216, 242, 92, 0.12);
  border-radius: 15px;
  box-shadow: 0 12px 25px rgba(25, 50, 44, 0.12);
}

.agent-orb {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--accent);
  background: rgba(216, 242, 92, 0.08);
  border: 1px solid rgba(216, 242, 92, 0.19);
  border-radius: 50%;
}

.agent-orb svg {
  width: 19px;
}

.agent-query label {
  min-width: 0;
}

.agent-query label span {
  display: block;
  color: #91aaa3;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.agent-query input {
  width: 100%;
  padding: 2px 0;
  color: #eff6f3;
  background: transparent;
  border: 0;
  font-size: 13px;
}

.agent-query input:focus {
  outline: 0;
}

.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 227, 220, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

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

.card-head h2 {
  margin: 3px 0 0;
  color: #243530;
  font-size: 15px;
  line-height: 1.3;
}

.info-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 4px 8px;
  color: #708078;
  background: #f5f7f3;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(420px, 2.3fr) repeat(3, minmax(145px, 0.75fr));
  gap: 14px;
}

.score-card {
  padding: 20px 22px;
}

.score-layout {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 15px;
}

.score-ring {
  --score-deg: 0deg;
  position: relative;
  display: grid;
  width: 118px;
  height: 118px;
  flex: 0 0 auto;
  place-items: center;
  background: conic-gradient(var(--accent-dark) var(--score-deg), #edf0ea 0);
  border-radius: 50%;
  transition: background 450ms ease;
}

.score-ring::before {
  position: absolute;
  width: 88px;
  height: 88px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #edf0ea;
}

.score-ring-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-ring-inner strong,
.score-ring-inner span {
  display: block;
}

.score-ring-inner strong {
  color: #1a2b26;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.score-ring-inner span {
  margin-top: 5px;
  color: #9aa49f;
  font-size: 9px;
}

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

.risk-level {
  display: inline-flex;
  padding: 4px 9px;
  color: #96524e;
  background: var(--danger-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

.risk-level.stable {
  color: #34745f;
  background: var(--positive-soft);
}

.score-copy p {
  display: -webkit-box;
  margin: 9px 0 8px;
  overflow: hidden;
  color: #5f6e69;
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.review-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7a8782;
  font-size: 9px;
}

.review-status::before {
  width: 6px;
  height: 6px;
  content: "";
  background: #9aac9f;
  border-radius: 50%;
}

.review-status.required {
  color: #ad655f;
}

.review-status.required::before {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.metric-card {
  position: relative;
  min-height: 174px;
  padding: 18px;
  overflow: hidden;
}

.metric-card::after {
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 100px;
  height: 100px;
  content: "";
  background: currentColor;
  border-radius: 50%;
  opacity: 0.035;
}

.metric-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 19px;
  place-items: center;
  border-radius: 10px;
}

.metric-icon svg {
  width: 18px;
}

.metric-card > span,
.metric-card > strong,
.metric-card > small {
  display: block;
}

.metric-card > span {
  color: #71807a;
  font-size: 10px;
  font-weight: 700;
}

.metric-card > strong {
  margin: 3px 0 4px;
  color: #20302c;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.metric-card > small {
  color: #a0aaa5;
  font-size: 9px;
}

.metric-danger {
  color: var(--danger);
}

.metric-warning {
  color: var(--warning);
}

.metric-positive {
  color: var(--positive);
}

.metric-danger .metric-icon {
  background: var(--danger-soft);
}

.metric-warning .metric-icon {
  background: var(--warning-soft);
}

.metric-positive .metric-icon {
  background: var(--positive-soft);
}

.analytics-grid,
.insight-grid,
.evidence-summary-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.analytics-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
}

.trend-card,
.dimension-card,
.risk-preview-card,
.service-card {
  padding: 20px 22px;
}

.metric-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.metric-tab {
  padding: 5px 8px;
  color: #7a8882;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 9px;
}

.metric-tab:hover,
.metric-tab.active {
  color: #27483f;
  background: #f2f6ee;
  border-color: #dce5da;
}

.chart-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 17px;
}

.chart-summary strong {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.chart-summary span {
  padding: 3px 7px;
  color: var(--positive);
  background: var(--positive-soft);
  border-radius: 999px;
  font-size: 9px;
}

.chart-summary span.negative {
  color: var(--danger);
  background: var(--danger-soft);
}

.line-chart {
  min-height: 212px;
  margin-top: 4px;
}

.line-chart svg {
  display: block;
  width: 100%;
  height: 212px;
  overflow: visible;
}

.chart-grid-line {
  stroke: #edf0eb;
  stroke-width: 1;
}

.chart-area {
  fill: url(#chartAreaGradient);
}

.chart-line {
  fill: none;
  stroke: #2d7766;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: #fff;
  stroke: #2d7766;
  stroke-width: 2.5;
}

.chart-label {
  fill: #8c9994;
  font-family: var(--font);
  font-size: 9px;
}

.chart-value {
  fill: #465852;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 700;
}

.dimension-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.dimension-row {
  display: grid;
  grid-template-columns: 72px 1fr 26px;
  align-items: center;
  gap: 10px;
}

.dimension-row label {
  color: #5e6d68;
  font-size: 10px;
}

.dimension-bar {
  height: 7px;
  overflow: hidden;
  background: #edf0eb;
  border-radius: 999px;
}

.dimension-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
  transition: width 600ms ease;
}

.dimension-bar span.low {
  background: var(--danger);
}

.dimension-bar span.medium {
  background: var(--warning);
}

.dimension-row strong {
  color: #354640;
  font-size: 10px;
  text-align: right;
}

.insight-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
}

.text-button {
  padding: 4px;
  color: var(--teal);
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.text-button:hover {
  color: #1d5c4d;
}

.risk-preview-list,
.service-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.risk-preview-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  background: #fafbf8;
  border: 1px solid #edf0eb;
  border-radius: 11px;
}

.risk-severity-dot {
  width: 8px;
  height: 8px;
  background: var(--warning);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--warning-soft);
}

.risk-severity-dot.high {
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

.risk-preview-item strong,
.risk-preview-item span {
  display: block;
}

.risk-preview-item strong {
  overflow: hidden;
  color: #354640;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-preview-item span {
  margin-top: 2px;
  overflow: hidden;
  color: #8a9691;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-preview-item small {
  color: #8d9994;
  font-size: 9px;
}

.service-item {
  position: relative;
  padding: 12px 12px 12px 39px;
  background: linear-gradient(135deg, #f5f8f2, #fbfcfa);
  border: 1px solid #e7ece5;
  border-radius: 11px;
}

.service-item::before {
  position: absolute;
  top: 13px;
  left: 13px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  content: "→";
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
}

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

.service-item strong {
  color: #385048;
  font-size: 10px;
}

.service-item span {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: #7b8984;
  font-size: 9px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.empty-state {
  padding: 24px;
  color: #87948f;
  background: #fafbf8;
  border: 1px dashed #dce3dc;
  border-radius: 12px;
  text-align: center;
}

.status-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 14px;
  color: #825d26;
  background: #fff8e8;
  border: 1px solid #efdda9;
  border-radius: 12px;
}

.status-banner svg {
  width: 21px;
}

.status-banner strong,
.status-banner span {
  display: block;
}

.status-banner strong {
  font-size: 11px;
}

.status-banner span {
  margin-top: 1px;
  color: #9b7740;
  font-size: 9px;
}

.status-banner button {
  color: #9b7740;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 20px;
}

.risk-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
}

.risk-summary-donut {
  --risk-gradient: conic-gradient(#e6eae4 0 100%);
  position: relative;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  background: var(--risk-gradient);
  border-radius: 50%;
}

.risk-summary-donut::before {
  position: absolute;
  width: 62px;
  height: 62px;
  content: "";
  background: #fff;
  border-radius: 50%;
}

.risk-summary-donut div {
  position: relative;
  z-index: 1;
  text-align: center;
}

.risk-summary-donut strong,
.risk-summary-donut span {
  display: block;
}

.risk-summary-donut strong {
  font-size: 21px;
  line-height: 1;
}

.risk-summary-donut span {
  margin-top: 4px;
  color: #8b9792;
  font-size: 8px;
}

.risk-summary-copy h2 {
  margin: 0 0 4px;
  font-size: 15px;
}

.risk-summary-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.filter-chips {
  display: flex;
  gap: 5px;
}

.filter-chip {
  padding: 6px 10px;
  color: #788680;
  background: #f8f9f6;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 9px;
}

.filter-chip:hover,
.filter-chip.active {
  color: #fff;
  background: #24493f;
  border-color: #24493f;
}

.risk-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.risk-detail-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.risk-detail-card[open] {
  border-color: #cfd8d0;
  box-shadow: var(--shadow-hover);
}

.risk-detail-card summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  list-style: none;
  cursor: pointer;
}

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

.severity-badge {
  min-width: 50px;
  padding: 4px 8px;
  color: #a4504c;
  background: var(--danger-soft);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.severity-badge.medium {
  color: #a46b26;
  background: var(--warning-soft);
}

.severity-badge.low {
  color: #397761;
  background: var(--positive-soft);
}

.risk-summary-main {
  min-width: 0;
}

.risk-summary-main strong,
.risk-summary-main span {
  display: block;
}

.risk-summary-main strong {
  color: #2c3e38;
  font-size: 12px;
}

.risk-summary-main span {
  margin-top: 3px;
  overflow: hidden;
  color: #78857f;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-id {
  color: #8e9a95;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
}

.expand-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #9da8a3;
  border-bottom: 2px solid #9da8a3;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.risk-detail-card[open] .expand-chevron {
  transform: rotate(225deg);
}

.risk-detail-body {
  padding: 0 18px 18px;
  border-top: 1px solid #edf0eb;
}

.risk-explanation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 15px;
}

.explanation-box {
  padding: 12px;
  background: #f8faf7;
  border: 1px solid #e9ede8;
  border-radius: 10px;
}

.explanation-box label {
  display: block;
  margin-bottom: 5px;
  color: #2d7766;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.explanation-box p {
  margin: 0;
  color: #62706b;
  font-size: 10px;
}

.evidence-title {
  margin: 16px 0 8px;
  font-size: 11px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.evidence-item {
  padding: 10px 11px;
  background: #fff;
  border: 1px solid #e1e7e1;
  border-left: 3px solid #79a99a;
  border-radius: 8px;
}

.evidence-item code {
  color: #2f7463;
  font-size: 8px;
}

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

.evidence-item strong {
  margin-top: 3px;
  font-size: 10px;
}

.evidence-item span {
  margin-top: 2px;
  color: #84908b;
  font-size: 8px;
}

.action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.action-list span {
  padding: 5px 8px;
  color: #49635b;
  background: var(--teal-soft);
  border-radius: 7px;
  font-size: 9px;
}

.materials-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
}

.material-form-card,
.material-result-card {
  padding: 20px 22px;
}

.select-control {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #7c8984;
  font-size: 9px;
}

.select-control select {
  height: 32px;
  padding: 0 28px 0 10px;
  color: #40514b;
  background: #f7f9f5;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.material-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 17px 0 10px;
}

.material-actions-row p {
  margin: 0;
  color: #7d8985;
  font-size: 10px;
}

.material-checklist {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.material-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(130px, 0.55fr) minmax(95px, 0.4fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fafbf8;
  border: 1px solid #e9ede8;
  border-radius: 10px;
}

.material-row > label:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #40514b;
  font-size: 10px;
  font-weight: 700;
}

.material-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2f7665;
}

.material-row .field-label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px;
  color: #8b9792;
  font-size: 8px;
}

.material-row input[type="date"],
.material-row select {
  width: 100%;
  height: 31px;
  min-width: 0;
  padding: 0 7px;
  color: #55645f;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 9px;
}

.material-row.disabled {
  opacity: 0.55;
}

.empty-result {
  display: grid;
  min-height: 410px;
  place-items: center;
  align-content: center;
  color: #83908b;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 13px;
  place-items: center;
  color: #7c9c91;
  background: #f0f5f1;
  border-radius: 18px;
}

.empty-icon svg {
  width: 28px;
}

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

.empty-result strong {
  color: #53635e;
  font-size: 12px;
}

.empty-result span {
  max-width: 230px;
  margin-top: 5px;
  font-size: 9px;
}

.material-result {
  padding-top: 10px;
}

.result-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: #9b6132;
  background: var(--warning-soft);
  border: 1px solid #f0d9b8;
  border-radius: 11px;
}

.result-status.good {
  color: #34745f;
  background: var(--positive-soft);
  border-color: #cce4da;
}

.result-status b {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 8px;
}

.result-status strong,
.result-status span {
  display: block;
}

.result-status strong {
  font-size: 10px;
}

.result-status span {
  font-size: 8px;
}

.result-section {
  margin-top: 16px;
}

.result-section h3 {
  margin: 0 0 7px;
  font-size: 10px;
}

.result-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  position: relative;
  padding: 8px 9px 8px 24px;
  color: #66746f;
  background: #fafbf8;
  border: 1px solid #e9ede8;
  border-radius: 8px;
  font-size: 9px;
}

.result-list li::before {
  position: absolute;
  top: 8px;
  left: 9px;
  content: "•";
  color: var(--warning);
  font-weight: 900;
}

.result-boundary {
  margin-top: 16px;
  padding: 9px;
  color: #8a9691;
  background: #f5f7f3;
  border-radius: 8px;
  font-size: 8px;
}

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

.quality-card,
.source-card,
.trace-card,
.indicator-table-card {
  padding: 20px 22px;
}

.quality-grade {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #376c5c;
  background: var(--positive-soft);
  border-radius: 11px;
  font-size: 13px;
  font-weight: 850;
}

.quality-meter {
  height: 7px;
  margin: 20px 0 14px;
  overflow: hidden;
  background: #edf0eb;
  border-radius: 999px;
}

.quality-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #4a8b75, #91c384);
  border-radius: inherit;
  transition: width 600ms ease;
}

.quality-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.quality-list div {
  display: flex;
  justify-content: space-between;
  padding-bottom: 7px;
  border-bottom: 1px dashed #e5e9e4;
}

.quality-list div:last-child {
  padding-bottom: 0;
  border: 0;
}

.quality-list dt {
  color: #84908b;
  font-size: 9px;
}

.quality-list dd {
  margin: 0;
  color: #41524c;
  font-size: 9px;
  font-weight: 750;
}

.source-list,
.tool-trace {
  display: grid;
  gap: 7px;
  margin-top: 17px;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  color: #597069;
  background: #f7f9f5;
  border: 1px solid #e7ece6;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
}

.source-item::before {
  width: 6px;
  height: 6px;
  content: "";
  background: #69a48d;
  border-radius: 50%;
}

.trace-step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  color: #5f6f69;
  font-size: 9px;
}

.trace-step:not(:last-child)::after {
  position: absolute;
  top: 22px;
  left: 8px;
  width: 1px;
  height: 16px;
  content: "";
  background: #dbe3dc;
}

.trace-index {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #fff;
  background: #4b8975;
  border-radius: 50%;
  font-size: 7px;
}

.trace-status {
  color: #46836e;
  font-size: 8px;
}

.indicator-table-card {
  margin-top: 14px;
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

.indicator-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

.indicator-table th {
  padding: 9px 10px;
  color: #7e8b86;
  background: #f5f7f3;
  border-bottom: 1px solid var(--line);
  font-weight: 750;
  text-align: left;
  white-space: nowrap;
}

.indicator-table td {
  padding: 10px;
  color: #596863;
  border-bottom: 1px solid #edf0eb;
  vertical-align: top;
}

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

.indicator-name {
  color: #31443d;
  font-weight: 750;
  white-space: nowrap;
}

.indicator-value {
  color: #2e7564;
  font-weight: 800;
  white-space: nowrap;
}

.indicator-source {
  color: #8b9792;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 2px 4px;
  color: #8b9692;
  font-size: 8px;
}

.page-footer > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-shield {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #3e7b68;
  background: var(--positive-soft);
  border-radius: 50%;
  font-size: 8px;
  font-weight: 900;
}

.loading-overlay {
  position: fixed;
  z-index: 80;
  inset: 64px 0 0 264px;
  display: none;
  place-items: center;
  align-content: center;
  color: #41534c;
  background: rgba(244, 246, 241, 0.78);
  backdrop-filter: blur(5px);
}

.loading-overlay.visible {
  display: grid;
}

.loading-overlay strong,
.loading-overlay span {
  display: block;
}

.loading-overlay strong {
  margin-top: 14px;
  font-size: 12px;
}

.loading-overlay span {
  margin-top: 4px;
  color: #84908b;
  font-size: 9px;
}

.loader-ring {
  width: 38px;
  height: 38px;
  border: 3px solid #dce3da;
  border-top-color: #467f6e;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 11px 14px;
  color: #edf5f1;
  background: #19342e;
  border: 1px solid rgba(216, 242, 92, 0.18);
  border-radius: 11px;
  box-shadow: 0 18px 42px rgba(13, 36, 30, 0.22);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

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

.toast.error {
  background: #713c38;
  border-color: #9c5651;
}

.mobile-scrim {
  display: none;
}

/* Tech-finance visual system */
.sidebar::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(110, 240, 214, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 240, 214, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.2) 68%, transparent 100%);
}

.sidebar::after {
  position: absolute;
  z-index: 0;
  top: 94px;
  right: -1px;
  width: 1px;
  height: 34%;
  pointer-events: none;
  content: "";
  background: linear-gradient(transparent, rgba(103, 239, 213, 0.75), transparent);
  box-shadow: 0 0 16px rgba(84, 228, 208, 0.42);
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.brand {
  min-height: 82px;
  gap: 10px;
  padding: 16px 18px;
  border-bottom-color: rgba(105, 226, 204, 0.12);
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  background: radial-gradient(circle, rgba(84, 228, 208, 0.09), transparent 68%);
  border: 0;
  border-radius: 15px;
}

.brand-mark::before {
  position: absolute;
  inset: 4px;
  content: "";
  border: 1px solid rgba(220, 255, 89, 0.13);
  border-radius: 50%;
  animation: tech-pulse 3.2s ease-in-out infinite;
}

.brand-mark img {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 0 10px rgba(84, 228, 208, 0.20));
}

.brand-copy {
  min-width: 0;
  flex: 1;
}

.brand strong {
  text-shadow: 0 0 18px rgba(84, 228, 208, 0.16);
}

.brand span {
  overflow: hidden;
  color: #7fa49d;
  font-size: 7.5px;
  letter-spacing: 0.11em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-live {
  position: relative;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(84, 228, 208, 0.08), 0 0 11px rgba(84, 228, 208, 0.8);
  animation: tech-pulse 2.4s ease-in-out infinite;
}

.nav-item {
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(84, 228, 208, 0.055);
  border-color: rgba(84, 228, 208, 0.08);
}

.nav-item.active {
  background: linear-gradient(102deg, #dcff59 0%, #c9f455 100%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 22px rgba(4, 18, 16, 0.28), 0 0 22px rgba(220, 255, 89, 0.09);
}

.nav-item.active::before {
  position: absolute;
  left: 5px;
  width: 2px;
  height: 18px;
  content: "";
  background: rgba(12, 40, 35, 0.32);
  border-radius: 3px;
}

.topbar {
  background: rgba(242, 248, 245, 0.82);
  border-bottom-color: rgba(72, 136, 123, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 28px rgba(9, 53, 45, 0.035);
  backdrop-filter: blur(20px) saturate(1.12);
}

.environment-badge {
  gap: 6px;
  padding: 6px 10px 6px 8px;
  color: #58716b;
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(51, 129, 114, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
  letter-spacing: 0.045em;
}

.environment-badge span {
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(84, 228, 208, 0.12), 0 0 9px rgba(84, 228, 208, 0.64);
  animation: tech-pulse 2.4s ease-in-out infinite;
}

.environment-badge b {
  color: #254a43;
  font-size: 9px;
}

.environment-badge i {
  color: #3b9b88;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
}

.icon-button {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(51, 119, 106, 0.15);
}

.icon-button:hover {
  color: #116e5e;
  border-color: rgba(30, 145, 125, 0.34);
  box-shadow: 0 8px 20px rgba(20, 91, 78, 0.08);
}

.eyebrow,
.card-kicker {
  color: #147b69;
  text-shadow: 0 0 18px rgba(84, 228, 208, 0.16);
}

.eyebrow::before {
  display: inline-block;
  width: 18px;
  height: 1px;
  margin-right: 8px;
  vertical-align: middle;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  box-shadow: 0 0 7px rgba(84, 228, 208, 0.4);
}

.page-heading h1 {
  color: #102823;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8);
}

.agent-query {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 6% 0%, rgba(220, 255, 89, 0.09), transparent 12rem),
    linear-gradient(105deg, #102d2a 0%, #0d2726 54%, #0a2221 100%);
  border-color: rgba(84, 228, 208, 0.18);
  box-shadow: 0 14px 34px rgba(7, 35, 31, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.agent-query::before {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: -28%;
  width: 25%;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(84, 228, 208, 0.07), transparent);
  transform: skewX(-18deg);
  animation: scan-line 6.8s ease-in-out infinite;
}

.agent-query > * {
  position: relative;
  z-index: 1;
}

.agent-query::after {
  position: absolute;
  right: 124px;
  bottom: 0;
  left: 62px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, rgba(84, 228, 208, 0.52), rgba(220, 255, 89, 0.16), transparent);
}

.agent-orb {
  color: var(--accent);
  background: radial-gradient(circle, rgba(220, 255, 89, 0.13), rgba(84, 228, 208, 0.035));
  border-color: rgba(84, 228, 208, 0.30);
  box-shadow: 0 0 0 4px rgba(84, 228, 208, 0.035), inset 0 0 12px rgba(84, 228, 208, 0.08);
}

.agent-core-label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  color: #8fb9b1 !important;
  letter-spacing: 0.09em !important;
}

.agent-core-label i {
  width: 4px;
  height: 4px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(84, 228, 208, 0.9);
}

.agent-query input {
  caret-color: var(--accent);
}

.agent-query .button-primary {
  background: linear-gradient(105deg, #dcff59, #c9f152);
  border-color: rgba(238, 255, 167, 0.75);
  box-shadow: 0 8px 20px rgba(145, 175, 47, 0.20), 0 0 18px rgba(220, 255, 89, 0.07);
}

.card {
  position: relative;
  background:
    linear-gradient(135deg, rgba(84, 228, 208, 0.022), transparent 38%),
    rgba(255, 255, 255, 0.95);
  border-color: rgba(40, 109, 96, 0.13);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card::before {
  position: absolute;
  z-index: 1;
  top: -1px;
  left: 17px;
  width: 52px;
  height: 2px;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, var(--cyan), rgba(220, 255, 89, 0.3), transparent);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(84, 228, 208, 0.2);
}

.metric-card {
  background-image:
    linear-gradient(135deg, rgba(84, 228, 208, 0.04), transparent 45%),
    linear-gradient(rgba(32, 128, 111, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 128, 111, 0.025) 1px, transparent 1px);
  background-size: auto, 18px 18px, 18px 18px;
}

.score-ring {
  box-shadow: 0 0 0 6px rgba(84, 228, 208, 0.035), 0 8px 26px rgba(41, 131, 114, 0.10);
}

.score-ring::before {
  box-shadow: inset 0 0 0 1px rgba(51, 128, 113, 0.11), 0 0 20px rgba(84, 228, 208, 0.06);
}

.chart-grid-line {
  stroke: #e7efeb;
}

.chart-line {
  stroke: #26a68f;
  filter: drop-shadow(0 2px 3px rgba(38, 166, 143, 0.16));
}

.chart-dot {
  stroke: #26a68f;
}

.dimension-bar {
  background: #e8f0ec;
  box-shadow: inset 0 0 0 1px rgba(35, 107, 94, 0.04);
}

.dimension-bar span:not(.low):not(.medium) {
  background: linear-gradient(90deg, #239b85, #56dfc8);
  box-shadow: 0 0 8px rgba(84, 228, 208, 0.18);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    border-color: rgba(36, 145, 125, 0.23);
    box-shadow: var(--shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    transform: translateY(-2px);
  }
}

@keyframes tech-pulse {
  0%, 100% { opacity: 0.72; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes scan-line {
  0%, 18% { left: -28%; opacity: 0; }
  28% { opacity: 1; }
  72% { opacity: 0.72; }
  82%, 100% { left: 112%; opacity: 0; }
}

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

@keyframes fade-up {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

  .score-card {
    grid-column: 1 / -1;
  }

  .score-layout {
    max-width: 760px;
  }

  .analytics-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

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

  .trace-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .sidebar {
    width: 264px;
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }

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

  .mobile-scrim {
    position: fixed;
    z-index: 35;
    inset: 0;
    background: rgba(10, 30, 25, 0.38);
  }

  .mobile-scrim.visible {
    display: block;
  }

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

  .mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-right: 12px;
  }

  .mobile-menu span {
    display: block;
    width: 15px;
    height: 1.5px;
    background: #43534e;
    border-radius: 2px;
  }

  .loading-overlay {
    left: 0;
  }

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

  .empty-result {
    min-height: 240px;
  }
}

@media (max-width: 680px) {
  .topbar {
    height: 58px;
    padding: 0 14px;
  }

  .environment-badge {
    display: none;
  }

  .content-wrap {
    padding: 20px 14px 14px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .agent-query {
    grid-template-columns: auto 1fr;
  }

  .agent-query .button {
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .score-card {
    grid-column: 1 / -1;
  }

  .metric-card:last-child {
    grid-column: 1 / -1;
    min-height: 140px;
  }

  .score-layout {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }

  .score-ring {
    width: 102px;
    height: 102px;
  }

  .score-ring::before {
    width: 76px;
    height: 76px;
  }

  .card-head-responsive {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-tabs {
    justify-content: flex-start;
  }

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

  .filter-chips {
    grid-column: 1 / -1;
    overflow-x: auto;
  }

  .risk-detail-card summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
  }

  .rule-id {
    display: none;
  }

  .risk-explanation-grid,
  .evidence-summary-grid {
    grid-template-columns: 1fr;
  }

  .trace-card {
    grid-column: auto;
  }

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

  .material-row .field-label {
    grid-template-columns: 60px 1fr;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .breadcrumb span,
  .breadcrumb i {
    display: none;
  }

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

  .metric-card:last-child {
    grid-column: auto;
  }

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

  .score-card,
  .trend-card,
  .dimension-card,
  .risk-preview-card,
  .service-card,
  .material-form-card,
  .material-result-card,
  .quality-card,
  .source-card,
  .trace-card,
  .indicator-table-card {
    padding: 17px;
  }
}

@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;
  }
}
