:root {
  --ink: #111814;
  --muted: #5b6861;
  --paper: #edf5f0;
  --panel: #fbfffd;
  --line: #c8d8d0;
  --line-strong: #829d94;
  --brand: #165fbe;
  --teal: #008573;
  --green: #21784c;
  --gold: #a56f00;
  --violet: #5d58bd;
  --blue: #1467a8;
  --shadow: 0 20px 54px rgba(7, 31, 24, 0.13);
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background:
    linear-gradient(90deg, rgba(17, 24, 20, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 24, 20, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, rgba(0, 133, 115, 0.06), transparent 38%),
    linear-gradient(315deg, rgba(22, 95, 190, 0.05), transparent 42%),
    var(--paper);
  background-size: 36px 36px;
  color: var(--ink);
  font-family: Charter, "Iowan Old Style", Georgia, serif;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

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

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 255, 253, 0.92);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 50%, rgba(0, 133, 115, 0.12), transparent 34%), var(--panel);
  box-shadow: inset 0 0 0 1px rgba(22, 95, 190, 0.12);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mark-shell {
  fill: transparent;
  stroke: rgba(17, 24, 20, 0.22);
  stroke-width: 1.5;
}

.mark-arc {
  fill: none;
  stroke: var(--brand);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark-thread {
  fill: none;
  stroke: rgba(17, 24, 20, 0.38);
  stroke-width: 2;
  stroke-linecap: round;
}

.mark-node {
  fill: var(--panel);
  stroke: var(--ink);
  stroke-width: 3;
}

.mark-node.primary {
  fill: var(--teal);
  stroke: var(--panel);
  stroke-width: 2;
}

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

h1 {
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 0.9;
}

.brand-block p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  background: rgba(237, 245, 240, 0.82);
  border-radius: 999px;
}

.nav-item,
.filter-button,
.action-button,
.icon-button {
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.nav-item.is-active {
  background: var(--ink);
  color: var(--panel);
}

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

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border-color: var(--line-strong);
  background: var(--panel);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-weight: 800;
}

.icon-button:hover,
.action-button:hover,
.filter-button:hover,
.nav-item:hover {
  transform: translateY(-1px);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(480px, 1fr) minmax(280px, 340px);
  gap: 14px;
  padding: 14px;
  flex: 1;
  min-height: 0;
}

.market-panel,
.object-panel,
.right-rail {
  min-width: 0;
}

.market-panel,
.object-panel,
.rail-section {
  border: 1px solid var(--line);
  background: rgba(251, 255, 253, 0.9);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.market-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 104px);
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-heading.compact {
  padding: 14px 14px 11px;
}

.eyebrow {
  color: var(--brand);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  margin-top: 3px;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 20px;
  line-height: 1;
}

.live-pill,
.ai-pill,
.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.panel-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.icon-button svg,
.action-button svg,
.text-link svg,
.resource-link svg,
.auth-button svg,
.modal-actions svg,
.map-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.live-pill {
  color: var(--teal);
  background: rgba(0, 133, 115, 0.1);
}

.ai-pill {
  color: var(--blue);
  background: rgba(20, 103, 168, 0.1);
}

.auth-slot {
  min-width: 0;
}

.auth-button,
.user-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--ink);
  color: var(--panel);
  padding: 7px 12px;
  cursor: pointer;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 13px;
  font-weight: 800;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.auth-button:hover,
.user-chip:hover {
  transform: translateY(-1px);
}

.user-chip {
  max-width: 210px;
  color: var(--ink);
  background: var(--panel);
}

.user-chip span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.user-chip strong,
.user-chip em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.avatar.small {
  width: 26px;
  height: 26px;
  font-size: 10px;
  background: var(--brand);
  color: var(--panel);
  border-color: var(--brand);
}

.search-wrap {
  display: grid;
  gap: 7px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.search-wrap span {
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-wrap input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 9px 11px;
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 95, 190, 0.15);
}

.market-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(237, 245, 240, 0.55);
}

.market-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.market-stats span {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 255, 253, 0.78);
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.market-stats strong {
  color: var(--ink);
}

.market-stats .sync-stat[data-sync-status="ready"] {
  color: var(--teal);
  border-color: rgba(0, 133, 115, 0.38);
  background: rgba(0, 133, 115, 0.1);
}

.market-stats .sync-stat[data-sync-status="setup-needed"],
.market-stats .sync-stat[data-sync-status="auth-only"] {
  color: var(--gold);
  border-color: rgba(165, 111, 0, 0.42);
  background: rgba(165, 111, 0, 0.11);
}

.market-stats .sync-stat[data-sync-status="error"] {
  color: var(--brand);
  border-color: rgba(22, 95, 190, 0.42);
  background: rgba(22, 95, 190, 0.1);
}

.view-switch {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 255, 253, 0.75);
}

.view-button {
  min-height: 29px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.view-button.is-active {
  color: var(--panel);
  background: var(--ink);
}

.filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.filter-button {
  min-height: 32px;
  padding: 6px 10px;
  border-color: var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(237, 245, 240, 0.82);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.filter-button.is-active {
  color: var(--panel);
  background: var(--brand);
  border-color: var(--brand);
}

.problem-list {
  overflow: auto;
  padding: 10px;
}

.plaza-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 255, 253, 0.88);
}

.problem-list > .plaza-pager {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 8px;
  box-shadow: 0 8px 18px rgba(7, 31, 24, 0.08);
}

.pager-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pager-copy strong,
.pager-copy span,
.pager-button,
.pager-gap {
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-weight: 800;
}

.pager-copy strong {
  color: var(--ink);
  font-size: 13px;
}

.pager-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pager-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.pager-button {
  min-width: 32px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(237, 245, 240, 0.82);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.pager-button:hover:not(:disabled),
.pager-button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--ink);
  background: var(--panel);
  color: var(--ink);
}

.pager-button.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--panel);
}

.pager-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pager-gap {
  min-width: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.problem-card {
  width: 100%;
  border: 1px solid transparent;
  border-bottom-color: var(--line);
  background: transparent;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.problem-card:hover {
  background: rgba(22, 95, 190, 0.055);
}

.problem-card.is-active {
  background: var(--panel);
  border-color: var(--ink);
  border-radius: var(--radius);
}

.problem-select {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 13px 13px 9px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.problem-card-top,
.meta-row,
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.problem-id {
  color: var(--brand);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.source-chip {
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.problem-card h3 {
  font-size: 17px;
  line-height: 1.18;
}

.problem-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.card-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 13px 12px;
}

.text-link,
.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 255, 253, 0.76);
  color: var(--brand);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.text-link {
  padding: 5px 9px;
}

.text-link.subtle {
  color: var(--muted);
}

.text-link:hover,
.resource-link:hover,
.map-node:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
  background: var(--panel);
}

.metric {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(237, 245, 240, 0.7);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.match-reason {
  color: var(--teal);
  border-color: rgba(0, 133, 115, 0.36);
  background: rgba(0, 133, 115, 0.1);
}

.knowledge-graph-panel {
  min-height: 590px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.knowledge-graph-canvas {
  position: relative;
  min-height: 548px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(17, 24, 20, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 24, 20, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 27% 50%, rgba(22, 95, 190, 0.09), transparent 28%),
    radial-gradient(circle at 73% 50%, rgba(0, 133, 115, 0.1), transparent 30%),
    rgba(237, 245, 240, 0.72);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
}

.knowledge-graph-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.knowledge-graph-edges line {
  stroke: rgba(17, 24, 20, 0.22);
  stroke-width: 0.85;
  vector-effect: non-scaling-stroke;
}

.kg-node {
  position: absolute;
  width: min(158px, 42%);
  min-height: 58px;
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(251, 255, 253, 0.96);
  box-shadow: 5px 5px 0 rgba(7, 31, 24, 0.1);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transform: translate(-50%, -50%);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.kg-node:hover,
.kg-node:focus-visible {
  transform: translate(-50%, calc(-50% - 1px));
  border-color: var(--ink);
  box-shadow: 7px 7px 0 rgba(7, 31, 24, 0.14);
}

.kg-node span,
.kg-node em {
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.kg-node span {
  color: var(--brand);
}

.kg-node strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.08;
}

.kg-node em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kg-node.is-active {
  border-color: var(--ink);
  background: var(--panel);
  box-shadow: 6px 6px 0 rgba(22, 95, 190, 0.22);
}

.kg-node-field span,
.kg-node-lean span {
  color: var(--teal);
}

.kg-node-tag span,
.kg-node-status span {
  color: var(--violet);
}

.kg-node-source span {
  color: var(--blue);
}

.kg-result-strip {
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: rgba(251, 255, 253, 0.92);
  color: var(--muted);
  font-size: 12px;
}

.kg-result-strip .plaza-pager {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.kg-result-strip button {
  cursor: pointer;
}

.graph-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.graph-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.object-panel {
  min-height: calc(100vh - 104px);
  overflow: auto;
}

.object-hero {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(22, 95, 190, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(0, 133, 115, 0.08), transparent 42%),
    linear-gradient(90deg, rgba(20, 103, 168, 0.05), transparent 48%);
}

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

.object-title {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 0.95;
  max-width: 920px;
}

.object-summary {
  margin-top: 15px;
  max-width: 860px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.48;
}

.object-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.resource-link {
  min-height: 38px;
  padding: 8px 12px;
  border-color: var(--line-strong);
  background: rgba(251, 255, 253, 0.88);
}

.resource-link.primary {
  color: var(--panel);
  border-color: var(--ink);
  background: var(--ink);
}

.text-link.is-disabled,
.resource-link.is-disabled {
  cursor: default;
  color: var(--muted);
  border-color: var(--line);
  background: rgba(237, 245, 240, 0.64);
}

.object-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.stat-box {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 255, 253, 0.74);
  padding: 11px;
}

.stat-box span {
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-box strong {
  display: block;
  margin-top: 7px;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 24px;
  line-height: 1;
}

.object-content {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.content-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 255, 253, 0.78);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.section-header h3 {
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 19px;
}

.statement {
  padding: 18px;
  font-size: 20px;
  line-height: 1.45;
}

mjx-container {
  color: inherit;
}

.statement mjx-container[jax="CHTML"] {
  font-size: 108% !important;
}

.problem-card mjx-container[jax="CHTML"],
.timeline-body mjx-container[jax="CHTML"],
.object-summary mjx-container[jax="CHTML"],
.map-copy mjx-container[jax="CHTML"] {
  font-size: 100% !important;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-time {
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.timeline-body strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
}

.timeline-body p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.42;
}

.action-row {
  padding: 14px;
}

.proof-inbox-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(22, 95, 190, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(22, 95, 190, 0.08), transparent 42%),
    rgba(251, 255, 253, 0.82);
}

.proof-inbox-strip strong,
.proof-inbox-strip span {
  display: block;
}

.proof-inbox-strip strong {
  font-size: 16px;
}

.proof-inbox-strip span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.graph-contract-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.graph-contract-strip span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid rgba(22, 95, 190, 0.24);
  border-radius: 999px;
  background: rgba(251, 255, 253, 0.76);
  color: var(--brand);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.graph-contract-strip svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signal-section {
  overflow: hidden;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 1px;
  background: var(--line);
}

.signal-card {
  min-height: 146px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 13px;
  border: 0;
  background:
    linear-gradient(135deg, rgba(22, 95, 190, 0.07), transparent 48%),
    rgba(251, 255, 253, 0.95);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.signal-card:hover {
  background:
    linear-gradient(135deg, rgba(0, 133, 115, 0.11), transparent 48%),
    var(--panel);
}

.signal-card span {
  width: 34px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(22, 95, 190, 0.32);
  border-radius: 999px;
  color: var(--brand);
  background: rgba(22, 95, 190, 0.06);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.signal-card strong {
  font-size: 16px;
  line-height: 1.1;
}

.signal-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
}

.signal-list {
  display: grid;
  gap: 0;
}

.signal-note,
.signal-empty {
  padding: 13px 14px;
  border-top: 1px solid var(--line);
}

.signal-note {
  display: grid;
  gap: 7px;
}

.signal-note div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.signal-note span,
.signal-empty span {
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.signal-note strong,
.signal-empty strong {
  font-size: 15px;
}

.signal-note p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.action-button {
  min-height: 38px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-color: var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.action-button.primary {
  color: var(--panel);
  border-color: var(--ink);
  background: var(--ink);
}

.action-button.subtle-action {
  color: var(--brand);
  border-color: rgba(22, 95, 190, 0.34);
  background: rgba(22, 95, 190, 0.06);
}

.graph-workbench-section {
  overflow: hidden;
}

.next-task-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--line);
}

.next-task-card {
  flex: 1 1 156px;
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(22, 95, 190, 0.075), transparent 46%),
    rgba(251, 255, 253, 0.95);
}

.next-task-card[data-task-kind="experiment"] {
  background:
    linear-gradient(135deg, rgba(0, 133, 115, 0.08), transparent 46%),
    rgba(251, 255, 253, 0.95);
}

.next-task-card[data-task-kind="lean"] {
  background:
    linear-gradient(135deg, rgba(20, 103, 168, 0.095), transparent 46%),
    rgba(251, 255, 253, 0.95);
}

.next-task-card[data-task-kind="review"] {
  background:
    linear-gradient(135deg, rgba(93, 88, 189, 0.085), transparent 46%),
    rgba(251, 255, 253, 0.95);
}

.next-task-card[data-task-kind="claim"] {
  background:
    linear-gradient(135deg, rgba(165, 111, 0, 0.08), transparent 46%),
    rgba(251, 255, 253, 0.95);
}

.task-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  color: var(--brand);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-topline span,
.task-topline em {
  overflow-wrap: anywhere;
}

.task-topline em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.next-task-card h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.next-task-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.next-task-card .text-link {
  justify-self: start;
  margin-top: auto;
  background: var(--panel);
}

.artifact-lane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.artifact-lane-card {
  min-height: 154px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: 7px 10px;
  padding: 14px;
  border: 0;
  background: rgba(251, 255, 253, 0.9);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 140ms ease, transform 140ms ease;
}

.artifact-lane-card:hover {
  transform: translateY(-1px);
  background: var(--panel);
}

.artifact-lane-card span,
.artifact-lane-card em {
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.artifact-lane-card span {
  color: var(--brand);
}

.artifact-lane-card strong {
  grid-column: 1 / -1;
  font-size: 17px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.artifact-lane-card em {
  min-width: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(22, 95, 190, 0.28);
  border-radius: 999px;
  color: var(--brand);
  background: rgba(22, 95, 190, 0.07);
  font-style: normal;
}

.artifact-lane-card small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.quick-mark-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: rgba(237, 245, 240, 0.58);
}

.quick-mark-panel > div:first-child {
  display: grid;
  gap: 5px;
}

.quick-mark-panel strong {
  font-size: 15px;
  line-height: 1.15;
}

.quick-mark-panel span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.quick-mark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 7px;
}

.quick-mark-button {
  min-height: 70px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 9px;
  border: 1px solid rgba(22, 95, 190, 0.22);
  border-radius: var(--radius);
  background: rgba(251, 255, 253, 0.86);
  color: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.quick-mark-button:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  background: var(--panel);
}

.quick-mark-button strong {
  color: var(--brand);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.quick-mark-button span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.workboard-section {
  overflow: hidden;
}

.workboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.workboard-card {
  min-height: 178px;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(20, 103, 168, 0.05), transparent 44%),
    rgba(251, 255, 253, 0.94);
}

.workboard-card h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.workboard-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.workboard-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.workboard-topline svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workboard-card .text-link {
  justify-self: start;
  margin-top: auto;
  background: var(--panel);
}

.lean-module {
  position: relative;
}

.lean-module .lean-spine {
  display: none;
}

.lean-grid .workboard-card {
  background:
    linear-gradient(135deg, rgba(0, 133, 115, 0.07), transparent 44%),
    rgba(251, 255, 253, 0.94);
}

.lean-card {
  position: relative;
}

.lean-card::before {
  content: attr(data-step);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.lean-spine {
  position: absolute;
  inset: 26px 10% auto 10%;
  height: 2px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(0, 133, 115, 0.24);
  pointer-events: none;
  z-index: 1;
}

.lean-spine span {
  width: 9px;
  height: 9px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--teal);
}

.board-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: rgba(237, 245, 240, 0.66);
}

.board-strip span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
}

.right-rail {
  display: grid;
  gap: 14px;
  align-content: start;
}

.rail-section {
  overflow: hidden;
}

.ledger-list {
  display: grid;
}

.ledger-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.ledger-item:last-child {
  border-bottom: 0;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.ledger-item strong {
  display: block;
  font-size: 15px;
}

.ledger-item span {
  color: var(--muted);
  font-size: 13px;
}

.ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: rgba(237, 245, 240, 0.52);
}

.claim-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.claim-module-note,
.claim-lane,
.claim-empty {
  background: rgba(251, 255, 253, 0.72);
}

.claim-module-note {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
}

.claim-module-note strong,
.claim-lane-head strong,
.claim-empty strong {
  display: block;
  font-size: 14px;
}

.claim-module-note span,
.claim-lane-head span,
.claim-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.claim-lane {
  display: grid;
}

.claim-lane-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.claim-lane-head em {
  min-width: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(22, 95, 190, 0.3);
  border-radius: 999px;
  color: var(--brand);
  font-style: normal;
  font-weight: 800;
}

.claim-empty {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
}

.claim-card {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(22, 95, 190, 0.055), transparent 45%),
    rgba(251, 255, 253, 0.72);
}

.claim-topline,
.claim-actions,
.claim-badges,
.claim-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.claim-topline {
  justify-content: space-between;
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.claim-card h3 {
  font-size: 16px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.claim-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.claim-badges span {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(22, 95, 190, 0.3);
  border-radius: 999px;
  background: rgba(22, 95, 190, 0.08);
  color: var(--brand);
  padding: 4px 8px;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.claim-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.credit-badge {
  color: var(--teal);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.pulse-cell {
  min-height: 86px;
  padding: 12px;
  background: rgba(251, 255, 253, 0.9);
}

.pulse-cell strong {
  display: block;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 27px;
  line-height: 1;
}

.pulse-cell span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.field-map {
  position: relative;
  height: 360px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(17, 24, 20, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 24, 20, 0.04) 1px, transparent 1px),
    repeating-linear-gradient(135deg, transparent 0 17px, rgba(20, 103, 168, 0.06) 18px 19px, transparent 20px 34px),
    rgba(237, 245, 240, 0.7);
  background-size: 24px 24px;
}

.map-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: calc(100% - 42px);
  pointer-events: none;
}

.map-edges line {
  stroke: rgba(17, 24, 20, 0.3);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.map-route {
  fill: none;
  stroke: rgba(22, 95, 190, 0.52);
  stroke-width: 1.2;
  stroke-dasharray: 4 5;
  vector-effect: non-scaling-stroke;
}

.map-node {
  position: absolute;
  width: min(132px, 38%);
  min-height: 58px;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(251, 255, 253, 0.94);
  box-shadow: 5px 5px 0 rgba(7, 31, 24, 0.11);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transform: translate(-50%, -50%);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
}

.map-node:hover {
  transform: translate(-50%, calc(-50% - 1px));
  box-shadow: 7px 7px 0 rgba(7, 31, 24, 0.14);
}

.map-node.is-disabled {
  cursor: default;
}

.map-node.is-disabled:hover {
  transform: translate(-50%, -50%);
  box-shadow: 5px 5px 0 rgba(7, 31, 24, 0.11);
}

.map-node-problem {
  width: min(154px, 46%);
  min-height: 70px;
  border-color: var(--ink);
}

.map-node.is-hot .map-icon {
  color: var(--panel);
  background: var(--brand);
  border-color: var(--brand);
}

.map-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
}

.map-icon svg {
  width: 15px;
  height: 15px;
}

.map-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.map-copy strong {
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

.map-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.map-legend {
  position: absolute;
  inset: auto 0 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: rgba(251, 255, 253, 0.92);
  color: var(--muted);
  font-size: 12px;
}

.map-legend a {
  color: var(--brand);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-weight: 800;
  white-space: nowrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 20, 0.28);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(22, 95, 190, 0.065), transparent 42%),
    linear-gradient(315deg, rgba(0, 133, 115, 0.055), transparent 46%),
    var(--panel);
  box-shadow: 14px 14px 0 rgba(7, 31, 24, 0.18);
}

.compact-modal {
  width: min(480px, 100%);
}

.profile-modal {
  width: min(920px, 100%);
}

.ledger-modal {
  width: min(940px, 100%);
}

.claim-modal {
  width: min(860px, 100%);
}

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

.modal-header h2 {
  font-size: 27px;
}

.small-control {
  width: 32px;
  height: 32px;
}

.modal-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

.modal-form label {
  display: grid;
  gap: 7px;
}

.modal-form label span,
.form-note,
.target-strip span {
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

.modal-form textarea {
  resize: vertical;
  line-height: 1.4;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 95, 190, 0.15);
}

.target-strip {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(237, 245, 240, 0.76);
}

.target-strip strong {
  font-size: 17px;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 18px 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(237, 245, 240, 0.72);
}

.auth-mode-button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 1px);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.auth-mode-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--panel);
}

.auth-reset-link {
  justify-self: start;
  margin-top: -4px;
}

.artifact-policy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 103, 168, 0.07), transparent 38%),
    rgba(237, 245, 240, 0.76);
}

.artifact-policy strong,
.artifact-policy p,
.artifact-policy span {
  display: block;
}

.artifact-policy strong {
  font-size: 17px;
}

.artifact-policy p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.policy-kicker,
.hash-preview,
.file-import-control em {
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hash-preview {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid rgba(0, 133, 115, 0.38);
  border-radius: 999px;
  background: rgba(0, 133, 115, 0.1);
  color: var(--teal);
  white-space: nowrap;
}

.artifact-badges {
  display: grid;
  justify-items: end;
  gap: 7px;
  min-width: min(260px, 100%);
}

.artifact-class-badge,
.reliability-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.artifact-class-badge {
  min-height: 30px;
  padding: 6px 10px;
}

.reliability-preview {
  max-width: 260px;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--muted);
  text-transform: none;
}

.file-import-control {
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(251, 255, 253, 0.72);
}

.file-import-control input {
  cursor: pointer;
}

.file-import-control em {
  text-transform: none;
}

.citable-opt-in {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(22, 95, 190, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(22, 95, 190, 0.07), transparent 44%),
    rgba(251, 255, 253, 0.78);
}

.citable-opt-in input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.modal-form .citable-opt-in span {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
}

.citable-opt-in strong {
  font-size: 14px;
}

.citable-opt-in em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.35;
}

.form-note {
  max-width: 100%;
  line-height: 1.35;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.modal-copy {
  padding: 0 18px 14px;
  color: var(--muted);
}

.modal-actions {
  max-width: 100%;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  padding-inline: 18px;
  padding-bottom: 18px;
}

.modal-form .modal-actions {
  padding-inline: 0;
  padding-bottom: 0;
}

.ledger-modal-body {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.ledger-summary {
  color: var(--muted);
}

.ledger-scope-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ledger-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
}

.ledger-kind-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ledger-kind-strip span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 255, 253, 0.78);
  color: var(--muted);
  padding: 5px 9px;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.ledger-modal-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(251, 255, 253, 0.66);
}

.ledger-modal-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(220px, 1fr) minmax(120px, auto);
  gap: 12px;
  align-items: center;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}

.ledger-modal-row:last-child {
  border-bottom: 0;
}

.ledger-object-link {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.ledger-object-link strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.15;
}

.ledger-object-link em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.ledger-credit-body strong,
.ledger-credit-body span {
  display: block;
  overflow-wrap: anywhere;
}

.ledger-credit-body span,
.ledger-credit-meta span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.ledger-credit-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.ledger-empty {
  border: 0;
}

.claim-modal-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.claim-identity {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.claim-identity strong,
.claim-identity span:last-child {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 255, 253, 0.78);
  padding: 5px 9px;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
}

.claim-modal-body > p {
  color: var(--muted);
  line-height: 1.4;
}

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

.claim-author-grid div {
  min-height: 72px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 255, 253, 0.72);
}

.claim-author-grid span,
.citation-box span {
  display: block;
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.claim-author-grid strong {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.2;
}

.citation-box {
  display: grid;
  gap: 7px;
}

.citation-box textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 10px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.profile-panel {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 18px;
}

.profile-workspace {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.profile-hero-panel {
  padding: 0;
}

.profile-note {
  padding: 0;
}

.avatar.large {
  width: 56px;
  height: 56px;
  font-size: 17px;
  background: var(--brand);
  color: var(--panel);
  border-color: var(--brand);
}

.profile-panel strong,
.profile-panel span,
.profile-panel em {
  display: block;
}

.profile-panel strong {
  font-size: 20px;
}

.profile-panel span,
.profile-panel em {
  color: var(--muted);
  font-size: 14px;
}

.profile-panel em {
  font-style: normal;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.profile-stats-grid .stat-box {
  min-height: 68px;
}

.profile-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 255, 253, 0.74);
  overflow: hidden;
}

.profile-lane-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.profile-lane {
  min-height: 140px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 0;
  background:
    linear-gradient(135deg, rgba(22, 95, 190, 0.055), transparent 42%),
    var(--panel);
  color: var(--ink);
  padding: 13px;
  cursor: pointer;
  text-align: left;
}

.profile-lane:hover {
  background:
    linear-gradient(135deg, rgba(0, 133, 115, 0.085), transparent 44%),
    var(--panel);
}

.profile-lane svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-lane strong {
  font-size: 16px;
}

.profile-lane span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.profile-history {
  display: grid;
}

.profile-contribution {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.profile-contribution:last-child {
  border-bottom: 0;
}

.profile-contribution-kind {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--brand);
  background: var(--paper);
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-contribution-kind[data-kind="lean"] {
  color: var(--teal);
}

.profile-contribution-kind[data-kind="review"] {
  color: var(--gold);
}

.profile-contribution-kind[data-kind="signal"] {
  color: var(--brand);
}

.profile-contribution-kind[data-kind="reference"] {
  color: var(--blue);
}

.profile-contribution strong,
.profile-contribution span {
  display: block;
  min-width: 0;
}

.profile-contribution span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-empty {
  display: grid;
  gap: 5px;
  padding: 22px 14px;
  color: var(--muted);
}

.profile-empty strong {
  color: var(--ink);
}

.profile-modal > .modal-actions {
  padding: 0 18px 18px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  pointer-events: none;
}

.toast {
  max-width: min(360px, calc(100vw - 36px));
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--panel);
  box-shadow: 8px 8px 0 rgba(7, 31, 24, 0.16);
  padding: 12px 14px;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", sans-serif;
  font-weight: 800;
}

.empty-state {
  padding: 30px 18px;
  color: var(--muted);
}

[data-status="Lean-Verified"] {
  color: var(--green);
}

[data-status="Ready for Attack"],
[data-status="Rising"] {
  color: var(--brand);
}

[data-status="Needs Review"],
[data-status="Needs Literature Check"],
[data-status="Needs Triage"] {
  color: var(--gold);
}

[data-status="Needs Formalization"] {
  color: var(--violet);
}

[data-status="Candidate"] {
  color: var(--blue);
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(260px, 340px) minmax(420px, 1fr);
  }

  .right-rail {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar {
    position: static;
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    grid-column: 1 / -1;
    overflow-x: auto;
    justify-self: start;
    max-width: 100%;
  }

  .header-actions {
    justify-content: flex-end;
  }

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

  .market-panel,
  .object-panel {
    min-height: auto;
  }

  .right-rail {
    grid-template-columns: 1fr;
  }

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

  .timeline-item {
    grid-template-columns: 1fr;
  }

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

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

  .quick-mark-panel {
    grid-template-columns: 1fr;
  }

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

  .claim-author-grid {
    grid-template-columns: 1fr;
  }

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

  .ledger-credit-meta {
    justify-items: start;
  }

  .market-tools {
    grid-template-columns: 1fr;
  }

  .view-switch {
    justify-self: start;
  }

  .plaza-pager,
  .kg-result-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .pager-controls {
    flex-wrap: wrap;
  }

  .knowledge-graph-panel {
    min-height: 460px;
  }

  .knowledge-graph-canvas {
    min-height: 420px;
  }

  .kg-node {
    width: min(150px, 44%);
    min-height: 54px;
  }
}

@media (max-width: 540px) {
  .topbar {
    padding: 12px;
  }

  .workspace {
    padding: 10px;
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-block p {
    font-size: 13px;
  }

  .object-hero {
    padding: 18px;
  }

  .object-meta-grid,
  .pulse-grid,
  .workboard-grid,
  .profile-lane-grid,
  .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .next-task-grid,
  .artifact-lane-grid,
  .quick-mark-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .board-strip {
    display: grid;
  }

  .artifact-policy {
    grid-template-columns: 1fr;
  }

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

  .artifact-badges {
    justify-items: start;
  }

  .hash-preview,
  .reliability-preview {
    justify-self: start;
  }

  .profile-contribution {
    grid-template-columns: 1fr;
  }

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

  .market-stats span {
    justify-content: center;
  }

  .knowledge-graph-canvas {
    min-height: 380px;
  }

  .kg-node {
    width: min(142px, 46%);
    padding: 7px;
  }

  .kg-node strong {
    font-size: 12px;
  }

  .object-topline {
    display: grid;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-card {
    max-height: calc(100vh - 24px);
  }

  .modal-actions {
    justify-content: stretch;
  }

  .modal-actions .action-button {
    flex: 1 1 160px;
  }
}
