html:has(.calc-studio) {
  scroll-behavior: auto;
}

.calc-studio {
  --cs-ink: #282219;
  --cs-earth: #33271f;
  --cs-pale: #f7f4ed;
  --cs-warm: #eee8dd;
  --cs-line: #d7cebe;
  --cs-muted: #645a4e;
  color: var(--cs-ink);
  background: var(--cs-pale);
}

.calc-studio section {
  padding: clamp(40px, 5.3vw, 78px) 0;
}

.calc-studio h2 {
  margin: 0;
  font: 500 clamp(31px, 4vw, 55px)/1.07 var(--serif);
}

.calc-studio .cs-hero {
  padding: 26px 0 0;
}

.cs-hero > .w,
.cs-workspace > .w {
  max-width: 1360px;
}

.cs-hero .crumbs {
  margin-bottom: 15px;
  color: var(--cs-muted);
}

.cs-hero .crumbs a {
  color: inherit;
}

.cs-hero__panel {
  overflow: hidden;
  color: #fffcf6;
  background: var(--cs-earth);
}

.cs-hero__panel--photo {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1fr);
}

.cs-hero__copy {
  align-self: center;
  padding: clamp(26px, 4.5vw, 66px);
}

.cs-hero h1 {
  max-width: 15ch;
  margin: 0 0 19px;
  font: 500 clamp(40px, 4.75vw, 69px)/1.01 var(--serif);
  letter-spacing: -.025em;
}

.cs-hero__copy p {
  max-width: 47ch;
  margin: 0;
  color: #ece0d1;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.6;
}

.cs-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 26px;
}

.cs-hero__actions a {
  text-align: center;
}

.cs-hero__secondary,
.cs-text-link {
  text-underline-offset: .26em;
}

.cs-hero__secondary {
  color: #fff3e3;
  font-size: .9375rem;
}

.cs-hero__secondary:hover {
  color: #dbc293;
}

.cs-hero__image {
  position: relative;
  min-height: 430px;
  margin: 0;
  background: #563d2e;
}

.cs-hero__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% center;
}

.cs-hero__image figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  background: #2b1f18e6;
  color: #fff;
  font-size: .75rem;
}

.calc-studio .cs-workspace {
  scroll-margin-top: 86px;
  padding-top: clamp(32px, 4vw, 60px);
}

.cs-workspace__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 18px;
}

.cs-text-link {
  color: var(--cs-ink);
}

.cs-workspace__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px;
  background: var(--cs-warm);
  border: 1px solid var(--cs-line);
  border-bottom: 0;
}

.cs-workspace__topics a,
.cs-workspace__topics span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 17px;
  color: var(--cs-ink);
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 500;
}

.cs-workspace__topics a:hover {
  text-decoration: underline;
  text-underline-offset: .24em;
}

.cs-workspace__topics span[aria-current="page"] {
  background: var(--cs-earth);
  color: #fff;
}

.cs-workspace__tool {
  border: 1px solid var(--cs-line);
  background: #fffdf8;
}

.cs-workspace__hint,
.cs-workspace__note {
  margin: 0;
  padding: 13px 20px;
  color: var(--cs-muted);
  font-size: .9375rem;
  line-height: 1.5;
}

.calc-studio .calc-frame {
  display: block;
  width: 100%;
  height: clamp(520px, 78vh, 900px);
  border: 0;
  border-block: 1px solid var(--cs-line);
  border-radius: 0;
  background: var(--cs-pale);
}

.calc-studio .cs-method {
  background: var(--cs-warm);
}

.cs-method__grid,
.cs-explore__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.45vw, 34px);
  margin-top: clamp(20px, 3vw, 37px);
}

.cs-method article {
  padding-top: 17px;
  border-top: 2px solid #aa8f68;
}

.cs-method h3,
.cs-topic h3 {
  margin: 0 0 8px;
  font: 500 clamp(24px, 2.5vw, 34px)/1.13 var(--serif);
}

.cs-method p,
.cs-topic p,
.cs-quote__copy p,
.cs-questions .faq p {
  margin: 0;
  color: var(--cs-muted);
  font-size: 1rem;
  line-height: 1.62;
}

.calc-studio .cs-quote {
  scroll-margin-top: 86px;
}

.cs-quote__panel {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 5vw, 75px);
  padding: clamp(23px, 4vw, 55px);
  background: var(--cs-earth);
}

.cs-quote__copy {
  padding-top: 9px;
  color: #fffaf1;
}

.cs-quote__copy p {
  max-width: 42ch;
  margin: 14px 0 20px;
  color: #e9ded0;
}

.cs-quote__copy .cs-text-link {
  color: inherit;
  font-size: 1.0625rem;
}

.cs-quote__form {
  min-width: 0;
  margin: 0;
  padding: clamp(16px, 2.7vw, 36px);
  background: #fffcf5;
}

.cs-quote__form input[hidden],
.cs-quote__form p[hidden] {
  display: none;
}

.cs-quote__form label {
  min-width: 0;
}

.cs-quote__form .fr > label > input {
  min-width: 0;
}

.cs-quote__form .btn {
  text-align: center;
  white-space: normal;
}

.calc-studio .cs-explore {
  padding-top: 0;
}

.cs-topic {
  border: 1px solid var(--cs-line);
  color: var(--cs-ink);
  background: #fffcf6;
  text-decoration: none;
}

.cs-topic:hover,
.cs-topic[aria-current="page"] {
  border-color: #9c7d52;
}

.cs-topic:hover h3 {
  text-decoration: underline;
  text-underline-offset: .21em;
}

.cs-topic img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.cs-topic > div {
  padding: clamp(14px, 1.9vw, 23px);
}

.calc-studio .cs-questions {
  background: var(--cs-warm);
}

.cs-questions__grid {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: clamp(20px, 5vw, 66px);
}

.cs-questions__links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 15px;
  margin-top: 16px;
}

.cs-questions .faq p {
  margin-top: 10px;
}

@media (max-width: 1050px) {
  .cs-hero__image {
    min-height: 360px;
  }
}

@media (max-width: 730px) {
  .cs-hero__panel--photo,
  .cs-quote__panel,
  .cs-questions__grid,
  .cs-method__grid,
  .cs-explore__grid {
    grid-template-columns: 1fr;
  }

  .cs-hero__image {
    min-height: 0;
    height: clamp(165px, 47vw, 320px);
  }

  .cs-hero__actions .btn {
    padding-inline: 16px;
  }

  .cs-workspace > .w {
    padding-inline: 12px;
  }

  .cs-workspace__topics a,
  .cs-workspace__topics span {
    padding-inline: 10px;
  }

  .cs-workspace__hint,
  .cs-workspace__note {
    padding: 10px 12px;
  }

  .cs-quote__copy {
    padding-top: 0;
  }
}

@media (max-width: 430px) {
  .cs-workspace__topics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

html.cs-calculator-open,
html.cs-calculator-open body {
  overflow: hidden;
}

.calc-studio .cs-workspace--expanded {
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 0;
  background: var(--cs-pale);
}

.cs-workspace--expanded > .w {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 0;
}

.cs-workspace--expanded .cs-workspace__heading {
  align-items: center;
  gap: 5px 16px;
  margin: 0;
  padding: 8px clamp(10px, 2vw, 26px);
}

.cs-workspace--expanded .cs-workspace__heading h2 {
  font-size: clamp(20px, 3vw, 33px);
}

.cs-workspace--expanded .cs-workspace__heading a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: .9375rem;
}

.cs-workspace--expanded .cs-workspace__topics,
.cs-workspace--expanded .cs-workspace__hint,
.cs-workspace--expanded .cs-workspace__note {
  display: none;
}

.cs-workspace--expanded .cs-workspace__tool {
  flex: 1;
  min-height: 0;
  border-inline: 0;
}

.calc-studio .cs-workspace--expanded .calc-frame {
  height: 100%;
  border: 0;
}
