@font-face { font-family:Poppins; src:url('poppins-regular.woff2') format('woff2'); font-style:normal; font-weight:400; font-display:swap; }
@font-face { font-family:Poppins; src:url('poppins-semibold.woff2') format('woff2'); font-style:normal; font-weight:600; font-display:swap; }
:root { color-scheme: light; --bg:#f3f1eb; --surface:#fffefa; --surface-2:#ece9e1; --text:#20231f; --muted:#6b6f68; --line:#d7d3ca; --accent:#315c45; --accent-2:#d9ec84; --danger:#a43d38; --shadow:0 22px 60px rgba(38,45,38,.09); --radius:22px; }
:root[data-theme="dark"] { color-scheme:dark; --bg:#151814; --surface:#1d211c; --surface-2:#262b25; --text:#f4f3ec; --muted:#aeb4ab; --line:#3b4139; --accent:#b9dd6d; --accent-2:#315c45; --danger:#f09188; --shadow:0 24px 70px rgba(0,0,0,.28); }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; min-width:320px; background:var(--bg); color:var(--text); font-family:Poppins, "Segoe UI", Arial, sans-serif; line-height:1.55; transition:background-color .2s,color .2s; }
button,input,select { font:inherit; }
button { color:inherit; }
.topbar { max-width:1440px; margin:auto; padding:24px clamp(18px,5vw,72px); display:flex; justify-content:space-between; align-items:center; }
.brand { color:inherit; text-decoration:none; font-weight:700; display:flex; gap:11px; align-items:center; letter-spacing:-.02em; }
.brand-mark { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; color:#132019; background:var(--accent-2); font-family:Georgia,serif; font-size:22px; }
.icon-button { width:42px; height:42px; border:1px solid var(--line); border-radius:50%; background:var(--surface); cursor:pointer; }
.icon-button:hover { transform:rotate(18deg); }
main { max-width:1440px; margin:auto; padding:38px clamp(18px,5vw,72px) 70px; }
.intro { max-width:780px; margin-bottom:40px; }
.eyebrow { margin:0 0 8px; color:var(--accent); font-size:.73rem; font-weight:800; letter-spacing:.18em; }
h1 { margin:0; max-width:760px; font-size:clamp(2.35rem,6vw,5.1rem); line-height:.98; letter-spacing:-.06em; font-weight:650; }
.intro>p:last-child { max-width:650px; margin:22px 0 0; color:var(--muted); font-size:clamp(1rem,2vw,1.18rem); }
.workspace { display:grid; grid-template-columns:minmax(0, .9fr) minmax(0, 1.1fr); gap:22px; align-items:start; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.controls { padding:clamp(22px,3vw,36px); }
.section-heading { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.section-heading span { color:var(--muted); font-size:.72rem; font-weight:800; }
.section-heading h2,.output-head h2 { margin:0; font-size:1.12rem; letter-spacing:-.025em; }
.field-row,.two-col { display:flex; gap:18px; align-items:flex-start; }
.two-col { display:grid; grid-template-columns:1fr 1fr; }
.field { min-width:0; }
.field.grow { flex:1; }
.amount-field { width:112px; flex:none; }
label,legend { display:block; margin-bottom:8px; font-size:.78rem; font-weight:700; }
fieldset { padding:0; border:0; margin:0; }
input[type="number"],select { width:100%; height:46px; padding:0 13px; color:var(--text); background:var(--surface-2); border:1px solid transparent; border-radius:11px; outline:none; }
input:hover,select:hover { border-color:var(--line); }
input:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible,pre:focus-visible { outline:3px solid color-mix(in srgb,var(--accent) 42%,transparent); outline-offset:2px; }
input[aria-invalid="true"] { border-color:var(--danger); }
small { display:block; color:var(--muted); font-size:.7rem; margin-top:6px; }
.error { color:var(--danger); min-height:1.1em; }
.segmented { display:flex; flex-wrap:wrap; gap:7px; }
.segmented label { margin:0; }
.segmented input { position:absolute; opacity:0; pointer-events:none; }
.segmented span { display:block; padding:11px 12px; border:1px solid var(--line); border-radius:11px; cursor:pointer; font-size:.76rem; font-weight:650; transition:.16s; }
.segmented input:checked+span { color:var(--surface); background:var(--accent); border-color:var(--accent); }
:root[data-theme="dark"] .segmented input:checked+span { color:#172015; }
.segmented input:focus-visible+span { outline:3px solid color-mix(in srgb,var(--accent) 42%,transparent); outline-offset:2px; }
.divider { height:1px; background:var(--line); margin:28px 0; }
.check-card { min-height:70px; margin:0; padding:13px; border:1px solid var(--line); border-radius:12px; display:flex; gap:11px; align-items:center; cursor:pointer; }
.check-card input { width:18px; height:18px; accent-color:var(--accent); }
.check-card strong { display:block; font-size:.78rem; }
.check-card small { margin:1px 0 0; line-height:1.35; }
.form-actions,.output-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:28px; }
.button { min-height:44px; border:1px solid transparent; border-radius:12px; padding:10px 16px; cursor:pointer; font-size:.78rem; font-weight:750; transition:transform .15s,background .15s,opacity .15s; }
.button:hover:not(:disabled) { transform:translateY(-1px); }
.button:disabled { opacity:.42; cursor:not-allowed; }
.primary { min-width:154px; color:#fff; background:var(--accent); }
:root[data-theme="dark"] .primary { color:#172015; }
.ghost,.secondary { background:var(--surface-2); border-color:var(--line); }
.danger { color:var(--danger); background:transparent; border-color:var(--line); }
.spinner { display:none; width:15px; height:15px; margin-right:8px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:spin .7s linear infinite; vertical-align:-3px; }
.loading .spinner { display:inline-block; }
.output-card { position:sticky; top:18px; padding:clamp(22px,3vw,36px); min-height:580px; }
.output-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:20px; }
.format-badge { padding:6px 9px; border-radius:8px; color:var(--accent); background:var(--accent-2); font-size:.65rem; font-weight:850; letter-spacing:.08em; }
pre { min-height:280px; max-height:490px; margin:0; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; padding:22px; background:var(--surface-2); border:1px solid var(--line); border-radius:15px; color:var(--muted); font:400 .9rem/1.75 "SFMono-Regular",Consolas,"Liberation Mono",monospace; }
pre.has-output { color:var(--text); }
.empty-state { display:grid; min-height:234px; place-items:center; text-align:center; }
.summary { min-height:1.5em; margin:16px 0 11px; color:var(--muted); font-size:.76rem; }
.stats { margin:0; display:grid; grid-template-columns:repeat(3,1fr); border:1px solid var(--line); border-radius:13px; overflow:hidden; }
.stats div { padding:11px 12px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.stats div:nth-child(3n) { border-right:0; }
.stats dt { color:var(--muted); font-size:.62rem; text-transform:uppercase; letter-spacing:.08em; }
.stats dd { margin:2px 0 0; font-size:.95rem; font-weight:750; }
.copy-status { min-height:1.2em; margin:9px 0 0; color:var(--accent); font-size:.75rem; font-weight:750; }
footer { max-width:1440px; margin:auto; padding:22px clamp(18px,5vw,72px) 42px; display:flex; justify-content:space-between; gap:16px; color:var(--muted); border-top:1px solid var(--line); font-size:.73rem; }
.hidden,[hidden] { display:none !important; }
@keyframes spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation-duration:.01ms!important; } }
@media (max-width:960px) { .workspace { grid-template-columns:1fr; } .output-card { position:static; } }
@media (max-width:580px) { main { padding-top:18px; } .topbar { padding-top:16px; padding-bottom:16px; } .field-row { flex-direction:column; } .amount-field { width:100%; } .two-col { grid-template-columns:1fr; } .stats { grid-template-columns:repeat(2,1fr); } .stats div:nth-child(3n) { border-right:1px solid var(--line); } .stats div:nth-child(2n) { border-right:0; } .form-actions .button { flex:1; } footer { flex-direction:column; } }
