.box-hero {
  padding-block: 52px 56px;
}

.box-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  gap: 70px;
  align-items: end;
}

.box-hero__lead h1 {
  max-width: 760px;
  font-size: clamp(3.35rem, 6vw, 5.25rem);
}

.box-hero__lead > p:last-child {
  max-width: 700px;
  margin-top: 22px;
  font-size: 1.05rem;
}

.box-hero__facts {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hub-line);
  list-style: none;
}

.box-hero__facts li {
  display: grid;
  gap: 2px;
  padding: 13px 0;
  border-bottom: 1px solid var(--hub-line);
}

.box-hero__facts strong {
  font-size: .9rem;
}

.box-hero__facts span {
  color: var(--hub-muted);
  font-size: .82rem;
}

.box-calculator-main {
  padding: 58px 0 72px;
}

.box-calculator-grid {
  display: grid;
  gap: 22px;
}

.box-plan-guide {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  grid-template-areas:
    "copy boxes"
    "copy note";
  gap: 10px 52px;
  align-items: end;
  padding: 38px 42px 30px;
  color: var(--hub-white);
  background: var(--hub-blue);
  border: 1px solid #264b58;
  box-shadow: 0 16px 34px rgba(23,48,61,.09);
}

.box-plan-guide__copy {
  grid-area: copy;
  align-self: center;
}

.box-plan-guide__kicker,
.box-result-eyebrow {
  margin: 0 0 9px;
  color: #f4ca72;
  font-family: var(--hub-utility);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.box-plan-guide h2 {
  max-width: 380px;
  margin: 0;
  font-family: var(--hub-display);
  font-size: clamp(2.2rem, 3.7vw, 3.35rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1;
}

.box-plan-guide__copy > p:last-child {
  max-width: 430px;
  margin: 18px 0 0;
  color: #dce5e6;
  font-size: .95rem;
  line-height: 1.65;
}

.box-stack {
  grid-area: boxes;
  min-height: 186px;
  display: grid;
  grid-template-columns: .76fr .9fr 1.03fr 1.08fr 1.18fr;
  gap: 10px;
  align-items: end;
  margin: 0;
}

.box-stack__box {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px 12px;
  color: var(--hub-ink);
  background: #f0dfb8;
  border: 2px solid var(--hub-ink);
  box-shadow: 5px 5px 0 rgba(15,33,41,.28);
}

.box-stack__box::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  left: 7px;
  border-top: 1px dashed rgba(23,48,61,.5);
}

.box-stack__box b {
  position: relative;
  padding-top: 8px;
  font-family: var(--hub-utility);
  font-size: .8rem;
  letter-spacing: .05em;
}

.box-stack__box small {
  font-family: var(--hub-body);
  font-size: .72rem;
  font-weight: 750;
  line-height: 1.3;
}

.box-stack__box--book {
  min-height: 92px;
}

.box-stack__box--small {
  min-height: 112px;
  background: #9ebbad;
}

.box-stack__box--medium {
  min-height: 135px;
  background: #d7cfb8;
}

.box-stack__box--large {
  min-height: 164px;
  background: #d98b68;
}

.box-stack__box--xl {
  min-height: 186px;
  background: #e1b155;
}

.box-plan-guide__note {
  grid-area: note;
  margin: 0;
  padding-top: 12px;
  color: #dce5e6;
  border-top: 1px solid rgba(255,255,255,.24);
  font-size: .78rem;
}

.box-planner-form {
  overflow: hidden;
  background: var(--hub-white);
  border: 1px solid var(--hub-line);
  box-shadow: 0 16px 34px rgba(23,48,61,.07);
}

.box-form-section {
  padding: 38px 42px 42px;
  border-bottom: 1px solid var(--hub-line);
}

.box-form-section__head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.box-form-section__head > span {
  flex: 0 0 auto;
  margin-top: 3px;
  padding: 5px 9px;
  color: var(--hub-orange);
  background: #f8ece5;
  border: 1px solid #e9c7b9;
  font-family: var(--hub-utility);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.box-form-section__head h2 {
  margin: 0;
  font-family: var(--hub-display);
  font-size: 2rem;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.box-form-section__head p {
  margin: 7px 0 0;
  color: var(--hub-muted);
  font-size: .9rem;
}

.box-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 16px;
}

.box-field {
  min-width: 0;
}

.box-field > span,
.box-choice-group legend {
  display: block;
  margin-bottom: 8px;
  color: var(--hub-ink);
  font-size: .86rem;
  font-weight: 800;
}

.box-field select,
.box-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  color: var(--hub-ink);
  background: #fbf8f1;
  border: 1px solid #a99f90;
  border-radius: 2px;
  font: inherit;
  font-size: 1rem;
}

.box-field select:hover,
.box-field input:hover {
  border-color: var(--hub-ink);
}

.box-field select:focus,
.box-field input:focus {
  border-color: var(--hub-ink);
  outline: 3px solid rgba(224,170,62,.4);
  outline-offset: 1px;
}

.box-choice-group {
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.box-choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.box-choice-row label {
  position: relative;
  min-height: 50px;
}

.box-choice-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.box-choice-row span {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 10px 13px;
  color: var(--hub-muted);
  background: #fbf8f1;
  border: 1px solid var(--hub-line);
  font-size: .86rem;
  font-weight: 750;
  cursor: pointer;
}

.box-choice-row span::before {
  content: "+";
  width: 20px;
  flex: 0 0 20px;
  margin-right: 8px;
  color: var(--hub-orange);
  font-size: 1rem;
  font-weight: 900;
}

.box-choice-row input:checked + span {
  color: var(--hub-white);
  background: var(--hub-blue);
  border-color: var(--hub-blue);
}

.box-choice-row input:checked + span::before {
  content: "✓";
  color: #f4ca72;
}

.box-choice-row input:focus-visible + span {
  outline: 3px solid var(--hub-yellow);
  outline-offset: 2px;
}

.box-calculate-button {
  width: calc(100% - 84px);
  min-height: 58px;
  margin: 30px 42px 0;
  font-size: .98rem;
}

.box-form-footnote {
  margin: 13px 42px 32px;
  color: var(--hub-muted);
  font-size: .8rem;
  text-align: center;
}

.box-results {
  scroll-margin-top: 84px;
  padding: 0 0 88px;
  background: var(--hub-paper);
}

.box-results[hidden] {
  display: none;
}

.box-results__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: end;
  padding: 42px;
  color: var(--hub-white);
  background: var(--hub-ink);
  border-top: 6px solid var(--hub-yellow);
}

.box-results__summary .hub-kicker {
  margin: 0 0 10px;
  color: #f4ca72;
  font-size: .74rem;
}

.box-results__summary h2 {
  margin: 0;
  font-family: var(--hub-display);
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .95;
}

.box-results__summary > div:first-child > p:last-child {
  max-width: 680px;
  margin: 15px 0 0;
  color: #d7e1e2;
  font-size: .92rem;
}

.box-results__starter {
  min-width: 205px;
  padding: 20px 22px;
  color: var(--hub-ink);
  background: var(--hub-yellow);
}

.box-results__starter span,
.box-results__starter small {
  display: block;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.box-results__starter strong {
  display: block;
  margin: 4px 0 3px;
  font-family: var(--hub-display);
  font-size: 2.8rem;
  line-height: 1;
}

.box-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 22px;
  background: var(--hub-white);
  border: 1px solid var(--hub-line);
  border-top: 0;
}

.box-result-tag {
  padding: 7px 10px;
  color: var(--hub-muted);
  background: var(--hub-paper);
  border: 1px solid #e8dfd2;
  font-size: .76rem;
  font-weight: 800;
}

.box-result-section {
  margin-top: 22px;
  padding: 34px;
  background: var(--hub-white);
  border: 1px solid var(--hub-line);
}

.box-result-section__head {
  display: flex;
  justify-content: space-between;
  gap: 34px;
  align-items: end;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hub-line);
}

.box-result-section__head .box-result-eyebrow {
  color: var(--hub-orange);
}

.box-result-section__head h3,
.box-buying-panel h3 {
  margin: 0;
  font-family: var(--hub-display);
  font-size: 2rem;
  letter-spacing: -.025em;
  line-height: 1.08;
}

.box-result-section__head > p {
  max-width: 380px;
  margin: 0;
  color: var(--hub-muted);
  font-size: .86rem;
}

.box-size-results {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.box-size-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: #fbf8f1;
  border: 1px solid #e1d7c8;
}

.box-size-card__count {
  display: flex;
  gap: 7px;
  align-items: baseline;
  font-family: var(--hub-display);
  font-size: 2.7rem;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
}

.box-size-card__count span {
  color: var(--hub-muted);
  font-family: var(--hub-body);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.box-size-card__shape {
  position: relative;
  min-height: 64px;
  display: grid;
  place-items: center;
  margin: 15px 0 17px;
  color: var(--hub-ink);
  background: #e1b155;
  border: 2px solid var(--hub-ink);
  box-shadow: 4px 4px 0 rgba(23,48,61,.12);
  font-family: var(--hub-utility);
  font-size: .76rem;
  font-weight: 900;
}

.box-size-card__shape::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  left: 8px;
  border-top: 1px dashed rgba(23,48,61,.45);
}

.box-size-card__details h4,
.box-detail-row h4 {
  margin: 0;
  font-size: .95rem;
}

.box-size-card__details strong,
.box-detail-row__dimensions {
  display: block;
  margin-top: 4px;
  color: var(--hub-orange);
  font-size: .78rem;
  font-weight: 800;
}

.box-size-card__details p,
.box-detail-row p {
  margin: 8px 0 0;
  color: var(--hub-muted);
  font-size: .82rem;
}

.box-size-card__link,
.box-detail-row__link {
  color: var(--hub-orange);
  font-size: .8rem;
  font-weight: 850;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.box-size-card__link {
  margin-top: auto;
  padding-top: 16px;
}

.box-result-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.box-result-columns .box-result-section {
  height: calc(100% - 22px);
}

.box-result-columns .box-result-section__head {
  display: block;
}

.box-detail-list {
  display: grid;
}

.box-detail-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 15px;
  padding: 18px 0;
  border-bottom: 1px solid #e6ddd0;
}

.box-detail-row:last-child {
  border-bottom: 0;
}

.box-detail-row__quantity {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--hub-ink);
  background: var(--hub-yellow);
  font-family: var(--hub-display);
  font-size: 1.3rem;
}

.box-detail-row__link {
  display: inline-block;
  margin-top: 9px;
}

.box-detail-empty {
  margin: 0;
  padding: 22px;
  color: var(--hub-muted);
  background: var(--hub-paper);
  font-size: .86rem;
}

.box-buying-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 38px;
  align-items: center;
  margin-top: 22px;
  padding: 38px;
  color: var(--hub-white);
  background: var(--hub-blue);
}

.box-buying-panel .box-result-eyebrow {
  color: #f4ca72;
}

.box-buying-panel p:last-child {
  max-width: 620px;
  margin: 13px 0 0;
  color: #dce5e6;
  font-size: .86rem;
}

.box-buying-panel__actions {
  min-width: 280px;
  display: grid;
  gap: 12px;
}

.box-buying-panel__actions .hub-button {
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.box-secondary-link {
  color: var(--hub-white);
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
  text-underline-offset: 4px;
}

@media (max-width: 980px) {
  .box-hero__layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .box-hero__facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .box-hero__facts li {
    padding: 14px;
    border-right: 1px solid var(--hub-line);
  }

  .box-hero__facts li:last-child {
    border-right: 0;
  }

  .box-plan-guide {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "boxes"
      "note";
    gap: 26px;
  }

  .box-plan-guide__copy {
    display: grid;
    grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
    gap: 30px;
    align-items: end;
  }

  .box-plan-guide__copy > p:last-child {
    margin: 0;
  }

  .box-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .box-size-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .box-hero__facts {
    grid-template-columns: 1fr;
  }

  .box-hero__facts li {
    padding-inline: 0;
    border-right: 0;
  }

  .box-result-columns,
  .box-buying-panel {
    grid-template-columns: 1fr;
  }

  .box-result-columns .box-result-section {
    height: auto;
  }

  .box-buying-panel__actions {
    min-width: 0;
  }

  .box-size-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .box-hero {
    padding-block: 40px 44px;
  }

  .box-hero__lead h1 {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .box-hero__lead > p:last-child {
    font-size: .98rem;
  }

  .box-calculator-main {
    padding: 32px 0 46px;
  }

  .box-plan-guide {
    padding: 28px 20px 22px;
  }

  .box-plan-guide__copy {
    display: block;
  }

  .box-plan-guide__copy > p:last-child {
    margin-top: 16px;
  }

  .box-stack {
    min-height: 142px;
    gap: 5px;
  }

  .box-stack__box {
    padding: 9px 6px;
    box-shadow: 3px 3px 0 rgba(15,33,41,.25);
  }

  .box-stack__box b {
    font-size: .66rem;
  }

  .box-stack__box small {
    font-size: .6rem;
  }

  .box-stack__box--book {
    min-height: 78px;
  }

  .box-stack__box--small {
    min-height: 92px;
  }

  .box-stack__box--medium {
    min-height: 108px;
  }

  .box-stack__box--large {
    min-height: 126px;
  }

  .box-stack__box--xl {
    min-height: 142px;
  }

  .box-form-section {
    padding: 28px 20px 32px;
  }

  .box-form-section__head {
    display: block;
  }

  .box-form-section__head > span {
    display: inline-block;
    margin: 0 0 12px;
  }

  .box-field-grid,
  .box-choice-row,
  .box-size-results {
    grid-template-columns: 1fr;
  }

  .box-choice-row {
    gap: 8px;
  }

  .box-calculate-button {
    width: calc(100% - 40px);
    margin: 24px 20px 0;
  }

  .box-form-footnote {
    margin: 13px 20px 25px;
  }

  .box-results {
    padding-bottom: 56px;
  }

  .box-results__summary {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 30px 22px 24px;
  }

  .box-results__starter {
    min-width: 0;
  }

  .box-result-section,
  .box-buying-panel {
    padding: 26px 20px;
  }

  .box-result-section__head {
    display: block;
  }

  .box-result-section__head > p {
    margin-top: 12px;
  }

  .box-size-card {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    column-gap: 16px;
  }

  .box-size-card__count {
    grid-column: 1 / -1;
  }

  .box-size-card__shape {
    min-height: 70px;
    margin: 15px 0 0;
  }

  .box-size-card__details {
    align-self: center;
    margin-top: 15px;
  }

  .box-size-card__link {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .box-results {
    scroll-behavior: auto;
  }
}
