:root {
  color-scheme: light;
  --ink: #17251f;
  --muted: #4b5a52;
  --green: #16593b;
  --green-dark: #11432d;
  --light: #f3f7f3;
  --border: #ccd6ce;
  --bg: #fcfdfc;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 1rem/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; }
a { color: #185c42; text-underline-offset: 2px; }
a:hover { color: #073f2a; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #367c66; outline-offset: 3px; }
.skip { position: absolute; transform: translateY(-160%); top: 0.5rem; left: 1rem; background: white; padding: .5rem; z-index: 10; }
.skip:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid var(--border); background: white; }
.header-inner { max-width: 1150px; padding: 1rem 1.25rem; margin: auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.brand { font-size: 1.09rem; font-weight: 750; text-decoration: none; color: var(--green-dark); }
nav { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .9rem; }
.container { max-width: 1150px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.eyebrow { color: var(--green); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; font-size: .78rem; margin: 0; }
h1 { font-size: clamp(1.9rem,4vw,2.6rem); letter-spacing: -.03em; line-height: 1.13; margin: .45rem 0 .8rem; }
h2 { font-size: 1.34rem; line-height: 1.25; margin: 0 0 .55rem; }
h3 { font-size: 1.03rem; margin: 1.4rem 0 .4rem; }
p { margin: .6rem 0 .9rem; }
.lead { font-size: 1.1rem; max-width: 790px; color: #3a4b42; }
.units { background: var(--light); border-left: 3px solid #568468; padding: .9rem 1rem; max-width: 960px; margin: 1.1rem 0 2rem; }
code { padding: .1em .3em; border-radius: 3px; background: #e7eeea; font-size: .92em; }
.tool-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 1.25rem; }
.tool { background: white; padding: 1.45rem 1.4rem; border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 2px 10px rgba(7,54,32,.035); min-width: 0; }
.tool.wide { grid-column: 1 / -1; }
.field { margin-bottom: .94rem; }
label { display: block; font-weight: 650; margin-bottom: .25rem; font-size: .92rem; }
input { display: block; width: 100%; border: 1px solid #8b9f90; padding: .63rem .72rem; border-radius: 5px; font: inherit; background: #fff; color: var(--ink); }
input::placeholder { color: #66776a; opacity: 1; }
input:focus { border-color: var(--green); }
button { border: 0; border-radius: 5px; background: var(--green); color: #fff; padding: .72rem 1rem; min-height: 44px; cursor: pointer; font: inherit; font-weight: 700; }
button:hover { background: var(--green-dark); }
.result { margin: 1rem 0 0; padding: .8rem .85rem; border: 1px solid #bad2bd; border-radius: 5px; background: #f3faf4; min-height: 3.2rem; }
.result.error { border-color: #ad7272; background: #fff5f5; color: #6d2020; }
.hint, .table-note { color: var(--muted); font-size: .88rem; }
.hint { margin: .35rem 0 0; }
.compact-form { display: flex; align-items: end; gap: .8rem; flex-wrap: wrap; }
.compact-form .field { margin: 0; width: min(260px,100%); }
.compact-form button { flex-shrink: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; min-width: 360px; }
th, td { border: 1px solid var(--border); padding: .5rem .55rem; text-align: left; }
th { background: #f0f4f0; }
tbody tr:nth-child(even) { background: #f9fbf9; }
.limitations { padding: 1.5rem 0 0; max-width: 940px; }
.footer { background: #f4f7f5; border-top: 1px solid var(--border); padding: 1.6rem max(1.25rem,calc((100vw - 1120px)/2)); font-size: .9rem; color: var(--muted); }
.footer p { margin: .4rem 0; }
@media (max-width: 760px) {
 .container { padding-top: 1.5rem; }
 .tool-grid { grid-template-columns: minmax(0,1fr); }
 .tool { padding: 1.2rem 1rem; }
 nav { gap: .65rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-header,button,.footer { display: none !important; } .tool { break-inside: avoid; box-shadow: none; } body { font-size: 10pt; } }

/* Original, game-inspired calculator color/shape layer: owner wiki theme 2026-11-26. */
:root {
 --ink:#29382f;
 --muted:#53604f;
 --green:#205c40;
 --green-dark:#153d2b;
 --light:#fbefd8;
 --border:#ddc9a9;
 --bg:#f4ead9;
}
body {
 color:var(--ink);
 background-color:#eee1cb;
 background-image:radial-gradient(circle at 13% 4%,rgba(244,180,62,.24),transparent 27%),radial-gradient(circle at 95% 42%,rgba(38,120,74,.1),transparent 30%);
 line-height:1.65;
}
a {color:#175b3f;}
a:hover {color:#984c20;}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible {outline:3px solid #cc651e;outline-offset:3px;}
.site-header {
 background:linear-gradient(180deg,#fffaf0,#fff0d4);
 border-bottom:5px solid #edb344;
 box-shadow:0 4px 15px rgba(83,48,22,.12);
}
.brand {font-family:"Trebuchet MS","Segoe UI",Arial,sans-serif;font-size:1.17rem;color:#633b20;}
.site-header nav a {font-weight:700;text-decoration:none;padding:.35rem .5rem;border-radius:7px;color:#1e5a3f;}
.site-header nav a:hover {background:#f6e3ba;text-decoration:underline;}
.container {background:rgba(255,251,242,.87);box-shadow:0 7px 24px rgba(85,58,30,.065);border-radius:0 0 16px 16px;}
.eyebrow {color:#804921;font-weight:800;letter-spacing:.12em;}
h1,h2,h3 {font-family:"Trebuchet MS","Segoe UI",Arial,sans-serif;color:#5e391f;}
h1 {font-weight:800;}
h2 {font-weight:800;color:#205a3c;}
.lead {color:#3c503f;}
.units {border:2px solid #dec593;border-left:6px solid #cd8c2d;border-radius:0 11px 11px 0;background:linear-gradient(110deg,#fff0c9,#fffbef);color:#493e2d;}
.tool {
 position:relative;
 overflow:hidden;
 background:linear-gradient(140deg,#fffef8,#fff5e4);
 border:2px solid #dfc59d;
 border-radius:15px;
 box-shadow:0 5px 0 #e1c694,0 8px 17px rgba(82,44,18,.08);
 padding-top:1.8rem;
}
.tool:before {
 content:"";
 position:absolute;
 left:0;right:0;top:0;height:7px;
 background:linear-gradient(90deg,#358951 0%,#358951 70%,#edb042 70%,#edb042 87%,#d77732 87%);
}
label {color:#344334;font-weight:700;}
input {
 border:2px solid #bba380;
 border-radius:8px;
 background:#fffefa;
 min-height:43px;
 color:#243329;
}
input::placeholder {color:#5c6b5f;}
input:focus {border-color:#265f43;}
button {
 background:linear-gradient(180deg,#28734c,#185139);
 border:2px solid #1d573e;
 border-radius:10px;
 min-height:45px;
 padding:.72rem 1.2rem;
 box-shadow:0 3px 0 #113d2b;
 color:#fff;
 font-weight:800;
}
button:hover {background:#144b34;}
button:active {transform:translateY(2px);box-shadow:0 1px 0 #113d2b;}
.result {border:2px solid #bad09b;border-radius:9px;background:linear-gradient(100deg,#edf5e5,#fffcf2);color:#253b2c;padding:1rem;}
.result.error {color:#742e22;background:#fff0e5;border-color:#ce8d7d;}
code {background:#f5e9d4;color:#5c3c24;border:1px solid #dfcba7;}
th {background:#20583d;color:#fffdf2;font-weight:800;border-color:#577c60;}
td {border-color:#d8c8ac;}
tbody tr:nth-child(even) {background:#f8efdf;}
.footer {background:#f8efd9;border-top:4px solid #e2ba72;color:#4e5c4f;}
@media(max-width:760px){.container{border-radius:0;box-shadow:none}.tool{border-radius:12px}.site-header{border-bottom-width:4px;}}
@media(prefers-reduced-motion:reduce){button:active{transform:none;}}



/* OWNER-APPROVED FIXED DARK SITE, NO LIGHT/SYSTEM MODE. */
:root{
    color-scheme:dark !important;
    --bg:#161e17;--ink:#f5eee0;--muted:#c9d4c7;
    --border:#677b66;--green:#2e784e;--green-dark:#1c5b3a;
    --light:#323e32;--wood:#e1bd88;--gold:#eeb545;
}
body{background:#161e17 !important;color:#f5eee0 !important;}
.site-header{background:linear-gradient(180deg,#253c2a,#202b23) !important;border-bottom-color:#d19b4e !important;}
.site-header a,.brand{color:#d7e9cc !important;}
.site-header nav a:hover{background:#354632 !important;color:#f1cc8a !important;}
.container{background:#252b25 !important;color:#f5eee0 !important;}
h1,h2,h3,.tool h2{color:#f1cb92 !important;}
.units{background:linear-gradient(110deg,#364333,#31382e) !important;border-color:#947b4e !important;color:#f4eedc !important;}
.tool{background:linear-gradient(145deg,#303b30,#353528) !important;border-color:#6f785e !important;box-shadow:0 8px 25px #0004 !important;color:#f4eedf !important;}
.tool label,.hint,.subtext,.muted,.tool small{color:#dce3d0 !important;}
input,select,textarea{background:#303c32 !important;border-color:#98a98d !important;color:#fff8eb !important;}
input::placeholder,textarea::placeholder{color:#c1cdbb !important;}
button{background:linear-gradient(180deg,#307b50,#1e5d3c) !important;color:#fff9e9 !important;border-color:#629b73 !important;}
button:hover{background:#276446 !important;}
.result,.result:not(.error){background:#303f32 !important;border-color:#6f946e !important;color:#f5eedc !important;}
.result.error{background:#51362e !important;border-color:#dc977d !important;color:#ffe9d7 !important;}
code{background:#303a30 !important;border:1px solid #6e795f !important;color:#f6d7a6 !important;}
table,td{border-color:#68785c !important;}
th{background:#20583d !important;color:#fff6e6 !important;border-color:#637b5f !important;}
tbody tr:nth-child(even){background:#344035 !important;color:#f1e9da !important;}
tbody tr:nth-child(odd){background:#303a31 !important;color:#f1e9da !important;}
.footer{background:#202b24 !important;color:#dce8d9 !important;border-top-color:#c09447 !important;}
.footer a,.container a{color:#b9e5b8 !important;}
:focus-visible{outline:3px solid #eeb545 !important;outline-offset:2px;}
