/* Home page, task 6299 revamp. Loaded on "/" only, after v3.css.
   Brand tokens come from redesign.css (--r-*). One idea: a calm reading
   page. Warm paper hero, the calculator as the one strong element, then
   plain sections separated by space and a single hairline, not by colour
   blocks. Phone first; widens at 760px and 1000px. */

.hx-wrap { max-width: var(--r-max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .hx-wrap { padding: 0 28px; } }

/* Hero */
.hx-hero { background: var(--r-sun); padding: 1.25rem 0 1.4rem; }
@media (min-width: 760px) { .hx-hero { padding: 1.9rem 0 1.8rem; } }
.hx-hero-head { max-width: 44rem; margin: 0 auto 1.1rem; text-align: center; }
.hx-hero h1 {
  font-family: var(--r-serif); color: var(--r-ink); font-weight: 800;
  font-size: clamp(1.95rem, 5.4vw, 3rem); line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 0.7rem; text-wrap: balance;
}
.hx-hero-head p { margin: 0 auto; max-width: 34rem; font-size: 1.02rem; line-height: 1.55; color: var(--r-ink); text-wrap: pretty; }
@media (min-width: 760px) { .hx-hero-head p { font-size: 1.1rem; } }
.hx-hero-tool { max-width: 52rem; margin: 0 auto; }
.hx-hero .sx-est { box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 10px 28px rgba(17, 17, 17, 0.07); }
.hx-hero-alt { margin: 0.9rem auto 0; text-align: center; font-size: 0.94rem; color: var(--r-ink); }
.hx-hero-alt a { color: var(--r-ink); font-weight: 600; }

/* Sections */
.hx-section { padding: 1.25rem 0; border-bottom: 1px solid var(--r-line-soft); }
@media (min-width: 760px) { .hx-section { padding: 1.75rem 0; } }
.hx-soft { background: var(--r-bg-soft); }
.hx-head { margin: 0 0 0.85rem; }
.hx-head h2 { font-family: var(--r-serif); font-weight: 800; color: var(--r-ink); font-size: clamp(1.45rem, 3.4vw, 1.9rem); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.4rem; }
.hx-head p { margin: 0; color: var(--r-ink-2); font-size: 1rem; line-height: 1.55; }
.hx-head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 2rem; }
.hx-head--row > div { flex: 1 1 30rem; }
.hx-link { font-weight: 650; color: var(--r-ink); text-decoration: underline; text-decoration-color: var(--r-sun); text-decoration-thickness: 2px; text-underline-offset: 4px; white-space: nowrap; }
.hx-link:hover { text-decoration-color: var(--r-ink); }

/* Built on public data: four sources, what each is used for */


/* Reading list */
.hx-reads { display: grid; grid-template-columns: 1fr; gap: 1.75rem; }
@media (min-width: 760px) { .hx-reads { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.hx-reads h3 { font-family: var(--r-sans); font-size: 0.95rem; font-weight: 700; color: var(--r-ink-3); margin: 0 0 0.25rem; }
.hx-reads ul { list-style: none; margin: 0; padding: 0; }
.hx-reads li { padding: 0.95rem 0; border-bottom: 1px solid var(--r-line); }
.hx-reads li:last-child { border-bottom: 0; }
.hx-reads a { font-weight: 650; font-size: 1.05rem; color: var(--r-ink); text-decoration: none; line-height: 1.35; }
.hx-reads a:hover { text-decoration: underline; text-decoration-color: var(--r-sun); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.hx-reads p { margin: 0.3rem 0 0; font-size: 0.92rem; line-height: 1.5; color: var(--r-ink-2); }
.hx-more { margin: 1.25rem 0 0; }
.hx-more a { font-weight: 650; color: var(--r-ink); text-decoration-color: var(--r-sun); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Who runs this site */
.hx-about { }
.hx-about h2 { font-family: var(--r-serif); font-weight: 800; color: var(--r-ink); font-size: clamp(1.35rem, 3vw, 1.6rem); margin: 0 0 0.6rem; }
.hx-about p { margin: 0 0 0.8rem; color: var(--r-ink-2); line-height: 1.6; }
.hx-about a { color: var(--r-ink); font-weight: 600; }
.hx-section:last-child { border-bottom: 0; }


.hx-hero .sx-est { border-color: rgba(17, 17, 17, 0.12); }

.hx-fine { margin: 0.8rem 0 0; font-size: 0.84rem; color: var(--r-ink-3); line-height: 1.5; }
.hx-fine a { color: var(--r-ink); }

/* Section rhythm: gold hero, then white, gold, white, gold, white, gold, so
   nobody loses their place in a long page. No rules over the headings. */
.hx-section { border-bottom: 0; }
.hx-hero ~ .hx-section:nth-of-type(even) { background: #fff; }
.hx-hero ~ .hx-section:nth-of-type(odd) { background: var(--r-sun-soft); }

/* Built on public data: a logo tile for each source, then what it is used for */
.hx-sources { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 620px) { .hx-sources { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .hx-sources { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hx-sources li { background: #fff; border: 1px solid var(--r-line); border-radius: 14px; padding: 1.1rem 1.1rem 1.2rem; }
.hx-src { display: block; text-decoration: none; color: var(--r-ink); }
.hx-logo { display: flex; align-items: center; justify-content: center; height: 76px; border-radius: 10px; background: var(--r-bg-soft); margin: 0 0 0.8rem; padding: 0.6rem 1rem; }
.hx-logo img { max-height: 52px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.hx-src-name { display: block; font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.hx-src:hover .hx-src-name { text-decoration: underline; text-decoration-color: var(--r-sun); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.hx-sources p { margin: 0.4rem 0 0; font-size: 0.92rem; line-height: 1.5; color: var(--r-ink-2); }

/* Phone: the four sources sit two by two with smaller logo tiles, so the
   block is not four screens tall. */
@media (max-width: 619px) {
  .hx-sources { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .hx-sources li { padding: 0.65rem 0.65rem 0.8rem; border-radius: 12px; }
  .hx-logo { height: 46px; margin-bottom: 0.5rem; padding: 0.3rem 0.5rem; }
  .hx-logo img { max-height: 30px; }
  .hx-src-name { font-size: 0.8rem; }
  .hx-sources p { font-size: 0.8rem; line-height: 1.4; }
}
