/* flourish.org.nz — reference template layout: age bar, header/nav, hero + feature-case,
   trust strip, toc, breadcrumbs, disclaimer, footer + rg-bar */

/* ---------- age bar ---------- */
.site-age {
  background: var(--brand-ink); color: #cfe5d9; font-size: .78rem;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 6px 12px; text-align: center;
}
.site-age a { color: #9fd8bc; }
.site-age strong { color: #fff; font-family: var(--font-mono); }
.age-pill {
  background: #fff; color: var(--brand-ink); font-family: var(--font-mono); font-weight: 600;
  border-radius: 999px; padding: 1px 9px; font-size: .74rem;
}
@media (max-width: 640px) { .age-long { display: none; } }

/* ---------- header + dropdown nav ---------- */
.site-header {
  background: linear-gradient(105deg, #082e25, #0a4835 65%, #0c5a42);
  color: #fff; position: relative; z-index: 60;
  border-bottom: 1px solid rgba(255,255,255,.12); box-shadow: 0 8px 24px rgba(8,46,37,.12);
}
.site-header .wrap { display: flex; align-items: center; gap: 30px; max-width: 1180px; min-height: 76px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  font-family: var(--font-display); font-size: 1.42rem; font-weight: 800; color: #fff;
  text-decoration: none; letter-spacing: -.3px; white-space: nowrap;
}
.brand::before {
  content: "✳"; display: grid; place-items: center; width: 35px; height: 35px;
  border-radius: 11px; background: #d6f2df; color: #0a4835;
  font: 1.45rem/1 sans-serif; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
.brand .tld { color: #a9ddc2; font-size: .78em; font-weight: 650; letter-spacing: 0; }
.brand:hover { color: #fff; }
.nav-toggle {
  display: none; align-items: center; gap: 10px; margin-left: auto;
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px; min-height: 44px; padding: 0 14px;
  font: 700 .86rem var(--font-body); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .18s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
.site-nav { display: flex; align-items: center; align-self: stretch; margin-left: auto; }
.nav-list { list-style: none; display: flex; align-items: stretch; gap: 6px; height: 100%; margin: 0; padding: 0; }
.nav-list > li { display: flex; align-items: center; position: relative; }
.nav-list > li > a, .nav-group-head > a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  color: #e7f3eb; text-decoration: none; font-weight: 650; font-size: .89rem;
  border-radius: 10px; white-space: nowrap;
}
.nav-list > li > a:hover, .nav-group-head:hover, .nav-group-head:focus-within { background: rgba(255,255,255,.11); }
.nav-list > li > a[aria-current="page"], .nav-group-head:has(> a[aria-current="page"]) { background: #e7f4e9; }
.nav-list > li > a[aria-current="page"], .nav-group-head:has(> a[aria-current="page"]) > a { color: #0b3e2f; }
.nav-group-head { display: flex; align-items: center; border-radius: 10px; transition: background .16s ease; }
.nav-group-head > a { padding-right: 5px; }
.nav-subtoggle {
  background: none; border: 0; color: #a9ddc2; cursor: pointer;
  width: 34px; height: 44px; padding: 0; margin-right: 3px; position: relative;
}
.nav-subtoggle::after {
  content: ""; position: absolute; left: 12px; top: 17px; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .16s ease;
}
.nav-subtoggle[aria-expanded="true"]::after { transform: translateY(3px) rotate(225deg); }
.nav-group-head:has(> a[aria-current="page"]) .nav-subtoggle { color: #0b3e2f; }
.nav-list a:focus-visible, .nav-subtoggle:focus-visible, .nav-toggle:focus-visible, .brand:focus-visible {
  outline: 2px solid #b8e8ca; outline-offset: 3px;
}
.nav-submenu {
  list-style: none; margin: 0; padding: 10px;
  position: absolute; top: 100%; left: 0; min-width: 250px;
  background: #fff; border: 1px solid var(--line); border-radius: 0 0 14px 14px;
  box-shadow: 0 18px 42px rgba(8,46,37,.2);
  display: none; z-index: 70; max-height: min(70vh, 520px); overflow-y: auto;
}
#nav-about { left: auto; right: 0; }
.nav-group:hover .nav-submenu, .nav-submenu.open { display: block; }
.nav-submenu a { color: var(--ink); display: block; padding: 10px 12px; border-radius: 8px; font-size: .88rem; text-decoration: none; }
.nav-submenu a:hover { background: var(--brand-tint); color: var(--brand-deep); }
.nav-subheading {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-soft); padding: 8px 12px 3px;
}
.nav-subheading:not(:first-child) { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 12px; }

@media (max-width: 1120px) {
  .site-header .wrap { min-height: 68px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #0a3d2f; padding: 12px max(18px, calc((100vw - 760px)/2)) 20px;
    max-height: calc(100vh - 68px); overflow-y: auto; box-shadow: 0 16px 30px rgba(8,46,37,.2);
  }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 4px; height: auto; }
  .nav-list > li { display: block; }
  .nav-list > li > a, .nav-group-head > a { display: flex; }
  .nav-group-head { justify-content: space-between; }
  .nav-subtoggle { width: 44px; margin-right: 4px; }
  .nav-subtoggle::after { left: 17px; }
  .nav-submenu { position: static; display: none; min-width: 0; max-height: none; overflow: visible; margin: 4px 0 8px; background: rgba(255,255,255,.07); border: 0; box-shadow: none; border-radius: 10px; }
  .nav-submenu.open { display: block; }
  .nav-submenu a { color: #e8f3ed; }
  .nav-submenu a:hover { background: rgba(255,255,255,.12); color: #fff; }
  .nav-subheading { color: #a9ddc2; }
  .nav-subheading:not(:first-child) { border-color: rgba(255,255,255,.13); }
  .nav-group:hover .nav-submenu:not(.open) { display: none; }
}

/* ---------- hero + feature case ---------- */
.hero {
  background: linear-gradient(110deg, var(--brand-ink), var(--brand-deep) 27%, var(--brand) 72%, #258966);
  border-radius: 40px 40px 0 0; color: #fff; margin: 18px 2px 0; padding: 26px 0 22px;
  overflow: hidden; position: relative;
}
.hero::before {
  content: ""; position: absolute; width: 630px; height: 630px; right: -20px; top: -135px;
  background: repeating-radial-gradient(circle, transparent 0 43px, rgba(99,209,160,.19) 44px 61px, transparent 62px 92px);
  pointer-events: none;
}
.hero .wrap { max-width: 1160px; display: grid; grid-template-columns: minmax(0, 1fr) 416px; gap: 48px; align-items: start; position: relative; }
.hero-copy h1 { color: #fff; margin-top: 0; font-size: clamp(2rem, 3vw, 2.15rem); font-weight: 600; }
.hero-copy p { color: #d6e9df; max-width: 720px; font-size: 1.02rem; }
.hero-copy .byline, .hero-copy .byline a { color: #a9cfbd; }
.hero-copy strong { color: #fff; }
.hero .trust-strip { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .trust-strip .chip, .trust-strip .chip {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 999px;
}
.hero-kicker {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: 2.2px; font-weight: 600;
  color: #8fd3b6 !important; text-transform: uppercase; margin: 0 0 10px !important;
}
/* trust chips restyled as dot bullets (reference v2) */
.hero .trust-strip { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; max-width: 640px; }
.hero .trust-strip .chip {
  background: none; border: 0; padding: 0; border-radius: 0; text-align: left;
  color: #e8f3ed; font-size: .84rem; font-weight: 600; position: relative; padding-left: 16px;
}
.hero .trust-strip .chip::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 8px; height: 8px; border-radius: 50%;
  background: #8fd3b6; box-shadow: -0 0 0 2px rgba(143,211,182,.25);
}
/* author card */
.author-chip {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 18px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18); border-radius: 12px;
  padding: 10px 16px; font-size: .82rem;
}
.author-chip img { border-radius: 50%; object-fit: cover; object-position: center 28%; }
.author-chip .ac-who { display: flex; flex-direction: column; padding-right: 14px; border-right: 1px solid rgba(255,255,255,.22); }
.author-chip .ac-who b a { color: #fff; text-decoration: none; }
.author-chip .ac-who span { color: #a9cfbd; font-size: .74rem; }
.author-chip .ac-upd { display: flex; flex-direction: column; }
.author-chip .ac-upd b { color: #fff; font-weight: 700; }
.author-chip .ac-upd span { color: #a9cfbd; font-size: .74rem; }
/* editor's choice card */
.feature-case { align-self: start; }
.feature-case-inner {
  background: #fff; color: var(--ink); border-radius: 16px; box-shadow: var(--shadow-lift);
  overflow: hidden; display: flex; flex-direction: column; align-items: stretch; text-align: center;
}
.fc-head {
  background: var(--brand-ink); color: #fff; font-family: var(--font-mono);
  font-size: .68rem; letter-spacing: 1.6px; font-weight: 600; padding: 9px 12px;
}
.fc-brand { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px 4px; }
.fc-logo {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.fc-logo img { max-width: 40px; max-height: 32px; object-fit: contain; }
.fc-id b { font-family: var(--font-display); font-size: 1.1rem; display: block; }
.fc-id span { color: var(--ink-soft); font-size: .78rem; }
.fc-stars { text-align: left; padding: 2px 16px; font-weight: 700; font-size: .9rem; }
.fc-stars .stars { color: var(--gold); letter-spacing: 2px; }
.fc-offer { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; margin: 4px 16px 0; text-align: left; color: var(--ink); }
.fc-offer-sub { color: var(--ink-soft); font-size: .76rem; margin: 0 16px 10px; text-align: left; }
.fc-tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 0 14px; }
.fc-tile { background: var(--brand-tint); border-radius: 8px; padding: 9px 6px; }
.fc-tile b { display: block; font-size: .72rem; line-height: 1.3; color: var(--brand-ink); }
.fc-tile span { font-family: var(--font-mono); font-size: .58rem; letter-spacing: 1px; color: var(--ink-soft); font-weight: 600; }
.feature-case .btn-cta { margin: 12px 14px 0; }
.case-terms { color: var(--ink-soft); font-size: .7rem; padding: 8px 12px 14px; }
@media (max-width: 1100px) and (min-width: 881px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
}
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .feature-case { max-width: 416px; width: 100%; margin: 18px auto 0; }
}

/* ---------- standalone trust strip band (non-hero) ---------- */
body > .trust-strip { background: var(--brand-tint); border-bottom: 1px solid var(--line); }
body > .trust-strip .wrap { display: flex; flex-wrap: wrap; gap: 8px 26px; padding-top: 10px; padding-bottom: 10px; font-size: .85rem; color: var(--brand-ink); }

/* ---------- table of contents ---------- */
.toc {
  margin: 26px 0; background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius);
}
.toc summary {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 16px;
  color: #111; font-weight: 700; cursor: pointer; list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc-count { color: var(--ink-soft); font-size: .78rem; font-weight: 500; }
.toc summary::after { content: "⌄"; margin-left: auto; font-size: 1.25rem; line-height: 1; }
.toc[open] summary::after { transform: rotate(180deg); }
.toc summary:focus-visible, .toc-links a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.toc-links {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px;
  max-height: 440px; overflow-y: auto; padding: 0 14px 14px;
}
.toc-links a {
  display: flex; align-items: center; min-height: 44px; padding: 9px 12px;
  text-decoration: none; color: #111; background: #fff; border: 1px solid var(--line);
  border-radius: 9px; font-size: .84rem; font-weight: 600; line-height: 1.35;
}
.toc-links a:hover { background: var(--brand-tint); border-color: var(--brand); }
@media (max-width: 640px) { .toc-links { grid-template-columns: 1fr; } }

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: .82rem; color: var(--ink-soft); margin: 14px 0 4px; }
.crumbs a { color: var(--ink-soft); }

/* ---------- disclaimer ---------- */
.disc {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius);
  padding: 13px 17px; margin: 18px 0; font-size: .86rem; color: #5c4a2e;
}

/* ---------- footer ---------- */
.site-footer { background: var(--brand-deep); color: #bdd8ca; margin-top: 54px; padding: 38px 0 0; font-size: .9rem; }
.site-footer a { color: #d9ece2; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; padding-bottom: 26px; }
.site-footer h4 { color: #fff; margin: 0 0 9px; font-size: .97rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 5px 0; }
.site-footer .cols p { font-size: .84rem; color: #9ec1af; }
@media (max-width: 880px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .site-footer .cols { grid-template-columns: 1fr; } }
.rg-bar { border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; padding-bottom: 20px; }
.rg-bar .row { display: flex; gap: 14px; align-items: flex-start; font-size: .8rem; color: #8fb3a2; }
.rg-bar a { color: #9fd8bc; }
.rg-bar b { color: #fff; }
.badge-18 {
  flex-shrink: 0; background: #fff; color: var(--brand-ink); font-family: var(--font-mono); font-weight: 600;
  border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: .8rem;
}

/* ---------- mobile above-the-fold: H1 + byline + toplist H2 + affiliate table ---------- */
@media (max-width: 720px) {
  .crumbs { display: none; }                      /* breadcrumbs off — fold budget */
  .hero { border-radius: 20px 20px 0 0; margin-top: 8px; padding: 16px 0 12px; }
  .hero::before { display: none; }
  .hero .wrap { gap: 0; }
  .hero-copy h1 { font-size: 1.32rem; margin: 0 0 6px; }
  .hero-copy .byline { font-size: .8rem; margin: 0; }
  .hero-copy p:not(.byline):not(.hero-kicker) { display: none; }  /* intro hidden; kicker stays */
  .hero-kicker { font-size: .62rem; margin-bottom: 6px !important; }
  .author-chip { margin-top: 8px; padding: 7px 12px; gap: 9px; font-size: .76rem; }
  .author-chip img { width: 30px; height: 30px; }
  .hero .trust-strip { display: none; }
  .feature-case { display: none; }                /* top-pick card duplicates toplist row 1 */
  main > .wrap > h2:first-of-type,
  main .wrap h2:first-of-type { margin-top: .9em; font-size: 1.22rem; }
  /* clamp the lead paragraph sitting between the H2 and the table */
  p:has(+ .toplist) {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; font-size: .88rem; margin: .3em 0 .6em;
  }
}
