/* Shared public controls and layout. Brand heading and body type stay in their templates. */
:root {
  --control-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
[hidden] { display: none !important; }
button, select, input, textarea, .button, .start-here-callout a {
  font-family: var(--control-font);
}
.button, .start-here-callout a {
  max-width: 100%;
  min-height: 46px;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
}
.button-outline { background: transparent; color: var(--burgundy-dark); }
.button-outline:hover, .button-outline:focus-visible { background: var(--burgundy-dark); color: #fff; }
.button:active { transform: translateY(1px); }
button:disabled, .button[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--burgundy);
  outline-offset: 4px;
}
.footer a:focus-visible, .footer button:focus-visible { outline-color: #fff; }
:where(h1, h2, h3, p, li, .resource-layout > *, .product-card > *) { overflow-wrap: break-word; }
:where(main, .resource-layout > *, .product-card > *, .category-grid > *, .shop-grid > *, .blog-feature > *) { min-width: 0; }
:where([id]) { scroll-margin-top: 100px; }
.container { width: min(calc(100% - 48px), var(--max)); }

/* One navigation pattern across public templates, with a progressive mobile disclosure. */
.site-header { position: sticky; top: 0; }
.site-nav { min-height: 76px; gap: 24px; align-items: center; }
.brand { flex-shrink: 0; }
.nav-list { gap: 18px; }
.nav-list a { display: inline-flex; align-items: center; min-height: 44px; font-size: .85rem; white-space: nowrap; }
.nav-list a:nth-child(3) { display: inline-flex; }
.nav-list .nav-shop { padding: 10px 16px; border-radius: 4px; background: var(--burgundy); color: #fff; font-family: var(--control-font); }
.nav-list .nav-shop:hover, .nav-list .nav-shop:focus-visible { background: var(--burgundy-dark); color: #fff; }
.nav-list .nav-shop::after { display: none; }
.menu-toggle { display: none; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: .9375rem; font-weight: 700; }

/* Product previews are allowed to shrink with their grid tracks. */
.resource-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 32px; }
.resource-layout > img { width: 100%; max-width: 440px; margin-inline: auto; }
.resource-actions { align-items: flex-start; gap: 12px; }
.resource-actions .button { min-height: 46px; }
.resource-previews { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.resource-previews a { display: block; }
.resource-previews img { width: 100%; }
.resource > h2 { margin-top: 48px; font-size: clamp(1.8rem, 3.5vw, 2.75rem); }
.math-cover { width: 100%; max-width: 440px; min-width: 0; margin-inline: auto; padding: clamp(16px, 2.5vw, 26px); }
.math-cover-top { flex-wrap: wrap; gap: 8px 16px; }
.math-cover-main { margin-top: 32px; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.math-cover-box { padding: 16px; gap: 12px; }
.math-cover-line { margin: 20px 0 24px; }
.resource-file-list { display: grid; gap: 12px; padding-left: 0; list-style: none; }
.resource-file-list a { display: inline-flex; align-items: center; min-height: 44px; }
.signup-panel { margin-top: 36px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.signup-panel h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.signup-panel p { max-width: 640px; }
.signup-panel .fine-print { margin-bottom: 0; }

/* Shorten the buying path and keep all resource cards discoverable. */
.shop-hero { padding: 56px 0 28px; }
.shop-hero h1 { max-width: 840px; margin-inline: auto; font-size: clamp(2.5rem, 5.5vw, 4.5rem); }
.product-card { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
.product-copy h2 { font-size: clamp(2rem, 4vw, 3.4rem); margin-bottom: 14px; }
.preview-column { min-width: 0; }
.planner-cover { width: 100%; max-width: 380px; margin-inline: auto; }
.thumbs { width: 100%; max-width: 380px; margin-inline: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.thumb { min-width: 0; }
.field select { font-family: var(--control-font); min-height: 48px; }
.new-resources { padding-top: 0; }
.resource-card { padding: 28px; }
.resource-card h3 { font-size: 1.65rem; line-height: 1.15; }
.fine-print { color: var(--muted); font-size: .875rem; }

/* Long titles stay readable within the page rather than widening it. */
.blog-hero { padding-top: 60px; }
.blog-hero h1 { font-size: clamp(2.35rem, 6vw, 4.75rem); line-height: 1.08; }
.post-card h2 { font-size: clamp(1.65rem, 3.7vw, 2.6rem); line-height: 1.15; }
.post-wrap h1 { font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: 1.08; }
.post-body h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.15; margin-top: 1.3em; }
.post-body h3 { line-height: 1.2; }
.post-body .button { font-family: var(--control-font); }
.post-link, .back-link { min-height: 44px; padding-block: 10px; }
.topic-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; }
.topic-nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.post-category + .post-category { margin-top: 56px; }
.post-category > h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.article-contents { margin: 28px 0 36px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.article-contents strong { font-size: .95rem; }
.article-contents ol { margin-bottom: 0; padding-left: 22px; }
.article-contents a { display: inline-block; padding-block: 5px; }
.related-post { margin: 36px 0 0; padding: 22px; border-top: 1px solid var(--line); }
.related-post a { font-weight: 700; }
.about-portrait { width: 100%; max-width: 440px; max-height: 550px; margin-inline: auto; }
.about-hero { gap: 48px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; min-height: 150px; gap: 24px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-inner nav a { display: inline-flex; align-items: center; min-height: 44px; color: #f5eaea; font-size: .875rem; }
.footer-inner nav a:hover { color: #fff; }
.start-here-callout a { font-family: var(--control-font) !important; font-size: .9375rem !important; font-weight: 700; }
.shop-bottom { flex-wrap: wrap; }
.shop-bottom .button { font-size: .9375rem; white-space: normal; }
.stage-list a, .blog-links a { min-width: 0; }
.stage-list a span, .blog-links a span { flex-shrink: 1; text-align: right; }

@media (max-width: 1050px) {
  .site-nav { gap: 16px; }
  .nav-list { gap: 12px; }
  .nav-list a { font-size: .8rem; }
  .brand-name { font-size: 1.35rem; }
}
@media (max-width: 900px) {
  .site-nav { flex-wrap: wrap; min-height: 68px; padding-block: 12px; }
  .nav-list { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding-block: 8px; justify-items: stretch; }
  .nav-list a { padding: 10px 8px; font-size: .9375rem; white-space: normal; }
  .nav-list .nav-shop { justify-content: center; }
  .nav-enhanced .menu-toggle { display: inline-flex; align-items: center; margin-left: auto; }
  .nav-enhanced .nav-list { display: none; }
  .nav-enhanced .nav-list.is-open { display: grid; }
  .about-hero-copy { grid-row: 1; }
  .about-hero { padding-top: 48px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; min-height: 0; padding: 65px 0 55px; }
  .hero > * { min-width: 0; }
  .hero h1 { white-space: normal; }
  .hero-actions { flex-wrap: wrap; }
  .hero-art { width: 100%; max-width: 470px; height: 380px; margin-inline: auto; }
  .about-layout { grid-template-columns: minmax(0, 1fr); gap: 45px; }
  .about-visual { width: 100%; margin-inline: auto; }
  .quote-card { right: 0; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); padding-block: 28px; }
}
@media (max-width: 800px) {
  .product-card { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .product-copy { grid-row: 1; }
  .preview-column { padding-top: 12px; border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  .resource-layout { grid-template-columns: minmax(0, 1fr); }
  .resource-layout > :last-child { grid-row: 1; }
  .resource-layout > img, .math-cover { max-width: 380px; }
  .resource-previews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .math-cover { margin-top: 8px; }
  .math-cover-main { font-size: clamp(1.6rem, 7vw, 2.3rem); }
  .resource { padding-top: 32px; }
}
@media (max-width: 520px) {
  .container { width: calc(100% - 32px); }
  .hero-art { height: 320px; }
  .brand-tagline { display: block; font-size: .5rem; }
  .site-nav { gap: 12px; }
  .brand-name { font-size: 1.3rem; }
  .resource-actions { flex-direction: column; align-items: stretch; }
  .resource-actions .button { width: 100%; }
  .product-card, .resource-card, .signup-panel { padding: 20px; }
  .shop-wrap { padding-bottom: 64px; }
  .shop-hero h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
  .product-copy h2 { font-size: 2.2rem; }
  .blog-hero { padding: 40px 0 20px; }
  .post-card { padding: 24px; }
  .post-wrap { padding: 40px 8px 72px; }
  .post-body { font-size: 1.08rem; }
  .planner-freebie { padding: 20px; }
  .article-contents { padding: 18px; }
  .about-hero h1 { font-size: 3rem; }
  .about-portrait { max-width: 340px; }
  .about-hero { padding-block: 40px 56px; }
  .footer-inner { padding-block: 28px; }
  .stage-list a, .blog-links a { flex-wrap: wrap; gap: 8px 16px; }
  .stage-list a span, .blog-links a span { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .button:hover, .button:focus-visible, .button:active { transform: none; }
}

.cookie-settings-link { appearance:none; border:0; background:transparent; padding:8px 0; min-height:44px; color:inherit; text-align:left; cursor:pointer; }
.cookie-settings-link:hover { text-decoration:underline; }
