:root {color-scheme:light; --ink:#14263a; --muted:#53677a; --surface:#fff; --line:#dce5ec; --bg:#f3f7fa; --accent:#a43e16; font: 1rem/1.55 system-ui,sans-serif;}
* {box-sizing:border-box;}
body {margin:0;background:var(--bg);color:var(--ink);}
a {color:inherit;text-underline-offset:0.2em;}
:focus-visible {outline:3px solid #2874bc;outline-offset:3px;}
.wrap {max-width:68rem;margin:auto;padding-inline:clamp(1rem,4vw,2.5rem);}
header {background:var(--ink);color:#fff;}
.mast {min-height:4.5rem;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.6rem 1.3rem;padding-block:.7rem;}
.brand {display:inline-flex;align-items:center;gap:.6rem;font-size:1.25rem;font-weight:750;text-decoration:none;}
.logo,.symbol {display:grid;place-items:center;border-radius:.55rem;font-weight:800;}
.logo {width:2rem;height:2rem;background:#ffcaad;color:#492411;font-size:1.35rem;}
.symbol {flex:0 0 2.65rem;width:2.65rem;height:2.65rem;color:#8a3212;background:#fce7db;font-size:.85rem;}
.intro {padding:clamp(2rem,6vw,4.4rem) 0 1.8rem;}
h1,h2,p {margin:0;}
h1 {font-size:clamp(2.4rem,6vw,4.65rem);line-height:1.03;letter-spacing:-.065em;}
.intro p {color:var(--muted);margin-top:.8rem;max-width:43rem;font-size:1.12rem;}
.layout {display:grid;grid-template-columns:minmax(0,1.14fr) minmax(0,1fr);align-items:start;gap:1.35rem;}
.calculator,.guide {background:var(--surface);border:1px solid var(--line);border-radius:1rem;padding:clamp(1rem,3vw,1.6rem);}
.calculator {box-shadow:0 .25rem 1.1rem #14263a0c;}
.calculator-head {display:flex;align-items:center;gap:.7rem;margin-bottom:1.25rem;}
.mode-switch {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem;padding:.3rem;margin-bottom:1rem;border:1px solid var(--line);border-radius:.65rem;background:#f3f7fa;}
.mode-switch button {margin:0;border:1px solid transparent;border-radius:.45rem;background:transparent;color:var(--ink);padding:.45rem .4rem;line-height:1.2;font-size:.88rem;}
.mode-switch button:hover {background:#e7eff6;}
.mode-switch button[aria-pressed="true"] {border-color:#e2b6a3;background:#fff;color:#8a3212;box-shadow:0 .12rem .25rem #14263a12;}
h2 {font-size:1.32rem;line-height:1.25;letter-spacing:-.025em;}
.fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;}
.fields label:has(select) {grid-column:1/-1;}
label {display:grid;gap:.35rem;font-weight:650;font-size:.9rem;min-width:0;}
input,select {font:inherit;color:inherit;background:#f9fbfd;border:1px solid #aab9c7;border-radius:.5rem;width:100%;min-width:0;min-height:2.85rem;padding:.5rem .65rem;}
select {appearance:none;padding-inline-end:1.9rem;background-image:linear-gradient(45deg,transparent 50%,#53677a 50%),linear-gradient(135deg,#53677a 50%,transparent 50%);background-position:calc(100% - 15px) 52%,calc(100% - 10px) 52%;background-size:5px 5px;background-repeat:no-repeat;}
button {color:white;background:var(--accent);border:0;border-radius:.5rem;font:inherit;font-weight:700;min-height:2.8rem;padding:.5rem 1rem;cursor:pointer;}
button:hover {background:#80300e;}
.form-actions,.result-head {display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;}
.form-actions {margin-top:.9rem;}
.form-actions [type=submit] {flex:1;}
.result-head {justify-content:space-between;margin-bottom:.15rem;}
.secondary {background:#fff;color:var(--ink);border:1px solid #aab9c7;}
.secondary:hover {background:#edf4f9;}
.secondary:disabled {cursor:default;opacity:.5;}
#copy-result {font-size:.85rem;padding-inline:.7rem;}
#copy-status {font-size:.86rem;}
.result {margin-top:1rem;padding:1rem;background:#edf4f9;border-radius:.7rem;overflow-wrap:anywhere;}
.result span {font-size:.9rem;font-weight:650;color:var(--muted);}
.result strong {display:block;font-size:clamp(1.7rem,5vw,2.55rem);line-height:1.2;font-variant-numeric:tabular-nums;}
.result p {color:var(--muted);margin-top:.35rem;}
.result .error {color:#a02b19;}
.result p:empty {display:none;}
#tools {padding:.35rem 0;}
.tool-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;margin-top:1rem;}
.tool-card {min-width:0;display:flex;align-items:center;gap:.65rem;min-height:4.55rem;padding:.65rem;background:#fff;border:1px solid var(--line);border-radius:.7rem;text-decoration:none;}
.tool-card:hover,.tool-card[aria-current] {border-color:var(--accent);}
.tool-card strong,.tool-card small {display:block;line-height:1.24;overflow-wrap:anywhere;}
.tool-card small {margin-top:.2rem;color:var(--muted);font-size:.82rem;}
.breadcrumbs {display:flex;flex-wrap:wrap;gap:.4rem;color:var(--muted);font-size:.88rem;margin-bottom:.85rem;}
.guide-jump {display:flex;flex-wrap:wrap;gap:.3rem 1.1rem;margin-top:.65rem;color:#8a3212;font-weight:650;}
.guide-jump a {display:inline-flex;align-items:center;min-height:2.75rem;}
#faq {scroll-margin-top:1rem;}
.guide {margin-top:1.25rem;max-width:52rem;line-height:1.7;scroll-margin-top:1rem;}
.guide h2:not(:first-child) {margin-top:1.75rem;}
.guide h3 {font-size:1.03rem;line-height:1.35;margin:1rem 0 0;}
.guide p {margin-top:.65rem;color:var(--muted);}
.guide strong {color:var(--ink);}
.guide-source,.guide-actions {border-top:1px solid var(--line);padding-top:.75rem;}
.guide-actions {display:flex;flex-wrap:wrap;gap:.45rem 1.35rem;margin-top:1rem;font-weight:650;}
footer.wrap {display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem 1rem;padding-block:2rem;color:var(--muted);}
.skip {position:absolute;inset-inline-start:1rem;top:-8rem;background:white;padding:.6rem;z-index:2;}
.skip:focus {top:.4rem;}
@media (max-width:760px) {.layout {grid-template-columns:1fr;} .intro {padding-bottom:1.3rem;}}
@media (max-width:350px) {.fields,.tool-grid {grid-template-columns:1fr;} .mode-switch {grid-template-columns:1fr;}}
