.strategy-map {
  container: strategy / inline-size;
  display: grid;
  gap: 13px;
  --sm-muted: var(--muted-foreground);
  --sm-line: #46505b;
  --sm-gold: #efc785;
}
.sm-surface {
  min-width: 0;
  padding: 21px clamp(18px, 2vw, 30px);
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
}
.sm-head h2 {
  font-size: var(--type-section);
  line-height: 1.35;
}
.sm-head p {
  margin-top: 5px;
  color: var(--sm-muted);
  font-size: 14px;
}
.sm-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.32fr) minmax(0, 1fr);
  gap: clamp(20px, 2.5vw, 42px);
  align-items: stretch;
  margin-top: 17px;
}
.sm-relations {
  --wire: clamp(38px, 8.25vw, 132px);
  --columns: minmax(0, 0.95fr) var(--wire) minmax(0, 1.05fr);
  min-width: 0;
  padding-left: clamp(0px, 0.95vw, 17px);
}
.sm-column-head,
.sm-branch {
  display: grid;
  grid-template-columns: var(--columns);
  align-items: center;
}
.sm-column-head {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 550;
}
.sm-column-head > :last-child,
.sm-projects {
  grid-column: 3;
}
.sm-tree {
  display: grid;
  gap: 8px;
}
.sm-branch {
  --wire-color: #757f89;
  --node-border: #49525c;
  --node-surface: #1a2028;
  color: var(--foreground);
}
.sm-branch.sm-active {
  --wire-color: var(--sm-gold);
  --node-border: var(--sm-gold);
  --node-surface: #2a2722;
}
.sm-goal,
.sm-project {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 43px;
  padding: 8px 15px;
  border: 1px solid var(--node-border);
  border-radius: 7px;
  background: var(--node-surface);
}
.sm-goal {
  min-height: 49px;
  gap: clamp(10px, 1.35vw, 23px);
}
.sm-project {
  min-height: 40px;
  padding-block: 6px;
}
.sm-goal strong,
.sm-project strong {
  font-size: 16px;
  font-weight: 550;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.sm-goal:hover,
.sm-project:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.sm-code,
.sm-node-value {
  font: 500 var(--type-card)/1.15 var(--chart-numerals);
  white-space: nowrap;
}
.sm-node-value {
  margin-left: auto;
}
.sm-active .sm-code {
  color: var(--sm-gold);
}
.sm-projects {
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.sm-projects li {
  position: relative;
  padding: 4px 0;
}
.sm-branch:not(:has(.sm-empty-projects)) .sm-goal::after,
.sm-projects li:not(.sm-empty-projects)::before,
.sm-projects li:not(:first-child):not(:last-child) .sm-project::before {
  content: "";
  position: absolute;
  pointer-events: none;
}
.sm-goal::after {
  top: 50%;
  left: calc(100% + 1px);
  width: calc(var(--wire) / 2);
  border-top: 1.5px solid var(--wire-color);
}
.sm-projects li::before {
  top: 0;
  bottom: 0;
  left: calc(var(--wire) / -2);
  width: calc(var(--wire) / 2);
  border-left: 1.5px solid var(--wire-color);
}
.sm-projects li:first-child::before {
  top: 50%;
  border-top: 1.5px solid var(--wire-color);
  border-top-left-radius: 9px;
}
.sm-projects li:last-child::before {
  bottom: 50%;
  border-bottom: 1.5px solid var(--wire-color);
  border-bottom-left-radius: 9px;
}
.sm-projects li:only-child::before {
  top: 50%;
  bottom: auto;
  border: 0;
  border-top: 1.5px solid var(--wire-color);
  border-radius: 0;
}
.sm-projects li:not(:first-child):not(:last-child) .sm-project::before {
  top: 50%;
  right: calc(100% + 1px);
  width: calc(var(--wire) / 2);
  border-top: 1.5px solid var(--wire-color);
}
.sm-project > svg {
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-46%);
  color: var(--wire-color);
  stroke-width: 2;
}
.sm-empty-projects {
  color: var(--sm-muted);
  font-size: 14px;
}
.sm-reading {
  min-width: 0;
  padding: 0 0 0 clamp(18px, 1.9vw, 30px);
  border-left: 1px solid var(--sm-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sm-label,
.sm-reading dt,
.sm-definition summary {
  color: var(--sm-muted);
  font-size: 13px;
}
.sm-reading h3 {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.45vw, 25px);
  margin: 6px 0 0;
  font: 600 var(--type-card)/1.4 var(--display);
}
.sm-reading h3 b {
  color: var(--sm-gold);
  font:
    500 var(--type-metric)/1.1 Georgia,
    serif;
}
.sm-reading > :not(:first-child) {
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
}
.sm-definition {
  border: 0;
  margin: 0;
  padding: 0;
}
.sm-definition summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.sm-definition summary::-webkit-details-marker {
  display: none;
}
.sm-definition summary:hover,
.sm-definition[open] summary {
  color: var(--primary);
}
.sm-definition p {
  font-size: 13px;
  margin: 5px 0 0;
  color: var(--sm-muted);
}
.sm-average > strong {
  display: block;
  margin: 3px 0 0;
  color: var(--sm-gold);
  font:
    500 var(--type-figure)/1 Georgia,
    serif;
  letter-spacing: -0.03em;
}
.sm-average em {
  font-size: 0.6em;
  font-style: normal;
}
.sm-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sm-totals > div + div {
  border-left: 1px solid var(--border);
  padding-left: clamp(10px, 1.6vw, 24px);
}
.sm-totals dd {
  margin: 2px 0 0;
  font: 550 var(--type-stat)/1.35 var(--chart-numerals);
  color: #efd7af;
}
.sm-totals dd small {
  font: 500 14px var(--font-sans);
  color: inherit;
  white-space: nowrap;
}
.sm-judgment p {
  margin: 3px 0 0;
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.55;
}
.sm-detail {
  padding-top: 14px;
}
.sm-detail > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-bottom: 12px;
}
.sm-detail h2 {
  font-size: var(--type-section);
  line-height: 1.4;
}
.sm-ledger {
  border: 1px solid var(--sm-line);
  border-radius: 7px;
  overflow: hidden;
}
.sm-ledger table {
  width: 100%;
  font-size: 15px;
}
.sm-ledger :is(th, td) {
  text-align: left;
  white-space: normal;
  padding: 9px clamp(12px, 1.8vw, 30px);
  line-height: 1.55;
}
.sm-ledger thead th {
  font-size: 13px;
  color: #c8cdd0;
  background: #1d242c;
  border-bottom-color: var(--sm-line);
}
.sm-ledger thead th:nth-child(1) {
  width: 27.5%;
}
.sm-ledger thead th:nth-child(2) {
  width: 17.5%;
}
.sm-ledger thead th:nth-child(3) {
  width: 25.5%;
}
.sm-ledger tbody th {
  font-size: 15px;
  background: transparent;
  color: var(--foreground);
  font-weight: 550;
}
.sm-ledger tbody tr:last-child > * {
  border-bottom: 0;
}
.sm-milestone {
  color: #d4d9db;
}
.sm-milestone time {
  font-family: var(--chart-numerals);
  margin-right: 4px;
  white-space: nowrap;
}
.sm-missing,
.sm-empty {
  color: var(--sm-muted);
}
.sm-mobile-progress {
  display: none;
}
.sm-project-link:hover,
.sm-milestone:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--primary);
}
.sm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: clamp(18px, 2.2vw, 34px);
}
.sm-actions .btn {
  min-width: 236px;
  min-height: 43px;
  font-size: 16px;
}
@container strategy (max-width: 935px) {
  .sm-relations {
    --wire: clamp(28px, 5cqi, 56px);
    padding-left: 0;
  }
  .sm-layout {
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
    gap: 17px;
  }
  .sm-goal,
  .sm-project {
    padding-inline: 10px;
    gap: 8px;
  }
  .sm-goal strong,
  .sm-project strong {
    font-size: 14px;
  }
  .sm-code,
  .sm-node-value {
    font-size: 15px;
  }
  .sm-reading {
    padding-left: 16px;
  }
  .sm-reading h3 {
    font-size: 17px;
    gap: 10px;
  }
}
@container strategy (max-width: 710px) {
  .sm-surface {
    padding: 16px;
  }
  .sm-layout {
    display: block;
    margin-top: 14px;
  }
  .sm-column-head {
    display: block;
    margin-bottom: 8px;
  }
  .sm-column-head > :last-child,
  .sm-projects,
  .sm-goal::after {
    display: none;
  }
  .sm-tree {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .sm-branch {
    display: contents;
  }
  .sm-active .sm-projects {
    display: block;
    grid-row: 3;
    grid-column: 1/-1;
    --wire: 24px;
    padding-left: 14px;
    margin-top: 3px;
  }
  .sm-active .sm-projects::before {
    content: attr(data-caption);
    display: block;
    margin-left: -14px;
    margin-bottom: 2px;
    font-size: 13px;
    color: var(--sm-muted);
  }
  .sm-project {
    min-height: 44px;
  }
  .sm-goal {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 6px;
    padding: 8px 11px;
  }
  .sm-goal strong {
    grid-row: 2;
    grid-column: 1/-1;
    font-size: 15px;
  }
  .sm-code {
    font-size: 13px;
    color: var(--sm-muted);
  }
  .sm-node-value {
    grid-column: 2;
    grid-row: 1;
  }
  .sm-reading {
    margin-top: 17px;
    border: 0;
    border-top: 1px solid var(--sm-line);
    padding: 14px 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 12px;
  }
  .sm-reading > :not(:first-child) {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .sm-reading > :first-child {
    grid-column: 1/-1;
  }
  .sm-reading h3 {
    margin-top: 3px;
  }
  .sm-reading > .sm-average {
    grid-column: 1;
  }
  .sm-reading > .sm-totals {
    align-self: end;
    padding-bottom: 2px;
    gap: 6px;
  }
  .sm-totals dd small {
    font-size: 12px;
  }
  .sm-totals > div + div {
    padding-left: 8px;
  }
  .sm-reading > .sm-judgment {
    grid-column: 1/-1;
    border-top: 1px solid var(--border);
    padding-top: 10px;
  }
  .sm-definition summary {
    min-height: 32px;
  }
  .sm-ledger {
    border: none;
    overflow: visible;
  }
  .sm-ledger thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .sm-ledger table,
  .sm-ledger tbody {
    display: block;
  }
  .sm-ledger tbody tr {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 6px 12px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
  }
  .sm-ledger :is(td, th) {
    padding: 0;
    border: 0;
    font-size: 14px;
  }
  .sm-ledger tbody th {
    grid-column: 1/-1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  .sm-project-link,
  .sm-milestone {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 44px;
  }
  .sm-mobile-progress {
    display: inline;
    font-size: 12px;
    white-space: nowrap;
  }
  .sm-ledger td::before {
    content: attr(data-label);
    color: var(--sm-muted);
    display: block;
    font-size: 12px;
  }
  .sm-ledger td:last-child {
    grid-column: 1/-1;
  }
  .sm-actions {
    margin-top: 8px;
  }
  .sm-actions .btn {
    width: 100%;
  }
}
