/* Moment — tip pages and tips index. Loaded on /tips/ and /tips/{slug}/.
   Chrome (header, breadcrumbs, brand link, footer hooks) mirrors the inline
   styles in faq/index.html so the two areas of the site feel like siblings.
   Tip-specific blocks (eyebrow, lede, related-tips, tip-cta, featured row)
   live below. styles.css is loaded first, so this file overrides nothing
   structural — it only adds. */

/* ---- Page chrome (mirrors faq/index.html chrome) ---- */

.tip-page {
  background: var(--color-light);
  color: var(--text-on-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tip-page-header {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  width: 100%;
  padding: 1.5rem 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-on-light);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-link img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.brand-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.breadcrumbs {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-on-light-secondary);
  flex-wrap: wrap;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  opacity: 0.6;
}

.breadcrumbs a {
  color: var(--text-on-light-secondary);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--text-on-light);
  text-decoration: underline;
}

.breadcrumbs a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.tip-main {
  max-width: var(--max-width-wide);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  flex: 1;
}

.last-updated {
  font-size: 0.85rem;
  color: var(--text-on-light-secondary);
  font-weight: 500;
}

/* ---- Individual tip page ---- */

.tip-article {
  max-width: 720px;
  margin: 0 auto 4rem;
}

.tip-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-dark);
  margin-bottom: 1rem;
}

.tip-eyebrow a {
  color: inherit;
  text-decoration: none;
}

.tip-eyebrow a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.tip-eyebrow a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.tip-question {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-on-light);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.tip-lede {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-on-light);
  font-weight: 500;
  margin-bottom: 1rem;
}

.tip-article .last-updated {
  margin-bottom: 2.5rem;
}

.tip-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-on-light);
}

.tip-body p {
  margin-bottom: 1.25rem;
}

.tip-body p:last-child {
  margin-bottom: 0;
}

/* ---- Related tips (under the tip body) ---- */

.related-tips {
  max-width: 720px;
  margin: 0 auto 4rem;
}

.related-tips h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-on-light-secondary);
  margin-bottom: 1.25rem;
}

.related-tip-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.related-tip a {
  display: block;
  background: var(--glass-bg);
  border-radius: var(--corner-radius);
  padding: 1.5rem 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease-out;
}

.related-tip a:hover {
  transform: translateY(-2px);
}

.related-tip a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.related-tip h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-on-light);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.related-tip p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-on-light-secondary);
  font-weight: 500;
}

/* ---- App Store CTA (bottom of every tip page) ---- */

.tip-cta {
  max-width: 640px;
  margin: 0 auto;
  background: var(--glass-bg);
  border-radius: var(--corner-radius);
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.tip-cta__text {
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text-on-light);
  font-weight: 600;
  max-width: 480px;
  margin: 0;
}

.tip-cta .app-store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
  transition: transform 0.2s;
}

.tip-cta .app-store-badge:hover {
  transform: translateY(-2px);
}

.tip-cta .app-store-badge:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.tip-cta .app-store-badge img {
  display: block;
  width: 220px;
  height: auto;
}

/* ---- Tips index page ---- */

.tip-index-main {
  padding-bottom: 4rem;
}

.tip-intro {
  max-width: 720px;
  margin: 0 auto 3rem;
  text-align: center;
}

.tip-intro h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-on-light);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.tip-intro .lede {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  line-height: 1.5;
  color: var(--text-on-light-secondary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.featured-tips {
  margin: 0 auto 4rem;
}

.featured-tips__heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-on-light-secondary);
  margin-bottom: 1.25rem;
  text-align: center;
}

.tip-card-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.tip-card a {
  display: block;
  background: var(--glass-bg);
  border-radius: var(--corner-radius);
  padding: 1.75rem 2rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: transform 0.15s ease-out;
}

.tip-card a:hover {
  transform: translateY(-3px);
}

.tip-card a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.tip-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-on-light);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.tip-card p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-on-light-secondary);
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.tip-card__cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-dark);
}

.tip-card a:hover .tip-card__cta {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.tip-index-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.tip-toc {
  background: var(--glass-bg);
  border-radius: var(--corner-radius);
  padding: 1.5rem 1.75rem;
}

.tip-toc h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-on-light-secondary);
  margin-bottom: 1rem;
}

.tip-toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  counter-reset: toc;
}

.tip-toc li {
  counter-increment: toc;
}

.tip-toc a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-on-light);
  font-weight: 500;
  line-height: 1.4;
  padding: 0.25rem 0;
}

.tip-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 0.75rem;
  color: var(--text-on-light-secondary);
  font-variant-numeric: tabular-nums;
}

.tip-toc a:hover {
  color: var(--color-dark);
}

.tip-toc a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.tip-cluster {
  margin-bottom: 4rem;
  scroll-margin-top: 2rem;
}

.tip-cluster h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--text-on-light);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-subtle);
}

/* ---- Responsive ---- */

@media (min-width: 720px) {
  .tip-card-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .tip-card-list--featured {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tip-card-list--featured {
    grid-template-columns: repeat(3, 1fr);
  }

  .related-tip-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .tip-index-layout {
    grid-template-columns: 260px 1fr;
    gap: 4rem;
  }

  .tip-toc {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
  }
}

@media (max-width: 720px) {
  .tip-page-header {
    padding: 1rem 1.25rem 0;
  }

  .tip-main {
    padding: 2rem 1.25rem 4rem;
  }

  .tip-cta {
    padding: 2rem 1.5rem;
  }
}

/* ---- Dark mode tweaks ---- */

@media (prefers-color-scheme: dark) {
  .brand-link img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }

  .tip-cluster h2 {
    border-bottom-color: var(--border-subtle);
  }

  .tip-eyebrow {
    color: var(--color-dark);
  }
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  .related-tip a,
  .tip-card a,
  .tip-cta .app-store-badge {
    transition: none;
  }
}
