/* Levelling calculator inputs. Keep the native select, number and disclosure controls. */
body[data-lev-preview] #calculator .controls {
  display: grid;
  align-content: start;
  align-self: start;
  min-width: 0;
  gap: 8px;
  overflow-wrap: anywhere;
}

body[data-lev-preview] #calculator .controls .panel {
  min-width: 0;
  padding: 11px 13px;
  margin: 0;
}

body[data-lev-preview] #calculator .controls .panel h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 0;
  margin: 0 0 9px;
  padding: 0;
  border: 0;
  font-size: 1rem !important;
  line-height: 1.3;
}

body[data-lev-preview] #calculator .controls .step {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.5em;
  height: 1.5em;
  margin: 0;
  padding: 0;
  font-size: .78em;
}

body[data-lev-preview] #calculator .controls .field {
  display: block;
  min-width: 0;
  margin: 0 0 7px;
  font-size: .875rem;
  line-height: 1.35;
}
body[data-lev-preview] #calculator .controls .field > span:first-child {
  margin: 0 0 3px;
  font-size: .8125rem;
  line-height: 1.35;
}
body[data-lev-preview] #calculator .controls .field :is(input, select) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  min-height: 44px;
  height: auto;
  margin: 0;
  padding: 6px 9px;
  font-size: 1rem !important;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  scroll-margin-block: 92px;
}

body[data-lev-preview] #calculator .controls .level-track-picker {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  margin: 0;
  color: #e2edf2;
}
body[data-lev-preview] #calculator .controls .level-track-picker select {
  position: absolute;
  inset: 0;
  z-index: 1;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
body[data-lev-preview] #calculator .controls .level-track-value[hidden] {
  display: flex !important;
  align-items: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 6px 27px 6px 9px;
  margin: 0;
  color: inherit;
  background: #0b1924;
  border: 1px solid #506773;
  border-radius: 6px;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
body[data-lev-preview] #calculator .controls .level-track-picker::after {
  content: "";
  position: absolute;
  right: 11px;
  top: calc(50% - 4px);
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  pointer-events: none;
}
body[data-lev-preview] #calculator .controls .level-track-picker:focus-within {
  outline: 2px solid #8ae3db;
  outline-offset: 2px;
}

body[data-lev-preview] #calculator .controls .two-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
  align-items: end;
  gap: 2px 9px;
  margin: 0;
}
body[data-lev-preview] #calculator .controls .range-shortcuts,
body[data-lev-preview] #preset-options .plan-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 5px;
  margin: 0;
}
body[data-lev-preview] #calculator .controls .range-shortcuts {
  margin: 0 0 7px;
}
body[data-lev-preview] #calculator .controls button,
body[data-lev-preview] #preset-options button {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 44px;
  min-height: 44px;
  height: auto;
  padding: 5px 9px;
  margin: 0;
  font-size: .8125rem;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}
body[data-lev-preview] #calculator .controls .range-shortcuts button,
body[data-lev-preview] #preset-options [data-preset] {
  flex: 1 1 auto;
}

body[data-lev-preview] #calculator #count-field .field,
body[data-lev-preview] #calculator .controls .field:has(> #saveMore) {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  margin: 0 0 5px;
}
body[data-lev-preview] #calculator #count-field .field > span,
body[data-lev-preview] #calculator .controls .field:has(> #saveMore) > span {
  flex: 1 1 8rem;
  margin: 0;
}
body[data-lev-preview] #calculator #count,
body[data-lev-preview] #calculator #saveMore {
  flex: 1 1 7rem;
  width: 7rem;
}

body[data-lev-preview] #calculator .controls :is(details, .extra-track),
body[data-lev-preview] #preset-options {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}
body[data-lev-preview] #calculator .controls details,
body[data-lev-preview] #preset-options .planner-help {
  padding: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid #334b58;
  border-radius: 0;
}
body[data-lev-preview] #calculator .controls summary,
body[data-lev-preview] #preset-options summary {
  box-sizing: border-box;
  min-height: 44px;
  height: auto;
  margin: 0;
  padding: 9px 24px 9px 1px;
  font-size: .8125rem;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}
body[data-lev-preview] #preset-options > summary {
  padding-inline-start: 11px;
}
body[data-lev-preview] #preset-options .plan-presets {
  padding: 7px 9px;
}
body[data-lev-preview] #preset-options .plan-presets .planner-help {
  flex-basis: 100%;
}
body[data-lev-preview] #calculator .controls .extra-track {
  padding: 7px 9px;
  margin: 5px 0 7px;
}
body[data-lev-preview] #calculator .controls .extra-track legend {
  max-width: 100%;
  font-size: .8125rem;
  line-height: 1.3;
}

body[data-lev-preview] #calculator .controls :is(.help, .field small, .field-error, .inset p),
body[data-lev-preview] #preset-options .planner-help p {
  margin: 5px 0 7px;
  font-size: .8125rem;
  line-height: 1.45;
}
body[data-lev-preview] #calculator .controls .checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  margin: 0;
  font-size: .875rem;
  line-height: 1.4;
}
body[data-lev-preview] #calculator .controls .checkbox input {
  flex: none;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  padding: 0;
}
body[data-lev-preview] #calculator .controls .modifier-levels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.6rem), 1fr));
  gap: 4px;
}
body[data-lev-preview] #calculator .controls .modifier-levels span {
  min-width: 0;
  font-size: .8125rem;
  line-height: 1.4;
}
body[data-lev-preview] #calculator .controls :is(.field-error:empty, [hidden]):not(.level-track-value) {
  display: none !important;
}
body[data-lev-preview] :is(#calculator .controls, #preset-options) :is(button, summary, input, select):focus-visible {
  outline: 2px solid #8ae3db;
  outline-offset: 2px;
}
@media (forced-colors: active) {
  body[data-lev-preview] #calculator .controls .level-track-picker:focus-within {
    outline-color: Highlight;
  }
}

body[data-lev-preview] #calculator #count {
  flex: 0 1 4.5rem;
  width: 4.5rem;
}

/* The results container follows the available reading width, including beside the desktop controls. */
body[data-lev-preview] #app #plan-total {
  container: lev-results / inline-size;
  min-inline-size: 0;
}
body[data-lev-preview] #app :is(#plan-total, #funding) {
  --lev-line: #344953;
  --lev-muted: #adbec7;
  --lev-accent: #a2dfcf;
  overflow-wrap: anywhere;
}
body[data-lev-preview] #app #plan-total .range-heading {
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .15rem .35rem;
  padding: 0 0 .45rem !important;
  margin: 0 0 .5rem !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lev-line) !important;
  border-radius: 0 !important;
}
body[data-lev-preview] #app #plan-total .range-heading h2,
body[data-lev-preview] #app #funding :is(h2, .funding-overview h2) {
  font-size: 1rem !important;
  line-height: 1.35 !important;
  margin: 0 !important;
}
body[data-lev-preview] #app #plan-total #range-label {
  font-size: .8rem !important;
  color: var(--lev-muted) !important;
  line-height: 1.35;
}
body[data-lev-preview] #app #totals .totals,
body[data-lev-preview] #app #funding .funding-results {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: .35rem !important;
  min-width: 0;
}
body[data-lev-preview] #app :is(#totals, #funding-results) .stat {
  border: 1px solid var(--lev-line) !important;
  border-radius: .45rem !important;
  padding: .45rem .65rem !important;
  min-width: 0;
  background: #12242f !important;
  box-shadow: none !important;
}
body[data-lev-preview] #app :is(#totals, #funding-results) .stat.primary {
  background: #142e2c !important;
  border-color: #3b695f !important;
}
body[data-lev-preview] #app #totals .stat:nth-child(-n+2),
body[data-lev-preview] #app #funding-results .stat:first-child { grid-column: 1 / -1; }
body[data-lev-preview] #app :is(#totals, #funding-results) .stat-label,
body[data-lev-preview] #app #plan-total .lev-cell-label {
  margin: 0 !important;
  font-size: .8rem !important;
  line-height: 1.35 !important;
  color: var(--lev-muted) !important;
}
body[data-lev-preview] #app :is(#totals, #funding-results) .stat-number {
  margin: .12rem 0 0 !important;
  font-size: .95rem !important;
  letter-spacing: 0 !important;
  line-height: 1.35 !important;
  font-variant-numeric: tabular-nums;
}
body[data-lev-preview] #app :is(#totals, #funding-results) .primary .stat-number {
  color: #e0f1e9 !important;
  font-size: 1.12rem !important;
}
body[data-lev-preview] #app :is(#totals, #funding-results) .stat small {
  font-size: .75rem !important;
  line-height: 1.4 !important;
  margin: .2rem 0 0 !important;
}
body[data-lev-preview] #app :is(#plan-total, #funding) .amount {
  font-size: inherit !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  font-variant-numeric: tabular-nums;
}
body[data-lev-preview] #app #totals .material-summary {
  display: grid;
  gap: 0;
  margin: .15rem 0 0 !important;
  padding: 0 !important;
}
body[data-lev-preview] #app #totals .material-summary li,
body[data-lev-preview] #app #plan-total .item-line {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 .5rem;
  padding: 0 !important;
  margin: 0 !important;
  font-size: .83rem !important;
  line-height: 1.35;
}
body[data-lev-preview] #app #totals .material-summary li + li {
  border-top: 1px solid var(--lev-line);
}
body[data-lev-preview] #app #totals .material-summary strong,
body[data-lev-preview] #app #plan-total .item-line b {
  margin: 0 !important;
  font-size: .85rem !important;
  color: #e2edf2;
  font-variant-numeric: tabular-nums;
  white-space: normal !important;
}
body[data-lev-preview] #app #plan-total .plan-material-link,
body[data-lev-preview] #app #plan-total .plan-level-link {
  display: inline-flex !important;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  color: var(--lev-accent) !important;
  font-size: .83rem !important;
  line-height: 1.35;
}
body[data-lev-preview] #app #totals .saving-bar {
  height: .2rem !important;
  margin-top: .35rem !important;
}
body[data-lev-preview] #app #plan-total .plan-actions {
  display: flex !important;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .3rem .45rem;
  margin: .4rem 0 0 !important;
}
body[data-lev-preview] #app #plan-total .lev-result-actions {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
body[data-lev-preview] #app #plan-total .lev-action-list {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  padding: .25rem 0;
}
body[data-lev-preview] #app #plan-total .plan-actions :is(button, summary) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  width: auto !important;
  min-height: 44px;
  height: auto;
  padding: .35rem .65rem !important;
  margin: 0;
  font-size: .82rem !important;
  line-height: 1.35;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}
body[data-lev-preview] #app #plan-total .lev-result-actions summary {
  display: flex;
  gap: .4rem;
  align-items: center;
  color: var(--lev-accent);
  border: 1px solid var(--lev-line);
  border-radius: .4rem;
  width: fit-content !important;
}
body[data-lev-preview] #app #plan-total .lev-result-actions summary::after { position: static !important; inset: auto !important; display: inline-block !important; width: .35rem !important; height: .35rem !important; flex: 0 0 .35rem; margin: -.15rem .1rem 0 0 !important; padding: 0 !important; border: solid currentColor !important; border-width: 0 1.5px 1.5px 0 !important; background: none !important; content: '' !important; transform: rotate(45deg) !important; }
body[data-lev-preview] #app #plan-total .lev-result-actions[open] summary::after { transform: rotate(225deg) !important; }
body[data-lev-preview] #app #plan-total summary::-webkit-details-marker { display: none; }
body[data-lev-preview] #app #plan-total #plan-copy-status {
  white-space: pre-wrap;
  color: var(--lev-accent) !important;
}
body[data-lev-preview] #app :is(#plan-total, #funding) .total-note {
  margin: .5rem 0 .75rem !important;
  font-size: .8rem !important;
  line-height: 1.45 !important;
}
body[data-lev-preview] #app #cost-table {
  border: 0 !important;
  background: transparent !important;
  margin: 0 !important;
}
body[data-lev-preview] #app #cost-table .plan-group + .plan-group { margin-block-start: 1rem; }
body[data-lev-preview] #app #cost-table .plan-group-heading {
  display: flex;
  flex-flow: row wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .15rem .65rem;
  margin: 0;
  padding: .45rem 0 .15rem !important;
  border: 0 !important;
  background: transparent !important;
}
body[data-lev-preview] #app #cost-table .plan-group-heading h3 {
  margin: 0;
  font-size: .95rem !important;
  line-height: 1.35;
}
body[data-lev-preview] #app #cost-table .plan-group-heading :is(small,span) {
  font-size: .8rem !important;
  line-height: 1.35;
}
body[data-lev-preview] #app #cost-table .plan-level-link { margin: 0 !important; }
body[data-lev-preview] #app #cost-table .table-wrap {
  overflow: visible !important;
  min-width: 0 !important;
  max-width: 100%;
  border: 1px solid var(--lev-line) !important;
  border-radius: .3rem !important;
}
body[data-lev-preview] #app #cost-table table {
  margin: 0;
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse;
}
body[data-lev-preview] #app #cost-table :is(td,th) {
  font-size: .8rem !important;
  line-height: 1.4 !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
  padding: .35rem .45rem !important;
  text-align: start !important;
  vertical-align: top;
}
body[data-lev-preview] #app #cost-table th:nth-child(1) { width: 15% !important; }
body[data-lev-preview] #app #cost-table th:nth-child(2) { width: 17% !important; }
body[data-lev-preview] #app #cost-table th:nth-child(3) { width: 23% !important; }
body[data-lev-preview] #app #cost-table th:nth-child(4) { width: 17% !important; }
body[data-lev-preview] #app #cost-table th:nth-child(5) { width: 28% !important; }
body[data-lev-preview] #app #cost-table .lev-build,
body[data-lev-preview] #app #cost-table .base-amount {
  display: block;
  margin: .12rem 0 !important;
  font-size: .75rem !important;
  line-height: 1.35 !important;
  color: var(--lev-muted) !important;
}
body[data-lev-preview] #app #cost-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  padding: 0;
}
body[data-lev-preview] #app #cost-table :is(.lev-cell-label, .lev-row-toggle) { display: none; }
body[data-lev-preview] #app #cost-table :focus-visible,
body[data-lev-preview] #app #plan-total .plan-actions :focus-visible {
  outline: 2px solid #a2dfcf !important;
  outline-offset: -2px;
}
@container lev-results (min-width: 35rem) {
  body[data-lev-preview] #app #totals .stat:nth-child(-n+2) { grid-column: auto; }
}
@container lev-results (max-width: 40rem) {
  body[data-lev-preview] #app #cost-table :is(table,thead,tbody) { display: block !important; }
  body[data-lev-preview] #app #cost-table tr {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    align-items: stretch;
    border: 0 !important;
  }
  body[data-lev-preview] #app #cost-table tbody tr { border-top: 1px solid var(--lev-line) !important; }
  body[data-lev-preview] #app #cost-table tr > :is(td,th) {
    display: block;
    min-width: 0 !important;
    width: auto !important;
    border: 0 !important;
    background: transparent !important;
  }
  body[data-lev-preview] #app #cost-table tbody tr > td:nth-child(2) {
    align-self: center;
    padding-inline-end: .55rem !important;
  }
  body[data-lev-preview] #app #cost-table .lev-range,
  body[data-lev-preview] #app #cost-table tr[data-expanded="false"] td:nth-child(n+3) { display: none !important; }
  body[data-lev-preview] #app #cost-table thead tr > th:nth-child(n) {
    width: auto !important;
  }
  body[data-lev-preview] #app #cost-table thead tr > th:nth-child(n+3) {
    position: absolute !important;
    width: 1px !important;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    padding: 0 !important;
  }
  body[data-lev-preview] #app #cost-table tbody tr > td:first-child { padding: 0 .45rem !important; }
  body[data-lev-preview] #app #cost-table .lev-row-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: start;
    gap: .45rem;
    min-width: 0;
    width: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 0 .1rem !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: var(--lev-accent) !important;
    font-size: .85rem !important;
    font-weight: 650;
    line-height: 1.4;
    text-align: start;
    cursor: pointer;
  }
  body[data-lev-preview] #app #cost-table .lev-row-toggle::before {
    content: '';
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    width: .34rem;
    height: .34rem;
    flex: 0 0 .34rem;
    transform: rotate(-45deg);
  }
  body[data-lev-preview] #app #cost-table .lev-row-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
  body[data-lev-preview] #app #cost-table tr[data-expanded="true"] > td:nth-child(n+3) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,7.5rem),1fr));
    align-items: baseline;
    gap: .1rem .6rem;
    border-top: 1px solid var(--lev-line) !important;
    padding: .35rem .55rem !important;
    background: #142933 !important;
  }
  body[data-lev-preview] #app #cost-table .lev-cell-label { display: block; }
  body[data-lev-preview] #app #cost-table .lev-cell-value { min-width: 0; }
  body[data-lev-preview] #app #cost-table .lev-build { margin: -.2rem 0 .35rem !important; }
}
@container lev-results (max-width: 16rem) {
  body[data-lev-preview] #app #totals .totals { grid-template-columns: minmax(0,1fr) !important; }
}
body[data-lev-preview] #app #funding {
  margin: 1rem 0 .6rem !important;
  padding: 0 !important;
  min-width: 0;
}
body[data-lev-preview] #app #funding > summary {
  display: list-item;
  box-sizing: border-box;
  min-height: 44px;
  font-size: 1rem !important;
  padding: .65rem .7rem !important;
  line-height: 1.4 !important;
}
body[data-lev-preview] #app #funding > :is(.funding-grid, #funding-results, .funding-intro, .total-note) {
  margin: .5rem .65rem .65rem !important;
}
body[data-lev-preview] #app #funding .funding-intro,
body[data-lev-preview] #app #funding .field :is(span,small),
body[data-lev-preview] #app #funding .help { font-size: .8rem !important; line-height: 1.45 !important; }
body[data-lev-preview] #app #funding .funding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,20rem),1fr)) !important;
  gap: .5rem !important;
}
body[data-lev-preview] #app #funding .funding-grid .panel {
  margin: 0 !important;
  padding: .6rem !important;
  min-width: 0;
}
body[data-lev-preview] #app #funding .panel h2 { margin: 0 0 .45rem !important; }
body[data-lev-preview] #app #funding :is(.two-fields, .wallet) {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,8rem),1fr)) !important;
  gap: .35rem .55rem !important;
}
body[data-lev-preview] #app #funding .field { min-width: 0; margin: 0 0 .5rem !important; }
body[data-lev-preview] #app #funding .field > span { margin: 0 0 .2rem !important; }
body[data-lev-preview] #app #funding .field :is(input,select) {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  height: auto;
}
body[data-lev-preview] #app #funding .field small { margin: .12rem 0 0 !important; }
body[data-lev-preview] #app #funding .funding-overview {
  padding: .55rem .65rem !important;
}
body[data-lev-preview] #app #funding .funding-progress {
  display: flex !important;
  flex-flow: row wrap;
  align-items: center;
  gap: .25rem .65rem !important;
  margin: .4rem 0 .55rem !important;
  min-width: 0;
}
body[data-lev-preview] #app #funding .funding-progress > * {
  min-width: 0;
  max-width: 100%;
  font-size: .83rem !important;
}
body[data-lev-preview] #app #funding .funding-progress progress {
  flex: 1 1 5rem;
  min-width: 2rem;
}
body[data-lev-preview] #app #funding-results .funding-results { margin: 0 !important; }
body[data-lev-preview] #app #funding-results .funding-ledger { margin: .65rem 0 0 !important; }
body[data-lev-preview] #app #funding-results .funding-ledger h3 {
  margin: 0 0 .25rem !important;
  font-size: .9rem !important;
}
body[data-lev-preview] #app #funding-results .funding-ledger dl {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr));
  gap: .1rem .9rem;
}
body[data-lev-preview] #app #funding-results .funding-ledger dl > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .1rem .65rem;
  padding: .3rem 0 !important;
}
body[data-lev-preview] #app #funding :is(.funding-ledger dt,.funding-ledger dd,.income-details p) {
  margin: 0;
  min-width: 0;
  line-height: 1.45 !important;
  font-size: .8rem !important;
}
body[data-lev-preview] #app #funding-results .income-details { margin: .65rem 0 0 !important; }
@media (max-width: 35rem) {
  body[data-lev-preview] #app #funding-results .funding-results {
    grid-template-columns: repeat(auto-fit,minmax(min(100%,8.5rem),1fr)) !important;
  }
}
@media (forced-colors: active) {
  body[data-lev-preview] #app #cost-table .lev-row-toggle { color: ButtonText !important; }
}

body[data-lev-preview] .atlas-crumb {
  background: transparent !important;
  color: #a0b4c3;
  border: 0;
  padding-block: 0;
  font-size: .75rem;
  line-height: 1.4;
}
body[data-lev-preview] .atlas-crumb a { color: #b9ccd7; }
body[data-lev-preview] .atlas-crumb i { color: #8095a3; }
body[data-lev-preview] main#app { min-width: 0; }
body[data-lev-preview] .level-hero {
  display: block;
  min-height: 0;
  margin: .65rem 0 .25rem;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
body[data-lev-preview] .level-hero::before,
body[data-lev-preview] .level-hero::after { content: none; }
body[data-lev-preview] .level-hero h1 {
  margin: 0;
  color: #f2f5f6;
  font-size: clamp(1.1875rem, 1rem + .85vw, 1.5625rem);
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-transform: none;
}
body[data-lev-preview] .level-hero .intro {
  margin: .25rem 0 0;
  font-size: .875rem;
  line-height: 1.45;
  max-inline-size: 68ch;
  color: #b4c5ce;
}
body[data-lev-preview] .tool-jumps {
  display: flex;
  gap: 0 .75rem;
  flex-wrap: wrap;
  margin: .3rem 0 .4rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #30444e;
  border-radius: 0;
  box-shadow: none;
}
body[data-lev-preview] .tool-jumps a,
body[data-lev-preview] .lev-edit,
body[data-lev-preview] #app .backtop {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .15rem .12rem;
  box-sizing: border-box;
  color: #9fdbc9;
  font-size: .8125rem;
  line-height: 1.35;
  font-weight: 600;
  overflow-wrap: anywhere;
  background: transparent;
  border: 0;
  border-radius: .15rem;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: .2em;
  text-decoration-color: #567e73;
}
body[data-lev-preview] .tool-jumps a { text-decoration: none; }
body[data-lev-preview] .tool-jumps a:hover,body[data-lev-preview] .lev-edit:hover { text-decoration: underline; }
body[data-lev-preview] :is(.tool-jumps a,.lev-edit,.backtop,.calculator-dock button):focus-visible { outline: 2px solid #b6e5d4; outline-offset: 2px; }
body[data-lev-preview] #app .backtop { position: static; inset: auto; width: auto; height: auto; margin-top: .5rem; }
body[data-lev-preview] #plan-total .range-heading { flex-wrap: wrap; gap: 0 .6rem; align-items: center; }
body[data-lev-preview] #plan-total .lev-edit { margin-inline-start: auto; min-width: 44px; justify-content: flex-end; }
body[data-lev-preview] #plan-total #range-label { flex-basis: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
body[data-lev-preview] :is(#calculator,#plan-total,#funding) { scroll-margin-block-start: .5rem; }
@media (max-width: 800px) {
  body[data-lev-preview] .calculator-dock:not([hidden]) {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .15rem max(.75rem,env(safe-area-inset-right)) max(.15rem,env(safe-area-inset-bottom)) max(.75rem,env(safe-area-inset-left));
    background: #12222b; border-top: 1px solid #41535d; box-shadow: none;
  }
  body[data-lev-preview] .calculator-dock[hidden] { display: none !important; }
  body[data-lev-preview] .calculator-dock div { display: grid; gap: 0; min-width: 0; }
  body[data-lev-preview] .calculator-dock small { font-size: .6875rem; line-height: 1.25; color: #b5c6cf; }
  body[data-lev-preview] .calculator-dock strong { font-size: .9375rem; line-height: 1.25; font-weight: 650; overflow-wrap: anywhere; white-space: normal; }
  body[data-lev-preview] .calculator-dock button {
    flex: 0 1 auto; min-width: 44px; min-height: 44px; max-width: 54%;
    padding: .25rem .65rem; background: #29443f; color: #daf3e6;
    border: 1px solid #45675d; border-radius: 6px;
    font-size: .8125rem; line-height: 1.3; font-weight: 600; white-space: normal;
  }
  body[data-lev-preview].has-calculator-dock { padding-bottom: max(3.4rem,var(--lev-dock-height,0px)); }
}
/* The shared theme sets fixed mobile heading and navigation sizes. */
body[data-lev-preview] main#app .level-hero { margin: .15rem 0 .25rem !important; }
body[data-lev-preview] main#app .level-hero h1 { font-size: 1.25rem !important; line-height: 1.22 !important; margin: 0 !important; overflow-wrap: anywhere; }
body[data-lev-preview] main#app .level-hero .intro { font-size: .8125rem !important; line-height: 1.45 !important; margin: .25rem 0 0 !important; }
body[data-lev-preview] main#app .tool-jumps { margin: 0 0 .5rem !important; padding: 0 !important; min-height: 0; }
body[data-lev-preview] main#app .tool-jumps a { font-size: .8125rem !important; padding: 0 .2rem !important; line-height: 1.35 !important; min-width: 44px; }
body[data-lev-preview] .calculator-dock button { overflow-wrap: anywhere; }
@media (max-width: 360px) {
  body[data-lev-preview] .calculator-dock:not([hidden]) { padding-inline: 8px; gap: 6px; }
  body[data-lev-preview] .calculator-dock button { padding-inline: 6px !important; max-width: 50%; }
}
@media (min-width: 801px) {
  body[data-lev-preview] main#app .level-hero h1 { font-size: 1.5rem !important; }
}
