/* Homes and Lifestyle guides. Reading layout only. Tokens and the locked quote stay in home.css and fx.css. */

.gh-page {
  background: #f5f1ea;
}

.gh-page h1 em,
.gh-page h2 em {
  font-style: italic;
  font-weight: 300;
  padding-right: 0.12em;
}

.gh-open {
  padding: calc(80px + 28px) 0 56px;
  background: var(--fx-charcoal);
  color: var(--fx-linen);
}

.gh-open h1 {
  max-width: 16ch;
  margin-top: 18px;
  color: var(--fx-linen);
}

.gh-open__split {
  display: grid;
  grid-template-areas:
    "title"
    "index"
    "lead"
    "spec"
    "actions";
}

.gh-open__title { grid-area: title; }
.gh-open__lead { grid-area: lead; }
.gh-spec { grid-area: spec; }
.gh-actions { grid-area: actions; }
.gh-index { grid-area: index; }

.gh-open .fx-lead { margin-top: 18px; }

.gh-open .fx-install-crumb,
.gh-open .fx-install-crumb a { color: var(--fx-stone-light); }

.gh-open .fx-install-crumb a:hover { color: var(--fx-linen); }

.gh-spec {
  margin: 18px 0 0;
  max-width: 62ch;
  color: var(--fx-stone-light);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums lining-nums;
}

.gh-actions { margin-top: 28px; }

.gh-index {
  display: grid;
  margin: 20px 0 0;
  border-top: 1px solid var(--fx-line-dark);
}

.gh-index div:nth-child(n + 2) { display: none; }

.gh-index div {
  padding: 16px 0 0;
}

.gh-index dt {
  margin: 0;
  color: var(--fx-stone-light);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gh-index dd {
  margin: 6px 0 0;
  color: var(--fx-linen);
  font-family: var(--fx-serif);
  font-weight: 300;
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums lining-nums;
}

.gh-index p {
  margin: 8px 0 0;
  max-width: 28ch;
  color: var(--fx-stone-light);
  font-size: 15px;
  line-height: 1.5;
}

.gh-chapter {
  padding: var(--fx-section) 0;
  background: var(--fx-linen);
  border-top: 1px solid var(--fx-line);
  scroll-margin-top: 88px;
}

.gh-chapter--paper { background: var(--fx-paper); }

.gh-chapter h2 { max-width: 18ch; }

.gh-prose {
  max-width: 62ch;
  margin-top: 18px;
}

.gh-prose p,
.gh-prose li {
  margin: 16px 0 0;
  color: var(--fx-ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

.gh-prose p:first-child,
.gh-prose ol:first-child { margin-top: 0; }

.gh-prose a {
  color: var(--fx-ink);
  text-underline-offset: 4px;
}

.gh-prose a:hover { color: var(--fx-oak-deep); }

.gh-prose a:focus-visible,
.gh-related a:focus-visible,
.gh-project:focus-visible,
.gh-page .fx-acc summary:focus-visible {
  outline: 2px solid var(--fx-oak);
  outline-offset: 4px;
}

.gh-pair {
  display: grid;
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid var(--fx-line);
}

.gh-pair article {
  padding: 22px 0 8px;
  border-top: 1px solid var(--fx-line);
}

.gh-pair article:first-child { border-top: 0; }

.gh-pair h3 { margin: 0; }

.gh-pair p {
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--fx-ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

.gh-seq {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  max-width: 62ch;
  counter-reset: gh;
}

.gh-seq li {
  counter-increment: gh;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--fx-line);
  color: var(--fx-ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

.gh-seq li::before {
  content: counter(gh, decimal-leading-zero);
  padding-top: 4px;
  color: var(--fx-oak);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums lining-nums;
}

.gh-table {
  width: 100%;
  margin-top: 28px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums lining-nums;
}

.gh-table th,
.gh-table td {
  padding: 16px 18px 16px 0;
  border-top: 1px solid var(--fx-line);
  vertical-align: top;
  text-align: left;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
}

.gh-table thead th {
  border-top: 0;
  color: var(--fx-stone);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gh-table tbody th {
  color: var(--fx-ink);
  font-family: var(--fx-serif);
  font-weight: 300;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
}

.gh-table td { color: var(--fx-ink-soft); }

.gh-related {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  max-width: 62ch;
}

.gh-related a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 44px;
  padding: 14px 0;
  border-top: 1px solid var(--fx-line);
  color: var(--fx-ink);
  text-decoration: none;
  font-size: 17px;
}

.gh-related li:last-child a { border-bottom: 1px solid var(--fx-line); }

.gh-related a:hover { color: var(--fx-oak-deep); }

.gh-projects__grid {
  display: grid;
  gap: 48px;
  margin-top: 36px;
}

.gh-project {
  color: inherit;
  text-decoration: none;
}

.gh-project__hero {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--fx-sand);
}

.gh-project__hero img,
.gh-project__stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
  display: block;
}

.gh-project__stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.gh-project__stack img { aspect-ratio: 4 / 3; }

.gh-project h3 { margin-top: 16px; }

.gh-project p {
  margin: 8px 0 0;
  max-width: 62ch;
  color: var(--fx-ink-soft);
}

.gh-kicker {
  margin: 16px 0 0;
  color: var(--fx-stone);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gh-project__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
  color: var(--fx-stone);
  font-size: 13px;
  font-variant-numeric: tabular-nums lining-nums;
}

.gh-page .fx-acc summary { min-height: 44px; }

.gh-open,
.gh-chapter,
.gh-page .fx-faq,
.gh-page #lead-form { scroll-margin-top: 88px; }

@media (max-width: 799px) {
  .gh-open { padding-top: calc(64px + 28px); }

  .gh-table caption,
  .gh-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .gh-table,
  .gh-table tbody,
  .gh-table tr,
  .gh-table th,
  .gh-table td { display: block; width: 100%; }

  .gh-table tr {
    padding: 8px 0 16px;
    border-top: 1px solid var(--fx-line);
  }

  .gh-table tbody th,
  .gh-table td {
    border-top: 0;
    padding: 8px 0 0;
  }

  .gh-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--fx-stone);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }
}

@media (min-width: 800px) {
  .gh-open { padding-bottom: 72px; }

  .gh-pair {
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
  }

  .gh-pair article {
    border-top: 0;
    padding: 22px 0 0;
  }

  .gh-pair article + article {
    border-left: 1px solid var(--fx-line);
    padding-left: 32px;
  }

  .gh-projects__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .gh-open__split {
    grid-template-columns: minmax(0, 62ch) minmax(16rem, 1fr);
    column-gap: 64px;
    align-items: start;
    grid-template-areas:
      "title index"
      "lead index"
      "spec index"
      "actions index";
  }

  .gh-index {
    margin-top: 0;
    border-top: 0;
    border-bottom: 0;
    grid-template-columns: 1fr;
  }

  .gh-index div:nth-child(n + 2) { display: block; }

  .gh-index div {
    border-right: 0;
    border-top: 1px solid var(--fx-line-dark);
    padding: 18px 0 8px;
  }

  .gh-page .fx-faq .fx-grid > div:first-child {
    position: sticky;
    top: 88px;
  }

  .gh-projects__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1440px) {
  .gh-open { padding-top: calc(80px + 64px); }
}

@media (prefers-reduced-motion: reduce) {
  .gh-page .fx-acc summary::after { transition: none; }
}
