/* Shared header, section sub-nav, breadcrumbs, and footer for /app pages.
   Hub pages get the same chrome from global.css. Loaded after app styles. */

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 500;
  background: #f8f3eb;
  color: #140e0c;
  padding: 8px 12px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

header.nav {
  position: sticky !important;
  top: 0;
  left: auto;
  right: auto;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 76px;
  flex-wrap: nowrap;
  padding: max(0.65rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.7rem
    max(1rem, env(safe-area-inset-left)) !important;
  background: #140e0c !important;
  color: #f8f3eb;
  border-bottom: 6px solid #9a3018 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none;
}

header.nav .nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: #f8f3eb;
  text-decoration: none;
}

header.nav .nav-brand .brand-mark {
  display: block;
  flex: none;
  width: auto;
  height: calc(32px * 1068 / 708);
  border-radius: 0;
  background: none;
  color: currentColor;
}

header.nav .wordmark {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #f8f3eb;
  white-space: nowrap;
}

header.nav .nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

header.nav .nav-details {
  display: flex;
  align-items: center;
}

header.nav .nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  position: static;
  background: transparent;
  border: 0;
  padding: 0;
}

header.nav .nav-link {
  color: #f8f3eb !important;
  text-decoration: none;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  padding: 0;
}

header.nav .nav-link[aria-current="page"],
header.nav .nav-link[aria-current="true"] {
  border-bottom: 3px solid #f8f3eb;
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

header.nav .menu-btn {
  display: none;
  list-style: none;
  background: transparent;
  border: 3px solid #f8f3eb;
  color: #f8f3eb;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

header.nav .menu-btn::-webkit-details-marker {
  display: none;
}

header.nav .menu-close {
  display: none;
}

header.nav details[open] > .menu-btn .menu-open {
  display: none;
}

header.nav details[open] > .menu-btn .menu-close {
  display: inline;
}

.subnav {
  background: #f6f1e8;
  border-bottom: 4px solid #140e0c;
  position: relative;
  z-index: 2;
}

.subnav-links {
  width: min(1080px, calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  padding: 0.75rem 0;
}

.subnav-links a {
  color: #140e0c;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border: 2px solid transparent;
}

.subnav-links a[aria-current="page"] {
  background: #140e0c;
  color: #f8f3eb;
  text-decoration: none;
}

.crumb-bar {
  background: #f6f1e8;
  border-bottom: 4px solid #140e0c;
  position: relative;
  z-index: 2;
}

.crumb-bar .crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  width: min(1080px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0.7rem 0;
  list-style: none;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: #3a2e26;
}

.crumb-bar .crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.crumb-bar .crumbs a {
  color: #140e0c;
}

footer.footer {
  background: #140e0c !important;
  color: #f8f3eb !important;
  border-top: 8px solid #9a3018 !important;
  padding: 0 !important;
  margin-top: 0 !important;
  position: relative;
  z-index: 2;
}

footer.footer .footer-inner {
  max-width: 1080px;
  width: min(1080px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.8rem 0 2.5rem;
  display: block !important;
  text-align: left !important;
}

footer.footer .footer-brand {
  display: inline-block;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #f8f3eb;
  text-decoration: none;
}

footer.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.15rem;
  margin: 0.9rem 0 1rem;
}

footer.footer nav a,
footer.footer p a {
  color: #f8f3eb;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

footer.footer .footer-care {
  max-width: 40rem;
  margin: 0.15rem 0 1rem;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #f8f3eb;
}

footer.footer p {
  max-width: 44rem;
  margin: 0 0 0.8rem;
  color: #f8f3eb;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
  text-align: left;
}

.back-to-journal {
  padding-top: 1.25rem !important;
}

.article-header {
  padding-top: 0.75rem !important;
}

.blog-hero {
  padding-top: 3rem !important;
}

@media (max-width: 1099px) {
  header.nav {
    flex-wrap: wrap;
    row-gap: 0.7rem;
  }

  header.nav .wordmark {
    font-size: clamp(1.2rem, 4.2vw, 1.55rem);
  }

  header.nav .nav-brand .brand-mark {
    height: calc(26px * 1068 / 708);
  }

  header.nav .nav-brand {
    flex: 1 1 auto;
  }

  header.nav .nav-actions {
    flex: 1 1 100%;
    width: 100%;
  }

  header.nav .nav-details,
  header.nav .menu-btn {
    display: none !important;
  }

  header.nav .nav-utilities {
    display: flex;
    width: 100%;
    gap: 0.75rem;
  }

  header.nav .nav-utilities .cv-toggle,
  header.nav .nav-utilities .quick-exit {
    flex: 1 1 auto;
  }

  .subnav-links a,
  .filter-pill,
  .waitlist-btn,
  .waitlist-input {
    min-height: 44px;
  }

  .subnav-links a {
    display: inline-flex;
    align-items: center;
  }

  .article-body,
  .article-body p,
  .post-body p,
  .direct-answer {
    font-size: 1.1875rem;
    line-height: 1.7;
  }

  .article-body h2 {
    font-size: 1.85rem;
    line-height: 1.15;
  }

  .hero-sub,
  .section-body,
  .bento-desc,
  .post-card p,
  .blog-hero-label {
    font-size: 1.125rem;
    line-height: 1.6;
  }

  .hero-tagline,
  .hero-badge,
  .hero-badge span,
  .filter-pill {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
  }

  .subnav-links,
  .crumb-bar .crumbs,
  footer.footer .footer-inner {
    width: min(1080px, calc(100% - 1.5rem));
  }

  .hero {
    min-height: 0 !important;
    height: auto !important;
    justify-content: flex-start !important;
    padding: 0.75rem 1.15rem 1rem !important;
  }

  .hero-app-logo {
    width: 84px !important;
    height: 84px !important;
  }

  .hero-silhouette-glow {
    width: 110px !important;
    height: 110px !important;
  }

  .hero-icon-lockup {
    margin-bottom: 0.4rem !important;
  }

  .hero-wordmark {
    font-size: 2.15rem !important;
    letter-spacing: 0.08em !important;
    margin-bottom: 0.2rem !important;
  }

  .hero-tagline {
    margin-bottom: 0.55rem !important;
    font-size: 0.95rem !important;
  }

  .hero-headline {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.45rem !important;
  }

  .hero-sub {
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0.75rem !important;
  }
}

.article-header .direct-answer {
  max-width: 680px;
  margin: 0 auto 28px;
  font-family: var(--sans, Inter, sans-serif);
  font-size: 17px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  line-height: 1.65;
  color: var(--cream, #faf0e8);
}

@media (min-width: 1100px) {
  header.nav {
    flex-wrap: nowrap;
  }

  header.nav .menu-btn {
    display: none !important;
  }

  header.nav .nav-details {
    display: flex !important;
  }

  header.nav details.nav-details:not([open]) > nav.nav-links {
    display: flex !important;
    position: static;
  }

  header.nav .nav-utilities {
    width: auto;
  }

  .tabbar {
    display: none !important;
  }
}

/* Journal FAQs use details/summary. Essay CSS still sets .faq-answer { max-height: 0 }. */
details.faq-item > summary.faq-question {
  display: flex;
  cursor: pointer;
  list-style: none;
}

details.faq-item > summary.faq-question::-webkit-details-marker {
  display: none;
}

details.faq-item .faq-answer {
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
}

@media (max-width: 1280px) and (min-width: 1100px) {
  header.nav .nav-links {
    gap: 0.75rem;
  }

  header.nav .nav-link {
    font-size: 0.88rem !important;
  }
}
