:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #25272a;
  background: #f7f7f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
.shell { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 28px; }
.masthead { display: flex; gap: 16px; align-items: center; margin: 0 0 32px; }
.mark { width: 52px; height: 52px; flex: 0 0 52px; display: block; border: 1px solid #eceef0; border-radius: 14px; background: #fff; object-fit: contain; }
.eyebrow { margin: 0 0 7px; color: #85888d; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.catchphrase { margin: 0 0 6px; color: #85888d; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
h1 { margin: 0; font-size: clamp(25px, 4vw, 34px); line-height: 1.15; letter-spacing: -.025em; }
.subtitle { margin: 8px 0 0; color: #777b80; }
.calculator-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 0 0 18px; padding: 6px; border: 1px solid #e7e8ea; border-radius: 14px; background: #fff; }
.calculator-tab { display: flex; width: auto; min-height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: #85888d; font: inherit; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.calculator-tab span { font-size: 15px; }
.calculator-tab.active { background: #fff0e5; color: #e7752d; }
.calculator-tab.active:hover { background: #fff0e5; color: #e7752d; }
.calculator-tab:hover:not(.active) { background: #f7f7f8; color: #4b4e52; }
.availability-dialog { position: fixed; width: min(420px, calc(100% - 32px)); padding: 30px; border: 1px solid #e7e8ea; border-radius: 20px; background: #fff; color: #25272a; box-shadow: 0 20px 70px #17191c33; }
.availability-dialog::backdrop { background: #24272a66; backdrop-filter: blur(3px); }
.availability-dialog h2 { margin: 0; font-size: 23px; letter-spacing: -.025em; }
.availability-dialog > p:not(.eyebrow) { margin: 12px 0 22px; color: #777b80; font-size: 14px; line-height: 1.55; }
.availability-dialog .eyebrow { padding-right: 28px; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 34px; min-height: 34px; border: 0; border-radius: 50%; background: #f4f4f5; color: #666a6f; font-size: 22px; line-height: 1; }
.dialog-close:hover:not(:disabled) { background: #e9eaec; }
.availability-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.availability-links .store-link { min-height: 46px; font-size: 14px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(270px, .92fr); gap: 18px; align-items: stretch; }
.calculator-view { display: none; }
.calculator-view.active { display: block; }
.calculator-tab[aria-current="page"] { background: #fff0e5; color: #e7752d; }
h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading .eyebrow { margin-bottom: 4px; }
.icon-button { width: 42px; min-height: 42px; border: 1px solid #f5d0b7; border-radius: 12px; background: #fff6ef; color: #e7752d; font-size: 24px; line-height: 1; }
.icon-button:hover:not(:disabled) { background: #ffecdf; }
.blend-instructions { margin: 12px 0 16px; color: #777b80; font-size: 13px; line-height: 1.5; }
.blend-rows { display: grid; gap: 9px; }
.blend-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(90px, .85fr) 40px; gap: 8px; align-items: end; }
.blend-row .field { gap: 5px; font-size: 11px; }
.blend-row select, .blend-row input { min-height: 42px; padding: 0 9px; font-size: 14px; }
.remove-species { width: 40px; min-height: 42px; border: 1px solid #e5e6e8; border-radius: 10px; background: #fff; color: #777b80; font-size: 17px; }
.remove-species:hover:not(:disabled) { background: #f7f7f8; color: #cc4e38; }
.blend-total { margin: 12px 0 0; color: #62666b; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.blend-hint { margin: 6px 0 0; color: #92969a; font-size: 11px; line-height: 1.45; }
.subheading { margin: 24px 0 -5px; font-size: 15px; }
.secondary-action { margin-top: 18px; border: 1px solid #ef8b4c; background: white; color: #df702a; }
.secondary-action:hover:not(:disabled) { background: #fff5ee; }
.property-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 11px 15px; margin: 13px 0 22px; padding: 0; }
.property-list dt { color: #777b80; font-size: 12px; }
.property-list dd { margin: 0; color: #34373a; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.blend-aft { margin-top: 24px; padding-top: 20px; border-top: 1px solid #eceef0; }
.blend-aft h2 { margin-bottom: 18px; font-size: 18px; }
.phi-field { margin-bottom: 15px; }
.phi-field span { display: flex; justify-content: space-between; }
.phi-field output { color: #34373a; font-variant-numeric: tabular-nums; }
input[type="range"] { min-height: 24px; padding: 0; accent-color: #ed7930; }
.blend-aft-result { margin: 18px 0 0; color: #ed7930; font-size: 38px; font-weight: 700; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.blend-aft-result span { font-size: 15px; letter-spacing: 0; }
.blend-results .caution { margin: 20px 0 0; padding: 0; }
.card { padding: 24px; border: 1px solid #e7e8ea; border-radius: 18px; background: #fff; box-shadow: 0 6px 24px #25272a08; }
.field { display: grid; gap: 8px; color: #62666b; font-size: 13px; font-weight: 600; }
.field + .field { margin-top: 18px; }
input, select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #dfe1e4; border-radius: 10px; background: white; color: #25272a; font: inherit; font-size: 15px; }
input:focus, select:focus { outline: 3px solid #ff9b4a33; border-color: #f28a3d; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.field-grid .field + .field { margin-top: 0; }
.mode-field { margin-top: 18px; }
.input-with-select { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.input-with-select select { width: auto; min-width: 92px; padding: 0 9px; font-size: 13px; }
.density-field { margin-top: 14px; }
.flow-hint { margin: 10px 0 0; color: #92969a; font-size: 11px; line-height: 1.45; }
.input-unit { position: relative; }
.input-unit input { padding-right: 52px; }
.input-unit span { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: #85888d; font-size: 13px; }
.mechanism-note { display: flex; gap: 9px; align-items: center; margin: 20px 0 14px; color: #777b80; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #f28a3d; }
button { width: 100%; min-height: 48px; border: 0; border-radius: 11px; background: #ed7930; color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
button:hover:not(:disabled) { background: #dd6924; }
button:disabled { background: #c8c9cb; cursor: wait; }
.engine-status { min-height: 18px; margin: 12px 0 0; color: #81858a; font-size: 12px; line-height: 1.45; }
.result-card { display: flex; flex-direction: column; }
.temperature-result { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; color: #ed7930; font-size: clamp(42px, 7vw, 62px); font-weight: 700; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.result-unit { font-size: 17px; letter-spacing: 0; }
.result-caption { margin: 0 0 26px; color: #85888d; font-size: 13px; }
.flow-summary { margin: -15px 0 20px; color: #85888d; font-size: 11px; font-variant-numeric: tabular-nums; }
.species-empty { padding: 15px 0; border-top: 1px solid #eceef0; color: #85888d; font-size: 13px; }
.species-list { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; margin: 0; padding: 15px 0 0; border-top: 1px solid #eceef0; font-size: 13px; }
.species-list dt { color: #777b80; }
.species-list dd { margin: 0; color: #34373a; font-variant-numeric: tabular-nums; }
.caution { margin: auto 0 0; padding-top: 22px; color: #8a8d91; font-size: 11px; line-height: 1.55; }
.more-calculators { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 22px 24px; border: 1px solid #e7e8ea; border-radius: 18px; background: #fff; }
.more-copy { max-width: 510px; }
.more-copy h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.more-copy > p:last-child { margin: 7px 0 0; color: #777b80; font-size: 13px; line-height: 1.5; }
.mobile-links { display: grid; grid-template-columns: auto auto; gap: 8px; justify-items: stretch; align-items: center; }
.store-link { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 13px; border-radius: 10px; background: #ed7930; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.store-link.secondary { border: 1px solid #e4e5e7; background: #fff; color: #3b3e42; }
.store-link.coming-soon { cursor: default; opacity: .7; }
.repo-link { grid-column: 1 / -1; justify-self: center; color: #777b80; font-size: 11px; }
footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 24px; color: #92969a; font-size: 11px; }
footer p { margin: 0; }
a { color: #71757a; }
@media (max-width: 700px) {
  .shell { padding-top: 32px; }
  .calculator-tabs { grid-template-columns: repeat(4, minmax(68px, 1fr)); overflow-x: auto; }
  .calculator-tab { flex-direction: column; gap: 3px; font-size: 10px; }
  .calculator-tab span { font-size: 16px; }
  .workspace { grid-template-columns: 1fr; }
  .result-card { min-height: 270px; }
  .more-calculators { align-items: flex-start; flex-direction: column; }
  .mobile-links { width: 100%; grid-template-columns: 1fr 1fr; }
  footer { flex-direction: column; }
}
@media (max-width: 430px) {
  .field-grid { grid-template-columns: 1fr; }
  .blend-row { grid-template-columns: minmax(0, 1.1fr) minmax(80px, .9fr) 38px; gap: 6px; }
}
