@font-face {
  font-family: Inter;
  src: url('assets/inter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --cool-mist: #eef2f3;
  --ice-white: #fafcfc;
  --white: #ffffff;
  --steel-tint: #e5ebed;
  --graphite: #101719;
  --steel: #536169;
  --border: #c9d2d5;
  --deep-steel: #18343f;
  --accent-steel: #3b5560;
  --dark: #0d171b;
  --inverse: #f8fbfb;
  --success: #287257;
  --warning: #9a6b19;
  --danger: #a7443e;
  --sidebar-width: 260px;
  --banner-height: 36px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--cool-mist);
  color: var(--graphite);
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
input,
select,
textarea,
[tabindex] {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(59, 85, 96, 0.78);
  outline-offset: 2px;
}

button {
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--graphite);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.demo-banner {
  position: fixed;
  z-index: 80;
  inset: 0 0 auto;
  height: var(--banner-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  background: var(--deep-steel);
  color: var(--inverse);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.demo-banner span {
  padding-right: 12px;
  border-right: 1px solid rgba(248, 251, 251, 0.28);
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.demo-banner p {
  margin: 0;
  color: #d5e0e3;
}

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

.sidebar {
  position: sticky;
  z-index: 50;
  top: var(--banner-height);
  height: calc(100vh - var(--banner-height));
  padding: 26px 18px 22px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid #294048;
  background: var(--dark);
  color: var(--inverse);
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.46;
  background-image:
    linear-gradient(rgba(220, 232, 236, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 232, 236, 0.022) 1px, transparent 1px);
  background-size: 52px 52px;
}

.sidebar > * {
  position: relative;
}

.brand {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.brandmark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--accent-steel);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.brand strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: #93a7ae;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar nav {
  display: grid;
  gap: 3px;
}

.nav {
  min-height: 44px;
  width: 100%;
  padding: 0 11px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  border-left: 2px solid transparent;
  border-radius: 0 2px 2px 0;
  background: transparent;
  color: #aebdc2;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.nav:hover {
  background: rgba(229, 235, 237, 0.06);
  color: var(--white);
}

.nav.active {
  border-left-color: var(--accent-steel);
  background: rgba(59, 85, 96, 0.2);
  color: var(--white);
}

.nav-index {
  color: #8fa0a6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.nav.active .nav-index {
  color: #c1cdd1;
}

.nav > span:nth-child(2) {
  font-size: 13px;
  font-weight: 550;
}

.nav b {
  min-width: 22px;
  padding: 2px 6px;
  border: 1px solid #36515b;
  border-radius: 999px;
  color: #a7bbc2;
  font-size: 10px;
  text-align: center;
}

.case-card {
  width: 100%;
  margin-top: 26px;
  padding: 15px;
  display: grid;
  gap: 5px;
  border: 1px solid #2a414a;
  border-radius: 2px;
  background: rgba(248, 251, 251, 0.035);
  color: var(--inverse);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.case-card:hover {
  border-color: #4c6d79;
  background: rgba(248, 251, 251, 0.06);
}

.case-card small {
  color: #7d969f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.case-card strong {
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.case-card span {
  color: #b8c7cc;
  font-size: 11px;
}

.case-card em {
  margin-top: 6px;
  color: #c1cdd1;
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 26px;
  display: grid;
  gap: 2px;
}

.sidebar-foot button,
.sidebar-foot a {
  padding: 9px 10px;
  background: transparent;
  color: #8fa4ab;
  font-size: 11px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-foot button:hover,
.sidebar-foot a:hover {
  color: var(--white);
}

.sidebar-scrim {
  display: none;
}

.app-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: var(--banner-height);
  min-height: 82px;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(250, 252, 252, 0.97);
  backdrop-filter: blur(10px);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 5px;
  color: var(--deep-steel);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.menu-button {
  width: 42px;
  height: 42px;
  display: none;
  align-content: center;
  gap: 7px;
  padding: 10px;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  width: 22px;
  height: 1px;
  background: var(--graphite);
}

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

.environment-chip {
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--steel);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.environment-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.notification-wrap {
  position: relative;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--white);
  cursor: pointer;
}

.icon-button span {
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--deep-steel);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
}

.notification-panel {
  position: absolute;
  top: 44px;
  right: 0;
  width: 290px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--white);
  box-shadow: 0 16px 34px rgba(16, 23, 25, 0.14);
}

.notification-panel strong {
  font-size: 13px;
}

.notification-panel p {
  margin: 8px 0 14px;
  color: var(--steel);
  font-size: 12px;
  line-height: 1.5;
}

.notification-panel button {
  padding: 0;
  background: transparent;
  color: var(--deep-steel);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: var(--deep-steel);
  color: var(--inverse);
  font-size: 11px;
  font-weight: 700;
}

.analyst-label strong,
.analyst-label small {
  display: block;
}

.analyst-label strong {
  font-size: 11px;
  font-weight: 650;
}

.analyst-label small {
  margin-top: 2px;
  color: var(--steel);
  font-size: 9px;
}

main {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 32px;
  flex: 1;
}

.view {
  display: none;
}

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

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

.section-lead {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.section-lead h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.section-lead > p {
  max-width: 520px;
  margin: 0;
  color: var(--steel);
  font-size: 12px;
  line-height: 1.6;
}

.metrics {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metrics article,
.panel,
.report-cards article,
.filter-panel,
.detail-panel,
.gallery-wrap {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--white);
}

.metrics article {
  min-height: 132px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.metrics article::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--steel-tint);
}

.metrics article:first-child::after {
  background: var(--accent-steel);
}

.metrics span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 550;
}

.metrics strong {
  display: block;
  margin: 12px 0 10px;
  font-size: 30px;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.metrics small {
  color: var(--steel);
  font-size: 10px;
}

.up {
  color: var(--success) !important;
}

.down {
  color: var(--danger) !important;
}

.panel-grid {
  margin-bottom: 16px;
  display: grid;
  gap: 12px;
}

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

.three-col {
  grid-template-columns: 0.9fr 1fr 1fr;
}

.analysis-grid {
  grid-template-columns: 1.12fr 0.88fr;
}

.panel {
  padding: 20px;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.panel-title {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-title h2 {
  margin: 0;
}

.period-button,
.text-button,
.report-cards button,
.missing button {
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--ice-white);
  color: var(--deep-steel);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.period-button::after {
  content: '⌄';
  padding-left: 6px;
  color: var(--steel);
}

.text-button {
  padding-inline: 0;
  border: 0;
  background: transparent;
}

.primary,
.secondary {
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.primary {
  border-color: var(--deep-steel);
  background: var(--deep-steel);
  color: var(--inverse);
}

.primary:hover {
  border-color: #214754;
  background: #214754;
}

.secondary {
  border-color: var(--border);
  background: var(--ice-white);
  color: var(--graphite);
}

.secondary:hover {
  border-color: var(--accent-steel);
  color: var(--deep-steel);
}

.approved {
  border-color: var(--success) !important;
  background: var(--success) !important;
}

.chart-row {
  min-height: 185px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
}

.donut {
  width: 144px;
  height: 144px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#3b5560 0 37%, #60747c 37% 56%, #89989d 56% 89%, #3f6d5c 89% 95%, #b5bec1 95%);
}

.donut::before {
  content: '';
  width: 84px;
  height: 84px;
  position: absolute;
  border-radius: 50%;
  background: var(--white);
}

.donut span {
  z-index: 1;
  font-size: 24px;
  font-weight: 650;
  text-align: center;
}

.donut small {
  display: block;
  margin-top: 2px;
  color: var(--steel);
  font-size: 9px;
  font-weight: 500;
}

.legend {
  min-width: 210px;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
  font-size: 10px;
}

.legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 1px;
}

.blue { background: #3b5560; }
.orange { background: #60747c; }
.yellow { background: #89989d; }
.green { background: #3f6d5c; }
.gray { background: #b5bec1; }

.bars {
  min-height: 185px;
  display: grid;
  align-content: center;
  gap: 16px;
}

.bars label {
  display: grid;
  grid-template-columns: 150px 1fr 28px;
  align-items: center;
  gap: 12px;
  color: var(--steel);
  font-size: 10px;
}

.bars label span {
  height: 7px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--accent-steel) var(--w), var(--steel-tint) var(--w));
}

.bar-88 { --w: 88%; }
.bar-74 { --w: 74%; }
.bar-59 { --w: 59%; }
.bar-42 { --w: 42%; }
.bar-33 { --w: 33%; }

.bars b {
  color: var(--graphite);
  font-weight: 600;
  text-align: right;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--steel);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

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

.clickrow {
  cursor: pointer;
}

.clickrow:hover {
  background: #f5f8f8;
}

.tag {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 650;
  white-space: nowrap;
}

.tag.amber {
  background: #e7ecee;
  color: #43555d;
}

.tag.blue {
  background: #e7ecee;
  color: #36515b;
}

.tag.yellow {
  background: #eff1f1;
  color: #5d6467;
}

.case-head {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.case-head h2 {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.case-head p:not(.section-kicker) {
  margin: 0;
  color: var(--steel);
  font-size: 11px;
}

.case-actions {
  display: flex;
  gap: 8px;
}

.stepper {
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--white);
  list-style: none;
}

.stepper li {
  padding: 12px;
  border-right: 1px solid var(--border);
  color: var(--steel);
  font-size: 10px;
  text-align: center;
}

.stepper li:last-child {
  border-right: 0;
}

.stepper .done {
  color: var(--success);
}

.stepper .active {
  border-bottom: 2px solid var(--accent-steel);
  background: #f1f6f7;
  color: var(--deep-steel);
  font-weight: 700;
}

dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 11px;
}

dt {
  color: var(--steel);
}

dd {
  margin: 0;
  font-weight: 600;
}

.callout,
.analysis-notice {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #d5e0e3;
  border-radius: 2px;
  background: #f5f8f8;
  color: var(--steel);
  font-size: 10px;
  line-height: 1.55;
}

.assessment {
  display: grid;
  align-content: start;
  gap: 8px;
}

.assessment span {
  color: var(--steel);
  font-size: 9px;
  text-transform: uppercase;
}

.assessment strong {
  font-size: 12px;
  font-weight: 620;
}

.confidence {
  margin: 8px 0;
}

.confidence b {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.confidence i,
.party i,
.confidence-box i,
.completeness i {
  height: 6px;
  display: block;
  overflow: hidden;
  border-radius: 1px;
  background: var(--steel-tint);
}

.confidence i span,
.party i span,
.confidence-box i span,
.completeness i span {
  height: 100%;
  display: block;
  background: var(--success);
}

.w-10 { width: 10%; }
.w-22 { width: 22%; }
.w-68 { width: 68%; }
.w-72 { width: 72%; }
.w-74 { width: 74%; }
.w-78 { width: 78%; }
.w-81 { width: 81%; }
.w-87 { width: 87%; }
.w-89 { width: 89%; }
.w-91 { width: 91%; }
.w-94 { width: 94%; }
.w-96 { width: 96%; }
.w-98 { width: 98%; }
.w-99 { width: 99%; }

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

.timeline div {
  min-height: 94px;
  padding: 13px;
  border-top: 2px solid var(--accent-steel);
  background: var(--ice-white);
}

.timeline .warn {
  border-color: var(--warning);
  background: #faf7ef;
}

.timeline b,
.timeline span {
  display: block;
  font-size: 10px;
}

.timeline span {
  margin-top: 7px;
  color: var(--steel);
  line-height: 1.5;
}

.evidence-layout {
  display: grid;
  grid-template-columns: 200px minmax(430px, 1fr) 320px;
  gap: 12px;
}

.mobile-filter-toggle {
  display: none;
}

.filter-panel {
  height: max-content;
  padding: 16px;
}

.filter-panel h3 {
  margin: 6px 0 9px;
  color: var(--steel);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filter-panel h3:not(:first-child) {
  margin-top: 20px;
}

.filter-panel label {
  min-height: 34px;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 4px;
  color: var(--steel);
  font-size: 10px;
  cursor: pointer;
}

input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--accent-steel);
}

.completeness {
  margin-top: 17px;
  padding-top: 16px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.completeness span,
.completeness small {
  color: var(--steel);
  font-size: 9px;
}

.completeness strong {
  font-size: 17px;
  font-weight: 620;
}

.gallery-wrap {
  padding: 14px;
}

.toolbar {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr 130px 150px;
  gap: 7px;
}

.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--ice-white);
  color: var(--graphite);
  font-size: 10px;
}

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

.evidence-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.evidence-card:hover,
.evidence-card.selected {
  border-color: var(--accent-steel);
  box-shadow: 0 0 0 1px var(--accent-steel);
}

.evidence-card .photo {
  height: 116px;
  position: relative;
  overflow: hidden;
  background: var(--steel-tint);
}

.evidence-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.evidence-card:hover img {
  transform: scale(1.02);
}

.evidence-card .photo span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 4px 6px;
  border-radius: 1px;
  background: rgba(13, 23, 27, 0.84);
  color: var(--white);
  font-size: 8px;
  text-transform: uppercase;
}

.evidence-card > div:last-child {
  padding: 10px;
}

.evidence-card h3 {
  margin: 0 0 5px;
  font-size: 10px;
  font-weight: 650;
}

.evidence-card p {
  margin: 0 0 8px;
  color: var(--steel);
  font-size: 8px;
}

.evidence-card small,
.tagrow {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.evidence-card small b,
.tagrow b {
  padding: 3px 5px;
  border: 1px solid #d5e2e7;
  border-radius: 1px;
  background: #f1f6f7;
  color: #43555d;
  font-size: 7px;
  font-weight: 600;
}

.gallery-empty {
  padding: 42px 20px;
  color: var(--steel);
  font-size: 11px;
  text-align: center;
}

.detail-panel {
  min-height: 540px;
  overflow: hidden;
}

.detail-empty {
  min-height: 540px;
  padding: 40px;
  display: grid;
  place-items: center;
  color: var(--steel);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.detail-image {
  width: 100%;
  height: 195px;
  object-fit: cover;
}

.detail-content {
  padding: 16px;
}

.kind {
  color: var(--deep-steel);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-content h2 {
  margin: 6px 0;
  font-size: 16px;
  font-weight: 650;
}

.detail-content > p,
.modal-info > p {
  color: var(--steel);
  font-size: 9px;
}

.tagrow {
  margin: 10px 0 16px;
}

.detail-content h3,
.modal-info h3 {
  color: var(--steel);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-content ul,
.modal-info ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 10px;
  line-height: 1.55;
}

.detail-content li,
.modal-info li {
  margin: 8px 0;
  padding-left: 13px;
  position: relative;
}

.detail-content li::before,
.modal-info li::before {
  content: '';
  width: 5px;
  height: 5px;
  position: absolute;
  top: 5px;
  left: 0;
  background: var(--accent-steel);
}

.confidence-box {
  margin: 15px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  font-size: 10px;
}

.confidence-box i {
  grid-column: 1 / 3;
}

.supports {
  padding: 11px;
  display: grid;
  gap: 4px;
  border-left: 2px solid var(--success);
  background: #f0f6f3;
}

.supports span {
  color: var(--success);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.supports strong {
  font-size: 10px;
}

.full {
  width: 100%;
  margin-top: 12px;
}

.analysis-score {
  min-width: 165px;
  padding: 10px 13px;
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--white);
}

.analysis-score span {
  color: var(--steel);
  font-size: 9px;
}

.analysis-score strong {
  color: var(--success);
  font-size: 19px;
  font-weight: 650;
}

.analysis-notice {
  margin: 0 0 16px;
  display: flex;
  gap: 8px;
  border-color: #cfdae0;
  background: #f5f8f9;
  color: var(--steel);
}

.analysis-notice strong {
  color: var(--graphite);
}

.rank {
  padding: 14px 0;
  display: grid;
  grid-template-columns: 32px 1fr 45px;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.rank:last-child {
  border-bottom: 0;
}

.rank > b {
  color: var(--deep-steel);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px;
}

.rank strong {
  font-size: 11px;
}

.rank p {
  margin: 5px 0 0;
  color: var(--steel);
  font-size: 10px;
  line-height: 1.5;
}

.rank em {
  color: var(--success);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

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

.evidence-list li {
  margin: 6px 0;
  padding: 10px;
  background: var(--ice-white);
  font-size: 10px;
  cursor: pointer;
}

.evidence-list b {
  float: right;
  color: var(--success);
}

h4 {
  margin: 13px 0 5px;
  color: var(--steel);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.support { color: var(--success); }
.against { color: var(--danger); }

.party {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.party span,
.party strong {
  font-size: 11px;
}

.party i,
.party p {
  grid-column: 1 / 3;
}

.party p {
  margin: 0;
  color: var(--steel);
  font-size: 10px;
  line-height: 1.5;
}

.missing {
  padding: 12px 0;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: start;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.missing > b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #cadce3;
  border-radius: 2px;
  color: var(--deep-steel);
  font-size: 9px;
}

.missing strong {
  font-size: 10px;
}

.missing p {
  margin: 5px 0;
  color: var(--steel);
  font-size: 9px;
  line-height: 1.5;
}

.missing button.requested {
  border-color: #bed8ca;
  background: #f0f6f3;
  color: var(--success);
}

.bluecall {
  border-color: #d5e0e3;
  background: #f5f8f8;
  color: var(--steel);
}

.next {
  float: right;
  margin: 4px 0 22px;
}

.finding-hero {
  margin-bottom: 16px;
  padding: 28px;
  border-radius: 2px;
  background: var(--dark);
  color: var(--inverse);
}

.finding-hero > span {
  color: #c1cdd1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.finding-hero h2 {
  margin: 10px 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.finding-hero p {
  max-width: 900px;
  color: #c1cdd1;
  font-size: 11px;
  line-height: 1.65;
}

.finding-hero div {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.finding-hero b {
  padding: 7px 9px;
  border: 1px solid #4c6d79;
  border-radius: 2px;
  background: rgba(76, 109, 121, 0.24);
  color: #e5ebed;
  font-size: 10px;
}

.finding-hero em {
  color: #c1cdd1;
  font-size: 10px;
  font-style: normal;
}

.check {
  padding: 9px 0;
  display: block;
  font-size: 10px;
  line-height: 1.5;
}

.check input {
  margin-right: 8px;
}

textarea {
  width: 100%;
  min-height: 95px;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--ice-white);
  font-size: 10px;
  line-height: 1.5;
  resize: vertical;
}

.recommended-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.recommended-action h2 {
  margin-bottom: 8px;
}

.recommended-action p:last-child {
  max-width: 850px;
  margin: 0;
  color: var(--steel);
  font-size: 10px;
  line-height: 1.6;
}

.report-cards {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.report-cards article {
  min-height: 190px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.report-cards i {
  color: var(--deep-steel);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-style: normal;
}

.report-cards h3 {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 650;
}

.report-cards p {
  margin: 0 0 16px;
  color: var(--steel);
  font-size: 10px;
  line-height: 1.55;
}

.report-cards button {
  margin-top: auto;
}

.preview {
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 225px;
  gap: 24px;
}

.preview span {
  color: var(--deep-steel);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview h2 {
  margin: 7px 0;
  font-size: 22px;
  font-weight: 620;
}

.preview h3 {
  margin: 15px 0 7px;
  font-size: 11px;
}

.preview p {
  color: var(--steel);
  font-size: 10px;
  line-height: 1.6;
}

.preview hr {
  border: 0;
  border-top: 1px solid var(--border);
}

.preview-side {
  display: grid;
  place-items: center;
  align-content: center;
  border-left: 1px solid var(--border);
  text-align: center;
}

.preview-side strong {
  color: var(--success);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.06em;
}

.preview-side span {
  margin: 5px 0 16px;
  color: var(--steel);
  letter-spacing: 0;
  text-transform: none;
}

.preview-side button {
  padding: 10px 13px;
  border-radius: 2px;
  background: var(--deep-steel);
  color: var(--white);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.product-footer {
  min-height: 62px;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--border);
  background: var(--ice-white);
  color: var(--steel);
  font-size: 9px;
}

.product-footer span {
  color: var(--graphite);
  font-weight: 650;
}

.product-footer p {
  margin: 0;
}

.product-footer p:last-child {
  margin-left: auto;
}

.modal,
.action-dialog {
  padding: 0;
  border: 1px solid #314750;
  border-radius: 2px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(13, 23, 27, 0.28);
}

.modal {
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
}

.modal::backdrop,
.action-dialog::backdrop {
  background: rgba(13, 23, 27, 0.78);
  backdrop-filter: blur(3px);
}

.modal-close {
  width: 38px;
  height: 38px;
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  border: 1px solid rgba(248, 251, 251, 0.3);
  border-radius: 2px;
  background: rgba(13, 23, 27, 0.72);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  display: grid;
  grid-template-columns: 1.5fr 0.72fr;
}

.modal-image {
  min-height: 600px;
  position: relative;
  background: #0a1012;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-info {
  padding: 28px;
}

.modal-info > span {
  color: var(--deep-steel);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-info h2 {
  margin: 8px 0;
  font-size: 20px;
  font-weight: 620;
}

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

.dialog-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dialog-heading .brandmark {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.dialog-heading p {
  margin: 0;
  color: var(--steel);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.action-dialog h2 {
  margin: 24px 0 9px;
  font-size: 21px;
  font-weight: 620;
}

.action-dialog > p,
#action-dialog-content {
  color: var(--steel);
  font-size: 11px;
  line-height: 1.6;
}

#action-dialog-content:empty {
  display: none;
}

.dialog-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast {
  position: fixed;
  z-index: 150;
  right: 22px;
  bottom: 22px;
  max-width: 360px;
  padding: 13px 16px;
  border: 1px solid #3d5964;
  border-radius: 2px;
  background: var(--deep-steel);
  color: var(--white);
  font-size: 11px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

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

@media (max-width: 1240px) {
  .evidence-layout {
    grid-template-columns: 180px minmax(400px, 1fr);
  }

  .detail-panel {
    grid-column: 1 / 3;
  }

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

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

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: var(--banner-height);
    left: 0;
    width: min(300px, calc(100vw - 48px));
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

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

  .sidebar-scrim {
    position: fixed;
    z-index: 45;
    inset: var(--banner-height) 0 0;
    background: rgba(13, 23, 27, 0.5);
  }

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

  .menu-button {
    display: grid;
  }

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

  .three-col,
  .analysis-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .demo-banner {
    justify-content: flex-start;
    overflow: hidden;
    white-space: nowrap;
  }

  .demo-banner p {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar {
    min-height: 72px;
    padding: 12px 16px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .environment-chip,
  .analyst-label {
    display: none;
  }

  main {
    padding: 24px 16px;
  }

  .section-lead,
  .case-head,
  .recommended-action {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-lead > p {
    max-width: none;
  }

  .two,
  .metrics,
  .timeline,
  .preview {
    grid-template-columns: 1fr;
  }

  .metrics article {
    min-height: 112px;
  }

  .chart-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .bars label {
    grid-template-columns: 120px 1fr 25px;
  }

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

  .detail-panel {
    grid-column: auto;
  }

  .mobile-filter-toggle {
    width: 100%;
    margin-bottom: 10px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--white);
    color: var(--graphite);
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
  }

  .mobile-filter-toggle::after {
    content: '+';
    color: var(--steel);
    font-size: 16px;
    font-weight: 400;
  }

  .mobile-filter-toggle[aria-expanded='true']::after {
    content: '−';
  }

  .mobile-filter-toggle small {
    margin-left: auto;
    margin-right: 10px;
    color: var(--steel);
    font-size: 9px;
    font-weight: 500;
  }

  .filter-panel {
    display: none;
  }

  .filter-panel.mobile-open {
    display: block;
  }

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

  .finding-hero {
    padding: 22px;
  }

  .finding-hero h2 {
    font-size: 21px;
  }

  .finding-hero div {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-side {
    padding-top: 22px;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .product-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .product-footer p:last-child {
    margin-left: 0;
  }

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

  .modal-image {
    min-height: 350px;
  }
}

@media (max-width: 520px) {
  .demo-banner {
    padding-inline: 14px;
  }

  .demo-banner p {
    display: none;
  }

  .header-actions {
    gap: 7px;
  }

  .avatar {
    display: none;
  }

  .case-actions {
    width: 100%;
  }

  .case-actions button {
    flex: 1;
  }

  .gallery,
  .report-cards {
    grid-template-columns: 1fr;
  }

  .report-cards article {
    min-height: 0;
  }

  .report-cards h3 {
    margin-top: 12px;
  }

  .evidence-card .photo {
    height: 180px;
  }

  .modal-image {
    min-height: 220px;
  }

  .analysis-notice {
    flex-direction: column;
  }

  .missing {
    grid-template-columns: 26px 1fr;
  }

  .missing button {
    grid-column: 2;
    justify-self: start;
  }

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

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

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