body { background: #f5f8fa; }
[hidden] { display: none !important; }
.skip, .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { width: auto; height: auto; clip-path: none; padding: 12px; background: white; z-index: 150; }
.nav-menu [aria-current] { color: var(--color-dark-blue); }
.workspace { max-width: 1180px; margin: auto; padding: 32px 32px 64px; }
.intro { margin-bottom: 20px; }
.crumb { color: #526574; font-size: .8rem; margin-bottom: 20px; }
.crumb span { margin: 0 7px; color: #788b9b; }
.intro h1 { font-size: clamp(2.15rem,4vw,3.35rem); letter-spacing: -.055em; margin-bottom: 10px; }
.intro p { color: #42596c; max-width: 670px; }
.notice, .result-notice { font-size: .875rem; }
.notice { background: #e8f2f6; padding: 12px 16px; border-left: 3px solid #327c9c; color: #234b61; margin-bottom: 24px; }
.layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 24px; align-items: start; }
.paper { border: 1px solid #d8e2e8; border-radius: 15px; background: white; box-shadow: 0 4px 20px rgba(23,54,73,.04); }
form.paper { padding: clamp(20px,3vw,32px); }
fieldset { min-width: 0; border: 0; }
fieldset + fieldset, #ordinary { margin-top: 24px; padding-top: 22px; border-top: 1px solid #e1e9ed; }
fieldset + fieldset { border-top: none; padding-top: 0; }
legend, .summary h2 { font-weight: 700; font-size: 1.25rem; letter-spacing: -.025em; }
legend { color: #182f43; margin-bottom: 8px; }
label { display: block; font-weight: 600; font-size: .875rem; color: #233b4e; margin: 10px 0 5px; }
select, input:not([type=checkbox]) { width: 100%; min-width: 0; height: 44px; border-radius: 7px; background: #fff; border: 1px solid #aebfc9; padding: 8px 10px; font: inherit; font-size: .94rem; color: #192e40; }
:focus-visible { outline: 3px solid #1179ac; outline-offset: 3px; }
.hint, .result-notice, .sources { color: #4b6273; }
.hint { font-size: .83rem; margin-top: 5px; }
.top { margin-top: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 8px; align-items: center; }
.check input { width: 16px; height: 16px; }
.calculate { margin-top: 24px; border-radius: 8px; background: #005a8c; color: white; padding: 12px 20px; font-weight: 650; font-size: .98rem; }
.calculate:hover { background: #064a70; }
.calculate span { padding-left: 10px; }
.summary { overflow: hidden; scroll-margin-top: 88px; }
.summary-head { background: #13384e; border-top: 4px solid #489984; color: #fff; padding: 22px 24px; }
.summary h2 { color: white; }
.summary-head p { font-size: .88rem; color: #d2e3ec; margin-top: 7px; }
.summary-body { padding: 8px 24px 22px; }
dl > div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; border-bottom: 1px solid #e1e8ec; padding: 13px 0; }
dt, dd { font-size: .93rem; }
dd { color: #163d53; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.subtotal dt, .total dt { font-weight: 650; }
.total { display: block; border: none; background: #e9f5f0; color: #184839; border-radius: 8px; padding: 13px 16px; margin: 14px 0; }
.total dd { font-size: 1.65rem; color: #124a3c; text-align: left; margin-top: 4px; }
#breakdown { margin-top: 18px; font-size: .84rem; }
#breakdown h3 { font-size: .95rem; }
#working { padding-left: 18px; margin-top: 6px; }
#working li { margin-top: 4px; }
.result-notice { margin-top: 20px; line-height: 1.55; }
.review { font-size: .86rem; margin-top: 12px; padding: 10px 13px; background: #faf3e4; border-radius: 6px; color: #604b24; }
.sources { margin-top: 20px; font-size: .88rem; padding: 14px 0; border-top: 1px solid #d8e2e8; }
.sources summary { cursor: pointer; font-weight: 650; color: #223e4e; }
.sources p { margin-top: 8px; max-width: 95ch; }
.sources a, .review a { text-decoration: underline; text-underline-offset: .15em; }
@media (max-width: 800px) { .layout { grid-template-columns: 1fr; } .workspace { padding: 20px 16px 40px; } }
@media (max-width: 470px) { .pair { grid-template-columns: 1fr; gap: 0; } .summary-body { padding-inline: 18px; } }
@media print {
  .navbar, .footer, .crumb, form.paper, .sources, .skip { display: none; }
  .workspace { padding: 0; }
  .layout { display: block; }
  .paper { box-shadow: none; }
  .summary-head, .summary h2, .summary-head p { background: white; color: black; }
  .summary { break-inside: avoid; }
}
