.foundation-page { background: #f1f0ea; color: #20352d; }
.foundation-page .page-shell { width: min(1120px, calc(100% - 28px)); }
.foundation-page .brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; white-space: nowrap; }
.foundation-page .brand-symbol { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 2px; background: #203f31; color: #fffefa; }
.foundation-page .brand-symbol svg { display: block; width: 23px; height: 23px; }
.foundation-page .brand-pro { margin-left: 4px; font-size: .65rem; letter-spacing: .06em; vertical-align: top; line-height: 1.8; }
.foundation-page .site-header { position: static; background: #f1f0ea; }
.foundation-page .site-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; width: auto; padding: 0; border: 0; }
.foundation-page .site-nav a { min-height: 44px; white-space: nowrap; }
.foundation-skip { position: absolute; left: 12px; top: -80px; z-index: 10; padding: 8px 12px; background: #fffefa; }
.foundation-skip:focus { top: 8px; }
.foundation-main { padding-top: 4px; }
.foundation-crumb { margin: 0 0 18px; color: #506159; font-size: .88rem; }
.foundation-crumb span { padding: 0 8px; color: #8a988f; }
.foundation-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 26px; align-items: stretch; background: #fffefa; border-top: 5px solid #20352d; border-bottom: 1px solid #cad5cc; padding: clamp(22px, 4vw, 42px); }
.foundation-hero h1 { margin: 0 0 10px; font-size: clamp(2.05rem, 4.5vw, 3.7rem); letter-spacing: -.045em; line-height: 1.07; }
.foundation-hero p { max-width: 61ch; margin: 0; font-size: 1.07rem; line-height: 1.58; color: #3e5749; }
.foundation-hero-answer { display: flex; flex-direction: column; justify-content: center; border-left: 1px solid #cfdbd0; padding-left: clamp(20px, 3vw, 38px); }
.foundation-hero-answer span { font-weight: 760; color: #315442; }
.foundation-hero-answer strong { display: block; margin: 7px 0 4px; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.12; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.foundation-hero-answer small { color: #52685a; line-height: 1.5; font-size: .86rem; }
.foundation-workspace { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr); align-items: start; gap: 16px; margin-top: 16px; }
#foundation-form { min-width: 0; padding: clamp(18px, 3vw, 32px); background: #fffefa; border: 1px solid #d4ddd3; }
.foundation-form-heading { margin-bottom: 22px; }
.foundation-form-heading h2, .foundation-result h2 { margin: 0 0 5px; font-size: 1.5rem; letter-spacing: -.03em; }
.foundation-form-heading p { margin: 0; color: #53655a; max-width: 60ch; }
.foundation-run, .foundation-order-fields { position: relative; margin: 0 0 18px; padding: 20px 0 0; border: 0; border-top: 1px solid #b9cbbd; min-width: 0; }
.foundation-run legend, .foundation-order-fields legend { padding: 0 10px 0 0; color: #203f31; font-size: 1.02rem; font-weight: 800; }
.foundation-run-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.foundation-order-fields > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.foundation-run label, .foundation-order-fields label { display: flex; flex-direction: column; min-width: 0; color: #264435; font-weight: 720; font-size: .92rem; }
.foundation-run label span, .foundation-order-fields label span { color: #6c776a; font-size: .8rem; font-weight: 500; }
.foundation-run input, .foundation-order-fields input { width: 100%; min-width: 0; height: 48px; margin-top: 7px; padding: 8px 12px; border: 1px solid #aabdb0; border-radius: 3px; background: #fff; color: #20352d; font-weight: 650; font-variant-numeric: tabular-nums; }
.foundation-run input:focus-visible, .foundation-order-fields input:focus-visible, .foundation-page button:focus-visible, .foundation-page a:focus-visible { outline: 3px solid #b87232; outline-offset: 2px; }
.foundation-order-fields small { margin-top: 6px; color: #637268; font-size: .79rem; line-height: 1.45; font-weight: 450; }
.foundation-remove { position: absolute; right: 0; top: -10px; border: 0; background: #fffefa; color: #765036; text-decoration: underline; text-underline-offset: 3px; font-size: .8rem; }
.foundation-remove[hidden] { display: none; }
.foundation-add { display: inline-flex; align-items: center; min-height: 38px; margin: 2px 0 26px; padding: 7px 14px; border: 1px solid #4b7259; background: #e6efe8; color: #203f31; font-weight: 740; }
.foundation-add:disabled { opacity: .5; cursor: not-allowed; }
.foundation-data-note { margin: 0; color: #627169; font-size: .83rem; }
.foundation-result { min-width: 0; padding: clamp(18px, 3vw, 31px); background: #e8eee7; border: 1px solid #c3d3c6; border-top: 4px solid #315f42; }
.foundation-result > p:first-of-type { min-height: 3em; margin: 0 0 19px; color: #4c6253; }
.foundation-area-ledger { margin: 0; }
.foundation-area-ledger > div { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid #c6d4c6; }
.foundation-area-ledger dt { color: #43604c; }
.foundation-area-ledger dd { margin: 0; text-align: right; font-weight: 760; font-variant-numeric: tabular-nums; }
.foundation-area-ledger .foundation-area-total { align-items: baseline; margin-top: 5px; border-top: 2px solid #365c43; border-bottom: 0; color: #203f31; font-weight: 800; }
.foundation-area-total dd { font-size: 1.42rem; }
.foundation-material { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 16px 0; padding: 14px 0; background: #fffefa; border: 1px solid #d0dbd1; }
.foundation-material > div { min-width: 0; padding: 0 10px; border-right: 1px solid #d0dbd1; }
.foundation-material > div:last-child { border-right: 0; }
.foundation-material span { display: block; min-height: 2.6em; color: #586b5b; font-size: .77rem; }
.foundation-material strong { display: block; overflow-wrap: anywhere; color: #203f31; font-size: .95rem; font-variant-numeric: tabular-nums; }
.foundation-result h3 { margin: 20px 0 8px; font-size: .98rem; }
.foundation-run-ledger { padding: 0 0 0 20px; margin: 0 0 18px; font-size: .82rem; color: #3e5946; }
.foundation-run-ledger li { padding: 3px 0 6px; }
.foundation-run-ledger li strong { display: block; color: #203f31; font-size: .9rem; }
#foundation-copy { min-height: 40px; padding: 9px 15px; border: 1px solid #254d37; background: #254d37; color: #fff; font-weight: 750; }
#foundation-copy:disabled { opacity: .5; cursor: not-allowed; }
#foundation-copy-status { min-height: 1.5em; margin: 6px 0 0; font-size: .8rem; }
#foundation-copy-fallback { width: 100%; margin-top: 8px; }
.foundation-caution { margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid #b5c9b8; color: #425d4a; font-size: .84rem; line-height: 1.5; }
.foundation-figure { margin: 28px 0 34px; background: #fffefa; border: 1px solid #d3dfd5; }
.foundation-figure img { display: block; width: 100%; height: auto; }
.foundation-figure figcaption { padding: 10px 18px 13px; color: #52665a; font-size: .84rem; border-top: 1px solid #d3dfd5; }
.foundation-section { max-width: 840px; padding: 0 0 23px; margin: 0 0 28px; border-bottom: 1px solid #d3ddd4; }
.foundation-section h2 { margin: 0 0 10px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -.025em; }
.foundation-section p { max-width: 75ch; margin: 0 0 12px; line-height: 1.65; }
.foundation-formula { padding: 14px 18px; background: #fffefa; border-left: 4px solid #8b633a; color: #284431; font-weight: 650; line-height: 1.8 !important; }
.foundation-faq details { border-top: 1px solid #c9d5ca; padding: 10px 0; }
.foundation-faq summary { cursor: pointer; font-weight: 760; }
.foundation-faq details p { margin: 8px 0 0; }
@media (max-width: 800px) {
  .foundation-hero, .foundation-workspace { grid-template-columns: 1fr; }
  .foundation-hero-answer { border-left: 0; border-top: 1px solid #cfdbd0; padding: 16px 0 0; }
  .foundation-workspace { gap: 10px; }
}
@media (max-width: 520px) {
  .foundation-page .page-shell { width: min(100% - 16px, 1120px); }
  .foundation-page .site-header { gap: 4px; }
  .foundation-page .site-nav { gap: 6px; }
  .foundation-hero { gap: 17px; padding: 20px 18px; }
  .foundation-hero h1 { font-size: 2rem; }
  .foundation-hero p { font-size: .98rem; }
  .foundation-hero-answer strong { font-size: 2.1rem; }
  #foundation-form, .foundation-result { padding: 18px; }
  .foundation-run-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foundation-run-fields label:last-child { grid-column: 1 / -1; }
  .foundation-order-fields > div { grid-template-columns: 1fr; }
  .foundation-material span { min-height: 3.8em; font-size: .72rem; }
  .foundation-material strong { font-size: .85rem; }
  .foundation-material > div { padding: 0 6px; }
}
