/* Read layout for the six field guides.
   Loaded after home.css and fx.css on those pages only. */

.gf-page {
  background: var(--fx-linen);
  color: var(--fx-ink);
}

.gf-page ::selection {
  background: var(--fx-oak);
  color: var(--fx-ink);
}

.gf-page :focus-visible {
  outline: 2px solid var(--fx-oak);
  outline-offset: 4px;
}

.gf-open,
.gf-chapter,
.gf-cases,
.gf-faq {
  scroll-margin-top: 88px;
}

.gf-open {
  padding: calc(80px + 36px) 0 clamp(56px, 8vw, 96px);
}

.gf-chapter,
.gf-cases,
.gf-faq {
  padding: var(--fx-section) 0;
}

.gf-chapter--paper,
.gf-faq--paper { background: var(--fx-paper); }

.gf-chapter--linen,
.gf-cases { background: var(--fx-linen); }

.gf-page h1 {
  max-width: 16em;
  margin: 18px 0 0;
  font-weight: 300;
}

.gf-page h2 {
  max-width: 18em;
  font-weight: 300;
}

.gf-label {
  margin: 0;
  color: var(--fx-stone);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.gf-lead {
  max-width: 48ch;
  margin: 22px 0 0;
  color: var(--fx-ink-soft);
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5;
}

.gf-prose,
.gf-spec,
.gf-note,
.gf-faq p,
.gf-steps p,
.gf-pair p,
.gf-moves p {
  max-width: 62ch;
  color: var(--fx-ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

.gf-prose p + p,
.gf-note + .gf-note { margin-top: 1em; }

.gf-note .fx-link + .fx-link { margin-left: 1.15em; }

.gf-checks { counter-reset: gf-check; }

.gf-checks li {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr);
  column-gap: 12px;
}

.gf-checks li::before {
  counter-increment: gf-check;
  content: counter(gf-check, decimal-leading-zero);
  color: var(--fx-oak);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.08em;
}

.gf-prose { margin-top: 22px; }

.gf-spec {
  margin-top: 28px;
}

.gf-open__split {
  display: grid;
  gap: 36px;
  margin-top: 8px;
}

.gf-moves,
.gf-steps,
.gf-questions,
.gf-cal,
.gf-checks {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.gf-moves li,
.gf-steps li,
.gf-questions li,
.gf-checks li {
  min-width: 0;
  padding: 18px 0;
  border-top: 1px solid var(--fx-line);
}

.gf-moves h2,
.gf-steps h3,
.gf-pair h3 {
  margin: 0 0 8px;
  font-weight: 300;
}

.gf-questions strong {
  display: block;
  margin-bottom: 6px;
  color: var(--fx-ink);
  font-family: var(--fx-serif);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 300;
  line-height: 1.2;
}

.gf-moves p,
.gf-steps p,
.gf-pair p,
.gf-questions p {
  margin: 0;
}

.gf-questions {
  counter-reset: gf-q;
}

.gf-questions li {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr);
  column-gap: 12px;
}

.gf-questions li::before {
  counter-increment: gf-q;
  content: counter(gf-q, decimal-leading-zero);
  color: var(--fx-oak);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.08em;
  line-height: 1.7;
}

.gf-cal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 36px;
  border-top: 1px solid var(--fx-line);
}

.gf-cal li {
  min-width: 0;
  padding: 18px 16px 18px 0;
  border-bottom: 1px solid var(--fx-line);
}

.gf-cal__when {
  display: block;
  margin-bottom: 8px;
  font-family: var(--fx-serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 300;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  overflow-wrap: break-word;
}

.gf-cal__name {
  display: block;
  color: var(--fx-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.gf-cal__gate {
  display: block;
  margin-top: 6px;
  max-width: 28ch;
  color: var(--fx-ink-soft);
  font-size: 15px;
  line-height: 1.45;
}

.gf-figures {
  display: grid;
  gap: 22px;
  margin-top: 32px;
}

.gf-figures div { min-width: 0; }

.gf-figures b {
  display: block;
  font-family: var(--fx-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  overflow-wrap: break-word;
}

.gf-figures span {
  display: block;
  margin-top: 8px;
  max-width: 22ch;
  color: var(--fx-ink-soft);
  font-size: 15px;
  line-height: 1.4;
}

.gf-pair,
.gf-split,
.gf-bands,
.gf-cases-grid {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}

.gf-bands p {
  min-width: 0;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--fx-line);
  color: var(--fx-ink-soft);
}

.gf-bands b {
  display: block;
  margin-bottom: 6px;
  color: var(--fx-ink);
  font-family: var(--fx-serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 300;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.gf-index {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}

.gf-index a {
  display: block;
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--fx-line);
  color: inherit;
  text-decoration: none;
}

.gf-index a:hover { color: var(--fx-oak-deep); }

.gf-index b {
  display: block;
  margin-bottom: 6px;
  font-family: var(--fx-serif);
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 300;
  line-height: 1.15;
}

.gf-index span {
  display: block;
  max-width: 36ch;
  color: var(--fx-ink-soft);
  font-size: 15px;
  line-height: 1.45;
}

.gf-said {
  max-width: 36em;
  margin: 28px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--fx-line);
  color: var(--fx-ink);
  font-family: var(--fx-serif);
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 300;
  line-height: 1.25;
}

.gf-table-wrap { margin-top: 28px; }

.gf-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.gf-table caption {
  margin-bottom: 12px;
  text-align: left;
  color: var(--fx-ink-soft);
}

.gf-table th,
.gf-table td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--fx-line);
  vertical-align: top;
  font-weight: 400;
}

.gf-table th {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.gf-faq details {
  border-top: 1px solid var(--fx-line);
}

.gf-faq details:last-of-type { border-bottom: 1px solid var(--fx-line); }

.gf-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  cursor: pointer;
  font-family: var(--fx-serif);
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 300;
  line-height: 1.2;
  list-style: none;
}

.gf-faq summary::-webkit-details-marker { display: none; }

.gf-faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.gf-faq details[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.gf-faq details p {
  margin: 0;
  padding-bottom: 22px;
}

.gf-case {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.gf-case img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--fx-sand);
}

.gf-case h3 {
  margin: 14px 0 0;
  font-weight: 300;
}

.gf-case p {
  margin: 8px 0 0;
  max-width: 36ch;
  color: var(--fx-ink-soft);
}

.gf-facts {
  margin-top: 10px;
  color: var(--fx-stone);
  font-size: 13px;
  font-variant-numeric: tabular-nums lining-nums;
}

.gf-facts span + span::before { content: " · "; }

.gf-more { margin-top: 28px; }

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

  .gf-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;
  }

  .gf-table,
  .gf-table tbody,
  .gf-table tr,
  .gf-table th,
  .gf-table td {
    display: block;
    width: auto;
  }

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

  .gf-table th,
  .gf-table td {
    border-bottom: 0;
    padding: 8px 0;
  }

  .gf-table th[scope="row"] {
    font-family: var(--fx-serif);
    font-size: clamp(24px, 6vw, 32px);
    font-weight: 300;
    letter-spacing: -0.02em;
  }

  .gf-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) {
  .gf-moves { display: grid; }

  .gf-moves,
  .gf-pair,
  .gf-bands { grid-template-columns: 1fr 1fr; }

  .gf-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .gf-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }

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

  .gf-cases-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .gf-cal { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .gf-split { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1440px) {
  .gf-setout .gf-open__split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
  }

  .gf-setout .gf-moves { grid-template-columns: minmax(0, 1fr); }

  .gf-cal { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .gf-page * { scroll-behavior: auto; }
}
