:root {
  --ux-bg: #f3f6f5;
  --ux-surface: #ffffff;
  --ux-surface-soft: #edf2f0;
  --ux-ink: #101817;
  --ux-muted: #60706c;
  --ux-faint: #87938f;
  --ux-line: #d8e1de;
  --ux-line-strong: #bcc9c5;
  --ux-brand: #176b5b;
  --ux-brand-dark: #0f4c41;
  --ux-found: #356b75;
  --ux-established: #2f6b4f;
  --ux-certified: #2458a6;
  --ux-refuted: #93424b;
  --ux-unresolved: #6d6087;
  --ux-shadow: 0 18px 48px rgba(20, 40, 35, .08);
  --ux-font: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body.florn-product {
  margin: 0;
  background: var(--ux-bg);
  color: var(--ux-ink);
  font-family: var(--ux-font);
  line-height: 1.45;
  letter-spacing: 0;
}

.florn-product *,
.florn-product *::before,
.florn-product *::after { box-sizing: border-box; }

.product-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  max-width: none;
  min-height: 62px;
  margin: 0;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  gap: 28px;
  color: var(--ux-ink);
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--ux-line);
  backdrop-filter: blur(12px);
}

.product-nav .brand-mark {
  justify-self: start;
  color: var(--ux-ink);
  font-size: 1.02rem;
  letter-spacing: .08em;
}

.product-nav .brand-o { color: var(--ux-brand); }

.product-nav-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.product-nav-link {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 6px;
  color: var(--ux-muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
}

.product-nav-link:hover,
.product-nav-link:focus-visible {
  color: var(--ux-ink);
  background: var(--ux-surface-soft);
}

.product-nav-link[aria-current="page"] {
  color: var(--ux-brand-dark);
  background: #e4efeb;
}

.product-nav-meta {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-nav .lang-select { margin-left: 0 !important; }
.product-nav .lang-link { color: var(--ux-muted) !important; }
.product-nav .lang-link.is-active { color: var(--ux-ink) !important; }

.florn-product main.product-main {
  width: min(1240px, calc(100% - 48px));
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px 0 80px;
}

.florn-product .hidden { display: none !important; }

.submit-workspace {
  width: min(760px, 100%);
  margin: 28px auto 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.submit-heading {
  margin: 0 0 8px;
  color: var(--ux-ink);
  font-size: 2.45rem;
  line-height: 1.08;
  font-weight: 680;
  letter-spacing: 0;
}

.submit-lead {
  max-width: 620px;
  margin: 0 0 28px;
  color: var(--ux-muted);
  font-size: 1.02rem;
}

.upload-surface {
  position: relative;
  min-height: 220px;
  padding: 36px 28px;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--ux-surface);
  border: 1px dashed var(--ux-line-strong);
  border-radius: 8px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.upload-surface:hover,
.upload-surface:focus-within,
.upload-surface.is-dragging {
  background: #fbfdfc;
  border-color: var(--ux-brand);
  box-shadow: 0 0 0 3px rgba(23, 107, 91, .1);
}

.upload-surface input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-glyph {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  color: var(--ux-brand-dark);
  background: #e5f0ec;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 700;
}

.upload-title {
  display: block;
  color: var(--ux-ink);
  font-size: 1.03rem;
  font-weight: 680;
}

.upload-file-name {
  display: block;
  max-width: 100%;
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: var(--ux-brand-dark);
  font-size: .9rem;
  font-weight: 650;
}

.upload-formats {
  display: block;
  max-width: 580px;
  margin-top: 10px;
  color: var(--ux-muted);
  font-size: .78rem;
  line-height: 1.45;
}

.upload-actions {
  margin-top: 18px;
  display: grid;
  gap: 13px;
}

.access-settings {
  background: transparent;
  border: 0;
}

.access-settings > summary {
  width: max-content;
  cursor: pointer;
  color: var(--ux-muted);
  font-size: .82rem;
  font-weight: 620;
}

.access-settings-body {
  margin-top: 10px;
  padding: 16px;
  background: var(--ux-surface);
  border: 1px solid var(--ux-line);
  border-radius: 6px;
}

.florn-product label {
  color: var(--ux-ink);
  font-size: .82rem;
  font-weight: 650;
}

.florn-product label .hint {
  color: var(--ux-muted);
  font-weight: 450;
}

.florn-product input[type="password"],
.florn-product input[type="text"],
.florn-product input[type="search"],
.florn-product select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ux-ink);
  background: var(--ux-surface);
  border: 1px solid var(--ux-line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: .88rem;
}

.florn-product input:focus-visible,
.florn-product select:focus-visible,
.florn-product button:focus-visible,
.florn-product a:focus-visible,
.florn-product summary:focus-visible {
  outline: 3px solid rgba(36, 88, 166, .22);
  outline-offset: 2px;
}

.florn-product .terms-row {
  margin: 0;
  color: var(--ux-muted);
  font-size: .82rem;
}

.florn-product .terms-row label { color: var(--ux-muted) !important; }
.florn-product .terms-row a { color: var(--ux-brand-dark); }

.product-primary-button,
.florn-product #btnSubmit {
  min-height: 48px;
  padding: 12px 18px;
  color: #fff;
  background: var(--ux-brand-dark);
  border: 1px solid var(--ux-brand-dark);
  border-radius: 6px;
  font: inherit;
  font-size: .94rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.product-primary-button:hover,
.florn-product #btnSubmit:hover { background: #0b3c34; }
.florn-product #btnSubmit:active { transform: translateY(1px); }
.florn-product #btnSubmit:disabled { opacity: .55; cursor: wait; }

.florn-product #submitStatus {
  min-height: 20px;
  margin-top: 10px;
  color: var(--ux-muted);
  font-size: .84rem;
}

.product-progress {
  margin-top: 18px;
  padding: 18px;
  background: var(--ux-surface);
  border: 1px solid var(--ux-line);
  border-radius: 7px;
}

.product-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ux-ink);
  font-size: .86rem;
  font-weight: 650;
}

.product-progress-track {
  height: 5px;
  margin-top: 11px;
  overflow: hidden;
  background: var(--ux-surface-soft);
  border-radius: 5px;
}

.product-progress-fill {
  height: 100%;
  width: var(--progress, 12%);
  background: var(--ux-brand);
  transition: width .3s ease;
}

.product-progress.is-indeterminate .product-progress-fill {
  width: 34%;
  animation: ux-progress 1.4s ease-in-out infinite;
}

@keyframes ux-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(310%); }
}

.florn-product #progressWrap,
.florn-product #runProgressMeta,
.florn-product #ingestionPreview,
.florn-product #componentBar { display: none !important; }

.has-product-result .submit-workspace { display: none; }

.result-workspace {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.product-result { display: grid; gap: 30px; }

.result-mode-nav {
  position: sticky;
  top: 62px;
  z-index: 24;
  min-width: 0;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--ux-line);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.result-mode-tab {
  appearance: none;
  min-height: 36px;
  margin: 0;
  padding: 8px 13px;
  flex: 0 0 auto;
  color: var(--ux-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}

.result-mode-tab:hover,
.result-mode-tab:focus-visible {
  color: var(--ux-ink);
  background: var(--ux-surface-soft);
}

.result-mode-tab.is-active {
  color: var(--ux-brand-dark);
  background: #e4efeb;
  border-color: #c4d9d2;
}

.result-mode-meta {
  margin-left: auto;
  padding: 0 8px;
  flex: 0 0 auto;
  color: var(--ux-muted);
  font-size: .76rem;
}

body[data-result-mode="overview"] [data-result-mode-content="explore"],
body[data-result-mode="explore"] [data-result-mode-content="overview"],
body[data-result-mode="map"] .product-result [data-result-mode-content],
body[data-result-mode="forensic"] .product-result [data-result-mode-content] {
  display: none;
}

.map-entry-panel {
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: #f7faf9;
  border: 1px solid var(--ux-line);
  border-radius: 8px;
}

.map-entry-panel p {
  margin: 6px 0 0;
  color: var(--ux-muted);
  font-size: .86rem;
}

.map-result-panel {
  margin-top: 22px;
  background: var(--ux-surface);
  border: 1px solid var(--ux-line);
  border-radius: 8px;
  box-shadow: var(--ux-shadow);
}

.map-result-head {
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--ux-line);
}

.map-result-head h2 {
  margin: 0;
  color: var(--ux-ink);
  font-size: 1.24rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.map-result-head p {
  margin: 6px 0 0;
  color: var(--ux-muted);
  font-size: .84rem;
}

.florn-product #graphView {
  margin: 0;
  min-height: 720px;
  color: #17211f;
  background:
    linear-gradient(rgba(18, 64, 58, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 64, 58, .035) 1px, transparent 1px),
    #f8fbfa;
  background-size: 34px 34px;
  border: 0;
  border-radius: 0 0 8px 8px;
}

.florn-product .florn-map {
  min-height: 720px;
  color: #17211f;
  font-family: var(--ux-font);
}

.florn-product .florn-map-top {
  padding: 14px 16px;
  gap: 14px;
  background: rgba(248, 251, 250, .96);
  border-bottom: 1px solid var(--ux-line);
  backdrop-filter: blur(10px);
}

.florn-product .florn-map-brand,
.florn-product .florn-map-panel-title,
.florn-product .florn-map-section {
  color: var(--ux-muted);
  letter-spacing: .08em;
}

.florn-product .florn-map-panel-title::before {
  background: var(--ux-brand);
  box-shadow: none;
}

.florn-map-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.florn-map-search {
  width: min(320px, 34vw);
  margin: 0;
}

.florn-product .florn-map-search input {
  min-height: 36px;
  padding: 7px 10px;
  font-size: .8rem;
  background: #fff;
}

.florn-map-show-all,
.florn-path-button {
  min-height: 36px;
  margin: 0;
  padding: 7px 10px;
  color: var(--ux-ink);
  background: #fff;
  border: 1px solid var(--ux-line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}

.florn-product .florn-map-runstat {
  color: var(--ux-brand-dark);
  background: #e4efeb;
  border: 1px solid #c4d9d2;
  border-radius: 6px;
  letter-spacing: .06em;
}

.florn-product .florn-map-body {
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

.florn-product .florn-map-left {
  background: rgba(255, 255, 255, .94);
  border: 0;
  border-right: 1px solid var(--ux-line);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.florn-product .florn-map-main {
  min-height: 640px;
}

.florn-product .florn-map-canvas-wrap {
  min-height: 640px;
  padding: 10px 10px 86px;
}

.florn-product .florn-map-canvas {
  min-height: 560px;
}

.florn-product .florn-map-right {
  top: 72px;
  right: 16px;
  width: min(440px, 42vw);
  color: var(--ux-ink);
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--ux-line);
  border-radius: 8px;
  box-shadow: -12px 16px 48px rgba(20, 40, 35, .14);
  backdrop-filter: blur(14px);
}

.florn-product .florn-map-detail-close {
  color: var(--ux-muted);
  background: #fff;
  border: 1px solid var(--ux-line);
  border-radius: 50%;
}

.florn-product .florn-detail-heading { color: var(--ux-ink); font-size: 1.05rem; }
.florn-product .florn-detail-sub,
.florn-product .florn-detail-muted { color: var(--ux-muted); }

.florn-detail-section {
  margin: 15px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--ux-line);
}

.florn-detail-section h3 {
  margin: 0 0 6px;
  color: var(--ux-muted);
  font-size: .68rem;
  font-weight: 780;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.florn-detail-section p {
  margin: 0;
  color: #33423f;
  font-size: .84rem;
  line-height: 1.5;
}

.florn-detail-section.is-next-action {
  padding: 14px;
  background: #e7f0ed;
  border: 1px solid #c4d9d2;
  border-radius: 7px;
}

.florn-detail-section.is-certificate {
  padding: 14px;
  background: #eef4ff;
  border: 1px solid #cad8f2;
  border-radius: 7px;
}

.florn-detail-section.is-worlds {
  padding: 14px;
  background: #f6f4fb;
  border: 1px solid #ddd6ee;
  border-radius: 7px;
}

.florn-world-list,
.florn-node-relation-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.florn-world-list li,
.florn-node-relation-list li {
  padding: 8px 9px;
  color: #33423f;
  background: #f5f8f7;
  border: 1px solid var(--ux-line);
  border-radius: 6px;
  font-size: .78rem;
  line-height: 1.35;
}

.florn-node-relation-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.florn-node-relation-list b {
  color: var(--ux-muted);
  font-size: .63rem;
  text-transform: uppercase;
}

.florn-node-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 2px;
}

.florn-node-actions button {
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  color: var(--ux-ink);
  background: #fff;
  border: 1px solid var(--ux-line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
}

.florn-product .florn-detail-grid { grid-template-columns: 1fr; margin-top: 14px; }
.florn-product .florn-detail-card {
  background: #f5f8f7;
  border: 1px solid var(--ux-line);
  border-radius: 6px;
}
.florn-product .florn-detail-card .label { color: var(--ux-muted); }
.florn-product .florn-detail-card .value { color: var(--ux-ink); font-size: .85rem; }

.florn-status-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.florn-status-filter {
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ux-muted);
  background: #fff;
  border: 1px solid var(--ux-line);
  border-radius: 6px;
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
  cursor: pointer;
}

.florn-status-filter span,
.florn-product .florn-filter-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.florn-status-filter b,
.florn-product .florn-filter-count {
  flex: 0 0 auto;
}

.florn-status-filter.is-active {
  color: var(--ux-brand-dark);
  background: #e4efeb;
  border-color: #c4d9d2;
}

.florn-product .florn-filter-row {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  margin: 6px 0;
  background: #fff;
  border: 1px solid var(--ux-line);
  border-radius: 6px;
  color: var(--ux-ink);
}

.florn-product .florn-filter-count { color: var(--ux-muted); }

.florn-path-controls {
  display: grid;
  gap: 8px;
}

.florn-path-controls label {
  margin: 0;
  display: grid;
  gap: 5px;
}

.florn-path-result {
  min-height: 18px;
  color: var(--ux-muted);
  font-size: .76rem;
  line-height: 1.35;
}

.florn-product .florn-map-legend {
  left: 12px;
  right: 12px;
  bottom: 12px;
  justify-content: flex-start;
  color: #33423f;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--ux-line);
  border-radius: 8px;
  text-transform: none;
  letter-spacing: 0;
}

.florn-map-legend .lg-status-certified { color: #0f9f6e; }
.florn-map-legend .lg-status-certified i { border-top-width: 3px; border-top-style: solid; }
.florn-map-legend .lg-status-unresolved { color: #7c8da8; }
.florn-map-legend .lg-status-unresolved i { border-top-style: dashed; }
.florn-map-legend .lg-status-refuted { color: #a94452; }
.florn-map-legend .lg-status-refuted i { border-top-style: dashed; }
.florn-map-legend .lg-association { color: #71717a; }
.florn-map-legend .lg-association i { border-top-style: dotted; }
.florn-map-legend .lg-structural_relation,
.florn-map-legend .lg-functional_relation,
.florn-map-legend .lg-col_fd_certified { color: #0f766e; }
.florn-map-legend .lg-causal_certified { color: #0f9f6e; }
.florn-map-legend .lg-tie_certified { color: #3b82f6; }

.florn-product .florn-map-reset {
  color: var(--ux-ink);
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--ux-line);
}

.florn-product .florn-map-reset:hover,
.florn-map-show-all:hover,
.florn-path-button:hover,
.florn-node-actions button:hover {
  color: var(--ux-brand-dark);
  border-color: var(--ux-brand);
}

.florn-product .florn-map-empty {
  color: var(--ux-muted);
  font-size: .95rem;
}

.florn-product .florn-map-canvas svg:focus-visible,
.florn-product .florn-edge:focus-visible .florn-edge-line,
.florn-product .florn-node:focus-visible circle {
  outline: none;
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
}

.florn-product .florn-edge:focus-visible .florn-edge-line,
.florn-product .florn-edge.is-selected .florn-edge-line,
.florn-product .florn-edge.is-path .florn-edge-line {
  stroke-width: 3.4px !important;
}

.florn-product .florn-node.is-selected circle,
.florn-product .florn-node.is-focus-node circle,
.florn-product .florn-node:focus-visible circle {
  stroke-width: 3px !important;
}

.florn-product .florn-node-label {
  fill: #17211f !important;
  stroke: rgba(248, 251, 250, .96) !important;
  letter-spacing: 0 !important;
}

.run-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.run-context-main { min-width: 0; }

.run-kicker {
  margin: 0 0 5px;
  color: var(--ux-brand-dark);
  font-size: .72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.run-file {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ux-ink);
  font-size: 1.13rem;
  line-height: 1.25;
  font-weight: 680;
  letter-spacing: 0;
}

.run-meta-line {
  margin: 6px 0 0;
  color: var(--ux-muted);
  font-size: .84rem;
}

.quiet-button,
.product-action-button,
.explore-filter {
  appearance: none;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--ux-ink);
  background: var(--ux-surface);
  border: 1px solid var(--ux-line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  cursor: pointer;
}

.quiet-button:hover,
.product-action-button:hover { border-color: var(--ux-brand); color: var(--ux-brand-dark); }

.executive-band {
  position: relative;
  overflow: hidden;
  padding: 32px 34px 26px;
  color: var(--ux-ink);
  background: var(--ux-surface);
  border: 1px solid var(--ux-line);
  border-radius: 8px;
  box-shadow: var(--ux-shadow);
}

.executive-top {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) minmax(0, 2fr);
  gap: 42px;
  align-items: end;
}

.found-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ux-found);
  font-size: .75rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.status-symbol {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: .67rem;
  line-height: 1;
  font-weight: 800;
}

.found-total {
  margin: 7px 0 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.found-number {
  color: var(--ux-ink);
  font-size: 4.65rem;
  line-height: .94;
  font-weight: 720;
  letter-spacing: 0;
}

.found-copy {
  max-width: 130px;
  color: var(--ux-muted);
  font-size: .96rem;
  line-height: 1.25;
}

.epistemic-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(95px, 1fr));
  border-top: 1px solid var(--ux-line);
  border-bottom: 1px solid var(--ux-line);
}

.epistemic-metrics.has-established {
  grid-template-columns: minmax(120px, 1.35fr) repeat(3, minmax(95px, 1fr));
}

.epistemic-metric {
  min-width: 0;
  padding: 15px 16px;
  border-right: 1px solid var(--ux-line);
}

.epistemic-metric:last-child { border-right: 0; }
.epistemic-metric strong { display: block; font-size: 1.55rem; line-height: 1; }
.epistemic-metric span { display: block; margin-top: 7px; color: var(--ux-muted); font-size: .74rem; font-weight: 680; }
.epistemic-metric[data-status="ESTABLISHED"] strong { color: var(--ux-established); }
.epistemic-metric[data-status="CERTIFIED"] strong { color: var(--ux-certified); }
.epistemic-metric[data-status="REFUTED"] strong { color: var(--ux-refuted); }
.epistemic-metric[data-status="UNRESOLVED"] strong { color: var(--ux-unresolved); }
.epistemic-metric[data-status="ESTABLISHED"]:not(.is-zero) { background: #f3f8f6; }
.epistemic-metric[data-status="ESTABLISHED"]:not(.is-zero) strong { font-size: 1.78rem; font-weight: 740; }
.epistemic-metric.is-zero strong { color: var(--ux-faint); font-size: 1.25rem; font-weight: 620; }
.epistemic-metric.is-zero span { color: var(--ux-faint); font-weight: 600; }

.executive-message {
  max-width: 880px;
  margin: 24px 0 0;
  color: var(--ux-ink);
  font-size: 1rem;
  line-height: 1.48;
}

.executive-boundary {
  margin: 8px 0 0;
  color: var(--ux-muted);
  font-size: .86rem;
}

.data-profile-note {
  margin: 8px 0 0;
  color: #4f645f;
  font-size: .82rem;
  line-height: 1.45;
}

.category-rail {
  margin: 24px -34px -26px;
  padding: 14px 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  overflow-x: visible;
  background: #f8faf9;
  border-top: 1px solid var(--ux-line);
}

.category-pill {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ux-muted);
  background: var(--ux-surface);
  border: 1px solid var(--ux-line);
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 620;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.category-pill b { flex: 0 0 auto; color: var(--ux-ink); }

.product-section { min-width: 0; }

.executive-band + .top-findings-section { margin-top: -10px; }

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-kicker {
  margin: 0 0 5px;
  color: var(--ux-muted);
  font-size: .7rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.product-section h2,
.product-section h3 {
  margin: 0;
  color: var(--ux-ink);
  font-size: 1.18rem;
  line-height: 1.25;
  font-weight: 690;
  letter-spacing: 0;
}

.top-findings {
  background: var(--ux-surface);
  border-top: 1px solid var(--ux-line-strong);
}

.finding-row {
  min-height: 112px;
  padding: 18px 10px 18px 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(140px, auto);
  gap: 14px;
  align-items: start;
  background: var(--ux-surface);
  border-bottom: 1px solid var(--ux-line);
}

.finding-rank {
  padding-top: 3px;
  color: var(--ux-faint);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.finding-body { min-width: 0; }
.finding-title { margin: 6px 0 5px; color: var(--ux-ink); font-size: .98rem; font-weight: 680; overflow-wrap: anywhere; }
.finding-explanation { margin: 0; color: var(--ux-muted); font-size: .84rem; line-height: 1.45; }
.finding-support { margin: 8px 0 0; color: var(--ux-faint); font-size: .76rem; }

.status-chip {
  width: auto;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  color: var(--ux-found);
  font-size: .68rem;
  line-height: 1.2;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: normal;
  overflow-wrap: anywhere;
}

.status-chip[data-status="ESTABLISHED"] { color: var(--ux-established); }
.status-chip[data-status="CERTIFIED"] { color: var(--ux-certified); }
.status-chip[data-status="REFUTED"] { color: var(--ux-refuted); }
.status-chip[data-status="UNRESOLVED"] { color: var(--ux-unresolved); }
.status-chip .status-symbol { width: 17px; height: 17px; font-size: .6rem; }

.finding-actions {
  min-width: 130px;
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.product-action-button { min-height: 34px; padding: 7px 10px; font-size: .76rem; }

.decision-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 22px;
  align-items: stretch;
}

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

.next-action-panel {
  padding: 25px 26px;
  background: #e7f0ed;
  border-left: 4px solid var(--ux-brand);
  border-radius: 0 7px 7px 0;
}

.next-action-class {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ux-brand-dark);
  font-size: .7rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.next-action-panel h2 { margin-top: 10px; font-size: 1.22rem; }
.next-action-copy { margin: 8px 0 0; color: #34524a; font-size: .88rem; line-height: 1.5; }

.next-action-facts {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.next-action-fact b { display: block; margin-bottom: 5px; color: var(--ux-brand-dark); font-size: .67rem; text-transform: uppercase; letter-spacing: .06em; }
.next-action-fact span { display: block; color: #34524a; font-size: .8rem; line-height: 1.4; }

.knowledge-reuse-panel,
.boundary-panel {
  min-height: 100%;
  padding: 24px;
  background: var(--ux-surface);
  border: 1px solid var(--ux-line);
  border-radius: 7px;
}

.knowledge-reuse-panel h3,
.boundary-panel h3 { margin-top: 10px; }
.knowledge-reuse-panel p,
.boundary-panel p { margin: 8px 0 0; color: var(--ux-muted); font-size: .84rem; line-height: 1.5; }

.analysis-path {
  padding: 22px 24px;
  background: var(--ux-surface);
  border: 1px solid var(--ux-line);
  border-radius: 7px;
}

.analysis-path-list {
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  list-style: none;
  counter-reset: ux-stage;
}

.analysis-path-list li {
  position: relative;
  min-height: 70px;
  padding: 28px 14px 0 0;
  color: var(--ux-muted);
  font-size: .75rem;
  line-height: 1.35;
  counter-increment: ux-stage;
}

.analysis-path-list li::before {
  content: counter(ux-stage);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  color: var(--ux-brand-dark);
  background: #e2eeea;
  border: 1px solid #b7d0c8;
  border-radius: 50%;
  font-size: .65rem;
  font-weight: 750;
}

.analysis-path-list li::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 21px;
  right: 0;
  height: 1px;
  background: var(--ux-line);
}

.analysis-path-list li:last-child::after { display: none; }

.explore-panel {
  padding-top: 4px;
}

.explore-toolbar {
  margin: 15px 0 12px;
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(170px, .6fr) minmax(150px, .5fr);
  gap: 10px;
}

.explore-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  overflow-x: visible;
  padding-bottom: 4px;
}

.explore-filter {
  flex: 0 1 auto;
  min-height: 34px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 10px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
  color: var(--ux-muted);
  background: transparent;
  border-color: transparent;
}
.explore-filter:hover { color: var(--ux-ink); background: var(--ux-surface); }
.explore-filter.is-active { color: var(--ux-brand-dark); background: #e4efeb; border-color: #c4d9d2; }

.explore-results-meta { margin: 0 0 6px; color: var(--ux-muted); font-size: .78rem; }
.explore-list { background: var(--ux-surface); border-top: 1px solid var(--ux-line-strong); }
.explore-list .finding-row { min-height: 96px; }

.product-empty {
  padding: 38px 28px;
  text-align: center;
  background: var(--ux-surface);
  border: 1px solid var(--ux-line);
  border-radius: 8px;
}

.product-empty .status-symbol { margin: 0 auto 14px; width: 30px; height: 30px; }
.product-empty h2 { margin: 0; color: var(--ux-ink); font-size: 1.35rem; }
.product-empty p { max-width: 580px; margin: 10px auto 0; color: var(--ux-muted); font-size: .9rem; }

.forensic-workspace {
  margin-top: 6px;
  background: var(--ux-surface);
  border: 1px solid var(--ux-line);
  border-radius: 7px;
}

.forensic-workspace > summary {
  padding: 15px 18px;
  cursor: pointer;
  color: var(--ux-muted);
  font-size: .82rem;
  font-weight: 650;
}

.forensic-body { padding: 0 18px 18px; }
.forensic-body .view-toggle { margin-top: 8px; }

.florn-product #exportActions {
  justify-content: flex-end;
  margin: -12px 0 0 !important;
}

.florn-product #exportActions button {
  min-height: 36px;
  padding: 8px 11px;
  color: var(--ux-ink);
  background: var(--ux-surface);
  border: 1px solid var(--ux-line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: .78rem;
  font-weight: 650;
}

.florn-product footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 20px;
  color: var(--ux-faint);
  font-size: .75rem;
  text-align: center;
}

.florn-product footer .copyright { margin-top: 6px; opacity: .72; }

.finding-drawer {
  width: min(560px, 96vw);
  max-width: 560px;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  padding: 0;
  color: var(--ux-ink);
  background: var(--ux-surface);
  border: 0;
  border-left: 1px solid var(--ux-line);
  box-shadow: -18px 0 55px rgba(15, 31, 27, .16);
}

.finding-drawer::backdrop { background: rgba(16, 24, 23, .34); }
.finding-drawer[open] { animation: drawer-in .18s ease-out; }
@keyframes drawer-in { from { transform: translateX(28px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--ux-line);
}

.drawer-head h2 { margin: 7px 0 0; font-size: 1.15rem; line-height: 1.3; letter-spacing: 0; }
.drawer-close { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; color: var(--ux-muted); background: transparent; border: 1px solid var(--ux-line); border-radius: 50%; font-size: 1.1rem; cursor: pointer; }
.drawer-close:hover { color: var(--ux-ink); border-color: var(--ux-line-strong); }
.drawer-body { padding: 24px 22px 52px; }
.drawer-level { padding: 0 0 23px; margin: 0 0 23px; border-bottom: 1px solid var(--ux-line); }
.drawer-level:last-child { border-bottom: 0; }
.drawer-level-label { color: var(--ux-muted); font-size: .67rem; font-weight: 760; text-transform: uppercase; letter-spacing: .08em; }
.drawer-level h3 { margin: 8px 0 0; font-size: .95rem; }
.drawer-level p { margin: 8px 0 0; color: var(--ux-muted); font-size: .86rem; line-height: 1.55; }
.evidence-facts { margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; list-style: none; }
.evidence-facts li { padding: 10px; background: var(--ux-surface-soft); border-radius: 5px; }
.evidence-facts b { display: block; color: var(--ux-ink); font-size: .88rem; }
.evidence-facts span { display: block; margin-top: 3px; color: var(--ux-muted); font-size: .7rem; }
.forensic-json { max-height: 260px; margin: 11px 0 0; padding: 13px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #34413e; background: #f3f6f5; border: 1px solid var(--ux-line); border-radius: 5px; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.knowledge-page-shell { display: grid; gap: 24px; }
.knowledge-header { display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.knowledge-header h1 { margin: 0; font-size: 2.35rem; letter-spacing: 0; }
.knowledge-header p { max-width: 650px; margin: 8px 0 0; color: var(--ux-muted); }
.knowledge-query { padding: 20px; background: var(--ux-surface); border: 1px solid var(--ux-line); border-radius: 7px; }
.knowledge-query-grid { display: grid; grid-template-columns: 1.2fr 1.2fr .9fr .9fr .8fr; gap: 10px; }
.knowledge-field label { display: block; margin: 0 0 6px; color: var(--ux-muted); }
.knowledge-result { padding: 18px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; border-bottom: 1px solid var(--ux-line); }
.knowledge-result:first-child { border-top: 1px solid var(--ux-line); }
.knowledge-claim { font-size: .96rem; font-weight: 680; }
.knowledge-scope { margin-top: 6px; color: var(--ux-muted); font-size: .79rem; }

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

@media (max-width: 900px) {
  .product-nav { grid-template-columns: auto 1fr auto; gap: 12px; padding: 0 18px; }
  .product-nav-links { justify-self: center; }
  .florn-product main.product-main { width: min(100% - 32px, 1240px); padding-top: 26px; }
  .result-mode-nav { top: 58px; }
  .map-entry-panel { grid-template-columns: 1fr; }
  .florn-product .florn-map-top { align-items: flex-start; flex-direction: column; }
  .florn-map-tools { width: 100%; flex-wrap: wrap; }
  .florn-map-search { width: min(100%, 420px); }
  .florn-product .florn-map-body { grid-template-columns: 1fr; }
  .florn-product .florn-map-left {
    border-right: 0;
    border-bottom: 1px solid var(--ux-line);
  }
  .florn-product #graphView,
  .florn-product .florn-map { min-height: 680px; }
  .florn-product .florn-map-main { min-height: 500px; }
  .florn-product .florn-map-canvas-wrap { min-height: 500px; padding-bottom: 130px; }
  .florn-product .florn-map-right {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-width: none;
    max-height: min(86vh, 680px);
    border-radius: 14px 14px 0 0;
    transform: translateY(110%);
    display: none;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .florn-product .florn-map-right.active {
    display: flex;
    transform: translateY(0);
  }
  .executive-top { grid-template-columns: 1fr; gap: 25px; }
  .decision-grid { grid-template-columns: 1fr; }
  .explore-toolbar { grid-template-columns: 1fr 1fr; }
  .explore-toolbar input { grid-column: 1 / -1; }
  .knowledge-query-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .product-nav { min-height: 58px; grid-template-columns: auto 1fr; }
  .product-nav-links { order: 3; grid-column: 1 / -1; width: calc(100% + 36px); margin: 0 -18px; padding: 0 14px 8px; justify-content: flex-start; overflow-x: auto; }
  .product-nav-meta { justify-self: end; }
  .result-mode-nav { top: 94px; border-radius: 6px; }
  .result-mode-meta { display: none; }
  .map-result-head { padding: 18px 16px 12px; }
  .florn-product #graphView,
  .florn-product .florn-map { min-height: 720px; }
  .florn-status-filters { grid-template-columns: 1fr; }
  .florn-product .florn-map-runstat { width: 100%; text-align: center; }
  .florn-product .florn-map-legend { max-height: 112px; overflow: auto; justify-content: flex-start; }
  .florn-product main.product-main { width: min(100% - 24px, 1240px); padding: 22px 0 58px; }
  .submit-workspace { margin-top: 12px; }
  .submit-heading { font-size: 1.8rem; }
  .upload-surface { min-height: 190px; padding: 28px 18px; }
  .run-context { align-items: flex-start; }
  .run-context .quiet-button { flex: 0 0 auto; }
  .executive-band { padding: 24px 18px 20px; }
  .found-number { font-size: 3.2rem; }
  .epistemic-metrics { grid-template-columns: repeat(2, 1fr); }
  .epistemic-metric:nth-child(2) { border-right: 0; }
  .epistemic-metric:nth-child(-n+2) { border-bottom: 1px solid var(--ux-line); }
  .category-rail { margin: 20px -18px -20px; padding: 12px 18px; }
  .finding-row { grid-template-columns: 32px minmax(0, 1fr); padding-right: 0; }
  .finding-actions { grid-column: 2; min-width: 0; justify-content: flex-start; }
  .next-action-panel { padding: 21px 18px; }
  .next-action-facts { grid-template-columns: 1fr; }
  .analysis-path-list { grid-template-columns: 1fr; }
  .analysis-path-list li { min-height: 54px; padding: 2px 0 18px 34px; }
  .analysis-path-list li::after { top: 21px; left: 10px; right: auto; width: 1px; height: calc(100% - 21px); }
  .explore-toolbar { grid-template-columns: 1fr; }
  .explore-toolbar input { grid-column: auto; }
  .finding-drawer { width: 100vw; max-width: 100vw; }
  .knowledge-header { display: block; }
  .knowledge-header h1 { font-size: 1.8rem; }
  .knowledge-query-grid { grid-template-columns: 1fr; }
  .knowledge-result { grid-template-columns: 1fr; }
}

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