:root {
  --bg: #f5f6fc;
  --surface: #fcfcff;
  --ink: #151d4b;
  --muted: #6b7395;
  --line: #dfe3f2;
  --accent: #4d56e9;
  --accent-soft: #eaeaff;
  --mint: #64bba3;
  --peach: #f7b58b;
  --radius: 9px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(30px, 3.35vw, 49px);
  line-height: 1.13;
  letter-spacing: -1.9px;
  font-weight: 750;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}
h3 {
  font-size: 16px;
}
input,
textarea {
  color: var(--ink);
}
button,
a,
input,
textarea,
summary {
  outline-offset: 4px;
}
:focus-visible {
  outline: 3px solid #a690e9;
}
button:focus:not(:focus-visible) {
  outline: none;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: -80px;
  left: 16px;
  background: var(--ink);
  color: #fff;
  padding: 14px;
  z-index: 100;
}
.skip:focus {
  top: 12px;
}
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  padding: 0 2.5vw;
  background: #f8f9ff;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.8px;
}
.brand svg {
  width: 31px;
  height: 32px;
}
.workspace {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
}
.workspace > span:first-child {
  color: var(--muted);
}
.sample-dot {
  width: 6px;
  height: 6px;
  background: var(--mint);
  border-radius: 50%;
}
.main-nav {
  display: flex;
  gap: 32px;
  height: 100%;
  align-items: stretch;
  margin: auto;
}
.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  white-space: nowrap;
}
.main-nav a:hover {
  color: var(--accent);
}
.main-nav a[aria-current] {
  color: var(--accent);
}
.main-nav a[aria-current]:after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  left: 0;
  right: 0;
  border-radius: 3px 3px 0 0;
}
.avatar {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e1e4f6;
  font-size: 11px;
  font-weight: 700;
}
.help-button {
  border: 1px solid var(--line);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: -18px;
  color: var(--muted);
}
.count {
  font-size: 10px;
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 1px 5px;
}
.storage-banner {
  padding: 12px 2.5vw;
  background: #fff2d6;
  color: #6b4d13;
}
main {
  padding: 0 2.5vw;
  max-width: 1920px;
  margin: auto;
}
.breadcrumb {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  padding: 22px 0 13px;
}
.muted,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 12px;
  line-height: 1.6;
}
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 24px;
}
.page-title .eyebrow {
  margin: 14px 0 10px;
}
.title-dot {
  color: var(--accent);
}
.page-actions {
  display: flex;
  gap: 17px;
  align-items: center;
  flex-shrink: 0;
}
.primary,
.secondary,
.text-button,
.outline-light,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  transition:
    background 0.16s,
    transform 0.16s;
}
.primary {
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
}
.primary:hover {
  background: #3b43ca;
  border-color: #3b43ca;
}
.primary:active {
  transform: translateY(1px);
}
.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
}
.secondary:hover {
  background: var(--accent-soft);
}
.text-button {
  color: var(--accent);
  padding: 8px 0;
}
.text-button:hover,
.text-link:hover {
  text-decoration: underline;
}
.dirty {
  font-size: 10px;
  color: #9c601e;
}
.dirty:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #cf9252;
  border-radius: 50%;
  margin-right: 5px;
}
.mobile-intro {
  display: none;
}
.scenario-bar {
  display: flex;
  border: 1px solid #d4d9ed;
  border-radius: 7px;
  overflow: auto;
  margin-bottom: 20px;
  min-height: 44px;
}
.scenario-tab {
  padding: 11px 16px;
  flex: 1;
  min-width: 110px;
  position: relative;
  border-right: 1px solid var(--line);
  white-space: nowrap;
  font-size: 13px;
}
.scenario-tab:hover {
  background: #eceefa;
}
.scenario-tab[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.scenario-tab.add {
  flex: 0.6;
  border-right: 0;
  color: var(--accent);
}
.workbench {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(430px, 2.15fr) minmax(
      260px,
      1fr
    );
  gap: 14px;
  align-items: stretch;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.45);
}
.controls-panel {
  padding: 22px 20px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.tiny-badge {
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  border-radius: 3px;
  padding: 1px 5px;
}
.controls-panel > .hint {
  margin-top: 6px;
}
.control {
  margin-top: 33px;
}
.control-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 15px;
}
.control-label label {
  font-size: 12px;
  font-weight: 600;
}
.number-wrap {
  display: flex;
  border: 1px solid #d8dded;
  border-radius: 5px;
  align-items: center;
  max-width: 96px;
  min-height: 33px;
  overflow: hidden;
  background: #f9faff;
}
.number-wrap input {
  width: 58px;
  background: transparent;
  border: 0;
  min-width: 0;
  padding: 6px 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
}
.number-wrap input::-webkit-inner-spin-button {
  appearance: none;
}
.number-wrap span {
  font-size: 11px;
  padding: 0 9px;
  color: var(--muted);
}
.budget-number {
  max-width: 110px;
}
.budget-number input {
  width: 76px;
  padding-left: 0;
}
.budget-number span {
  padding-right: 3px;
}
.range-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
input[type="range"] {
  --progress: 50%;
  width: 100%;
  height: 5px;
  appearance: none;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--progress),
    #dfe3f4 var(--progress),
    #dfe3f4 100%
  );
  margin: 8px 0;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 2px 5px #4954c73b;
}
input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--accent);
  border: 0;
  border-radius: 50%;
}
.select-value {
  font-size: 11px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.switch-control {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.switch-control label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}
.switch-control label span {
  color: var(--muted);
  font-size: 11px;
  max-width: 170px;
}
.switch-control input {
  appearance: none;
  min-width: 37px;
  height: 22px;
  border-radius: 20px;
  background: #bdc3da;
  position: relative;
  margin: 0;
  cursor: pointer;
}
.switch-control input:checked {
  background: var(--accent);
}
.switch-control input:before {
  content: "";
  width: 16px;
  height: 16px;
  position: absolute;
  top: 3px;
  left: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
}
.switch-control input:checked:before {
  transform: translateX(15px);
}
.model-details {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 14px;
  font-size: 11px;
  color: var(--muted);
}
.model-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}
.model-details p {
  margin-top: 10px;
}
.baseline-message {
  background: #edeefa;
  border-radius: 5px;
  padding: 10px;
  font-size: 11px;
  margin-top: 14px;
  color: #555e88;
}
.chart-panel {
  padding: 22px 20px 12px;
  min-width: 0;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.25px;
  color: var(--muted);
  font-weight: 700;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 22px 0 2px;
  min-height: 15px;
  font-size: 10px;
}
.legend-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 6px;
}
.chart-wrap {
  width: 100%;
  overflow: hidden;
}
#chart {
  width: 100%;
  height: auto;
  display: block;
  min-height: 250px;
}
#chart text {
  font-family: Arial, Helvetica, sans-serif;
  fill: #737b9b;
  font-size: 11px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 14px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
th:first-child,
td:first-child {
  text-align: left;
}
th {
  font-weight: 600;
}
th.selected,
td.selected {
  background: #eeefff;
  color: #3d45ba;
}
#comparison-table {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}
#comparison-table th:not(:first-child) {
  min-width: 95px;
}
.table-toggle {
  font-size: 10px;
  min-height: 32px;
  margin-top: 8px;
}
#monthly-table caption {
  text-align: left;
  padding: 13px 12px 0;
  font-weight: 700;
}
#monthly-table {
  font-size: 10px;
}
#monthly-table th,
#monthly-table td {
  padding: 10px 8px;
}
.result-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.result-card {
  background: #30395f;
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  flex: 1;
  overflow: hidden;
}
.result-top h2 {
  font-size: 23px;
  margin-bottom: 5px;
}
.result-label {
  font-size: 8px;
  letter-spacing: 1px;
  color: #bec6e2;
}
.result-amount {
  display: flex;
  gap: 7px;
  align-items: baseline;
  white-space: nowrap;
  margin-top: 13px;
}
.result-amount strong {
  font-size: clamp(31px, 3.15vw, 49px);
  letter-spacing: -1.7px;
  line-height: 1.1;
  font-weight: 700;
}
.result-amount > span {
  font-size: 12px;
}
.result-delta {
  color: #97dcc7;
  font-size: 20px;
  font-weight: 600;
  margin-top: 8px;
  line-height: 1.3;
}
.result-delta.higher {
  color: #ffd0b3;
}
.result-card hr {
  border: 0;
  border-top: 1px solid #596182;
  margin: 24px 0 21px;
}
.result-card h3 {
  font-size: 14px;
}
.tradeoffs {
  list-style: none;
  padding: 0;
  margin: 19px 0 25px;
  display: grid;
  gap: 18px;
}
.tradeoffs li {
  display: flex;
  gap: 11px;
  font-size: 12px;
  line-height: 1.5;
  align-items: flex-start;
}
.tradeoffs .mark {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  background: #97d9c8;
  color: #273857;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 12px;
  margin-top: 1px;
}
.tradeoffs .mark.caution {
  background: #f2bd98;
  border-radius: 6px;
}
.outline-light {
  border: 1px solid #b9c0db;
  color: #fff;
  width: 100%;
  font-weight: 400;
  font-size: 11px;
  min-height: 37px;
}
.outline-light:hover {
  background: #424c76;
}
.note-panel {
  padding: 15px;
}
.note-panel .section-heading {
  font-size: 12px;
}
.note-panel textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 84px;
  margin-top: 10px;
  padding: 10px;
  background: #fafbff;
  font-size: 11px;
  line-height: 1.5;
}
.note-panel textarea::placeholder {
  color: #7b83a0;
}
.note-count {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.saved-panel {
  margin-top: 19px;
  display: flex;
  align-items: center;
  gap: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff90;
  padding: 15px 18px;
}
.saved-panel h3 {
  font-size: 12px;
}
.saved-panel .hint {
  font-size: 10px;
}
.compare-options {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
}
.compare-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
}
.compare-option:has(input:checked) {
  border-color: #c6ccf5;
  background: #f4f5ff;
}
.compare-option input {
  accent-color: var(--accent);
  margin: 0;
}
.text-link {
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
}
.text-link span {
  margin-left: 10px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 22px 2px;
  font-size: 9px;
  color: #8990a7;
}
.footer-brand {
  letter-spacing: 3px;
  font-weight: 600;
  color: #626d94;
}
.overview-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.stat {
  padding: 24px 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat p {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}
.stat strong {
  font-size: 33px;
  font-weight: 600;
  letter-spacing: -1px;
}
.stat small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
.roomy {
  padding: 28px;
}
.roomy > p {
  margin: 10px 0 24px;
  line-height: 1.7;
  color: var(--muted);
  font-size: 13px;
}
.plan-list {
  margin-top: 25px;
}
.plan-row {
  display: grid;
  grid-template-columns: 1fr 130px 100px;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 21px 0;
}
.plan-row small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.plan-row .plan-cost {
  text-align: right;
  font-weight: 600;
}
.plan-row .text-button {
  font-size: 11px;
}
.steps {
  padding: 0;
  list-style: none;
  display: grid;
  gap: 26px;
  margin: 30px 0;
}
.steps li {
  display: flex;
  gap: 20px;
  font-size: 13px;
}
.steps li > span {
  font-size: 13px;
  color: var(--accent);
  padding-top: 2px;
}
.steps p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}
.soft-note {
  background: var(--accent-soft);
  padding: 15px;
  border-radius: 6px;
  font-size: 11px !important;
  margin-bottom: 0 !important;
}
.empty-state {
  text-align: center;
  padding: 70px 20px;
}
.empty-state h3 {
  font-size: 22px;
  margin: 12px 0;
}
.empty-state p {
  color: var(--muted);
  margin-bottom: 24px;
}
.history-item {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 25px 0;
}
.history-icon {
  height: 35px;
  width: 35px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.history-item h3 {
  font-size: 15px;
}
.history-meta {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0;
}
.history-item blockquote {
  margin: 12px 0 0;
  border-left: 2px solid #c5cbf5;
  padding: 8px 14px;
  background: #f4f5fd;
  font-size: 12px;
  max-width: 680px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.history-cost {
  text-align: right;
  font-size: 19px;
  font-weight: 600;
}
.history-cost small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.reports-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.report-icon {
  background: var(--accent-soft);
  width: 42px;
  height: 42px;
  border-radius: 9px;
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 25px;
  margin-bottom: 30px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 26px 0;
}
.plain-list {
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 2.1;
  margin-top: 15px;
}
.model-list {
  font-size: 12px;
  margin-top: 25px;
}
.model-list div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.model-list dt {
  color: var(--muted);
}
.model-list dd {
  margin: 0;
  font-weight: 600;
}
.danger-text {
  color: #ad4d4d;
  padding: 10px 0;
  margin-top: 20px;
  font-size: 11px;
  text-decoration: underline;
}
.inline-error {
  font-size: 12px;
  color: #a74740;
  line-height: 1.5;
  margin: 10px 0 !important;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #222d53;
  color: #fff;
  padding: 13px 22px;
  border-radius: 8px;
  box-shadow: 0 5px 30px #29304b25;
  font-size: 12px;
  z-index: 10;
  max-width: calc(100% - 32px);
  text-align: center;
}
dialog {
  width: min(490px, calc(100% - 32px));
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px;
  color: var(--ink);
  background: #fcfcff;
  box-shadow: 0 20px 120px #10193630;
}
dialog::backdrop {
  background: #10193677;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.dialog-heading .eyebrow {
  margin: 4px 0 8px;
}
.icon-button {
  font-size: 25px;
  line-height: 1;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: var(--muted);
}
dialog p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
dialog label {
  font-size: 12px;
  font-weight: 600;
  display: block;
  margin: 18px 0 8px;
}
dialog input {
  width: 100%;
  border: 1px solid #cbd2e9;
  border-radius: 5px;
  padding: 12px;
  background: white;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
}
.reports-grid .hint {
  margin: 12px 0 0;
  font-size: 10px;
}
.file-button {
  cursor: pointer;
}
.view {
  animation: appear 0.18s ease;
}
@keyframes appear {
  from {
    opacity: 0.4;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 1650px) {
  .workbench {
    grid-template-columns: 300px minmax(500px, 1fr) 330px;
  }
  .chart-panel {
    padding: 25px 28px;
  }
  .chart-wrap {
    margin-top: 14px;
  }
  #chart {
    min-height: 340px;
  }
  .control {
    margin-top: 41px;
  }
  .result-card {
    padding: 28px;
  }
}
@media (max-width: 1200px) {
  .topbar {
    gap: 20px;
  }
  .main-nav {
    gap: 24px;
  }
  .workspace > span:first-child {
    display: none;
  }
  .workbench {
    grid-template-columns: 220px minmax(360px, 1fr);
  }
  .result-column {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1.45fr 1fr;
  }
  .result-card {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    column-gap: 30px;
    align-items: start;
  }
  .result-top,
  .result-amount,
  .result-delta {
    grid-column: 1;
  }
  .result-card hr {
    display: none;
  }
  .result-card > h3,
  .result-card .tradeoffs,
  .result-card .outline-light {
    grid-column: 2;
  }
  .result-card > h3 {
    grid-row: 1;
  }
  .result-card .tradeoffs {
    grid-row: 2/5;
    margin: 10px 0 18px;
    gap: 12px;
  }
  .result-card .outline-light {
    grid-row: 5;
  }
  .result-amount strong {
    font-size: 41px;
  }
  .result-delta {
    font-size: 18px;
  }
  .note-panel textarea {
    min-height: 150px;
  }
  .overview-stats {
    gap: 12px;
  }
  .stat {
    padding: 20px;
  }
  .reports-grid {
    gap: 14px;
  }
  .reports-grid .roomy {
    padding: 22px;
  }
  .saved-panel {
    gap: 15px;
  }
  .page-title h1 {
    font-size: 38px;
  }
}
@media (max-width: 850px) {
  .topbar {
    height: auto;
    flex-wrap: wrap;
    padding: 16px 24px 0;
    gap: 12px;
  }
  .brand {
    font-size: 22px;
  }
  .brand svg {
    width: 28px;
  }
  .workspace {
    margin-left: auto;
  }
  .avatar {
    margin-left: 8px;
  }
  .help-button {
    margin: 0;
  }
  .main-nav {
    order: 5;
    width: 100%;
    height: 49px;
    justify-content: space-between;
    gap: 15px;
  }
  .main-nav a {
    font-size: 12px;
  }
  .breadcrumb {
    padding-top: 18px;
  }
  main {
    padding: 0 24px;
  }
  .page-title {
    align-items: flex-start;
  }
  .page-title h1 {
    font-size: 32px;
    letter-spacing: -1.2px;
  }
  .page-actions {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .page-actions .dirty {
    width: 100%;
    text-align: right;
  }
  .primary,
  .secondary {
    font-size: 11px;
    padding: 10px 12px;
  }
  .workbench {
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 12px;
  }
  .controls-panel,
  .chart-panel {
    padding: 18px 15px;
  }
  .chart-panel > .section-heading {
    display: block;
  }
  .chart-panel .eyebrow {
    display: block;
    margin-top: 5px;
  }
  .workbench h2 {
    font-size: 18px;
  }
  .chart-legend {
    gap: 10px;
    margin-top: 18px;
  }
  #chart {
    min-height: 260px;
  }
  .control-label {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .control {
    margin-top: 26px;
  }
  .number-wrap {
    margin-left: auto;
  }
  .result-card {
    padding: 21px;
  }
  .result-amount strong {
    font-size: 34px;
  }
  .tradeoffs li {
    font-size: 11px;
  }
  .result-column {
    grid-template-columns: 1.6fr 1fr;
  }
  .saved-panel {
    flex-wrap: wrap;
  }
  .saved-panel > div:first-child {
    width: 100%;
  }
  .compare-options {
    gap: 4px;
  }
  .compare-option {
    padding: 8px;
  }
  .saved-panel .text-link {
    margin-left: auto;
  }
  .overview-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .reports-grid {
    grid-template-columns: 1fr 1fr;
  }
  .reports-grid > section:last-child {
    grid-column: 1/-1;
  }
  .model-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
  }
  .plan-row {
    grid-template-columns: 1fr 110px 90px;
  }
  footer {
    font-size: 8px;
  }
  footer > span:nth-child(2) {
    display: none;
  }
}
@media (max-width: 620px) {
  .topbar {
    padding: 14px 18px 0;
  }
  .workspace {
    font-size: 10px;
    padding: 8px;
  }
  .brand {
    font-size: 20px;
    gap: 6px;
  }
  .avatar {
    display: none;
  }
  .help-button {
    width: 25px;
    height: 25px;
  }
  .main-nav {
    height: 44px;
  }
  main {
    padding: 0 16px;
  }
  .breadcrumb {
    font-size: 10px;
    gap: 8px;
    padding-top: 16px;
  }
  .page-title {
    display: block;
    margin-bottom: 18px;
  }
  .page-title h1 {
    font-size: 33px;
    max-width: 370px;
    letter-spacing: -1.5px;
  }
  .mobile-intro {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 8px;
  }
  .page-actions {
    justify-content: flex-start;
    gap: 22px;
    margin-top: 17px;
    flex-wrap: nowrap;
  }
  .page-actions .primary {
    margin-left: auto;
    font-size: 12px;
  }
  .page-actions .dirty {
    width: auto;
    font-size: 9px;
  }
  .page-actions .text-button {
    font-size: 11px;
  }
  .scenario-bar {
    margin-bottom: 14px;
    min-height: 42px;
  }
  .scenario-tab {
    min-width: 96px;
    padding: 10px 12px;
    font-size: 12px;
  }
  .workbench {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .controls-panel {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }
  .controls-panel > .section-heading,
  .controls-panel > .hint,
  .baseline-message,
  .model-details {
    grid-column: 1/-1;
  }
  .control {
    margin-top: 24px;
  }
  .control-label {
    display: flex;
  }
  .control-label label {
    font-size: 11px;
  }
  .number-wrap {
    max-width: 82px;
    min-height: 30px;
  }
  .number-wrap input {
    width: 43px;
    padding: 5px 7px;
    font-size: 11px;
  }
  .number-wrap span {
    padding: 0 5px;
  }
  .budget-number {
    max-width: 91px;
  }
  .budget-number input {
    width: 65px;
  }
  .switch-control {
    padding-top: 4px;
  }
  .switch-control label {
    font-size: 11px;
  }
  .switch-control label span {
    font-size: 10px;
  }
  .select-value {
    font-size: 9px;
    padding: 5px 7px;
  }
  .model-details {
    margin-top: 20px;
  }
  .chart-panel {
    padding: 20px 15px;
  }
  .chart-panel > .section-heading {
    display: flex;
  }
  .chart-panel .eyebrow {
    font-size: 8px;
  }
  .chart-legend {
    margin-top: 20px;
  }
  #chart {
    min-height: 190px;
  }
  th,
  td {
    padding: 13px 9px;
    font-size: 10px;
  }
  #comparison-table th:not(:first-child) {
    min-width: 83px;
  }
  .result-column {
    display: flex;
    flex-direction: column;
  }
  .result-card {
    padding: 24px;
    display: block;
  }
  .result-card h2 {
    font-size: 22px;
  }
  .result-amount strong {
    font-size: 49px;
  }
  .result-amount span {
    font-size: 13px;
  }
  .result-card hr {
    display: block;
    margin: 22px 0;
  }
  .result-delta {
    font-size: 21px;
  }
  .result-card .tradeoffs {
    margin: 18px 0;
    gap: 17px;
  }
  .tradeoffs li {
    font-size: 13px;
  }
  .outline-light {
    font-size: 12px;
    min-height: 42px;
  }
  .note-panel {
    padding: 20px;
  }
  .note-panel textarea {
    min-height: 90px;
    font-size: 12px;
  }
  .saved-panel {
    padding: 17px;
    gap: 10px;
  }
  .compare-options {
    width: 100%;
    flex: auto;
  }
  .saved-panel .text-link {
    margin: 10px 0 0;
  }
  .view > .page-title > .primary,
  .view > .page-title > .secondary {
    margin-top: 18px;
  }
  .overview-stats {
    gap: 10px;
  }
  .stat {
    padding: 19px 16px;
  }
  .stat strong {
    font-size: 27px;
  }
  .stat p {
    font-size: 10px;
  }
  .roomy {
    padding: 22px;
  }
  .plan-row {
    grid-template-columns: 1fr 100px;
    gap: 12px;
  }
  .plan-row .text-button {
    grid-column: 1/-1;
    justify-content: flex-start;
    padding: 0;
    min-height: 20px;
  }
  .reports-grid {
    grid-template-columns: 1fr;
  }
  .reports-grid > section:last-child {
    grid-column: auto;
  }
  .model-list {
    display: block;
  }
  .history-item {
    grid-template-columns: 32px 1fr;
    gap: 12px;
  }
  .history-cost {
    grid-column: 2;
    text-align: left;
    font-size: 17px;
  }
  .history-cost small {
    display: inline;
    margin-left: 5px;
  }
  .history-item blockquote {
    font-size: 11px;
  }
  .history-meta {
    font-size: 10px;
  }
  .history-icon {
    width: 30px;
    height: 30px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .toast {
    bottom: 16px;
    min-width: 250px;
  }
  dialog {
    padding: 24px;
  }
  .model-details p {
    font-size: 11px;
  }
  footer {
    padding: 22px 2px;
  }
  .dirty {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
