.roof-guide {
  --roof-ink: #12213e;
  --roof-yellow: #d9cc61;
  --roof-muted: #62685f;
  --roof-line: #dcded4;
  --roof-gutter: clamp(20px, 5vw, 64px);
  color: var(--roof-ink);
  background: #f7f7f4;
  overflow-wrap: anywhere;
}

.roof-guide,
.roof-guide section[id] {
  scroll-margin-top: 24px;
}

.roof-shell {
  width: min(1184px, calc(100% - 2 * var(--roof-gutter)));
  margin-inline: auto;
}

.roof-guide p {
  line-height: 1.65;
}

.roof-guide h3 {
  margin: 0 0 24px;
  font-size: clamp(2.05rem, 4.1vw, 3.55rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.roof-guide h4 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  line-height: 1.3;
}

.roof-guide a {
  text-underline-offset: 0.25em;
}

.roof-guide a:focus-visible {
  outline: 3px solid var(--roof-ink);
  outline-offset: 5px;
}

.roof-eyebrow {
  margin: 0 0 20px;
  color: var(--roof-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.roof-number {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--roof-yellow);
  color: var(--roof-ink);
  letter-spacing: 0;
}

.roof-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.roof-back-link:hover {
  text-decoration: underline;
}

.roof-hero {
  padding-block: clamp(40px, 6vw, 80px);
  border-radius: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0 0;
  background: #e9e4b9;
}

.roof-hero .roof-eyebrow {
  color: #4c554b;
}

.roof-hero > .roof-shell > .roof-back-link {
  margin-bottom: 32px;
}

.roof-hero__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}

.roof-hero h2 {
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.roof-hero h2 span {
  color: #4f5b50;
}

.roof-hero__copy {
  min-width: 0;
}

.roof-hero__copy > p {
  max-width: 46ch;
  margin: 0 0 24px;
  font-size: 1.05rem;
}

.roof-hero__copy .roof-hero__promise {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.roof-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 100%;
  min-height: 52px;
  padding: 15px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.roof-button > [aria-hidden] {
  flex-shrink: 0;
  font-size: 1.4rem;
  line-height: 1;
}

.roof-button--navy {
  background: var(--roof-ink);
  color: #fff;
}

.roof-button--navy:hover {
  background: #253855;
}

.roof-hero__copy .roof-location {
  margin: 22px 0 0;
  font-size: 0.78rem;
}

.roof-hero__photo {
  margin: 44px 0 0;
}

.roof-hero__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  border-radius: 28px;
  object-fit: cover;
  object-position: center 53%;
}

.roof-hero__photo figcaption {
  max-width: 85ch;
  margin-top: 14px;
  color: #4c554b;
  font-size: 0.8rem;
  line-height: 1.55;
}

.roof-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 32px;
  border-bottom: 1px solid var(--roof-line);
}

.roof-nav .roof-eyebrow {
  margin: 0;
}

.roof-nav ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.roof-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--roof-line);
  border-radius: 999px;
  color: var(--roof-ink);
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.roof-nav a:hover {
  border-color: var(--roof-yellow);
  background: #efeac6;
}

.roof-nav a span {
  color: var(--roof-muted);
  font-size: 0.7rem;
}

.roof-section {
  padding-block: clamp(56px, 7vw, 96px);
}

.roof-section + .roof-section {
  border-top: 1px solid var(--roof-line);
}

.roof-section-heading {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  margin-bottom: 32px;
}

.roof-section-heading h3 {
  margin-bottom: 0;
}

.roof-section-heading > p,
.roof-section-heading > div > p:not(.roof-eyebrow) {
  max-width: 54ch;
  margin: 0;
  font-size: 1rem;
}

.roof-opening-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.roof-opening-card,
.roof-operation-card,
.roof-accessory-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--roof-line);
  border-radius: 24px;
  background: #fff;
}

.roof-opening-card p,
.roof-operation-card p,
.roof-accessory-card p {
  margin: 0 0 24px;
  font-size: 0.98rem;
}

.roof-opening-diagram {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin: 0 auto 28px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roof-diagram__roof {
  stroke: #a7afa1;
  stroke-width: 3;
  stroke-dasharray: 5 9;
}

.roof-diagram__frame {
  stroke: var(--roof-ink);
  stroke-width: 9;
}

.roof-diagram__sash {
  stroke: var(--roof-yellow);
  stroke-width: 9;
}

.roof-diagram__pivot {
  fill: var(--roof-ink);
}

.roof-diagram__motion {
  stroke: var(--roof-ink);
  stroke-width: 3;
}

.roof-opening-card h4 {
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.roof-opening-card .roof-card-detail,
.roof-operation-card .roof-card-detail,
.roof-accessory-card .roof-card-detail {
  margin: auto 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--roof-line);
  color: var(--roof-muted);
  font-size: 0.85rem;
}

.roof-smallprint {
  margin: 20px 0 0;
  color: var(--roof-muted);
  font-size: 0.82rem;
}

.roof-combination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 32px;
  padding: 28px;
  border-radius: 20px;
  background: #e9e6cf;
}

.roof-combination p {
  margin: 0;
  font-size: 0.95rem;
}

.roof-operation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.roof-tag {
  display: inline-block;
  align-self: start;
  margin-bottom: 24px;
  padding: 6px 10px;
  border: 1px solid var(--roof-line);
  border-radius: 999px;
  color: var(--roof-muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

.roof-operation-card h4,
.roof-accessory-card h4 {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.roof-note {
  margin-top: 24px;
  padding: 24px 28px;
  border-radius: 20px;
  background: #e9e6cf;
  font-size: 0.95rem;
  line-height: 1.65;
}

.roof-accessory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.roof-accessory-card > svg {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  stroke: var(--roof-ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roof-accessory-card:nth-child(2),
.roof-accessory-card:nth-child(3) {
  background: #f0edda;
}

.roof-connected {
  padding-block: clamp(56px, 7vw, 96px);
  background: var(--roof-ink);
  color: #fff;
}

.roof-connected__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}

.roof-connected .roof-eyebrow {
  color: var(--roof-yellow);
}

.roof-connected p {
  color: #d2d7e0;
  font-size: 1rem;
}

.roof-scenarios {
  display: grid;
  gap: 24px;
}

.roof-scenarios > div {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid #ffffff38;
}

.roof-scenario-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--roof-yellow);
  border-radius: 50%;
  color: var(--roof-yellow);
  font-size: 0.8rem;
}

.roof-scenarios h4 {
  font-size: 1.05rem;
}

.roof-scenarios p {
  margin: 0;
  font-size: 0.95rem;
}

.roof-connected .roof-connected__check {
  margin: 40px 0 0;
  padding: 24px 28px;
  border: 1px solid #ffffff38;
  border-radius: 20px;
  font-size: 0.9rem;
}

.roof-indicative {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--roof-yellow);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
}

.roof-sizing__warning {
  margin: 0 0 28px;
  padding: 24px 28px;
  border-left: 4px solid var(--roof-yellow);
  border-radius: 0 16px 16px 0;
  background: #e9e6cf;
  font-size: 0.95rem;
}

.roof-sizing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--roof-line);
  border-radius: 20px;
  background: #fff;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: left;
}

.roof-sizing-table caption {
  padding: 0 0 16px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
}

.roof-sizing-table th,
.roof-sizing-table td {
  padding: 20px;
}

.roof-sizing-table thead th {
  background: var(--roof-ink);
  color: #fff;
  font-size: 0.83rem;
}

.roof-sizing-table thead th:first-child {
  border-top-left-radius: 18px;
}

.roof-sizing-table thead th:last-child {
  border-top-right-radius: 18px;
}

.roof-sizing-table tbody tr:not(:last-child) > * {
  border-bottom: 1px solid var(--roof-line);
}

.roof-sizing-table tbody th {
  font-size: 1.35rem;
  white-space: nowrap;
}

.roof-sizing-table td:last-child {
  font-weight: 700;
}

.roof-sizing-table td:last-child ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.25rem;
  font-weight: 400;
}

.roof-cell-label {
  display: none;
}

.roof-sizing-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.roof-sizing-notes h4 {
  font-size: 1rem;
}

.roof-sizing-notes p {
  margin: 0;
  font-size: 0.95rem;
}

.roof-project {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(28px, 4.5vw, 60px);
  border-radius: 32px;
  background: var(--roof-yellow);
}

.roof-project .roof-eyebrow {
  color: #3e473b;
}

.roof-project > div > p {
  max-width: 54ch;
  margin: 0 0 28px;
  font-size: 1rem;
}

.roof-project__checklist ul {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding-left: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.roof-project .roof-project__checklist > p {
  margin: 0;
  font-size: 0.85rem;
}

.roof-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding-block: 32px 5rem;
  color: var(--roof-muted);
}

.roof-end a {
  scroll-margin-block: 8rem;
}

.roof-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .roof-hero__intro,
  .roof-section-heading,
  .roof-opening-grid,
  .roof-operation-grid,
  .roof-accessory-grid,
  .roof-combination,
  .roof-connected__grid,
  .roof-sizing-notes,
  .roof-project {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .roof-hero h2 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .roof-hero__photo {
    margin-top: 32px;
  }

  .roof-hero__photo img {
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    object-position: 40% center;
  }

  .roof-nav {
    flex-direction: column;
    align-items: start;
    gap: 16px;
    padding-block: 28px;
  }

  .roof-nav ol {
    justify-content: flex-start;
  }

  .roof-section-heading {
    margin-bottom: 28px;
  }

  .roof-note,
  .roof-connected .roof-connected__check,
  .roof-sizing__warning,
  .roof-project {
    padding: 24px;
  }

  .roof-project {
    border-radius: 24px;
  }

  .roof-project .roof-button {
    width: 100%;
    padding-inline: 16px;
    gap: 12px;
    font-size: 0.88rem;
  }

  .roof-end {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 700px) {
  .roof-sizing-table,
  .roof-sizing-table tbody,
  .roof-sizing-table tr,
  .roof-sizing-table th,
  .roof-sizing-table td,
  .roof-sizing-table caption {
    display: block;
  }

  .roof-sizing-table {
    border: 0;
    background: transparent;
  }

  .roof-sizing-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .roof-sizing-table tbody {
    display: grid;
    gap: 16px;
  }

  .roof-sizing-table tbody tr {
    padding: 24px;
    border: 1px solid var(--roof-line);
    border-radius: 20px;
    background: #fff;
  }

  .roof-sizing-table tbody tr > * {
    padding: 12px 0;
    border: 0;
  }

  .roof-sizing-table tbody th {
    padding-top: 0;
    padding-bottom: 16px;
    font-size: 1.65rem;
  }

  .roof-sizing-table tbody tr:not(:last-child) > * {
    border-bottom: 0;
  }

  .roof-sizing-table tbody td {
    border-top: 1px solid var(--roof-line);
  }

  .roof-cell-label {
    display: block;
    margin-bottom: 4px;
    color: var(--roof-muted);
    font-size: 0.75rem;
    font-weight: 700;
  }
}
