:root { color-scheme: light; font: 16px/1.5 system-ui,sans-serif; color: #202a35; background: #f3f5f8; }
* { box-sizing: border-box; }
main { max-width: 1120px; margin: auto; padding: clamp(16px,3vw,32px); }
header { margin: 8px 0 24px; }
header p { margin: 8px 0 0; color: #4a5868; }
.brand { background: #122235; color: #fff; border-bottom: 1px solid #314258; }
.brand-lockup { max-width: 1120px; margin: auto; padding: 13px clamp(16px,3vw,32px); display: flex; gap: 12px; align-items: center; }
.brand-name { font-size: clamp(1.15rem,3vw,1.5rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.brand-name strong { color: #ffbb5c; font-weight: inherit; }
.brand-mark { width: 44px; height: 44px; flex: none; position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; background: #ffbb5c; border-radius: 10px; }
.brand-mark i { width: 6px; height: 24px; background: #122235; clip-path: polygon(50% 0,100% 19%,100% 100%,0 100%,0 19%); }
.brand-mark::after { content: ""; position: absolute; inset: 20px 7px auto; height: 9px; border-radius: 2px; background: repeating-linear-gradient(90deg,#ffbb5c 0 1px,transparent 1px 5px) top 2px left 3px / calc(100% - 6px) 4px no-repeat,#122235; }
h1 { font: 750 clamp(1.8rem,4vw,3rem)/1.12 system-ui,sans-serif; margin: 0; letter-spacing: -.04em; max-width: 25ch; }
h2,h3 { line-height: 1.2; }
.layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
#calculator,.result,details,.explanation { background: #fff; padding: clamp(16px,3vw,26px); border: 1px solid #d9e0e9; border-radius: 14px; }
#calculator > h2:first-child,.result h2,.explanation h2 { margin-top: 0; }
.result { background: #122235; color: #f2f6fc; }
.result button { background: #ffbb5c; border-color: #ffbb5c; color: #122235; font-weight: 700; }
.result #result p:first-child { color: #ffcb82; }
details,.explanation { margin-top: 18px; }
.explanation { max-width: 72ch; }
fieldset { min-width: 0; margin: 0 0 12px; padding: 12px; border: 1px solid #d9e0e9; border-radius: 8px; }
legend,summary,label { font-weight: 600; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
label { display: block; font-size: .9rem; }
input,select,textarea,button { font: inherit; border: 1px solid #8292a5; border-radius: 6px; padding: 8px; }
input,select,textarea { display: block; width: 100%; margin: 4px 0; background: #fff; }
button { color: #202a35; background: #f5f7fa; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
fieldset button { margin-top: 8px; }
.primary { color: white; background: #174bac; }
:focus-visible { outline: 3px solid #a24d13; outline-offset: 3px; }
#result p:first-child { font-weight: 700; font-size: 1.4rem; }
#runs button { margin-top: 10px; }
@media (max-width: 730px) { .layout { grid-template-columns: 1fr; } }
