/* Farm theme: the light Forge & Pray farm look for the public site.
   _Layout puts .farm-theme on <body> for every page outside /forge-control and /setup and loads this
   file after the page stylesheets, so Forge Control keeps its dark tools look. The block designer and
   the news editor put the class on their preview frames, so previews match the public page.

   Markup is CMS-driven, so this file only re-skins: tokens first, then the public components and
   CMS elements whose old rules carry fixed dark colors. Variant names (amber, cyan, rune, ember …)
   are stored in CMS content, so they keep their names and get farm colors. Elements that editors may
   colour themselves (styled text, promo, timer) sit on a dark "chalkboard" so colours picked for the
   old dark site stay readable. */

/* Nunito, served from wwwroot/fonts (SIL OFL, licence next to the files): the rounded titles now look
   the same on Windows and Android as on Apple devices, still with no third-party request and nothing that
   needs consent. Variable font, so one file per script covers every weight from 200 to 1000. */
@font-face {
  font-display: swap;
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  src: url("../fonts/nunito/nunito-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-display: swap;
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  src: url("../fonts/nunito/nunito-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.farm-theme {
  color-scheme: light;

  /* Meadow and sky */
  --bg: #f2f6ea;
  --sky: #e2f1f8;
  --panel: #ffffff;
  --panel-soft: #e5eed8;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-hover: rgba(54, 112, 43, 0.06);

  /* Ink */
  --text: #1e3a2a;
  --text-soft: #34503f;
  --muted: #586c5e;
  --line: rgba(30, 58, 42, 0.14);
  --line-strong: rgba(30, 58, 42, 0.32);

  /* Pond blue for links and focus, meadow green for small headings, sunflower for the main action */
  --accent: #1d6a9e;
  --accent-strong: #155680;
  --accent-rgb: 29, 106, 158;
  --on-accent: #ffffff;
  --meadow: #36702b;
  --meadow-rgb: 54, 112, 43;
  --sun: #f5c431;
  --sun-soft: #ffe27a;
  --sun-deep: #c79a12;
  --sun-rgb: 245, 196, 49;
  --sun-ink: #5e4200;          /* text on sunflower tints */
  --barn: #b5392c;

  /* States, darkened so they read on light backgrounds */
  --danger: #b42318;
  --danger-rgb: 180, 35, 24;
  --success: #2e7d32;
  --success-rgb: 46, 125, 50;
  --warning: #8f5a00;
  --warning-rgb: 143, 90, 0;
  --gold: #9a7410;
  --gold-rgb: 154, 116, 16;
  --live: #c2410c;
  --live-rgb: 194, 65, 12;

  /* Chalkboard: the dark board for editor-coloured elements and the footer */
  --chalk: #23432f;
  --chalk-text: #f2f6ea;
  --chalk-muted: #bccdb8;

  /* Aliases and derived tokens are resolved where they are declared, so they are declared again here */
  --fg: var(--text);
  --border: var(--line);
  --forge-gold: var(--warning);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 0 rgba(30, 58, 42, 0.05), 0 14px 32px -20px rgba(30, 58, 42, 0.45);
  --focus-ring: 0 0 0 3px rgba(var(--accent-rgb), 0.35);

  /* Rounded titles: our own Nunito first so every device gets the same face, system rounded faces as fallback
     (the files are local, so offline and consent stay as they were). */
  --font-display: "Nunito", ui-rounded, "SF Pro Rounded", "Varela Round", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --ui-color-canvas: var(--bg);
  --ui-color-surface: var(--surface);
  --ui-color-surface-muted: var(--panel-soft);
  --ui-color-text: var(--text);
  --ui-color-text-muted: var(--muted);
  --ui-color-border: var(--line);
  --ui-color-accent: var(--accent);
  --ui-color-accent-strong: var(--accent-strong);
  --ui-color-on-accent: var(--on-accent);
  --ui-color-success-bg: rgba(var(--success-rgb), 0.1);
  --ui-color-success-border: rgba(var(--success-rgb), 0.3);
  --ui-color-success-text: var(--success);
  --ui-color-warning-bg: rgba(var(--warning-rgb), 0.1);
  --ui-color-warning-border: rgba(var(--warning-rgb), 0.3);
  --ui-color-warning-text: var(--warning);
  --ui-color-danger-bg: rgba(var(--danger-rgb), 0.08);
  --ui-color-danger-border: rgba(var(--danger-rgb), 0.3);
  --ui-color-danger-text: var(--danger);
  --ui-color-info-bg: rgba(var(--accent-rgb), 0.08);
  --ui-color-info-border: rgba(var(--accent-rgb), 0.3);
  --ui-color-info-text: var(--accent);
  --ui-font-family: var(--font-sans);
}

/* ── Page canvas and type ─────────────────────────────────────────────── */
body.farm-theme {
  background: linear-gradient(180deg, var(--sky) 0, var(--bg) 26rem) no-repeat, var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

body.farm-theme.has-page-bg::before {
  opacity: 0.08;
}

.farm-theme :is(h1, h2, h3, .page-title, .landing-section__title, .cms-block__title, .cms-element--cta__title,
  .footer-page__title, .feature-card__title, .nav-brand, .footer-brand__name) {
  font-family: var(--font-display);
}

.farm-theme :is(h1, h2, h3) {
  color: var(--text);
}

/* Small headings above titles: sentence case in meadow green instead of tracked capitals */
.farm-theme :is(.page-eyebrow, .landing-section__eyebrow, .landing-countdown__eyebrow) {
  color: var(--meadow);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.farm-theme .tag {
  --badge-rgb: 88, 108, 94;
  letter-spacing: 0.01em;
  text-transform: none;
}

/* ── Buttons: a sunflower game button you can press ───────────────────── */
.farm-theme .btn {
  border-radius: var(--radius);
}

.farm-theme .btn--primary,
.farm-theme .landing .cms-block--hero .btn--primary {
  background: var(--sun);
  border-color: transparent;
  box-shadow: 0 4px 0 var(--sun-deep);
  color: var(--text);
  transition: background-color 0.14s, box-shadow 0.1s, transform 0.1s;
}

.farm-theme .btn--primary:hover,
.farm-theme .landing .cms-block--hero .btn--primary:hover {
  background: var(--sun-soft);
  color: var(--text);
}

.farm-theme .btn--primary:active {
  box-shadow: 0 1px 0 var(--sun-deep);
  transform: translateY(3px);
}

.farm-theme .btn--secondary,
.farm-theme .btn--ghost,
.farm-theme .landing .cms-block--hero .btn--ghost,
.farm-theme .cookie-consent__actions .btn--ghost {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--text);
}

.farm-theme .btn--secondary:hover,
.farm-theme .btn--ghost:hover,
.farm-theme .cookie-consent__actions .btn--ghost:hover {
  background: var(--panel-soft);
  border-color: var(--meadow);
  color: var(--text);
}

/* ── Navigation ───────────────────────────────────────────────────────── */
.farm-theme .site-nav {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--line);
}

.farm-theme .nav-brand {
  color: var(--text);
  font-weight: 800;
}

.farm-theme .nav-link {
  border-radius: var(--radius-pill);
  color: var(--text-soft);
}

.farm-theme .nav-link:hover {
  background: var(--surface-hover);
  border-color: var(--line);
  color: var(--text);
}

.farm-theme .nav-link--active {
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 700;
}

.farm-theme .nav-link--danger {
  color: var(--danger);
}

.farm-theme .nav-link--admin,
.farm-theme .nav-link--admin:hover {
  border-color: var(--line-strong);
}

.farm-theme .nav-link--cta {
  border-color: rgba(var(--accent-rgb), 0.45);
}

.farm-theme .nav-user {
  color: var(--muted);
}

@media (max-width: 860px) {
  .farm-theme .nav-menu {
    background: var(--panel);
    box-shadow: var(--shadow);
  }
}

/* ── Footer: the dark soil band under the meadow ──────────────────────── */
.farm-theme .site-footer {
  --text: var(--chalk-text);
  --muted: var(--chalk-muted);
  --line: rgba(242, 246, 234, 0.16);
  --accent: var(--sun-soft);
  background: var(--chalk);
  border-top: 0;
  color: var(--muted);
}

/* Rolling hills instead of a hard edge: a row of soil-coloured bumps sits on top of the footer.
   Pure gradients, so no image request and nothing for the CSP to allow. */
.farm-theme .site-footer {
  margin-top: 28px;
  position: relative;
}

.farm-theme .site-footer::before {
  background:
    radial-gradient(ellipse 50% 100% at 50% 100%, var(--chalk) 98%, transparent 100%) 0 100% / 180px 26px repeat-x,
    radial-gradient(ellipse 50% 100% at 50% 100%, #2c5239 98%, transparent 100%) 90px 100% / 180px 16px repeat-x;
  content: "";
  height: 26px;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: -25px;
}

.farm-theme .footer-brand__eyebrow {
  color: #a8d98e;
  letter-spacing: 0.02em;
  text-transform: none;
}

.farm-theme .footer-link {
  border-color: rgba(242, 246, 234, 0.16);
  color: #d5e3d0;
}

.farm-theme .footer-link:hover {
  background: rgba(242, 246, 234, 0.06);
  border-color: rgba(255, 226, 122, 0.45);
  color: #ffffff;
}

.farm-theme .footer-bottom {
  border-top-color: rgba(242, 246, 234, 0.12);
}

/* ── Cards and forms ──────────────────────────────────────────────────── */
.farm-theme :is(.feature-card, .landing-step, .landing-link-card, .landing-news-card, .landing-faq-card,
  .landing-guide-card, .guide-chapter, .content-section-public, .content-card, .auth-card) {
  background: var(--panel);
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.farm-theme .landing .feature-card,
.farm-theme .landing-step,
.farm-theme .landing-link-card,
.farm-theme .landing-news-card {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.farm-theme .landing .feature-card:hover,
.farm-theme .landing-link-card:hover,
.farm-theme .landing-news-card:hover {
  background: var(--panel);
  border-color: rgba(var(--meadow-rgb), 0.45);
  box-shadow: 0 1px 0 rgba(30, 58, 42, 0.05), 0 22px 40px -22px rgba(30, 58, 42, 0.5);
  transform: translateY(-3px);
}

/* news cards had no hover before; now they lift like the other cards */
.farm-theme .landing-news-card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* link cards: a small sunflower arrow tells you the whole card is clickable */
.farm-theme .landing-link-card strong::after {
  color: var(--sun-deep);
  content: "→";
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.18s ease;
}

.farm-theme .landing-link-card:hover strong::after {
  transform: translateX(3px);
}

/* a bit more air between the home page sections */
.farm-theme .landing-section {
  margin-bottom: 56px;
}

/* the last section already gets .landing's bottom padding plus the footer's new top margin;
   without this the gap above the footer grew to ~180px */
.farm-theme .landing-section:last-child {
  margin-bottom: 0;
}

.farm-theme .landing-section__intro {
  margin-bottom: 22px;
}

@media (prefers-reduced-motion: reduce) {
  .farm-theme :is(.landing .feature-card, .landing-link-card, .landing-news-card, .landing-link-card strong::after) {
    transition: none !important;
  }

  .farm-theme :is(.landing .feature-card, .landing-link-card, .landing-news-card):hover,
  .farm-theme .landing-link-card:hover strong::after {
    transform: none;
  }
}

.farm-theme .landing .feature-card::before {
  background: linear-gradient(180deg, var(--sun), var(--meadow));
  opacity: 1;
}

.farm-theme :is(.landing-step h3, .landing-news-card h3, .landing-faq-card h3, .landing-guide-card h3,
  .landing-link-card strong, .landing-section__title, .landing-countdown h2) {
  color: var(--text);
}

.farm-theme :is(.landing-countdown p, .landing-section__lead, .landing-step p, .landing-link-card span,
  .landing-news-card p, .landing-faq-card p, .landing-guide-card p, .content-card li) {
  color: var(--text-soft);
}

.farm-theme .landing-step__num {
  background: var(--sun);
  color: var(--text);
}

.farm-theme .landing-inline-link {
  color: var(--accent);
}

.farm-theme .landing-news-card__meta {
  color: var(--muted);
  letter-spacing: 0.01em;
  text-transform: none;
}

.farm-theme .guide-chapter__num {
  background: rgba(var(--sun-rgb), 0.25);
  border-color: rgba(var(--sun-rgb), 0.6);
  color: var(--sun-ink);
}

.farm-theme .guide-category-links__item:hover {
  border-color: rgba(var(--meadow-rgb), 0.45);
}

.farm-theme .form-input {
  background: var(--panel);
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
}

.farm-theme .form-input:focus {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.farm-theme .faq-question:hover {
  background: var(--surface-hover);
}

/* ── Landing ──────────────────────────────────────────────────────────── */
.farm-theme .landing::before {
  animation: none;
  background:
    radial-gradient(circle at 86% 4%, rgba(var(--sun-rgb), 0.3), transparent 24rem),
    radial-gradient(circle at 8% 12%, rgba(169, 219, 242, 0.5), transparent 28rem);
}

.farm-theme .landing .cms-block--hero .page-eyebrow {
  color: var(--meadow);
}

.farm-theme .landing .cms-block--hero .page-title {
  color: var(--text);
  font-size: clamp(2.8rem, 7.5vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

.farm-theme .landing .cms-block--hero .page-subtitle {
  color: var(--text-soft);
}

.farm-theme .landing .cms-block--cards {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line);
  box-shadow: none;
}

.farm-theme .landing-countdown {
  background:
    radial-gradient(circle at 14% 10%, rgba(var(--sun-rgb), 0.22), transparent 22rem),
    var(--panel);
  border-color: rgba(var(--sun-rgb), 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.farm-theme .landing-countdown::before {
  background: linear-gradient(90deg, var(--sun), var(--meadow), var(--accent));
}

.farm-theme .landing-countdown__unit {
  background: var(--panel-soft);
  border-color: var(--line);
}

.farm-theme .landing-countdown__unit strong {
  color: var(--text);
  font-family: var(--font-display);
}

.farm-theme .landing-countdown__unit span {
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ── Hero scene: the CMS hero's forge drawing, repainted as a farm in daylight ──
   The markup is fixed by the hero partial (halo, stars, mountains, roof, fire, anvil, smoke, blade,
   embers), so each piece takes a new role: sun glow, sky with sun and clouds, hills, barn, barn door,
   fence with a hay bale, drifting clouds, (hidden), meadow flowers. The drifting clouds are the only
   ambient motion; reduced motion and narrow screens stop them through the rules in the page files. */
.farm-theme .landing .cms-hero-scene__halo {
  animation: none;
  /* the blur got cut off at the scene's clipping edge and left a visible rectangle; the soft gradient is enough */
  filter: none;
  background: radial-gradient(circle, rgba(var(--sun-rgb), 0.38), transparent 62%);
}

.farm-theme .landing .cms-hero-scene__window {
  animation: none;
  background: linear-gradient(180deg, #a9dbf2 0%, #dcf0f8 60%, #7fbd5d 60%, #5c9c43 100%);
  border: 6px solid #ffffff;
  border-radius: 28px;
  box-shadow: 0 2px 0 rgba(30, 58, 42, 0.06), 0 30px 60px -28px rgba(30, 58, 42, 0.55);
}

.farm-theme .cms-hero-scene__stars {
  background:
    radial-gradient(circle at 76% 14%, #ffe27a 0 30px, rgba(255, 226, 122, 0.4) 31px 46px, transparent 47px),
    radial-gradient(ellipse 46px 16px at 22% 18%, #ffffff 98%, transparent),
    radial-gradient(ellipse 30px 14px at 30% 15%, #ffffff 98%, transparent),
    radial-gradient(ellipse 40px 13px at 58% 30%, rgba(255, 255, 255, 0.9) 98%, transparent);
  opacity: 1;
}

.farm-theme .cms-hero-scene__mountain {
  background: #8cc66b;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  bottom: 39%;
  clip-path: none;
  height: 22%;
  width: 78%;
}

.farm-theme .cms-hero-scene__mountain--back {
  left: -18%;
  opacity: 1;
}

.farm-theme .cms-hero-scene__mountain--front {
  background: #6fae4f;
  bottom: 39%;
  height: 16%;
  right: -22%;
  width: 82%;
}

/* the page files never made the forge group absolute, so its bottom offset did nothing; the barn needs it */
.farm-theme .cms-hero-scene__forge {
  bottom: 22%;
  position: absolute;
}

/* barn: gambrel silhouette with a white hayloft window */
.farm-theme .cms-hero-scene__roof {
  background: linear-gradient(180deg, #c2473a, var(--barn) 60%, #9d3025);
  clip-path: polygon(50% 0, 86% 20%, 100% 46%, 100% 100%, 0 100%, 0 46%, 14% 20%);
}

.farm-theme .cms-hero-scene__roof::before {
  background:
    linear-gradient(#ffffff, #ffffff) center / 3px 100% no-repeat,
    linear-gradient(#ffffff, #ffffff) center / 100% 3px no-repeat,
    #7e2a20;
  border: 3px solid #ffffff;
  content: "";
  height: 30px;
  left: 50%;
  position: absolute;
  top: 26px;
  transform: translateX(-50%);
  width: 30px;
}

/* barn door with the white X brace */
.farm-theme .cms-hero-scene__fire {
  animation: none;
  background:
    linear-gradient(to top right, transparent calc(50% - 3px), #ffffff calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)),
    linear-gradient(to top left, transparent calc(50% - 3px), #ffffff calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)),
    #7e2a20;
  border: 5px solid #ffffff;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  bottom: 23px;
  height: 66px;
  width: 78px;
}

/* fence in front of the barn, hay bale at its left end */
.farm-theme .cms-hero-scene__anvil {
  background:
    linear-gradient(#fffdf5, #fffdf5) 0 6px / 100% 4px no-repeat,
    linear-gradient(#fffdf5, #fffdf5) 0 16px / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, #fffdf5 0 7px, transparent 7px 26px);
  border-radius: 0;
  bottom: -12px;
  height: 28px;
  width: 330px;
}

.farm-theme .cms-hero-scene__anvil::before {
  background: radial-gradient(circle, #e9c35a 0 28%, #d6a538 29% 34%, #e9c35a 35% 58%, #d6a538 59%);
  border-radius: 50%;
  box-shadow: inset -4px -4px 0 rgba(120, 80, 0, 0.18);
  height: 46px;
  left: 18px;
  top: -18px;
  width: 46px;
}

.farm-theme .cms-hero-scene__smoke {
  animation: farmCloudDrift 16s ease-in-out infinite alternate;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 16px -9px 0 2px #ffffff;
  filter: none;
  height: 20px;
  opacity: 0.95;
  width: 64px;
}

.farm-theme .cms-hero-scene__smoke--one {
  left: -70px;
  top: -118px;
}

.farm-theme .cms-hero-scene__smoke--two {
  animation-delay: -6s;
  left: 190px;
  top: -168px;
}

.farm-theme .cms-hero-scene__blade {
  display: none;
}

.farm-theme .cms-hero-scene__ember {
  animation: none;
  background: #ffd84a;
  box-shadow: 0 -7px 0 -1px #ffffff, 0 7px 0 -1px #ffffff, 7px 0 0 -1px #ffffff, -7px 0 0 -1px #ffffff;
  height: 9px;
  width: 9px;
}

.farm-theme .cms-hero-scene__ember--one { bottom: 9%; left: 12%; }
.farm-theme .cms-hero-scene__ember--two { bottom: 5%; left: 78%; }
.farm-theme .cms-hero-scene__ember--three { bottom: 14%; left: 88%; }

@keyframes farmCloudDrift {
  from { transform: translateX(0); }
  to { transform: translateX(36px); }
}

@media (max-width: 980px) {
  .farm-theme .landing .cms-hero-scene__smoke {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .farm-theme .landing .cms-hero-scene__smoke,
  .farm-theme .btn--primary {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Hero slider ──────────────────────────────────────────────────────── */
.farm-theme .landing .cms-hero-slider,
.farm-theme .cms-hero-slider {
  background: var(--panel);
  border: 6px solid #ffffff;
  border-radius: 28px;
  box-shadow: 0 30px 60px -28px rgba(30, 58, 42, 0.55);
}

.farm-theme .cms-hero-slider__dots button.is-active {
  background: var(--sun);
}

/* ── CMS elements ─────────────────────────────────────────────────────── */
.farm-theme .cms-element--text.el--featured {
  border-left-color: var(--sun-deep);
}

.farm-theme .cms-element--text.el--featured .cms-block__title {
  color: var(--text);
}

.farm-theme .cms-element--text.el--callout {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.farm-theme .el-checklist .el-list-item {
  border-radius: var(--radius);
}

.farm-theme .el-list-compact .el-list-item {
  background: var(--panel-soft);
}

.farm-theme .cms-element--cta.el--banner {
  background: linear-gradient(135deg, #ffeeb3, #f9d667);
  border-color: rgba(199, 154, 18, 0.5);
  border-radius: var(--radius-lg);
  color: var(--text);
}

.farm-theme .cms-element--cta.el--ghost .btn--primary {
  background: transparent;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  box-shadow: none;
  color: var(--accent);
}

.farm-theme .cms-element--banner {
  border-radius: var(--radius-lg);
}

.farm-theme .cms-element--banner.el--amber {
  background: #fff3cc;
  border-color: #e8c45a;
}

.farm-theme .cms-element--banner.el--amber .cms-banner__title { color: var(--sun-ink); }

.farm-theme .cms-element--banner.el--cyan {
  background: #e1f0f9;
  border-color: #9ccbe6;
}

.farm-theme .cms-element--banner.el--cyan .cms-banner__title { color: #154e75; }

.farm-theme .cms-element--banner.el--danger {
  background: #fde8e6;
  border-color: #f1a9a2;
}

.farm-theme .cms-element--banner.el--danger .cms-banner__title { color: #8a1c12; }

.farm-theme .cms-element--banner.el--subtle {
  background: rgba(30, 58, 42, 0.03);
  border-color: var(--line);
}

.farm-theme .cms-quote__mark {
  color: rgba(var(--meadow-rgb), 0.25);
}

/* Synthetic italics of the rounded face look broken; the quote gets weight instead */
.farm-theme .cms-quote__text {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
}

.farm-theme .cms-element--quote.el--amber .cms-quote__mark { color: rgba(var(--sun-rgb), 0.7); }
.farm-theme .cms-element--quote.el--amber .cms-quote__text { color: var(--sun-ink); }

.farm-theme .cms-media img {
  border-radius: var(--radius-lg);
}

.farm-theme :is(.cms-stats article, .cms-feature--faq details, .cms-feature--progress, .cms-slider article) {
  background: var(--panel);
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.farm-theme .cms-stats strong {
  color: var(--meadow);
  font-family: var(--font-display);
}

.farm-theme .cms-gallery a {
  border-color: var(--line);
  border-radius: var(--radius-lg);
}

.farm-theme .cms-progress > div {
  background: var(--panel-soft);
}

.farm-theme .cms-progress i {
  background: linear-gradient(90deg, var(--meadow), #7fbd5d, var(--sun), #7fbd5d, var(--meadow));
}

.farm-theme .cms-element--divider.el--ember {
  background: var(--line);
}

/* Chalkboard elements: editor colours were chosen against a dark page, so they keep one */
.farm-theme :is(.cms-element--styled-text, .cms-promo, .cms-element--timer) {
  --text: var(--chalk-text);
  --muted: var(--chalk-muted);
  --line: rgba(242, 246, 234, 0.16);
  color: var(--chalk-text);
}

.farm-theme .cms-element--styled-text {
  background: var(--chalk);
  border-color: rgba(242, 246, 234, 0.12);
}

.farm-theme .cms-element--styled-text .prose-text {
  color: inherit;
}

.farm-theme .cms-styled-text__item {
  background: rgba(242, 246, 234, 0.06);
  border-color: rgba(242, 246, 234, 0.14);
}

.farm-theme .cms-styled-text__item-title,
.farm-theme .cms-promo span,
.farm-theme .cms-timer__prefix {
  color: var(--sun-soft);
}

.farm-theme .cms-promo {
  background: linear-gradient(120deg, #1d3a28, var(--chalk) 55%, #2c5139);
  border-color: rgba(255, 226, 122, 0.3);
  border-radius: var(--radius-lg);
}

.farm-theme .cms-promo h2 {
  color: var(--chalk-text);
}

.farm-theme :is(.cms-promo p, .cms-promo__text) {
  color: var(--chalk-muted);
}

.farm-theme .cms-element--timer {
  background: var(--chalk);
  border-color: rgba(242, 246, 234, 0.12);
  border-radius: var(--radius-lg);
}

.farm-theme .cms-timer__value {
  color: var(--chalk-text);
  font-family: var(--font-display);
}

/* the banner timer is the sunny one, so it goes back to dark ink */
.farm-theme .cms-element--timer.el--banner {
  --text: #1e3a2a;
  --muted: #586c5e;
  background: linear-gradient(135deg, #ffeeb3, #f9d667);
  border-color: rgba(199, 154, 18, 0.5);
  color: var(--text);
}

.farm-theme .cms-element--timer.el--banner .cms-timer__prefix { color: var(--sun-ink); }
.farm-theme .cms-element--timer.el--banner .cms-timer__value { color: var(--text); }

/* ── Cookie banner ────────────────────────────────────────────────────── */
.farm-theme .cookie-consent {
  background: var(--panel);
  border-color: var(--line);
  border-top-color: var(--meadow);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px -18px rgba(30, 58, 42, 0.5);
}

.farm-theme .cookie-consent__link {
  color: var(--accent);
}

.farm-theme .cookie-manage-panel,
.farm-theme .cookie-category {
  border-top-color: var(--line);
}

.farm-theme .cookie-category:first-child {
  border-top: none;
}

.farm-theme .cookie-toggle-slider {
  background: rgba(30, 58, 42, 0.22);
}

.farm-theme .cookie-toggle-input:checked + .cookie-toggle-slider {
  background: var(--meadow);
}

/* ── News ─────────────────────────────────────────────────────────────── */
.farm-theme :is(.pub-filter-btn, .news-filter-btn):hover {
  border-color: var(--line-strong);
}

.farm-theme :is(.pub-filter-btn, .news-filter-btn).is-active {
  background: var(--panel-soft);
  border-color: var(--meadow);
}

.farm-theme .pub-filter-btn__count {
  background: var(--panel-soft);
}

.farm-theme .news-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.farm-theme .news-card--featured {
  background: radial-gradient(circle at 100% 0, rgba(var(--sun-rgb), 0.16), transparent 22rem), var(--panel);
  border-color: rgba(199, 154, 18, 0.45);
}

.farm-theme .tag--latest {
  background: rgba(var(--sun-rgb), 0.35);
  color: var(--sun-ink);
}

.farm-theme :is(.news-card__body, .planned-patch__description, .patch-content-item p) {
  color: var(--text-soft);
}

.farm-theme :is(.planned-patch__title, .patch-content-item__heading > strong) {
  color: var(--text);
}

.farm-theme .planned-patch {
  border-left-color: var(--sun-deep);
}

.farm-theme .planned-patch__content-heading h3 {
  color: var(--sun-ink);
}

.farm-theme :is(.planned-patch__content-heading, .patch-content-item) {
  border-top-color: var(--line);
}

.farm-theme .patch-content-item__tags span {
  color: var(--accent-strong);
}

/* ── Footer pages (about, legal, CMS pages) ───────────────────────────── */
.farm-theme .footer-page__header {
  border-bottom-color: var(--line);
}

.farm-theme .footer-page__title,
.farm-theme .footer-page__document h2,
.farm-theme .footer-page__document .prose-text strong,
.farm-theme .footer-page-nav__heading h2,
.farm-theme .footer-page-nav__help h3 {
  color: var(--text);
}

.farm-theme :is(.footer-page__summary, .footer-page__meta, .footer-page__empty, .footer-page-nav__help p) {
  color: var(--muted);
}

.farm-theme :is(.footer-page__document h3, .footer-page__document .prose-text,
  .footer-page--about .footer-page__document > .cms-block--hero:first-child .page-subtitle) {
  color: var(--text-soft);
}

.farm-theme .footer-page__document {
  background: var(--panel);
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.farm-theme .footer-page__document .cms-element--text + .cms-element--text,
.farm-theme .footer-page--about .footer-page__document > .cms-block--hero:first-child {
  border-color: var(--line);
}

.farm-theme .footer-page__document .cms-element--text.el--featured {
  background: linear-gradient(90deg, rgba(var(--sun-rgb), 0.14), transparent 78%);
  border-left-color: var(--sun-deep);
}

.farm-theme .footer-page__document .prose-text li::marker {
  color: var(--meadow);
}

.farm-theme .footer-page__document .prose-text :is(th, td) {
  border-color: var(--line);
}

.farm-theme .footer-page__document .prose-text th {
  background: var(--panel-soft);
  color: var(--text);
}

.farm-theme .footer-page__document .prose-text td {
  background: transparent;
  color: var(--text-soft);
}

.farm-theme .footer-page__document .prose-text blockquote {
  background: rgba(var(--accent-rgb), 0.06);
  border-left-color: var(--accent);
  color: var(--text-soft);
}

.farm-theme .footer-page__document a {
  color: var(--accent);
  text-decoration-color: rgba(var(--accent-rgb), 0.4);
}

.farm-theme .footer-page__document a:hover {
  color: var(--accent-strong);
}

.farm-theme .footer-page-nav__panel,
.farm-theme .quick-access__panel {
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--line);
  border-radius: var(--radius-lg);
}

.farm-theme .quick-access__panel--play {
  background: radial-gradient(circle at 100% 0%, rgba(var(--sun-rgb), 0.3), transparent 60%), var(--panel);
  border-color: rgba(199, 154, 18, 0.5);
}

.farm-theme .footer-page-nav__heading {
  border-bottom-color: var(--line);
}

.farm-theme .footer-page-nav__mark,
.farm-theme .footer-page-nav__contact {
  border-color: rgba(199, 154, 18, 0.55);
  color: var(--sun-ink);
}

.farm-theme .footer-page-nav__contact:hover {
  background: rgba(var(--sun-rgb), 0.18);
  border-color: var(--sun-deep);
  color: var(--sun-ink);
}

.farm-theme .footer-page-nav__links a {
  color: var(--text-soft);
}

.farm-theme .footer-page-nav__links a:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.farm-theme .footer-page-nav__links a[aria-current="page"] {
  background: rgba(var(--sun-rgb), 0.2);
  border-left-color: var(--sun-deep);
  color: var(--sun-ink);
}

.farm-theme .footer-page-nav__help {
  background: var(--panel-soft);
  border-top-color: var(--line);
}

.farm-theme .footer-page a:focus-visible {
  outline-color: var(--accent);
}

/* ── Preview frames in Forge Control (block designer, news editor) ────────
   The page around them stays dark; the frame itself shows the public look. */
.cms-preview__frame.farm-theme,
.block-studio .cms-preview__frame.farm-theme,
.news-preview-wrap.farm-theme {
  background: linear-gradient(180deg, var(--sky) 0, var(--bg) 18rem) no-repeat, var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}
