/* ==========================================================================
   tips.css — Tips & Guides index + posts (pageCss: tips). Editorial layout:
   symptom-finder hero, featured guide, filterable card grid; posts get a
   split header with photo, sticky contents rail, reading progress bar.
   ========================================================================== */

:root { --tp-line: rgba(27,58,92,.12); }

.tp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-chip {
  font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 50px;
  background: rgba(27,58,92,.08); color: var(--primary);
}
.tp-chip--gold { background: rgba(201,154,59,.16); color: #8a6420; }

/* ==== INDEX ============================================================ */

/* --- Hero: headline left, symptom finder card right -------------------- */
.tx-hero {
  position: relative; overflow: hidden;
  background: var(--primary-dark); color: var(--white);
  padding: 136px 0 120px;
}
.tx-hero::after {
  /* gold-ring motif from the logo */
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  right: -180px; top: -200px;
  border: 2px solid rgba(201,154,59,.45);
  box-shadow: 0 0 0 40px rgba(255,255,255,.03);
  pointer-events: none;
}
.tx-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); gap: 56px; align-items: center; }
.tx-eyebrow { display: block; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.tx-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.06; color: var(--white); margin-bottom: 18px; }
.tx-hero-copy p { font-size: 1.06rem; line-height: 1.7; color: rgba(255,255,255,.76); max-width: 540px; }

.tx-finder {
  background: var(--white); color: var(--dark);
  border-radius: 18px; padding: 24px;
  box-shadow: 0 30px 60px -28px rgba(0,0,0,.55);
}
.tx-finder-label { display: block; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--primary); margin-bottom: 10px; }
.tx-finder ul { list-style: none; margin: 0; padding: 0; }
.tx-finder li + li { border-top: 1px solid var(--tp-line); }
.tx-finder li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; }
.tx-finder li span { font-weight: 600; }
.tx-finder li em { font-style: normal; font-size: .78rem; color: var(--mid); white-space: nowrap; }
.tx-finder li a:hover span { color: var(--accent); }
.tx-finder-call {
  display: block; margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--bg); font-weight: 600; font-size: .92rem; color: var(--primary); text-align: center;
}
.tx-finder-call:hover { background: var(--bg-alt); }

/* --- Featured guide, overlapping the hero ------------------------------ */
.tx-featured { position: relative; z-index: 2; margin-top: -64px; }
.tx-feature {
  display: grid; grid-template-columns: 0.9fr 1.1fr; overflow: hidden;
  background: var(--white); border-radius: 20px;
  box-shadow: 0 28px 60px -30px rgba(20,33,61,.45);
  transition: transform .25s ease, box-shadow .25s ease;
}
.tx-feature:hover { transform: translateY(-3px); box-shadow: 0 34px 70px -30px rgba(20,33,61,.5); }
.tx-feature-photo { margin: 0; min-height: 320px; }
.tx-feature-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tx-feature-copy { padding: 40px 44px; display: flex; flex-direction: column; justify-content: center; }
.tx-label { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mid); margin-bottom: 12px; }
.tx-feature h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.15; color: var(--dark); margin: 16px 0 12px; }
.tx-feature p { color: var(--mid); line-height: 1.65; }
.tx-read { margin-top: 20px; font-weight: 700; color: var(--primary); border-bottom: 2px solid var(--accent); align-self: flex-start; padding-bottom: 2px; }

/* --- Filterable grid --------------------------------------------------- */
.tx-list { padding: 80px 0 88px; }
.tx-list-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--tp-line); }
.tx-list-head h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); color: var(--primary); }
.tx-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.tx-filters button {
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 50px;
  border: 1.5px solid var(--tp-line); background: var(--white); color: var(--dark);
  transition: background .2s, color .2s, border-color .2s;
}
.tx-filters button:hover { border-color: var(--primary); }
.tx-filters button.is-active { background: var(--primary); border-color: var(--primary); color: var(--white); }

.tx-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.tx-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border-radius: 16px; border: 1px solid var(--tp-line);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tx-card[hidden] { display: none; }
.tx-card:hover { transform: translateY(-3px); border-color: rgba(27,58,92,.3); box-shadow: 0 18px 40px -24px rgba(20,33,61,.45); }
.tx-card-photo { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.tx-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.tx-card:hover .tx-card-photo img { transform: scale(1.04); }
.tx-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.tx-card-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; font-weight: 600; color: var(--mid); margin-bottom: 10px; }
.tx-card-meta span:first-child { color: #8a6420; text-transform: uppercase; letter-spacing: .06em; }
.tx-card h3 { font-size: 1.15rem; line-height: 1.3; color: var(--dark); margin-bottom: 8px; }
.tx-card p { font-size: .94rem; line-height: 1.6; color: var(--mid); }
.tx-empty { margin-top: 20px; color: var(--mid); }

/* --- Appliance pills band --------------------------------------------- */
.tx-appliances { background: var(--bg-alt); padding: 56px 0; }
.tx-appliances-grid { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 40px; align-items: center; }
.tx-appliances h2 { font-size: 1.6rem; color: var(--primary); margin-bottom: 6px; }
.tx-appliances p { color: var(--mid); }
.tx-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tx-pills a { display: inline-block; padding: 10px 18px; border-radius: 50px; background: var(--white); font-weight: 600; font-size: .92rem; color: var(--primary); border: 1px solid var(--tp-line); }
.tx-pills a:hover { border-color: var(--accent); color: var(--dark); }

/* ==== POST ============================================================= */

.tp-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1100; pointer-events: none; }
.tp-progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

.tp-head { background: var(--bg); padding: 128px 0 64px; border-bottom: 1px solid var(--tp-line); }
.tp-head-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.75fr); gap: 56px; align-items: center; }
.tp-crumbs { display: flex; gap: 8px; font-size: .86rem; color: var(--mid); margin-bottom: 18px; }
.tp-crumbs a { color: var(--primary); font-weight: 600; }
.tp-crumbs a:hover { color: var(--accent); }
.tp-head h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.1; color: var(--dark); margin: 16px 0 14px; }
.tp-lede { font-size: 1.12rem; line-height: 1.65; color: var(--mid); max-width: 620px; }
.tp-byline { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.tp-byline img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 2px var(--accent); }
.tp-byline strong { display: block; font-size: .94rem; color: var(--dark); }
.tp-byline span { font-size: .86rem; color: var(--mid); }

.tp-head-photo {
  margin: 0; justify-self: end; width: 100%; max-width: 380px; aspect-ratio: 4/5;
  border-radius: 200px 200px 20px 20px; overflow: hidden;
  box-shadow: 0 0 0 8px var(--white), 0 0 0 10px var(--accent), 0 30px 60px -30px rgba(20,33,61,.5);
}
.tp-head-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- Body: sticky rail + prose ---------------------------------------- */
.tp-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; padding-top: 56px; padding-bottom: 80px; align-items: start; }
.tp-rail { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
.tp-rail-label { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mid); margin-bottom: 10px; }
.tp-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--tp-line); }
.tp-toc a { display: block; padding: 7px 0 7px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: .9rem; line-height: 1.4; color: var(--mid); }
.tp-toc a:hover { color: var(--primary); }
.tp-toc a.is-current { color: var(--primary); font-weight: 600; border-left-color: var(--accent); }

.tp-help { background: var(--primary); color: var(--white); border-radius: 16px; padding: 20px; }
.tp-help .tp-rail-label { color: var(--accent); }
.tp-help p { font-size: .9rem; line-height: 1.55; color: rgba(255,255,255,.8); margin-bottom: 14px; }
.tp-help .sp-btn { width: 100%; justify-content: center; background: var(--accent); color: var(--primary-dark); box-shadow: none; font-size: .95rem; padding: 12px 16px; }
.tp-help-link { display: block; margin-top: 10px; font-size: .88rem; font-weight: 600; color: var(--white); }
.tp-help-link:hover { color: var(--accent); }

.tp-prose { max-width: 720px; }
.tp-prose > p:first-child { font-size: 1.18rem; line-height: 1.7; color: var(--dark); }
.tp-prose h2 { scroll-margin-top: 96px; font-size: 1.6rem; line-height: 1.2; color: var(--primary); margin: 48px 0 14px; padding-top: 20px; position: relative; }
.tp-prose h2::before { content: ""; position: absolute; top: 0; left: 0; width: 40px; height: 3px; border-radius: 3px; background: var(--accent); }
.tp-prose h3 { font-size: 1.18rem; color: var(--dark); margin: 28px 0 8px; }
.tp-prose p, .tp-prose li { font-size: 1.05rem; line-height: 1.78; color: #3f4756; }
.tp-prose p { margin: 0 0 1.1rem; }
.tp-prose ul, .tp-prose ol { margin: 0 0 1.2rem; padding-left: 0; list-style: none; }
.tp-prose ul li, .tp-prose ol li { position: relative; padding-left: 28px; margin-bottom: .55rem; }
.tp-prose ul li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--accent); }
.tp-prose ol { counter-reset: tp; }
.tp-prose ol li { counter-increment: tp; }
.tp-prose ol li::before { content: counter(tp); position: absolute; left: 0; top: .25em; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: var(--white); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.tp-prose strong { color: var(--dark); }
.tp-prose a { color: var(--primary); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.tp-prose blockquote { margin: 1.6rem 0; padding: 18px 22px; border-radius: 12px; background: var(--bg-alt); border-left: 4px solid var(--accent); }
.tp-prose blockquote p { margin: 0; color: var(--dark); }
.tp-prose table { width: 100%; border-collapse: collapse; margin: 1.4rem 0 1.8rem; font-size: .96rem; background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--tp-line); }
.tp-prose th { background: var(--primary); color: var(--white); text-align: left; font-weight: 600; padding: 12px 14px; }
.tp-prose td { padding: 11px 14px; border-top: 1px solid var(--tp-line); color: #3f4756; }
.tp-prose tr:nth-child(even) td { background: #fbfaf6; }

/* --- Related ----------------------------------------------------------- */
.tp-related { background: var(--bg-alt); padding: 64px 0; }
.tp-related h2 { font-size: 1.7rem; color: var(--primary); margin-bottom: 24px; }
.tp-related-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.tp-mini { display: flex; gap: 18px; align-items: center; background: var(--white); border-radius: 16px; padding: 14px; border: 1px solid var(--tp-line); transition: transform .2s, box-shadow .2s; }
.tp-mini:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -22px rgba(20,33,61,.45); }
.tp-mini img { width: 110px; height: 110px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.tp-mini-cat { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a6420; }
.tp-mini h3 { font-size: 1.05rem; line-height: 1.3; color: var(--dark); margin: 4px 0 6px; }
.tp-mini-meta { font-size: .82rem; color: var(--mid); }

/* --- CTA band (index + posts) ----------------------------------------- */
.tp-cta { background: var(--primary-dark); color: var(--white); padding: 56px 0; }
.tp-cta-inner { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 32px; align-items: center; }
.tp-cta-ring { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 0 0 3px var(--accent), 0 0 0 14px rgba(255,255,255,.06); overflow: hidden; }
.tp-cta-ring img { width: 100%; height: 100%; display: block; }
.tp-cta h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); color: var(--white); margin-bottom: 6px; }
.tp-cta p { color: rgba(255,255,255,.75); }
.tp-cta-btns { display: flex; gap: 12px; }
.tp-cta .sp-btn--primary { background: var(--accent); color: var(--primary-dark); }
.tp-cta .sp-btn--ghost { color: var(--white); border-color: rgba(255,255,255,.4); }

/* ==== Responsive ====================================================== */
@media (max-width: 1000px) {
  .tx-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tp-body { grid-template-columns: 1fr; gap: 32px; }
  .tp-rail { position: static; order: 2; }
  .tp-toc { display: none; }
  .tp-cta-inner { grid-template-columns: 1fr; }
  .tp-cta-ring { display: none; }
}
@media (max-width: 768px) {
  .tp-wrap { padding: 0 16px; }
  .tx-hero { padding: 104px 0 96px; }
  .tx-hero::after { width: 320px; height: 320px; right: -160px; top: -120px; }
  .tx-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .tx-feature { grid-template-columns: 1fr; }
  .tx-feature-photo { min-height: 0; aspect-ratio: 16/10; }
  .tx-feature-copy { padding: 24px 22px 28px; }
  .tx-list { padding: 56px 0 64px; }
  .tx-grid { grid-template-columns: 1fr; }
  .tx-appliances-grid { grid-template-columns: 1fr; gap: 20px; }
  .tp-head { padding: 100px 0 40px; }
  .tp-head-grid { grid-template-columns: 1fr; gap: 28px; }
  .tp-head-photo { justify-self: start; max-width: 100%; aspect-ratio: 16/10; border-radius: 20px; }
  .tp-body { padding-top: 32px; padding-bottom: 56px; }
  .tp-prose h2 { font-size: 1.35rem; margin-top: 36px; }
  .tp-prose table { display: block; overflow-x: auto; }
  .tp-related-grid { grid-template-columns: 1fr; }
  .tp-mini img { width: 84px; height: 84px; }
  .tp-cta-btns { flex-direction: column; }
  .tp-cta-btns .sp-btn { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .tx-card, .tx-feature, .tp-mini, .tx-card-photo img { transition: none; }
}

/* Posts without a photo */
.tx-feature:not(:has(.tx-feature-photo)) { grid-template-columns: 1fr; }
.tp-head-grid:not(:has(.tp-head-photo)) { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
