/* Block Hand Bulletin — shared styles for bulletin.html and issue pages */
/* v152.4.86 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: light;
  --green-900: #0d2414;
  --green-800: #1a3820;
  --green-700: #1e4a2a;
  --green-600: #2f5d3a;
  --green-500: #3a7048;
  --green-400: #4e8f60;
  --green-200: #b8d9c0;
  --green-100: #dff0e4;
  --green-50:  #f0f8f2;
  --cream:     #faf8f3;
  --text-dark: #111c14;
  --text-mid:  #3a4d3e;
  --text-muted:#6b7d6f;
  --border:    #e0ebe3;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ─── SHARED HEADER ──────────────────────────────────────── */

.bh-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 37, 20, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.bh-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  height: 60px;
}

.bh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  flex-shrink: 0;
}

.bh-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.bh-brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: white;
}

.bh-header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.bh-header-nav a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color .15s, background .15s;
}

.bh-header-nav a:hover { color: white; background: rgba(255,255,255,.08); }
.bh-header-nav a.active { color: white; }

.bh-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--green-500);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}

.bh-header-cta:hover { background: var(--green-400); transform: translateY(-1px); }

/* ─── SHARED FOOTER ──────────────────────────────────────── */

.bh-footer {
  background: var(--green-900);
  padding: clamp(28px, 4vw, 44px) clamp(16px, 4vw, 40px);
  text-align: center;
}

.bh-footer-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.bh-footer-links a {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: color .15s, background .15s;
}

.bh-footer-links a:hover { color: white; background: rgba(255,255,255,.07); }

.bh-footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,.3);
  font-weight: 500;
}

.bh-footer-copy a {
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color .15s;
}

.bh-footer-copy a:hover { color: rgba(255,255,255,.8); }

/* ─── BULLETIN INDEX — HERO ──────────────────────────────── */

.bh-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--green-900) 0%, var(--green-700) 55%, var(--green-500) 100%);
  padding: clamp(64px, 10vw, 120px) clamp(20px, 5vw, 60px) clamp(72px, 11vw, 136px);
  text-align: center;
}

.bh-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 0%, rgba(255,255,255,.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 80% 100%, rgba(0,0,0,.15) 0%, transparent 60%);
  pointer-events: none;
}

.bh-hero-inner {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.bh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
  margin-bottom: 22px;
}

.bh-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5fe08a;
  box-shadow: 0 0 6px #5fe08a;
  flex-shrink: 0;
}

.bh-hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.0;
  color: white;
  margin-bottom: 20px;
}

.bh-hero-sub {
  font-size: clamp(15px, 2vw, 17px);
  color: rgba(255,255,255,.72);
  line-height: 1.65;
  margin-bottom: 40px;
  font-weight: 400;
}

.bh-subscribe-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto 14px;
}

.bh-subscribe-input {
  flex: 1;
  padding: 13px 16px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 14px;
  font-family: var(--font);
  font-weight: 500;
  outline: none;
  transition: background .15s, border-color .15s;
  min-width: 0;
}

.bh-subscribe-input::placeholder { color: rgba(255,255,255,.42); }
.bh-subscribe-input:focus {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.42);
}

.bh-subscribe-btn {
  padding: 13px 20px;
  background: white;
  color: var(--green-700);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .1s;
}

.bh-subscribe-btn:hover { background: #e8f7ee; transform: translateY(-1px); }

.bh-form-note {
  font-size: 12px;
  color: rgba(255,255,255,.38);
  font-weight: 500;
}

.bh-hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}

.bh-hero-wave svg { display: block; width: 100%; }

/* ─── BULLETIN INDEX — STATS ─────────────────────────────── */

.bh-stats {
  background: white;
  border-bottom: 1px solid var(--border);
}

.bh-stats-inner {
  display: flex;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto;
}

.bh-stat {
  flex: 1;
  text-align: center;
  padding: 22px 16px;
  border-right: 1px solid var(--border);
}

.bh-stat:last-child { border-right: none; }

.bh-stat-value {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--green-700);
  line-height: 1;
  margin-bottom: 4px;
}

.bh-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

/* ─── BULLETIN INDEX — ARCHIVE ───────────────────────────── */

.bh-archive {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 32px);
}

.bh-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.bh-section-title {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-dark);
}

.bh-section-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.bh-issue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bh-issue-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}

.bh-issue-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--green-200);
}

.bh-issue-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(145deg, var(--green-100), #c9e8d3);
  border-radius: 14px;
  flex-shrink: 0;
}

.bh-issue-badge-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--green-600);
  line-height: 1;
}

.bh-issue-badge-num {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--green-700);
  line-height: 1.1;
}

.bh-issue-body { min-width: 0; }

.bh-issue-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-dark);
  margin-bottom: 5px;
  line-height: 1.3;
}

.bh-issue-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bh-issue-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.bh-issue-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.bh-issue-arrow {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-50);
  border-radius: 8px;
  color: var(--green-500);
  font-size: 14px;
  transition: background .15s, color .15s, transform .15s;
}

.bh-issue-card:hover .bh-issue-arrow {
  background: var(--green-600);
  color: white;
  transform: translateX(2px);
}

/* ─── BULLETIN INDEX — ABOUT ─────────────────────────────── */

.bh-about {
  background: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.bh-about-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 32px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.bh-about-copy h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-dark);
  margin-bottom: 14px;
  line-height: 1.15;
}

.bh-about-copy p {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 24px;
}

.bh-about-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--green-700);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: background .15s, transform .1s;
}

.bh-about-cta:hover { background: var(--green-600); transform: translateY(-1px); }

.bh-about-card {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.bh-about-card-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--green-500);
  margin-bottom: 10px;
}

.bh-about-card-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.bh-about-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.bh-about-card-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

/* ─── ISSUE PAGE — HERO ──────────────────────────────────── */

.issue-hero {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  color: white;
  padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 40px) clamp(32px, 5vw, 60px);
  text-align: center;
}

.issue-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.issue-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
}

.issue-date {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  font-weight: 700;
}

.issue-hero h1 {
  font-size: clamp(26px, 4.5vw, 50px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 16px;
  color: white;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.issue-hero-sub {
  font-size: clamp(14px, 1.8vw, 17px);
  color: rgba(255,255,255,.7);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ─── ISSUE PAGE — BODY ──────────────────────────────────── */

.issue-body {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 60px) clamp(16px, 4vw, 32px);
}

.issue-section {
  margin-bottom: 48px;
}

.issue-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 12px;
}

.issue-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--green-100);
}

.issue-section h2 {
  font-size: clamp(20px, 2.8vw, 26px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin: 0 0 14px;
  line-height: 1.2;
}

.issue-section p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-mid);
  margin: 0 0 16px;
}

.issue-section p:last-child { margin-bottom: 0; }

.issue-section ul, .issue-section ol {
  padding-left: 22px;
  margin: 0 0 16px;
}

.issue-section li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-mid);
  margin-bottom: 8px;
}

/* v152.4.309 — screenshot figures in guides. The guide markup shipped six
   <figure> blocks in v300 but no styling ever existed for them, so the images
   would have rendered raw with the caption as plain body text. `height: auto`
   is load-bearing: the <img> tags carry intrinsic width/height attributes to
   reserve space and stop layout shift, and without this the max-width:100%
   rule would squash them to the literal pixel height on narrow screens. */
.issue-section figure {
  margin: 22px 0;
}
.issue-section figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 14px;
  background: #fff;
}
/* v152.4.316 — end-of-page install CTA for guides and bulletin issues.
   A reader who has just finished a guide is the warmest audience we get, so
   this sits between the article and the pagination. Browser-first, store
   second, deliberately: guides get read on desktop where an App Store link is
   useless. NO PRICING COPY anywhere in here — the app presents as free until
   IAP ships (App Store 2.1(b), v294). */
.guide-cta {
  margin: 34px 0 8px;
  padding: 26px clamp(18px, 4vw, 32px);
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 18px;
  background: #f4f8f4;
}
.guide-cta-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green-600, #2f6f3e);
}
.guide-cta h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.3; }
.guide-cta p { margin: 0 0 14px; color: #475467; line-height: 1.6; }
.guide-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.guide-cta-primary {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--green-700, #2f5d3a);
  color: #fff !important;
  font-weight: 900;
  text-decoration: none;
}
.guide-cta-primary:hover { background: var(--green-600, #2f6f3e); color: #fff !important; }
.guide-cta .store-badge { display: inline-block; line-height: 0; border-radius: 8px; }
.guide-cta .store-badge svg { height: 44px; width: auto; display: block; }
.guide-cta .store-badge:hover { opacity: .9; }
.guide-cta-note { margin: 12px 0 0 !important; font-size: 13px; color: #667085; }
.guide-cta .sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (max-width: 600px) {
  .guide-cta-actions { flex-direction: column; align-items: stretch; }
  .guide-cta-primary { text-align: center; }
  .guide-cta .store-badge svg { height: 40px; }
}

/* v152.4.310 — data tables in guides (first used for DairyNZ's milk volumes by
   breed). bulletin.css had no table rules at all, so this would otherwise
   render as a bare default table. Wrapped in overflow-x so a three-column
   table doesn't blow out the layout on a phone. */
.issue-table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}
.issue-table th,
.issue-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line, #e4e7ec);
  white-space: nowrap;
}
.issue-table th {
  font-weight: 900;
  color: var(--text-dark, #1d2939);
  background: #f8faf8;
}
.issue-table tbody tr:last-child td { border-bottom: none; }

.issue-section figcaption {
  margin-top: 10px;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.issue-section strong { color: var(--text-dark); }
.issue-section a { color: var(--green-600); font-weight: 700; }
.issue-section a:hover { color: var(--green-700); }

/* ─── ISSUE PAGE — TIP BOX ───────────────────────────────── */

.issue-tip-box {
  background: linear-gradient(135deg, var(--green-100), var(--green-50));
  border: 1px solid var(--green-200);
  border-left: 4px solid var(--green-600);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 20px 0;
}

.issue-tip-box-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 8px;
}

.issue-tip-box p {
  font-size: 15px;
  margin: 0;
  color: var(--green-800);
}

/* ─── ISSUE PAGE — SUBSCRIBE STRIP ──────────────────────── */

.issue-subscribe {
  background: linear-gradient(135deg, var(--green-100), var(--green-50));
  border: 1px solid var(--green-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  margin-top: 48px;
}

.issue-subscribe h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin: 0 0 8px;
}

.issue-subscribe p {
  font-size: 14px;
  color: var(--text-mid);
  margin: 0 0 18px;
  line-height: 1.5;
}

.issue-subscribe-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.issue-subscribe-form input[type="email"] {
  flex: 1 1 200px;
  max-width: 280px;
  padding: 11px 16px;
  border: 1px solid var(--green-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-dark);
  background: white;
  outline: none;
}

.issue-subscribe-form input:focus { border-color: var(--green-600); }

.issue-subscribe-btn {
  padding: 11px 20px;
  background: var(--green-600);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  transition: background .12s;
}

.issue-subscribe-btn:hover { background: var(--green-700); }

/* ─── ISSUE PAGE — PAGINATION ────────────────────────────── */

.issue-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 32px) 48px;
  gap: 16px;
}

.issue-pagination a {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  color: var(--green-600);
  text-decoration: none;
  background: white;
  transition: background .12s, border-color .12s;
}

.issue-pagination a:hover { background: var(--green-50); border-color: var(--green-200); }

.issue-pagination-all {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
}

.issue-pagination-all:hover { color: var(--green-600); }

/* ─── RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 640px) {
  .bh-header-nav { display: none; }
  .bh-subscribe-form { flex-direction: column; }
  .bh-subscribe-btn { width: 100%; }
  .bh-stats-inner { flex-wrap: wrap; }
  .bh-stat { flex: 1 1 calc(50% - 1px); }
  .bh-issue-card { grid-template-columns: 52px 1fr; }
  .bh-issue-meta { display: none; }
  .bh-about-inner { grid-template-columns: 1fr; }
  .bh-about-card { display: none; }
  .issue-subscribe-form { flex-direction: column; align-items: center; }
}
