:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #1b2330;
  --muted: #647083;
  --line: #d7dce5;
  --line-strong: #b8c0cc;
  --teal: #0f766e;
  --teal-soft: #e7f5f2;
  --green: #217a47;
  --green-soft: #edf8f0;
  --amber: #9a5b0a;
  --amber-soft: #fff5e6;
  --rust: #a33b28;
  --rust-soft: #fceeea;
  --blue: #295b8f;
  --blue-soft: #edf4fb;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(15 118 110 / 24%);
  outline-offset: 2px;
}

main {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 30px 24px 64px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 24px;
}

.page-heading > div:first-child {
  min-width: 0;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.holder-eyebrow {
  color: var(--amber);
}

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

h1 {
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0;
}

.page-heading p {
  max-width: 750px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.price-control {
  flex: 0 0 260px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.price-control > label,
.control-group > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.price-control > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.price-control input,
.assumption-grid input[type="number"],
.holder-volume input {
  min-width: 0;
  width: 100%;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 0 9px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.price-control button,
.secondary-button {
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #ffffff;
  color: var(--text);
  padding: 0 11px;
  font-weight: 700;
}

.price-control button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.price-control small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.model-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 22px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.profile-control {
  flex: 1 1 480px;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
}

.profile-control .segmented {
  width: min(100%, 560px);
}

.segmented button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--muted);
  padding: 7px 13px;
  font-weight: 700;
  white-space: nowrap;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  background: var(--teal-soft);
  color: var(--teal);
}

.profile-summary {
  display: flex;
  gap: 9px;
  margin: 10px 0 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.profile-summary strong {
  color: var(--text);
}

.fee-assumption {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.issuer-section,
.holder-section {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 2px solid var(--line-strong);
}

.issuer-section {
  border-top-color: var(--teal);
}

.holder-section {
  border-top-color: var(--amber);
}

.section-heading,
.subsection-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  margin-bottom: 9px;
}

.section-explanation {
  max-width: 850px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.sponsored-payouts {
  max-width: 980px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid #e8c88f;
  border-left: 4px solid var(--amber);
  background: var(--amber-soft);
}

.sponsored-payouts > div {
  margin-bottom: 8px;
}

.sponsored-payouts .eyebrow {
  margin-bottom: 3px;
}

.sponsored-payouts p {
  max-width: 900px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.sponsored-payouts code {
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
}

.issuer-summary,
.holder-summary,
.capacity-facts {
  display: grid;
  border: 1px solid var(--line);
  background: var(--panel);
}

.issuer-summary {
  grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(180px, 0.8fr));
}

.holder-summary,
.capacity-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.issuer-summary > div,
.holder-summary > div,
.capacity-facts > div {
  min-width: 0;
  padding: 15px 16px;
  border-right: 1px solid var(--line);
}

.issuer-summary > div:last-child,
.holder-summary > div:last-child,
.capacity-facts > div:last-child {
  border-right: 0;
}

.issuer-summary .primary-total {
  background: var(--teal-soft);
}

.holder-summary .holder-total {
  background: var(--amber-soft);
}

.issuer-summary span,
.holder-summary span,
.capacity-facts span {
  display: block;
  min-height: 30px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

.issuer-summary strong,
.holder-summary strong,
.capacity-facts strong {
  display: block;
  margin: 3px 0;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.issuer-summary .primary-total strong {
  color: var(--teal);
  font-size: 28px;
}

.holder-summary .holder-total strong {
  color: var(--amber);
}

.issuer-summary small,
.holder-summary small,
.capacity-facts small {
  color: var(--muted);
  font-size: 11px;
}

.subsection-heading {
  margin: 24px 0 10px;
}

.subsection-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.assumption-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--panel);
}

.assumption-grid > label {
  display: block;
  min-width: 0;
  padding: 14px 15px;
  border-right: 1px solid var(--line);
}

.assumption-grid > label:last-child {
  border-right: 0;
}

.assumption-grid label > span:first-child,
.holder-volume label > span {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.assumption-grid input[type="number"] {
  margin: 7px 0;
}

.assumption-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.assumption-grid .checkbox-control {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 23px;
}

.checkbox-control input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--teal);
}

.checkbox-control span {
  min-width: 0;
}

.checkbox-control small {
  margin-top: 7px;
  font-weight: 400;
}

.table-heading {
  align-items: flex-end;
}

.detail-caption {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef1f5;
  color: #4f5a6c;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  white-space: nowrap;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

td:nth-child(2) {
  width: 36%;
}

td strong {
  display: block;
}

.row-note {
  display: block;
  max-width: 440px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.phase-label {
  color: #4f5a6c;
  font-weight: 700;
  white-space: nowrap;
}

.basis {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.basis.measured {
  background: var(--green-soft);
  color: var(--green);
}

.basis.modeled {
  background: var(--amber-soft);
  color: var(--amber);
}

tfoot td {
  border-bottom: 0;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 750;
}

.holder-table tfoot td {
  background: var(--amber-soft);
  color: var(--amber);
}

.data-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.holder-volume {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: end;
  gap: 18px;
  margin: 16px 0 10px;
}

.holder-volume input {
  margin-top: 6px;
}

.holder-volume p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.capacity-block {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}

.capacity-block .subsection-heading {
  margin-top: 0;
}

.capacity-facts strong {
  font-size: 18px;
}

.capacity-verdict {
  margin-top: 10px;
  padding: 12px 14px;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.capacity-verdict.tight {
  border-left-color: var(--rust);
  background: var(--rust-soft);
}

.capacity-verdict strong {
  color: var(--text);
}

@media (max-width: 900px) {
  .page-heading {
    display: block;
  }

  .price-control {
    width: min(100%, 360px);
    margin-top: 18px;
  }

  .issuer-summary,
  .holder-summary,
  .capacity-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .issuer-summary > div:nth-child(2),
  .holder-summary > div:nth-child(2),
  .capacity-facts > div:nth-child(2) {
    border-right: 0;
  }

  .issuer-summary > div:nth-child(-n + 2),
  .holder-summary > div:nth-child(-n + 2),
  .capacity-facts > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .assumption-grid > label:nth-child(2) {
    border-right: 0;
  }

  .assumption-grid > label:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  main {
    padding: 20px 14px 44px;
  }

  h1 {
    font-size: 27px;
  }

  .model-controls,
  .section-heading,
  .subsection-heading,
  .holder-volume {
    display: block;
  }

  .control-group + .control-group {
    margin-top: 15px;
  }

  .segmented,
  .profile-control .segmented {
    width: 100%;
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }

  .segmented button {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .segmented button:last-child {
    border-bottom: 0;
  }

  .profile-summary {
    display: block;
  }

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

  .issuer-summary,
  .holder-summary,
  .capacity-facts,
  .assumption-grid {
    grid-template-columns: 1fr;
  }

  .issuer-summary > div,
  .holder-summary > div,
  .capacity-facts > div,
  .assumption-grid > label {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .issuer-summary > div:last-child,
  .holder-summary > div:last-child,
  .capacity-facts > div:last-child,
  .assumption-grid > label:last-child {
    border-bottom: 0;
  }

  .subsection-heading .secondary-button {
    margin-top: 10px;
  }

  .detail-caption {
    display: block;
    margin-top: 5px;
  }

  .holder-volume label {
    display: block;
    width: 100%;
  }

  .holder-volume p {
    margin-top: 8px;
  }
}
