body[data-page="home"] .home-tool-goal-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .65rem;
}
body[data-page="home"] label.home-tool-goal-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: .45rem;
  position: relative;
  height: 100%;
  min-height: 8.6rem;
  padding: .85rem .9rem;
  background: #fafcfb;
  border: 1px solid #cedad4;
  border-radius: .85rem;
  color: #142d26;
  font-size: 1rem;
  line-height: 1.18;
}
.home-tool-goal-option svg {width: 3.6rem; height: 3.15rem; color: #215d47;}
body[data-page="home"] label.home-tool-goal-option::after {
  position: absolute;
  top: .7rem;
  right: .7rem;
  width: .85rem;
  height: .85rem;
  border: 1px solid #94aaa1;
}
body[data-page="home"] .home-tool-choice-input:checked + label.home-tool-goal-option {
  background: #d8f2df;
  border: 2px solid #176d45;
  padding: calc(.85rem - 1px) calc(.9rem - 1px);
}
body[data-page="home"] .home-tool-choice-input:checked + label.home-tool-goal-option::after {
  content: "✓"; font: bold .75rem/1.1 sans-serif; text-align: center;
  color: white; border-color: #176d45; background: #176d45;
}
@media (hover: hover) {
  body[data-page="home"] label.home-tool-goal-option:hover {border-color: #39825e; background: #edf6f0;}
}
.home-links {display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 1rem; margin: clamp(2rem,5vw,4rem) 0;}
.home-links article {display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.15rem,2.5vw,2.15rem); border-radius: 1.15rem; background: #eef3f0; color: #14372d;}
.home-links article:first-child {background: #133e2e; color: #fff;}
.home-links h2 {font-size: clamp(1.25rem,2.3vw,1.85rem); color: inherit; line-height: 1.13; margin: .9rem 0 .45rem;}
.home-links p {line-height: 1.55; margin: 0 0 1rem; color: inherit;}
.home-links a {color: inherit; margin-top: auto; font-weight: 700; padding: .35rem 0; text-decoration: underline; text-underline-offset: .22em;}
.home-links svg {width: 2.7rem; height: 2.7rem; color: inherit;}
@media (max-width: 999px) {body[data-page="home"] .home-tool-goal-list {grid-template-columns: repeat(3,minmax(0,1fr));}}
@media (max-width: 699px) {
  body[data-page="home"] .home-tool-goal-list {grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem;}
  body[data-page="home"] label.home-tool-goal-option {min-height: 7.1rem; font-size: .94rem;}
  .home-tool-goal-option svg {width: 3rem; height: 2.5rem;}
  .home-links {grid-template-columns: 1fr; gap: .65rem;}
  .home-links article {display: grid; grid-template-columns: 2.7rem 1fr; column-gap: .9rem;}
  .home-links svg {grid-row: span 3;}
  .home-links h2, .home-links p {margin: 0 0 .45rem;}
}
@media (prefers-reduced-motion: reduce) {body[data-page="home"] .home-tool-goal-option {transition: none;}}

.home-tool-select-grid .home-tool-select-field,
.home-tool-chip-choice:has([name="splitType"]) .home-tool-chip {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-content: start;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: .75rem;
  border: 1px solid #cedad4;
  border-radius: .85rem;
  background: #fafcfb;
  color: #142d26;
}
.home-tool-select-field > svg, .home-tool-chip > svg {
  width: 2rem;
  height: 2rem;
  color: #215d47;
}
.home-tool-select-field > small,
.home-tool-select-field select {
  grid-column: 1 / -1;
}
.home-tool-select-field select {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}
.home-tool-select-grid .home-tool-select-field:has(option:checked:not([value=""])),
.home-tool-chip-choice input[name="splitType"]:checked + label.home-tool-chip {
  border-color: #176d45;
  box-shadow: inset 0 0 0 1px #176d45;
  background: #d8f2df;
}
.home-tool-chip-row:has(input[name="splitType"]) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
}
.home-tool-chip-choice:has([name="splitType"]) .home-tool-chip {
  height: 100%;
  padding-right: 1.7rem;
  position: relative;
}
.home-tool-chip-choice input[name="splitType"] + label::after {
  content: "";
  position: absolute;
  right: .55rem;
  top: .65rem;
  width: .85rem;
  height: .85rem;
  border: 1px solid #94aaa1;
  border-radius: 50%;
}
.home-tool-chip-choice input[name="splitType"]:checked + label::after {
  content: "✓";
  text-align: center;
  background: #176d45;
  border-color: #176d45;
  color: white;
  font: bold .75rem/1.1 sans-serif;
}
.home-tool-chip-choice input[name="splitType"]:focus-visible + label,
.home-tool-select-field:focus-within {
  outline: 2px solid #176d45;
  outline-offset: 2px;
}

.home-results-active [data-preview="example"] {display: none !important;}
body[data-page="home"] .home-preview {display: grid; gap: 1rem; min-width: 0; max-width: 100%; color: #202631; background: #fff; padding: clamp(1rem, 3vw, 1.6rem); border: 1px solid #d4d9dc; border-radius: 1.1rem; box-sizing: border-box;}
.home-preview h2, .home-preview h3, .home-preview p, .home-preview dl, .home-preview dd {margin: 0;}
body[data-page="home"] .home-preview h2 {font-size: 1rem; color: #29313b;}
.home-preview h3 {font-size: clamp(1.15rem, 2vw, 1.5rem); overflow-wrap: anywhere; line-height: 1.25;}
body[data-page="home"] .home-preview h3 a {color: #17212b; text-underline-offset: .16em;}
.home-preview-head {display: grid; grid-template-columns: auto minmax(0,1fr); gap: .8rem; align-items: center;}
.home-preview .hero-dashboard-ring > svg {position: relative; z-index: 1; width: 2.2rem; height: 2.2rem; color: var(--home-green-dark, #16794c);}
.home-preview dl {display:grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: .75rem; border-top: 1px solid #d8dde0; padding-top: .8rem;}
.home-preview dt {font-size: .83rem; color: #424b54;}
.home-preview dd {font-weight: 600; overflow-wrap: anywhere;}
.home-preview small {display: block; font-weight: normal;}
@media(max-width: 460px){.home-preview dl {grid-template-columns: 1fr;}}

#home-result-start {display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.65rem 1.1rem;border-radius:12px;background:#123e30;color:white;font-weight:700;text-decoration:none}
#home-result-start:focus-visible {outline:3px solid #0368ae;outline-offset:3px}
@media(max-width:700px){#home-result-start {align-self:flex-start;max-width:100%}}
