/* Reading system for the guides index, the buyer’s guide, and the cost guide.
   Loaded after home.css and fx.css. Does not restyle .fx-grade. */

body.fx-read {
  --fx-ink: #1c1a17;
  --fx-ink-soft: #4a453e;
  --fx-stone: #766e64;
  --fx-stone-light: #a39a8e;
  --fx-line: #e2dbcf;
  --fx-line-dark: rgb(245 241 234 / 14%);
  --fx-linen: #f5f1ea;
  --fx-paper: #fbf9f5;
  --fx-sand: #ede6da;
  --fx-oak: #b08a5b;
  --fx-oak-deep: #8c6a43;
  --fx-charcoal: #1f1d1a;
  --fx-serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --fx-sans: "Inter Tight", "Segoe UI", sans-serif;
  --fx-margin: clamp(20px, 5vw, 80px);
  --fx-max: 1440px;
  background: var(--fx-linen);
  color: var(--fx-ink);
  color-scheme: light;
  scrollbar-color: var(--fx-stone) var(--fx-linen);
}

body.fx-read ::selection {
  background: var(--fx-oak);
  color: var(--fx-ink);
}

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

body.fx-read::-webkit-scrollbar { width: 10px; height: 10px; }
body.fx-read::-webkit-scrollbar-thumb { background: var(--fx-stone); border-radius: 0; }
body.fx-read::-webkit-scrollbar-track { background: var(--fx-linen); }

.fx-read h1.fx-display-m {
  max-width: 18em;
  font-size: clamp(32px, 4.2vw, 52px);
}

.fx-read #lead-form,
.fx-read #guide-search,
.fx-read #faq {
  scroll-margin-top: 88px;
}

.rd-open {
  padding: calc(80px + 28px) 0 8px;
}

.rd-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--fx-stone);
}

.rd-crumb a { color: inherit; text-decoration: none; }
.rd-crumb a:hover { color: var(--fx-ink); }

.rd-meta {
  margin: 14px 0 0;
  max-width: 62ch;
  color: var(--fx-stone);
  font-size: 13px;
  letter-spacing: 0.04em;
}

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

.rd-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 22px 0 0;
  max-width: 62ch;
}

.rd-toc a,
.rd-jump a {
  color: var(--fx-ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--fx-line);
  padding-bottom: 2px;
}

.rd-toc a:hover,
.rd-jump a:hover { border-bottom-color: var(--fx-oak); }

.rd-search { margin-top: 28px; }

.rd-search h2 {
  margin: 0 0 8px;
  font-family: var(--fx-serif);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.015em;
  line-height: 1.08;
}

.rd-search .hub-gs-how {
  margin: 0 0 16px;
  max-width: 62ch;
  color: var(--fx-ink-soft);
  line-height: 1.5;
}

.rd-field {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 720px;
  background: var(--fx-paper);
  box-shadow: inset 0 0 0 1px var(--fx-ink);
}

.rd-field input {
  flex: 1;
  width: auto;
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--fx-ink);
  font-family: var(--fx-sans);
  font-size: 17px;
  min-height: 56px;
  padding: 0 16px;
  caret-color: var(--fx-ink);
}

.rd-field input::placeholder { color: var(--fx-ink-soft); opacity: 1; }

.hub-gs-clear {
  flex: 0 0 auto;
  margin-right: 8px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--fx-ink);
  color: var(--fx-ink);
  font-family: var(--fx-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.hub-gs-clear:hover { background: var(--fx-ink); color: var(--fx-linen); }

.hub-gs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  max-width: 720px;
}

.hub-gs-chip {
  height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--fx-stone);
  font-family: var(--fx-sans);
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.hub-gs-chip:hover { color: var(--fx-ink); border-bottom-color: var(--fx-ink); }

.hub-gs-status {
  margin: 16px 0 0;
  min-height: 1.2em;
  color: var(--fx-oak);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-gs-idle,
.hub-gs-empty {
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--fx-ink-soft);
  line-height: 1.5;
}

.hub-gs-results {
  margin-top: 8px;
  max-width: 720px;
}

.hub-gs-result {
  display: block;
  padding: 16px 0;
  border-top: 1px solid var(--fx-line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.hub-gs-results .hub-gs-result:last-child { border-bottom: 1px solid var(--fx-line); }

.hub-gs-result-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 4px;
}

.hub-gs-best {
  color: var(--fx-oak);
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hub-gs-cat {
  color: var(--fx-stone);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hub-gs-result h3 {
  margin: 0;
  font-family: var(--fx-serif);
  font-weight: 300;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
}

.hub-gs-result p {
  margin: 6px 0 0;
  max-width: 62ch;
  color: var(--fx-ink-soft);
  line-height: 1.5;
}

.hub-gs-result .hub-go {
  display: inline-block;
  margin-top: 8px;
  color: var(--fx-ink);
  font-size: 15px;
  font-weight: 500;
}

.hub-gs-result:hover h3,
.hub-gs-result:hover .hub-go { color: var(--fx-oak-deep); }

.rd-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
}

.rd-chapter {
  padding: clamp(56px, 7vw, 88px) 0;
  border-top: 1px solid var(--fx-line);
}

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

.rd-chapter h2,
.rd-sheet h2 {
  margin: 0;
  font-family: var(--fx-serif);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 22ch;
}

.rd-chapter h3 {
  margin: 28px 0 0;
  font-family: var(--fx-serif);
  font-weight: 300;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  max-width: 28ch;
}

.rd-prose { max-width: 62ch; }
.rd-prose p,
.rd-chapter > .fx-grid > p,
.rd-note {
  margin: 16px 0 0;
  max-width: 62ch;
  color: var(--fx-ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

.rd-prose a,
.rd-note a {
  color: var(--fx-ink);
  text-decoration: underline;
  text-decoration-color: var(--fx-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.rd-prose a:hover,
.rd-note a:hover { text-decoration-color: var(--fx-oak); }

.rd-prose ol,
.rd-prose ul {
  margin: 16px 0 0;
  padding: 0 0 0 1.2em;
  max-width: 62ch;
  color: var(--fx-ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

.rd-prose li + li { margin-top: 8px; }

.rd-split {
  margin-top: 28px;
  border-top: 1px solid var(--fx-line);
  padding-top: 8px;
}

.rd-split + .rd-split { margin-top: 0; }

.rd-spec {
  margin: 22px 0 0;
  max-width: 78ch;
}

.rd-spec div {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--fx-line);
}

.rd-spec div:last-child { border-bottom: 1px solid var(--fx-line); }
.rd-spec dt { margin: 0; color: var(--fx-stone); }
.rd-spec dd {
  margin: 0;
  color: var(--fx-ink);
  font-variant-numeric: tabular-nums lining-nums;
}

.rd-table-wrap { margin-top: 22px; max-width: 880px; }

.rd-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums lining-nums;
}

.rd-table caption {
  caption-side: top;
  text-align: left;
  margin: 0 0 12px;
  font-family: var(--fx-serif);
  font-weight: 300;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.15;
  color: var(--fx-ink);
}

.rd-table th,
.rd-table td {
  padding: 12px 16px 12px 0;
  border-top: 1px solid var(--fx-line);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
  color: var(--fx-ink-soft);
}

.rd-table thead th {
  color: var(--fx-stone);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rd-table tbody th { color: var(--fx-ink); }
.rd-table strong { color: var(--fx-ink); font-weight: 500; }

.rd-catalog strong {
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.2;
}

.rd-catalog p { max-width: 46ch; }

.rd-steps {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  max-width: 62ch;
}

.rd-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px 12px;
  padding: 14px 0;
  border-top: 1px solid var(--fx-line);
  color: var(--fx-ink-soft);
}

.rd-steps li:last-child { border-bottom: 1px solid var(--fx-line); }
.rd-steps span:first-child { color: var(--fx-oak); font-variant-numeric: tabular-nums; }
.rd-steps span:last-child { color: var(--fx-ink-soft); }

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

body.hub-searching .hub-cat { opacity: 0.42; }

@media (max-width: 799px) {
  .rd-open { padding-top: calc(64px + 8px); }
  .fx-read h1.fx-display-m { font-size: 28px; line-height: 1.05; }
  .rd-crumb { margin-bottom: 10px; }
  .rd-meta { margin-top: 8px; }
  .rd-lead { margin-top: 10px; font-size: 16px; line-height: 1.45; }
  .rd-search { margin-top: 16px; }
  .rd-search h2 { font-size: 24px; margin-bottom: 4px; }
  .rd-search .hub-gs-how { margin-bottom: 10px; font-size: 15px; line-height: 1.4; }
  .rd-table-wrap { margin-top: 12px; }
  .rd-table caption { font-size: 22px; line-height: 1.1; margin-bottom: 6px; }

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

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

  .rd-table tr { padding: 8px 0 2px; border-top: 1px solid var(--fx-line); }
  .rd-table tbody th,
  .rd-table td { border: 0; padding: 2px 0; }
  .rd-table tbody th {
    font-family: var(--fx-serif);
    font-weight: 300;
    font-size: 20px;
    color: var(--fx-ink);
  }
}

@media (min-width: 800px) {
  .rd-spec div { grid-template-columns: 11rem 1fr; gap: 8px 24px; align-items: baseline; }
}

@media (min-width: 1024px) {
  .rd-catalog {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }

  .rd-catalog li a { border-bottom: 0; }
  .rd-catalog li:last-child a { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-read .hub-gs-result,
  .fx-read .hub-gs-chip,
  .fx-read .hub-gs-clear,
  .fx-read .fx-acc summary::after,
  body.hub-searching .hub-cat {
    transition: none;
  }
}
