@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  font-family: 'DM Sans', sans-serif;
  color: #19251f;
  background: #f3f3ed;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  font-weight: 400;
  --ink: #19251f;
  --line: #e4e5dc;
  --green: #c7f36b;
  --deep: #1d2b24;
  --mono: 'DM Mono', monospace;
  --display: 'Manrope', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
.shell { width: min(1160px, calc(100% - 72px)); margin: 0 auto; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #dfe1d8; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: .13em; }
.brand-mark { width: 25px; height: 25px; background: var(--green); display: grid; place-items: center; border-radius: 50%; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: 0; }
.top-note, .eyebrow, .edit-label, .step-index, .results-topline, .efficiency-row, .hero-label, .section-caption, .meter-labels, .page-foot { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; }
.top-note { color: #636c65; display: flex; align-items: center; gap: 9px; }
.live-dot { width: 7px; height: 7px; background: #7aac36; border-radius: 50%; box-shadow: 0 0 0 3px #e0edcd; }
.intro { padding: 54px 0 40px; display: flex; align-items: flex-end; justify-content: space-between; }
.eyebrow { color: #7a817b; margin: 0 0 15px; }
.eyebrow span { color: #bcc0b8; padding: 0 5px; }
h1 { font-family: var(--display); font-size: clamp(55px, 6.5vw, 81px); line-height: .99; letter-spacing: -.065em; margin: 0; font-weight: 600; }
h1 em { font-style: normal; color: #77816d; }
.intro-copy { font-size: 18px; line-height: 1.6; color: #6c746d; max-width: 290px; margin: 0 4px 5px 24px; }
.workspace { display: grid; grid-template-columns: minmax(350px, .86fr) minmax(0, 1.14fr); align-items: stretch; box-shadow: 0 14px 50px #2733260a; }
.input-panel { min-width: 0; padding: 29px 34px 27px; background: #fff; border: 1px solid #e8e9e2; border-right: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.panel-heading > div { display: flex; align-items: center; gap: 12px; }
.step-index { color: #849174; background: #f1f5eb; border-radius: 50%; width: 32px; height: 32px; display: grid; place-items: center; letter-spacing: 0; }
.panel-heading h2 { font-family: var(--display); font-size: 23px; letter-spacing: -.04em; margin: 0; font-weight: 700; }
.edit-label { color: #9a9f98; font-size: 12px; }
fieldset { min-width: 0; border: 0; border-top: 1px solid var(--line); margin: 0; padding: 20px 0 17px; }
legend { float: left; width: 100%; padding: 0 0 16px; font-family: var(--mono); font-size: 12px; letter-spacing: .11em; color: #727a73; }
legend + .field { clear: both; }
.legend-mark { color: #8b9b7e; margin-right: 8px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; font-size: 14px; color: #4d574f; }
.field small { display: block; color: #8b938b; font-size: 13px; margin: 4px 0 0; }
.field-label { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.tooltip { position: relative; width: 17px; height: 17px; display: inline-grid; place-items: center; border: 1px solid #aeb8ad; border-radius: 50%; color: #667368; font-family: var(--mono); font-size: 11px; line-height: 1; cursor: help; }
.tooltip:focus-visible { outline: 2px solid #a8c77d; outline-offset: 2px; }
.input-wrap { width: fit-content; max-width: 100%; height: 44px; border: 1px solid #e4e7df; background: #fbfcf9; display: flex; align-items: center; transition: border-color .18s, box-shadow .18s; }
.input-wrap:focus-within, select:focus { outline: none; border-color: #a8c77d; box-shadow: 0 0 0 3px #c7f36b36; }
.input-wrap input { min-width: 0; width: 9ch; flex: 0 0 9ch; height: 100%; border: 0; background: transparent; outline: 0; padding: 0 4px; color: var(--ink); font-family: var(--mono); font-size: 16px; font-variant-numeric: tabular-nums; }
.input-wrap .prefix, .input-wrap .suffix { flex: none; color: #929991; font-family: var(--mono); font-size: 14px; }
.input-wrap .prefix { padding-left: 11px; }
.input-wrap .suffix { padding-right: 11px; }
.field-row { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-row .field { min-width: 0; }
.treasury-pair { align-items: start; }
.treasury-pair .field { margin-bottom: 10px; }
.reserve-field { clear: both; margin-bottom: 2px; }
.field select, .risk-field select { height: 44px; width: 100%; border: 1px solid #e4e7df; background: #fbfcf9; padding: 0 10px; color: var(--ink); font-family: 'DM Sans', sans-serif; font-size: 14px; border-radius: 0; }
.profile-fields { padding-bottom: 0; }
.profile-row { grid-template-columns: minmax(0, 1.3fr) minmax(100px, .7fr); max-width: 340px; }
.risk-field { clear: both; max-width: 200px; margin: 0; }
.results-panel { background: var(--deep); color: #f5f7ef; padding: 26px 34px 24px; min-width: 0; }
.results-topline { display: flex; justify-content: space-between; color: #adb8ad; font-size: 12px; }
.slash { color: #637267; padding: 0 4px; }
.currency-tag { color: #77857a; }
.result-hero { margin-top: 23px; padding: 20px; background: #26372d; border: 1px solid #33443a; }
.efficiency-row { display: flex; align-items: center; gap: 9px; color: #d1eba9; font-size: 13.2px; }
.status-dot { width: 8px; height: 8px; background: #e5816e; border-radius: 50%; }
.efficiency-row[data-level="unavailable"] { color: #aebcaf; }
.efficiency-row[data-level="unavailable"] .status-dot { background: #86938a; }
.efficiency-row[data-level="medium"] { color: #ead392; }
.efficiency-row[data-level="medium"] .status-dot { background: #e8bb57; }
.efficiency-row[data-level="good"] { color: #c8ed8b; }
.efficiency-row[data-level="good"] .status-dot { background: #a3d75a; }
.efficiency-score { margin-left: auto; color: #aebcaf; font-size: 14.4px; }
.hero-label { color: #aeb8ad; font-size: 14.4px; margin: 25px 0 4px; }
.hero-value { font-family: var(--display); font-size: clamp(46px, 5.2vw, 62px); line-height: 1.1; letter-spacing: -.06em; font-weight: 600; font-variant-numeric: tabular-nums; margin: 0; color: #ef6258; }
.hero-detail { color: #a7b1a7; font-size: 14px; margin: 8px 0 20px; }
.hero-detail strong { color: #e3e9de; font-weight: 500; }
.meter { height: 6.3px; background: #405047; position: relative; overflow: hidden; }
.meter:before, .meter:after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: #819084; z-index: 1; }
.meter:before { left: 25%; }
.meter:after { left: 50%; }
#meter-fill { height: 100%; width: 0; background: #e5816e; display: block; transition: width .25s ease, background .25s ease; }
.meter-labels { display: flex; justify-content: space-between; color: #829086; font-size: 11.5px; letter-spacing: 0; margin-top: 7px; }
.breakdown { padding: 21px 1px 18px; border-bottom: 1px solid #3b4a40; }
.section-caption { display: block; color: #91a092; font-size: 12px; margin-bottom: 12px; }
.breakdown-row, .potential-row, .impact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: #c0c9bf; padding: 6px 0; }
.breakdown-row > span { display: flex; align-items: center; gap: 9px; }
.breakdown-row strong, .potential-row strong { font-family: var(--mono); font-size: 14px; font-weight: 400; color: #f0f2ec; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-inflation { background: #c6ed70; }
.dot-opportunity { background: #80b8a1; }
.dot-operations { background: #8b94c7; }
.loss-chart { display: flex; gap: 3px; height: 9px; margin-top: 15px; overflow: hidden; background: #405047; }
.loss-chart span { min-width: 0; height: 100%; transition: width .3s ease; }
.chart-inflation { background: #c6ed70; }
.chart-opportunity { background: #80b8a1; }
.chart-operations { background: #8b94c7; }
.potential { padding: 20px 1px 16px; }
.potential-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 9px; }
.potential-heading .section-caption { margin-bottom: 4px; }
.potential-range { display: block; font-family: var(--display); font-size: 35px; font-weight: 500; letter-spacing: -.05em; color: var(--green); line-height: 1; }
.potential-range span { font-size: 21px; margin-left: 2px; }
.range-note { font-size: 14.4px; color: #93a095; padding-bottom: 3px; }
.potential-row { padding: 6px 0; color: #b8c2b8; }
.potential-row strong { color: #e8eee5; font-weight: 500; }
.impact-row { border-top: 1px solid #3b4a40; margin-top: 10px; padding: 13px 0 0; color: #f2f5ed; }
.impact-row { font-size: 16.8px; }
.impact-row strong { font-family: var(--mono); font-size: 19.2px; color: var(--green); font-weight: 500; white-space: nowrap; }
.insight-card { border-top: 1px solid #3b4a40; padding: 17px 0 15px; }
.insight-card .section-caption { margin-bottom: 7px; }
.insight-card p { margin: 0; color: #d5dfd3; font-size: 14px; line-height: 1.55; }
.risk-note { display: flex; gap: 11px; align-items: flex-start; border-top: 1px solid #3b4a40; padding-top: 15px; color: #c3cec1; font-size: 13px; line-height: 1.6; }
.note-icon { height: 18px; width: 18px; flex: none; display: grid; place-items: center; border: 1px solid #78877a; border-radius: 50%; font-family: var(--mono); font-size: 12px; color: #c4d6b5; line-height: 1; }
.risk-note strong { font-weight: 600; color: #d7e7c5; }
.risk-note small { color: #aab5aa; font-size: 12px; }
.page-foot { height: 52px; display: flex; align-items: center; justify-content: space-between; color: #8a928a; font-size: 12px; }
.page-foot span:last-child { font-family: 'DM Sans', sans-serif; letter-spacing: .02em; text-transform: none; }
.share-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; }
.share-cta button { border: 0; padding: 12px 15px; background: var(--green); color: var(--deep); font: 600 14px 'DM Sans', sans-serif; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.share-cta button:hover { background: #d8ffa0; transform: translateY(-1px); }
.share-cta button:focus-visible { outline: 2px solid #f5f7ef; outline-offset: 3px; }
.share-cta button span { padding-left: 12px; }
#share-status { color: #aebcaf; font-size: 12px; text-align: right; }

@media (max-width: 900px) {
  .shell { width: min(100% - 36px, 620px); }
  .topbar { height: 68px; }
  .intro { padding: 42px 0 30px; display: block; }
  .intro-copy { margin: 17px 0 0; max-width: 380px; font-size: 18px; }
  h1 { font-size: clamp(54px, 12vw, 72px); }
  .workspace { grid-template-columns: 1fr; }
  .input-panel { padding: 27px 28px; border-right: 1px solid #e8e9e2; }
  .results-panel { padding: 27px 28px; }
  .result-hero { margin-top: 20px; }
  .hero-value { font-size: 57px; }
  .page-foot { font-size: 12px; }
}

@media (max-width: 390px) {
  .shell { width: calc(100% - 24px); }
  .input-panel, .results-panel { padding-left: 17px; padding-right: 17px; }
  .field-row:not(.profile-row) { grid-template-columns: 1fr; gap: 0; }
  .field-row .field { margin-bottom: 13px; }
  .profile-row { grid-template-columns: 1.1fr .9fr; gap: 10px; }
  h1 { font-size: clamp(57px, 14vw, 60px); }
  .potential-row, .breakdown-row { font-size: 13px; }
  .impact-row { font-size: 15.6px; }
  .potential-row strong, .breakdown-row strong { font-size: 13px; }
  .top-note { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}