/* The embeddable calculators (/embed/<calc>, functions/embed/[[calc]].js). Small and standalone: no site stylesheet,
   no web fonts, no images. Light, dark (?theme=dark) or the visitor's own setting (default). Both directions. */
:root { --bg: #faf7f2; --ink: #15181c; --muted: #656d79; --line: #e3ddd2; --card: #ffffff; --jade: #0d7a58; --jade-ink: #ffffff; --clay: #b4472b; --soft: #eef6f2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #101316; --ink: #eceff2; --muted: #9aa3ae; --line: #2a3138; --card: #171b20; --jade: #3fb68b; --jade-ink: #07130e; --clay: #e08a6f; --soft: #14231d; } }
:root[data-theme="dark"] { --bg: #101316; --ink: #eceff2; --muted: #9aa3ae; --line: #2a3138; --card: #171b20; --jade: #3fb68b; --jade-ink: #07130e; --clay: #e08a6f; --soft: #14231d; }
* { box-sizing: border-box; }
html { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; }
.embed { max-width: 480px; margin: 0 auto; padding: 14px 16px 10px; }
.e-title { font-size: 18px; line-height: 1.3; margin: 0 0 12px; }
form { display: grid; gap: 10px; }
.field { display: grid; gap: 4px; }
.lbl { font-size: 13px; font-weight: 600; }
input, select { width: 100%; font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-height: 40px; }
input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--jade); outline-offset: 2px; }
.hint, .xs { font-size: 12px; color: var(--muted); margin: 0; }
.sm { font-size: 13px; }
.faint { color: var(--muted); }
.res-card { margin-block-start: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.res-k { margin: 0; font-size: 13px; color: var(--muted); }
.res-v { margin: 2px 0 0; font-size: 26px; font-weight: 700; color: var(--jade); overflow-wrap: anywhere; }
.ticks { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.ticks li { padding-inline-start: 0; }
.warn { color: var(--clay); font-weight: 600; }
.empty { padding: 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }
.e-by { margin-block-start: 12px; padding-block-start: 8px; border-block-start: 1px solid var(--line); font-size: 12px; text-align: center; }
.e-by a { color: var(--jade); font-weight: 600; text-decoration: none; }
.e-by a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
