.compound{color:var(--text,var(--ink,#102027));font:16px/1.5 system-ui,-apple-system,sans-serif;max-width:860px;margin:auto;overflow-wrap:anywhere}.compound *{box-sizing:border-box}.compound-modes{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 22px}.compound button{font:inherit;cursor:pointer;min-height:44px;padding:10px 15px;border:1px solid var(--line,#dce6dd);border-radius:12px;color:inherit;background:var(--card,#fff)}.compound-modes button[aria-pressed=true],.compound button.compound-calculate{background:#0f766e;color:white;border-color:#0f766e;font-weight:700}.compound-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.compound label{display:grid;gap:6px;min-width:0;font-size:14px;font-weight:650}.compound input{width:100%;min-width:0;min-height:48px;padding:12px;border:1px solid var(--line,#cbded2);border-radius:12px;font:400 16px system-ui;background:var(--card,#fff);color:inherit}.compound input:focus-visible,.compound button:focus-visible,.compound summary:focus-visible{outline:3px solid #54b8a4;outline-offset:3px}.compound details{padding:16px 0;border-bottom:1px solid var(--line,#dce6dd);margin:12px 0}.compound summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:650}.compound details[open] summary{margin-bottom:12px}.compound-note{font-size:13px;color:var(--muted,#66757c);line-height:1.6}.compound-results{margin-top:24px}.compound-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.compound-metrics>div{min-width:0;padding:16px;border-radius:15px;border:1px solid var(--line,#dce6dd);background:var(--card,#fff)}.compound-metrics strong{display:block;font-size:clamp(19px,4vw,28px);line-height:1.25;margin-top:8px;letter-spacing:-.03em}.compound-metrics span{font-size:13px;color:var(--muted,#66757c)}.compound-metrics .compound-total{background:linear-gradient(120deg,#0f766e,#0b5f59);color:white}.compound-total span{color:#dcf5ee}.compound-negative{color:var(--bad,#c24141)}.compound-chart{margin:22px 0;border:1px solid var(--line,#dce6dd);border-radius:16px;padding:12px;background:var(--card,#fff)}.compound-chart svg{display:block;width:100%;height:auto;color:var(--muted,#66757c)}.compound-legend{display:flex;flex-wrap:wrap;gap:15px;font-size:12px;margin:8px}.compound-legend span:before{content:'';display:inline-block;width:13px;height:4px;margin:0 6px 3px 0;background:#0f766e}.compound-legend span:last-child:before{background:#8b8eaa}.compound-table-wrap{overflow:auto;max-width:100%}.compound table{width:100%;border-collapse:collapse;text-align:right;font-size:13px}.compound th,.compound td{padding:10px;border-bottom:1px solid var(--line,#dce6dd);white-space:nowrap}.compound th:first-child,.compound td:first-child{text-align:left}.compound-error{color:var(--bad,#c24141);font-size:14px}.compound[hidden],.compound [hidden]{display:none!important}.compound-dialog{width:min(940px,calc(100% - 24px));max-height:calc(100dvh - 32px);padding:22px;border:1px solid var(--line,#dce6dd);border-radius:22px;background:var(--card,#fff);color:var(--text,#102027);overscroll-behavior:contain}.compound-dialog::backdrop{background:#10202799}.compound-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px}.compound-dialog-head h2{margin:0;font-size:23px}.compound-dialog-head button{min-width:44px;min-height:44px;border:1px solid var(--line,#dce6dd);border-radius:12px;background:var(--card,#fff);color:inherit;font:inherit}.compound-dialog .compound{padding-bottom:10px}@media(max-width:560px){.compound-fields,.compound-metrics{grid-template-columns:minmax(0,1fr)}.compound-metrics strong{font-size:26px}.compound-dialog{padding:16px}.compound-modes button{flex:1;font-size:14px}.compound-calculate{width:100%}}

/* Keep the title and close button visible while only the body scrolls. */
.compound-dialog{position:fixed;inset:calc(12px + env(safe-area-inset-top,0px)) 12px calc(12px + env(safe-area-inset-bottom,0px));box-sizing:border-box;width:min(940px,calc(100% - 24px));height:min(860px,calc(100vh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px));height:min(860px,calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px));max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);margin:auto;padding:0;overflow:hidden}
.compound-dialog:not([open]){display:none!important}
.compound-dialog[open]{display:flex;flex-direction:column}
.compound-dialog-head{flex:none;margin:0;padding:16px 20px;border-bottom:1px solid var(--line,#dce6dd);background:var(--card,#fff)}
.compound-dialog-head h2{font-size:22px;min-width:0;overflow-wrap:anywhere}
.compound-dialog-head button{flex:none}
.compound-dialog-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:18px 20px 24px;scroll-padding-top:12px}
.compound-dialog-body>h3{font-size:18px;margin:0 0 16px;line-height:1.4}
@media(max-width:560px){.compound-dialog-head{padding:12px 14px}.compound-dialog-body{padding:16px 14px 24px}}
