@font-face {
    font-family: 'DM Sans';
    src: url('./fonts/dm-sans.ttf') format('truetype');
    font-weight: 100 1000;
    font-display: swap;
}
:root {
    --ink: #172e27;
    --muted: #52675e;
    --forest: #194b3b;
    --line: #d6ded5;
    --paper: #f5f6f0;
    --white: #fff;
    --acid: #dded9f;
    --radius: 15px;
    font-family: 'DM Sans', Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
button,
input,
select {
    font: inherit;
    color: inherit;
}
button,
select,
summary {
    cursor: pointer;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 3px solid #518b72;
    outline-offset: 2px;
}
button:disabled {
    cursor: default;
    opacity: 0.5;
}
button {
    touch-action: manipulation;
}
.shell {
    width: min(1200px, calc(100% - 80px));
    margin: auto;
}
.mast {
    background: #fbfcf8;
    border-bottom: 1px solid var(--line);
}
.mast-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 55px;
}
.wordmark {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    font-size: 23px;
    font-weight: 750;
    letter-spacing: -1.2px;
}
.brand-mark {
    width: 33px;
    height: 35px;
    display: grid;
    place-items: center;
    transform: rotate(-8deg);
    background: var(--forest);
    color: var(--acid);
    border-radius: 6px;
    font:
        29px/1 Georgia,
        serif;
    box-shadow: -3px 2px 0 #b5c7ae;
}
nav {
    height: 100%;
    display: flex;
    gap: 26px;
    align-items: stretch;
}
nav a,
nav button {
    padding: 3px 0 0;
    display: flex;
    align-items: center;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}
nav .nav-active {
    border-color: var(--forest);
    color: var(--forest);
}
main.shell {
    padding: 37px 0 65px;
    scroll-margin: 12px;
}
.title-row,
.section-head,
.results-head,
.dialog-head,
.dialog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
h1,
h2,
h3,
p {
    margin: 0;
}
h1 {
    font-size: clamp(36px, 4.1vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.061em;
    font-weight: 610;
}
h2 {
    font-size: 22px;
    letter-spacing: -0.045em;
    line-height: 1.2;
    font-weight: 660;
}
.title-row p,
.section-head p,
.count-detail > p,
.dialog-head p,
fieldset p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}
.button {
    border: 1px solid transparent;
    border-radius: 8px;
    height: 41px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 15px;
    font-weight: 640;
    font-size: 13px;
    white-space: nowrap;
}
.button.outline {
    background: #fbfcf8;
    border-color: #c7d2c6;
}
.button.outline:hover:enabled {
    background: #edf1e9;
    border-color: #829c87;
}
.button.primary {
    background: var(--forest);
    color: white;
}
.button.primary:hover {
    background: #103a2d;
}
.button.primary span {
    font-size: 11px;
    color: var(--acid);
}
.sliders {
    width: 15px;
    display: grid;
    gap: 3px;
}
.sliders i {
    height: 1.5px;
    background: currentColor;
    position: relative;
}
.sliders i::after {
    content: '';
    position: absolute;
    top: -1.5px;
    left: 3px;
    width: 3px;
    height: 5px;
    background: var(--ink);
    border-radius: 2px;
}
.sliders i:nth-child(2)::after {
    left: 9px;
}
.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.controls {
    margin-top: 24px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr auto;
    align-items: end;
    gap: 18px;
}
label {
    font-size: 12px;
    font-weight: 650;
    color: #394f44;
}
select,
input[type='number'] {
    height: 39px;
    border: 1px solid #cbd5cc;
    background: #fff;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 520;
    min-width: 0;
}
select {
    padding: 0 32px 0 11px;
    width: 100%;
    appearance: none;
    background: #fff
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23496355' stroke-width='1.5'/%3E%3C/svg%3E")
        right 11px center/10px no-repeat;
}
input[type='number'] {
    width: 100%;
    padding: 0 9px;
    font-variant-numeric: tabular-nums;
}
.controls label > select,
.controls .affix,
.field-grid input,
.field-grid select {
    margin-top: 6px;
}
.affix {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5cc;
    background: #fff;
    border-radius: 7px;
    overflow: hidden;
    height: 39px;
}
.affix:focus-within {
    outline: 2px solid #518b72;
    outline-offset: 1px;
}
.affix span {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    padding: 0 0 0 11px;
    white-space: nowrap;
}
.affix.suffix span,
.risk-field .affix span {
    padding: 0 10px 0 0;
}
.affix input[type='number'] {
    border: 0;
    outline: 0;
    height: 100%;
    background: transparent;
}
.rule-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 9px 3px 19px;
    color: var(--muted);
    font-size: 12px;
}
.rule-symbol {
    color: #789078;
}
.results {
    background: linear-gradient(110deg, #153f32, #20523f);
    color: white;
    border: 1px solid #194734;
    border-radius: var(--radius);
    padding: 20px 25px 24px;
}
.results-head h2 {
    font-size: 17px;
    letter-spacing: -0.025em;
    color: #f2f6e9;
}
.run-status {
    color: #d5e5d4;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.run-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--acid);
}
.run-status.busy i {
    animation: pulse 1s infinite alternate;
}
@keyframes pulse {
    to {
        opacity: 0.25;
    }
}
.metrics {
    display: grid;
    grid-template-columns: 1.15fr 1fr 0.9fr 1.15fr;
    margin-top: 20px;
}
.metrics > div {
    padding-left: 24px;
    border-left: 1px solid #48705c;
}
.metrics > div:first-child {
    border: 0;
    padding-left: 0;
}
.metrics h3 {
    font-size: 13px;
    font-weight: 500;
    color: #d6e7d8;
}
.metrics strong {
    display: block;
    color: #f6f8eb;
    font-size: clamp(27px, 3.1vw, 43px);
    letter-spacing: -0.055em;
    line-height: 1.22;
    font-weight: 550;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.metrics > div:first-child strong {
    color: var(--acid);
}
.metrics small {
    font-size: 11px;
    color: #d1e1d2;
}
.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(310px, 1fr);
    align-items: start;
    gap: 20px;
    margin-top: 22px;
}
.section-head {
    padding: 22px 22px 0;
}
.section-head p,
.count-detail > p {
    font-size: 13px;
}
.ramp-tools {
    padding: 15px 22px;
}
.ramp-tools label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}
.ramp-tools select {
    width: auto;
    min-width: 160px;
    height: 32px;
    font-size: 12px;
}
table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}
.ramp-table th {
    padding: 10px 6px;
    background: #f3f6f0;
    text-align: left;
    font-size: 11px;
    font-weight: 650;
    color: var(--muted);
    border-block: 1px solid #e4e9e2;
}
.ramp-table th:first-child,
.ramp-table td:first-child {
    padding-left: 22px;
}
.ramp-table th:last-child,
.ramp-table td:last-child {
    padding-right: 22px;
    text-align: right;
}
.ramp-table td {
    height: 48px;
    padding: 5px 6px;
    border-bottom: 1px solid #e7ebe5;
}
.ramp-table td:first-child {
    font-size: 14px;
    font-weight: 650;
}
.ramp-table td:last-child {
    color: var(--muted);
}
.ramp-table .affix {
    max-width: 95px;
    height: 30px;
}
.ramp-table .affix input {
    font-size: 13px;
}
.ramp-table .affix:has(input:disabled) {
    opacity: 0.45;
    background: #f3f6f0;
}
.spots {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f7f8f4;
    overflow: hidden;
}
.spots button {
    height: 27px;
    border: 0;
    background: none;
    font-size: 12px;
    font-weight: 570;
    padding: 0 8px;
    color: #59685d;
}
.spots button[aria-pressed='true'] {
    background: #dcead6;
    color: #193f2e;
    font-weight: 750;
}
.spots button:focus-visible {
    outline-offset: -3px;
}
.table-foot,
.note {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}
.table-foot {
    padding: 12px 22px;
}
aside {
    display: grid;
    gap: 16px;
}
.compare,
.count-detail {
    padding: 21px 22px;
}
.compare .section-head {
    padding: 0;
}
.chart {
    height: 102px;
    display: flex;
    gap: 4px;
    align-items: stretch;
    padding-top: 14px;
    margin-top: 4px;
}
.chart-bin {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
}
.bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    justify-content: center;
    flex: 1;
    border-bottom: 1px solid #c5d0c5;
}
.bars i {
    width: 36%;
    max-width: 16px;
    border-radius: 2px 2px 0 0;
    background: var(--forest);
}
.bars i + i,
.legend span + span i {
    background: #acbf7b;
}
.chart-bin small {
    text-align: center;
    color: var(--muted);
    font-size: 10px;
    margin-top: 4px;
    white-space: nowrap;
}
.legend {
    display: flex;
    gap: 13px;
    justify-content: center;
    margin: 10px 0 14px;
    font-size: 11px;
    color: var(--muted);
}
.legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 4px;
    border-radius: 2px;
    background: var(--forest);
}
.comparison th,
.comparison td,
.count-detail th,
.count-detail td {
    padding: 9px 2px;
    border-bottom: 1px solid #e4e9e2;
    text-align: right;
}
.comparison th:first-child,
.count-detail th:first-child,
.count-detail td:first-child {
    text-align: left;
}
.comparison tbody th {
    font-weight: 500;
}
.comparison thead,
.count-detail thead {
    font-size: 11px;
    color: var(--muted);
}
.comparison td {
    font-weight: 640;
}
.risk-field {
    margin: 14px 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.risk-field .affix {
    max-width: 85px;
    height: 31px;
}
.wide {
    width: 100%;
    margin-top: 12px;
}
.count-detail summary {
    font-size: 13px;
    font-weight: 650;
    padding: 12px 0;
    color: var(--forest);
}
.count-detail .note:not(:empty) {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    margin-top: 4px;
}
dialog {
    border: 1px solid var(--line);
    border-radius: 16px;
    width: min(580px, calc(100% - 24px));
    padding: 24px;
    max-height: 89vh;
    color: var(--ink);
    box-shadow: 0 20px 80px #102c2940;
}
dialog::backdrop {
    background: #102a2399;
}
.dialog-head {
    align-items: start;
}
.dialog-head button {
    border: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #edf1e9;
    font-size: 22px;
}
fieldset {
    margin: 20px 0 0;
    padding: 12px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
}
legend {
    font-size: 15px;
    font-weight: 700;
    padding: 0 10px 0 0;
}
fieldset p {
    margin: 0 0 9px;
    font-size: 12px;
}
.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.field-grid label {
    display: flex;
    flex-direction: column;
}
.checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}
.checks input {
    accent-color: var(--forest);
    vertical-align: middle;
}
.dialog-actions {
    justify-content: end;
    margin-top: 18px;
}
.error {
    color: #9c332d;
    font-size: 13px;
    margin-top: 9px;
}
.method h3 {
    font-size: 16px;
    margin: 18px 0 5px;
}
.method p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}
.method a {
    color: var(--forest);
}
@media (max-width: 900px) {
    .shell {
        width: calc(100% - 42px);
    }
    .controls {
        gap: 10px;
    }
    .workspace {
        grid-template-columns: minmax(0, 1.2fr) minmax(275px, 0.9fr);
        gap: 12px;
    }
    .compare,
    .count-detail {
        padding: 17px;
    }
    .section-head {
        padding: 18px 15px 0;
    }
    .ramp-tools {
        padding: 12px 15px;
    }
    .ramp-table th:first-child,
    .ramp-table td:first-child {
        padding-left: 12px;
    }
    .ramp-table th:last-child,
    .ramp-table td:last-child {
        padding-right: 12px;
    }
    .metrics > div {
        padding-left: 14px;
    }
}
@media (max-width: 720px) {
    .shell {
        width: calc(100% - 32px);
    }
    .mast-inner {
        height: 56px;
        gap: 20px;
        justify-content: space-between;
    }
    nav {
        gap: 15px;
    }
    .wordmark {
        font-size: 20px;
    }
    .brand-mark {
        width: 28px;
        height: 30px;
        font-size: 24px;
    }
    .title-row {
        align-items: start;
        flex-wrap: wrap;
        gap: 11px;
    }
    .title-row p {
        font-size: 13px;
    }
    main.shell {
        padding-top: 26px;
    }
    .controls {
        grid-template-columns: 1fr 1fr;
        margin-top: 15px;
        padding: 14px;
        gap: 12px;
    }
    .workspace {
        grid-template-columns: 1fr;
    }
    .metrics {
        grid-template-columns: 1fr 1fr;
        gap: 18px 10px;
    }
    .metrics > div {
        padding-left: 12px;
    }
    .metrics > div:nth-child(3) {
        border: 0;
        padding-left: 0;
    }
    .results {
        padding: 16px;
    }
    .metrics strong {
        font-size: 31px;
    }
    .results-head {
        gap: 5px;
        align-items: flex-start;
    }
    .run-status {
        font-size: 10px;
    }
    .rule-line {
        font-size: 11px;
    }
    .ramp-table .affix {
        max-width: 83px;
    }
    .metrics small {
        display: block;
    }
    .chart {
        height: 120px;
    }
    .rule-symbol {
        display: none;
    }
}
@media (max-width: 390px) {
    .shell {
        width: calc(100% - 20px);
    }
    nav {
        gap: 10px;
    }
    .spots button {
        padding: 0 6px;
    }
    .ramp-table {
        font-size: 12px;
    }
    .results-head h2 {
        font-size: 15px;
    }
    .field-grid {
        gap: 9px;
    }
    dialog {
        padding: 16px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .run-status.busy i {
        animation: none;
    }
}
input:user-invalid,
.affix:has(input:user-invalid) {
    border-color: #ac3934;
}
.ramp-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.bulk summary {
    font-size: 12px;
    font-weight: 650;
    color: var(--forest);
}
.bulk[open] {
    width: 100%;
    padding-top: 5px;
}
.bulk > div {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.bulk label {
    display: block;
}
.bulk label select {
    display: block;
    margin-top: 4px;
    min-width: 98px;
}
.bulk .button {
    height: 32px;
    font-size: 12px;
}
@media (max-width: 390px) {
    .controls select {
        font-size: 12px;
        padding-left: 7px;
        padding-right: 23px;
        background-position: right 7px center;
    }
    .metrics h3 {
        font-size: 12px;
    }
}
