/* Community Impact pages (/community/...). Loaded only there, after main.css.
   Same ink / cream / gold system; each campaign adds one accent colour (--cm) for its own identity:
   DuckSanta = Christmas red, DucksGiving = pumpkin. Gold stays the action colour everywhere. */

.cm { --cm: var(--gold); --cm-glow: rgba(255, 193, 7, 0.22); }
.cm-theme-santa { --cm: #d8262f; --cm-glow: rgba(216, 38, 47, 0.30); }
.cm-theme-ducksgiving { --cm: #e8761f; --cm-glow: rgba(232, 118, 31, 0.28); }
.cm [hidden] { display: none !important; }
.cm code { font-family: var(--font-display); font-weight: 900; letter-spacing: 0.06em; font-size: 1.08em; color: var(--ink); background: rgba(255, 193, 7, 0.28); padding: 1px 6px; border-radius: 2px; }

/* ---- Hero ---- */
.cm-hero .wrap { padding-bottom: 0; }
.cm-hero-grid { display: grid; gap: 8px; align-items: end; }
.cm-hero-copy { padding-bottom: 52px; align-self: start; }
.cm-hero-ducks, .cm-hero-art { align-self: end; }
.cm-hero .lede { max-width: 50ch; }
.cm-hero::after {   /* snow: the same dot field as the campaign flyers */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.16;
  background-image: radial-gradient(circle, var(--gold) 1.6px, transparent 2.2px), radial-gradient(circle, var(--on-dark) 1.1px, transparent 1.7px);
  background-size: 110px 110px, 64px 64px; background-position: 18px 26px, 50px 4px;
}
.cm-hero-ducks { position: relative; height: 260px; justify-self: center; width: min(100%, 420px); }
.cm-duck { position: absolute; bottom: 0; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }
.cm-duck--plain { width: 50%; left: 2%; }
.cm-duck--santa { width: 58%; right: 0; }
.cm-hero-ducks::before { content: ""; position: absolute; inset: 10% 0 0; background: radial-gradient(closest-side, rgba(255, 193, 7, 0.26), transparent); }
.cm-hero-art { position: relative; justify-self: center; width: min(78%, 380px); }
.cm-hero-art::before { content: ""; position: absolute; inset: 4% -12% -4%; background: radial-gradient(closest-side, var(--cm-glow), transparent); }
.cm-hero-mascot { position: relative; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }
.cm-hero--campaign { border-bottom: 6px solid var(--cm); }
.cm-hero-scrawl { display: block; margin-top: 6px; font-size: clamp(26px, 3vw, 34px); }
.cm-hero--campaign h1 { margin-top: 2px; }
.cm-hero-note { margin-top: 22px; font-weight: 700; color: var(--on-dark); border-left: 4px solid var(--cm); padding: 4px 0 4px 14px; max-width: 52ch; }

@media (min-width: 900px) {
  .cm-hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 32px; }
  .cm-hero-copy { padding-bottom: 72px; }
  .cm-hero-ducks { height: 400px; width: 100%; max-width: 460px; }
  .cm-hero-art { width: 100%; max-width: 360px; }
}
@media (prefers-reduced-motion: no-preference) {
  .cm-duck, .cm-hero-mascot { animation: cm-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .cm-duck--santa { animation-delay: 0.12s; }
  @keyframes cm-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

/* ---- Status line ---- */
.cm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-weight: 700; font-size: 14.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); }
.on-dark .cm-meta { color: var(--on-dark-soft); }
.cm-hero .cm-meta { margin-top: 8px; }
.cm-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1.5px solid currentColor; border-radius: 2px; font-size: 12.5px; letter-spacing: 0.12em; line-height: 1; }
.cm-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
[data-status="active"] .cm-badge { background: var(--gold); color: var(--ink); border-color: var(--ink); }
[data-status="active"] .cm-badge::before { background: #1f9d55; }
[data-status="upcoming"] .cm-badge { border-style: dashed; }

/* ---- Impact numbers ---- */
.cm-impact { padding-block: 64px; background: var(--paper); border-bottom: 1px solid var(--line); }
.cm-impact-head { max-width: 640px; margin-bottom: 30px; }
.cm-impact-head p { margin-top: 12px; color: var(--ink-faint); }
.cm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.cm-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 20px; background: var(--paper-raised); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--gold); }
.cm-tile-n { font-family: var(--font-display); font-weight: 900; font-size: clamp(44px, 5vw, 64px); line-height: 0.9; color: var(--ink); }
.cm-tile-l { font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: 0.06em; font-size: 14.5px; }
.cm-tile-s { font-size: 14px; line-height: 1.4; color: var(--ink-faint); }
.cm-tiles--tight { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* ---- Initiative cards ---- */
.cm-list .h2-display { margin-bottom: 26px; }
.cm-list-sub { margin: -14px 0 26px; color: var(--ink-faint); }
.cm-grid { display: grid; gap: 22px; }
@media (min-width: 900px) {
  .cm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-grid > .cm-card:only-child { grid-column: 1 / -1; max-width: 860px; grid-template-columns: 200px 1fr; }
}
.cm-card { display: grid; grid-template-columns: 112px 1fr; background: var(--paper-raised); border: 2px solid var(--ink); border-top: 8px solid var(--cm); min-width: 0; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.cm-card:hover { transform: translateY(-3px); box-shadow: 6px 6px 0 var(--ink); }
.cm-card-art { position: relative; background: var(--ink); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.cm-card-art::before { content: ""; position: absolute; inset: 20% -30% -10%; background: radial-gradient(closest-side, var(--cm-glow), transparent); }
.cm-card-mascot { position: relative; width: 92%; height: auto; margin-bottom: -4px; }
.cm-card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cm-card-title { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(30px, 3.6vw, 40px); line-height: 0.92; }
.cm-card-title a { text-decoration: none; color: var(--ink); }
.cm-card-title a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; }
.cm-card-title span { color: var(--cm); }
.cm-card-text { color: var(--ink-soft); }
.cm-card-mech { font-size: 15.5px; color: var(--ink-soft); }
.cm-card-mech b { color: var(--ink); }
.cm-card-actions { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
@media (min-width: 560px) { .cm-card { grid-template-columns: 150px 1fr; } }
.cm-year + .cm-year { margin-top: 36px; }
.cm-year-h { font-family: var(--font-display); font-weight: 900; font-size: 30px; color: var(--ink); margin-bottom: 14px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }

.cm-result { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; color: var(--ink); }
.cm-check { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; background: var(--gold); border: 2px solid var(--ink); position: relative; }
.cm-check::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.cm-result--soon { color: var(--ink-faint); font-style: italic; font-weight: 600; }

/* ---- How it works ---- */
.cm-steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 640px) { .cm-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cm-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cm-step { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--paper-raised); border: 1px solid var(--line); border-top: 4px solid var(--ink); }
.cm-step-n { font-family: var(--font-display); font-weight: 900; font-size: 46px; line-height: 0.8; color: var(--cm); margin-bottom: 6px; }
.cm-step b { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 23px; line-height: 1; color: var(--ink); }
.cm-step span:last-child { color: var(--ink-soft); font-size: 16px; line-height: 1.5; }
.cm-how-foot { margin-top: 26px; display: grid; gap: 22px; align-items: start; }
@media (min-width: 900px) { .cm-how-foot { grid-template-columns: 1.4fr 1fr; } }
.cm-terms { display: flex; flex-direction: column; gap: 8px; font-size: 16px; color: var(--ink-soft); max-width: 64ch; }
.cm-terms b { color: var(--ink); }
.cm-code { padding: 22px 22px 24px; border: 3px dashed var(--ink); background: var(--gold); text-align: center; }
.cm-code-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; font-size: 13px; color: var(--ink); }
.cm-code-value { font-family: var(--font-display); font-weight: 900; font-size: clamp(44px, 6vw, 64px); line-height: 1; color: var(--ink); margin: 6px 0 14px; letter-spacing: 0.04em; }
.cm-code .btn-gold { background: var(--ink); color: var(--gold); box-shadow: 4px 4px 0 var(--paper-raised); }
.cm-code-note { margin-top: 12px; font-size: 14px; color: var(--ink); }

/* ---- Story ---- */
.cm-story-grid { display: grid; gap: 26px; }
@media (min-width: 900px) { .cm-story-grid { grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; } }
.cm-story-h { font-size: clamp(40px, 6vw, 76px); }
.cm-story .mega .accent { color: var(--cm); }
.cm-story .copy p.cm-sign { font-family: var(--font-script); font-size: 26px; color: var(--ink); transform: rotate(-2deg); margin-top: 22px; }

/* ---- Results ---- */
.cm-results .h2-display { margin-bottom: 24px; }
.cm-results-grid { display: grid; gap: 30px; align-items: start; }
@media (min-width: 900px) { .cm-results-grid { grid-template-columns: 1fr 320px; gap: 48px; } }
.cm-results-text { margin-top: 22px; font-size: 18px; line-height: 1.65; color: var(--ink-soft); max-width: 60ch; }
.cm-math { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.cm-math span { font-family: var(--font-script); font-size: 26px; color: var(--ink); background: var(--paper-raised); border: 1px solid var(--line); padding: 2px 14px; transform: rotate(-1.5deg); }
.cm-proof { margin: 0; background: var(--paper-raised); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--gold); padding: 10px; transform: rotate(1.2deg); max-width: 320px; justify-self: center; }
.cm-proof img { width: 100%; height: auto; }
.cm-proof figcaption, .cm-gallery figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-faint); line-height: 1.4; }
.cm-soon { max-width: 640px; padding: 26px 26px 28px; border: 3px dashed var(--cm); background: var(--paper-raised); }
.cm-soon-h { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(30px, 4vw, 44px); line-height: 0.95; color: var(--ink); margin-bottom: 10px; }
.cm-soon p:last-child { color: var(--ink-soft); }

/* ---- Gallery and earlier years ---- */
.cm-gallery .h2-display { margin-bottom: 24px; }
.cm-gallery-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 420px)); }
.cm-gallery figure { margin: 0; }
.cm-gallery img { width: 100%; height: auto; border: 2px solid var(--ink); }
.cm-edition-list { margin-top: 22px; border-top: 2px solid var(--ink); }
.cm-edition-list li { display: grid; gap: 4px 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .cm-edition-list li { grid-template-columns: 80px 200px 1fr; align-items: center; } }
.cm-edition-list b { font-family: var(--font-display); font-size: 28px; color: var(--ink); }

/* ---- Partnership invite ---- */
.cm-partner-grid { display: grid; gap: 26px; }
@media (min-width: 900px) { .cm-partner-grid { grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: end; } }
.cm-partner .mega { font-size: clamp(36px, 5.4vw, 68px); }
.cm-partner-copy p { color: var(--on-dark-soft); font-size: 17.5px; line-height: 1.7; margin-bottom: 22px; max-width: 48ch; }

/* ---- Phones ---- */
@media (max-width: 559px) {
  .cm-hero-copy { padding-bottom: 28px; }
  .cm-hero-ducks { height: 210px; width: min(100%, 320px); }
  .cm-hero-art { width: min(56%, 230px); }
  .cm-card { grid-template-columns: 1fr; }
  .cm-card-art { height: 150px; }
  .cm-card-mascot { width: auto; height: 140px; }
}
.cm-story .copy p.cm-sign small { display: block; font-family: var(--font-body, 'Barlow', sans-serif); font-size: 15px; font-style: italic; color: var(--muted, #555); margin-top: 4px; transform: rotate(2deg); }
