:root {
    font-family: "Segoe UI", "Yu Gothic UI", sans-serif;
    color: #1d302e;
    background: #f6f8f7;
    font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 70rem; margin: auto; padding: clamp(1rem, 4vw, 3rem); }
footer { max-width: 70rem; margin: auto; padding: 0 clamp(1rem, 4vw, 3rem) 1rem; font-size: .875rem; }
footer summary { width: fit-content; cursor: pointer; }
.menu-bar { margin-bottom: .75rem; border-bottom: 1px solid #cbd6d1; }
.menu-bar details { position: relative; width: fit-content; }
.menu-bar summary { cursor: pointer; padding: .45rem .75rem; }
.menu-bar label { position: absolute; z-index: 3; min-width: 12rem; padding: .75rem; background: white;
    border: 1px solid #cbd6d1; border-radius: .3rem; box-shadow: 0 .2rem .6rem #0002; }
.tool-tabs {
    display: flex;
    gap: .25rem;
    border-bottom: 1px solid #8b9d97;
    margin-bottom: 1.5rem;
}
.tool-tabs button {
    flex: 1;
    padding: .85rem .5rem;
    border-radius: .5rem .5rem 0 0;
    background: #e6eeea;
    color: #1d302e;
}
.tool-tabs button:hover { background: #d4e3dc; }
.tool-tabs button[aria-selected="true"] { background: #1a6858; color: white; }
h1 { margin: 0 0 1.25rem; font-size: clamp(1.5rem, 4vw, 2rem); }
h2 { margin: 0 0 1.25rem; font-size: 1.5rem; }
h3 { margin: 2rem 0 .75rem; font-size: 1.25rem; }
form, .table-scroll { background: white; border: 1px solid #cbd6d1; border-radius: .5rem; }
form { padding: clamp(1rem, 3vw, 1.5rem); }
label, legend { font-weight: 600; }
label { display: grid; gap: .3rem; }
input, select, button { font: inherit; border-radius: .3rem; }
input, select { width: 100%; padding: .45rem .6rem; border: 1px solid #8b9d97; color: inherit; }
.prediction-settings { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.prediction-settings label { display: flex; align-items: center; gap: .5rem; max-width: 100%; }
.prediction-settings input { width: 6rem; min-width: 0; }
.prediction-settings .seed { width: 9rem; }
.growth-conditions {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, auto);
    gap: .5rem 1.5rem;
    max-width: 34rem;
    margin-bottom: 1rem;
}
.growth-conditions label { grid-template-columns: 2.5rem minmax(0, 1fr); align-items: center; }
.growth-count { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; font-weight: 600; }
.growth-count input { width: 3rem; min-width: 0; padding-inline: .25rem; }
@media (max-width: 36rem) {
    .growth-conditions { column-gap: .75rem; }
    .growth-conditions label { grid-template-columns: minmax(0, 1fr); }
    .growth-conditions select { padding-inline: .25rem; font-size: .875rem; }
}
:focus-visible { outline: 3px solid #248675; outline-offset: 2px; }
fieldset { margin: 1.25rem 0 0; padding: 0; min-width: 0; border: 0; }
legend { padding: 0; margin-bottom: .6rem; }
.unit-panel { margin: 0 0 1rem; padding: .5rem 1rem 1rem; background: white; border: 1px solid #cbd6d1; border-radius: .5rem; }
.unit-panel > legend { padding: 0 .4rem; margin: 0; font-size: 1.25rem; }
.unit-fields { overflow-x: auto; padding: .35rem; }
.unit-selectors, .growth-inputs { display: grid; min-width: 52rem; }
.unit-selectors { grid-template-columns: 20fr 23fr 25fr 10fr 22fr auto; gap: .75rem; }
.unit-selectors label, .unit-selectors select { min-width: 0; }
.part-three { display: flex; align-items: center; align-self: end; padding-block: .45rem; white-space: nowrap; }
.part-three input { width: auto; margin: 0; }
.growth-inputs { grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; margin-top: 1.25rem; }
.growth-inputs fieldset { margin: 0; }
.guaranteed-count { align-content: space-between; }
.guaranteed-count input { width: 3.25rem; font-size: .875rem; }
.guaranteed-count input:read-only { background: #f6f8f7; }
.rates { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .5rem; }
.rates label { grid-template-columns: auto minmax(0, 1fr); align-items: center; font-size: .875rem; }
.rates input { min-width: 0; padding-inline: .25rem; }
form p { color: #455953; font-size: .9rem; }
form [role="alert"] { color: #a52d22; }
button { padding: .55rem 2rem; border: 0; background: #1a6858; color: white; font-weight: 600; cursor: pointer; }
button:hover { background: #125244; }
button.secondary { background: #e6eeea; color: #1d302e; }
button.secondary:hover { background: #d4e3dc; }
button:disabled { cursor: default; opacity: .55; }
.search-inputs { margin: 0 0 1.25rem; }
.observations { width: auto; }
.observations label { display: inline-flex; padding: .3rem; cursor: pointer; }
.observations input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: #1a6858; }
.observations .selected-row { background: #e6eeea; }
.observation-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.search-progress progress { width: 100%; accent-color: #1a6858; }
.table-scroll { overflow: auto; max-height: 65vh; }
table { width: 100%; border-spacing: 0; white-space: nowrap; text-align: center; }
thead th { position: sticky; top: 0; background: #e6eeea; font-size: .875rem; }
th, td { height: 40px; padding: 0 .55rem; border-bottom: 1px solid #e0e7e3; }
.seed { font-family: Consolas, monospace; letter-spacing: .04em; }
.seed-menu {
    position: fixed;
    left: clamp(0px, var(--menu-x), calc(100% - 12rem));
    top: clamp(0px, var(--menu-y), calc(100% - 2.5rem));
    width: min(12rem, 100%);
    z-index: 2;
}
.seed-menu button { width: 100%; height: 2.5rem; padding: .35rem; box-shadow: 0 .2rem .6rem #0003; }
.gain { color: #126047; font-weight: 700; }
.empty { color: #586c64; height: 4rem; }
