.four-hundred { max-width: 1100px; margin: 0 auto; padding: clamp(1rem, 3vw, 2.5rem); color: #172d3c; }
.four-hundred h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 750; margin: .5rem 0 1rem; }
.fh-kicker { color: #075b64; font-weight: 750; text-transform: uppercase; letter-spacing: .09em; font-size: .8rem; }
.fh-intro { max-width: 70ch; line-height: 1.7; }
.fh-links { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 1.8rem; }
.fh-links a { color: #075b64; text-underline-offset: .2em; }
.fh-panel { border: 1px solid #d7e0e1; background: #fff; border-radius: 18px; padding: clamp(1rem, 2.5vw, 1.8rem); margin: 1rem 0; }
.fh-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.fh-toolbar h2, .fh-panel h2 { font-size: 1.2rem; margin: 0; }
.fh-draw { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.fh-draw input { width: 5rem; min-height: 44px; border: 1px solid #9fb7ba; border-radius: 9px; padding: .4rem; }
.fh-mode { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.3rem; font-weight: 650; }
.fh-mode select { min-height: 44px; padding: .5rem 1rem; border: 1px solid #075d68; border-radius: 9px; background: #e7f2f2; color: #172d3c; font: inherit; }
.fh-numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.four-hundred[data-count="5"] .fh-numbers { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fh-number span { display: block; font-size: .8rem; margin-bottom: .3rem; }
.fh-number input { width: 100%; text-align: center; color: #132d3c; background: #fff; font: 750 2rem/1.3 system-ui, sans-serif; padding: .7rem .1rem; border: 1px solid #bacdce; border-radius: 13px; min-height: 72px; }
.fh-number input[aria-invalid="true"] { border: 2px solid #a02b2b; }
.four-hundred button { cursor: pointer; font: inherit; }
.fh-button { border: 1px solid #075d68; border-radius: 11px; padding: .65rem 1rem; min-height: 44px; color: #fff; background: #075d68; font-weight: 650; }
.fh-button:hover { background: #084951; }
.fh-button:disabled { cursor: wait; opacity: .65; }
.fh-calculate { width: 100%; margin-top: 1rem; padding: 1rem; }
.fh-extreme-controls { display: flex; align-items: end; flex-wrap: wrap; gap: .8rem; margin-top: 1rem; }
.fh-extreme-controls .fh-search-field { display: flex; align-items: center; gap: .65rem; }
.fh-extreme-controls select { min-height: 44px; padding: .4rem .8rem; border: 1px solid #9fb7ba; border-radius: 9px; background: #fff; color: #172d3c; }
.fh-button-outline { background: #fff; color: #075d68; }
.fh-button-outline:hover { background: #e7f2f2; }
.fh-extreme-selection { margin: 1rem 0 0; padding: .8rem 1rem; border-left: 4px solid #075d68; background: #e7f2f2; line-height: 1.6; }
.fh-note { font-size: .9rem; color: #4c626b; line-height: 1.6; margin: 1rem 0 0; }
.fh-status { min-height: 1.7em; margin: 1.2rem 0; color: #335a63; }
.fh-results-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.fh-results-heading h2 { font-size: 1rem; font-weight: 500; margin: 0 0 .25rem; }
.fh-score { font: 750 clamp(2rem, 5vw, 2.8rem)/1.2 system-ui, sans-serif; }
.fh-percent { font-size: 1.3rem; }
.fh-current { font-size: .9rem; color: #4c626b; }
.four-hundred progress { width: 100%; height: 14px; display: block; margin: .75rem 0; appearance: none; border: 0; border-radius: 20px; overflow: hidden; background: #eef2f2; }
.four-hundred progress::-webkit-progress-bar { background: #eef2f2; }
.four-hundred progress::-webkit-progress-value { background: #00865f; border-radius: 20px; }
.four-hundred progress::-moz-progress-bar { background: #00865f; }
.fh-legend { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .9rem; margin: .7rem 0 1rem; }
.fh-dot { display: inline-block; width: .85rem; height: .85rem; border: 1px solid #afbec2; border-radius: 50%; background: #f1f3f6; margin-right: .35rem; }
.fh-dot-green { background: #a6dfcd; border-color: #00865f; }
.fh-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .45rem; }
.fh-target { min-height: 48px; min-width: 0; padding: .4rem 0; border: 1px solid #d3dadd; border-radius: 8px; background: #f4f5f7; color: #56626b; font-variant-numeric: tabular-nums; }
.fh-target.is-possible { border-color: #71bea6; background: #ddf2ea; color: #10483b; font-weight: 650; }
.fh-target[aria-pressed="true"] { outline: 3px solid #075d68; outline-offset: 1px; }
.four-hundred :is(button, input, select, a, summary):focus-visible { outline: 3px solid #bf7100; outline-offset: 3px; }
.fh-detail { scroll-margin-top: 1rem; }
.fh-formula { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: clamp(1.1rem, 3vw, 1.5rem); margin: 1rem 0; }
.fh-steps { line-height: 1.9; padding-left: 1.5rem; font-family: ui-monospace, monospace; }
.fh-best { display: flex; align-items: center; gap: .8rem; justify-content: space-between; flex-wrap: wrap; background: #fff8e9; border-color: #e4cd99; }
.fh-best p { margin: 0; }
.fh-best .fh-button { background: transparent; color: #075d68; }
.four-hundred details { line-height: 1.7; }
.four-hundred summary { cursor: pointer; font-weight: 700; }
.four-hundred [hidden] { display: none !important; }
@media (max-width: 600px) {
    .four-hundred { padding: .8rem; }
    .fh-numbers { gap: .45rem; }
    .four-hundred[data-count="5"] .fh-numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fh-number input { font-size: 1.7rem; min-height: 62px; }
    .fh-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .fh-grid .fh-target { min-height: 46px; }
    .fh-toolbar { align-items: start; }
}
