/*
Theme Name: Flockline Learn
Theme URI: https://flockline.com/learn/
Author: Flockline
Description: Lightweight branded knowledge theme for flockline.com/learn.
Version: 0.5.1
Text Domain: flockline-learn
Requires at least: 6.4
Requires PHP: 8.1
*/

/* Tokens aligned with flockline.com marketing homepage */
:root {
  --burnt: #D96B3B;
  --burnt-deep: #BD5A2E;
  --yolk: #E8B04B;
  --eggshell: #FFF6EC;
  --cream: #F2E6D6;
  --cream-2: #EADBC4;
  --sage: #A7B96E;
  --sage-deep: #7E944A;
  --taupe: #B89E83;
  --roost: #4B2F28;
  --roost-soft: #6B4E45;
  --ink: #2A1C18;
  --paper: #FFFDF9;
  --line: rgba(75, 47, 40, 0.10);
  --line-2: rgba(75, 47, 40, 0.18);
  --urgent: #B42318;
  --urgent-bg: #FEF3F2;
  --ok: #3B6D11;
  --ok-bg: #F3F9EB;
  --f-display: "Satoshi", "Instrument Sans", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Satoshi", system-ui, sans-serif;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 24px -16px rgba(75, 47, 40, 0.18);
  --shadow-cta: 0 8px 20px -10px rgba(217, 107, 59, 0.6);
  --wrap: 720px;
  --wrap-wide: 1240px;
  --gutter: 34px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-weight: 400;
  color: var(--roost);
  background: var(--eggshell);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Learn article media: never clip diagrams at the content column edge */
.fl-wrap,
.fl-article,
.fl-content,
.fl-content figure {
  min-width: 0;
  max-width: 100%;
}

.fl-content figure {
  margin: 1.5rem 0;
  overflow: visible;
}

.fl-content img,
.fl-content figure img,
.fl-article img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

a {
  color: var(--burnt-deep);
  text-underline-offset: 2px;
  transition: color 160ms ease;
}

a:hover { color: var(--burnt); }

.fl-wrap {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

.fl-wrap--wide {
  width: min(100% - (var(--gutter) * 2), var(--wrap-wide));
}

@media (max-width: 980px) {
  :root { --gutter: 28px; }
}

@media (max-width: 480px) {
  :root { --gutter: 22px; }
}

/* ----- Header (matches marketing sticky nav) ----- */
.fl-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 22px 0;
  background: rgba(255, 246, 236, 0.85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: padding 220ms ease, box-shadow 220ms ease;
}

.fl-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.fl-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--roost);
}

.fl-brand:hover { color: var(--roost); }

.fl-brand img,
.fl-brand .mark {
  width: 46px;
  height: 46px;
  flex: none;
  object-fit: contain;
  border-radius: 0;
}

.fl-brand__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1;
}

.fl-brand__name {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--roost);
}

.fl-brand__tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--burnt);
  letter-spacing: 0.01em;
}

.fl-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.fl-nav a {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 15.5px;
  letter-spacing: 0.005em;
  color: var(--roost);
  text-decoration: none;
}

.fl-nav a:hover { color: var(--burnt); }

.fl-nav .fl-btn {
  margin-left: 4px;
}

@media (max-width: 860px) {
  .fl-brand img,
  .fl-brand .mark { width: 38px; height: 38px; }
  .fl-brand__name { font-size: 22px; }
  .fl-brand__tag { font-size: 10px; }
  .fl-nav { gap: 16px; }
  .fl-nav a { font-size: 14.5px; }
  .fl-nav .fl-btn { display: none; }
}

/* ----- Buttons ----- */
.fl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  background: var(--burnt);
  color: #fff !important;
  text-decoration: none !important;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.fl-btn:hover {
  background: var(--burnt-deep);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -10px rgba(217, 107, 59, 0.7);
}

.fl-btn--lg {
  padding: 18px 28px;
  font-size: 17px;
}

.fl-btn--secondary {
  background: var(--paper);
  color: var(--roost) !important;
  border: 1.5px solid var(--line-2);
  box-shadow: none;
}

.fl-btn--secondary:hover {
  background: var(--cream);
  color: var(--roost) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

/* ----- Main / hero ----- */
.fl-main { padding: 28px 0 72px; }

.fl-hero { margin-bottom: 1.75rem; }

.fl-hero h1 {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--roost);
  margin: 0 0 0.85rem;
  text-wrap: balance;
}

.fl-hero__lead {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--roost);
  margin: 0;
  max-width: 36rem;
  line-height: 1.45;
}

.fl-breadcrumbs {
  font-family: var(--f-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--roost-soft);
  margin-bottom: 1.25rem;
}

.fl-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.fl-breadcrumbs a:hover { color: var(--burnt); }

.fl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  margin: 0.9rem 0 0.35rem;
}

.fl-meta a.fl-chip,
.fl-meta span {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--roost);
  font-family: var(--f-display);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fl-meta a.fl-chip:hover,
.fl-meta a.fl-chip:focus-visible {
  background: #fff;
  border-color: var(--line);
  color: var(--burnt-deep);
  outline: none;
}

.fl-meta a.fl-chip--type {
  background: transparent;
  border-color: var(--line);
  font-weight: 500;
}

.fl-byline {
  margin: 0.65rem 0 0;
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--roost-soft);
}

.fl-trust-meta {
  margin: 0.35rem 0 1.35rem;
  font-size: 0.78rem;
  color: var(--muted, #7a655c);
  letter-spacing: 0.01em;
}

/* ----- Content blocks / cards ----- */
.fl-card,
.fl-quick-answer,
.fl-urgent,
.fl-compare__ok,
.fl-compare__concern,
.fl-cta,
.fl-safety,
.fl-tool-shell,
.fl-cluster-grid a,
.fl-related li {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
}

.fl-quick-answer {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.4rem;
  background: linear-gradient(180deg, #fff, var(--paper));
  box-shadow: var(--shadow-soft);
}

.fl-quick-answer h2 {
  margin: 0 0 0.55rem;
  font-family: var(--f-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage-deep);
}

.fl-urgent {
  margin: 1.5rem 0;
  padding: 1.15rem 1.25rem;
  background: var(--urgent-bg);
  border-color: rgba(180, 35, 24, 0.18);
  color: #7A271A;
}

.fl-urgent strong { color: var(--urgent); }

.fl-compare {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 720px) {
  .fl-compare { grid-template-columns: 1fr 1fr; }
}

.fl-compare__ok,
.fl-compare__concern {
  padding: 1.1rem 1.2rem;
}

.fl-compare__ok {
  background: var(--ok-bg);
  border-color: rgba(59, 109, 17, 0.18);
}

.fl-compare__concern {
  background: var(--urgent-bg);
  border-color: rgba(180, 35, 24, 0.18);
}

.fl-content h2 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: var(--roost);
  margin: 2.25rem 0 0.75rem;
}

.fl-content h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.12rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--roost);
}

.fl-content p,
.fl-content li {
  font-size: 1.05rem;
  color: var(--roost);
}

.fl-content p { color: var(--roost-soft); }

.fl-content ul { padding-left: 1.2rem; }

.fl-content figcaption {
  margin-top: 0.55rem;
  font-family: var(--f-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--roost-soft);
  line-height: 1.4;
}

/* Responsive video embeds (YouTube / WP oEmbed) */
.fl-content .fl-embed,
.fl-content .wp-block-embed,
.fl-content .wp-block-embed__wrapper {
  margin: 1.25rem 0 1.75rem;
  max-width: 100%;
}

.fl-content .wp-block-embed__wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--cream-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
}

.fl-content .wp-block-embed__wrapper iframe,
.fl-content .fl-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.fl-content figure.fl-figure {
  margin: 1.5rem 0;
}

.fl-content .fl-sources a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fl-checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.fl-checklist li {
  position: relative;
  padding: 0.7rem 0 0.7rem 2rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--roost);
}

.fl-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--burnt);
  box-shadow: inset 0 0 0 3px var(--burnt);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.2l2.4 2.3 4.6-5'/%3E%3C/svg%3E");
  background-size: 10px 10px;
  background-repeat: no-repeat;
  background-position: center;
  border: none;
}

.fl-cta {
  margin: 2.5rem 0;
  padding: 1.6rem 1.7rem;
  background:
    linear-gradient(145deg, rgba(217, 107, 59, 0.08), rgba(167, 185, 110, 0.14)),
    var(--paper);
  box-shadow: var(--shadow-soft);
}

.fl-cta h2 {
  margin: 0 0 0.5rem;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--roost);
}

.fl-cta p {
  margin: 0 0 1rem;
  color: var(--roost-soft);
  font-size: 1.02rem;
}

.fl-cta p:last-child { margin-bottom: 0; }

.fl-safety {
  margin: 1.25rem 0 1.75rem;
  padding: 1rem 1.15rem;
  background: var(--cream);
  font-size: 0.95rem;
  color: var(--roost-soft);
}

.fl-safety--full {
  margin-top: 3rem;
  font-size: 0.92rem;
}

.fl-related {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.fl-related h2 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--roost);
  margin: 0 0 1rem;
}

.fl-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.fl-related li {
  padding: 0;
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.fl-related li:hover {
  border-color: rgba(217, 107, 59, 0.35);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.fl-related li a {
  display: block;
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: var(--roost);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.02rem;
}

.fl-related li a:hover { color: var(--burnt); }

.fl-related li div {
  padding: 0 1.15rem 1rem;
  color: var(--roost-soft);
  font-size: 0.95rem;
}

/* ----- Tools ----- */
.fl-tool-shell {
  padding: 1.4rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-soft);
}

.fl-tool-shell > h2 {
  margin: 0 0 0.4rem;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--roost);
}

.fl-tool-shell > p {
  margin: 0 0 1rem;
  color: var(--roost-soft);
}

.fl-tool-shell label {
  display: block;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--roost);
  margin: 0.95rem 0 0.4rem;
}

.fl-tool-shell select,
.fl-tool-shell input,
.fl-tool-shell textarea,
.fl-search input[type="search"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--roost);
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.fl-tool-shell select:focus,
.fl-tool-shell input:focus,
.fl-tool-shell textarea:focus,
.fl-search input[type="search"]:focus {
  outline: none;
  border-color: var(--burnt);
  box-shadow: 0 0 0 3px rgba(217, 107, 59, 0.18);
}

.fl-tool-shell .fl-btn { margin-top: 1.15rem; }

.fl-tool-result {
  margin-top: 1.25rem;
  padding: 1.05rem 1.15rem;
  border-radius: var(--radius-md);
  background: var(--ok-bg);
  border: 1px solid rgba(59, 109, 17, 0.18);
  display: none;
}

.fl-tool-result.is-visible { display: block; }

.fl-tool-result.is-urgent {
  background: var(--urgent-bg);
  border-color: rgba(180, 35, 24, 0.18);
}

/* ----- Cluster grid / search ----- */
.fl-cluster-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 720px) {
  .fl-cluster-grid { grid-template-columns: repeat(2, 1fr); }
}

.fl-cluster-grid a {
  display: block;
  padding: 1.25rem 1.35rem;
  text-decoration: none;
  color: var(--roost);
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.fl-cluster-grid a:hover {
  border-color: rgba(217, 107, 59, 0.4);
  color: var(--roost);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -18px rgba(75, 47, 40, 0.28);
}

.fl-cluster-grid a strong {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.015em;
  color: var(--roost);
}

.fl-cluster-grid a br + *,
.fl-cluster-grid a {
  font-size: 0.95rem;
  line-height: 1.45;
}

.fl-cluster-grid a {
  color: var(--roost-soft);
}

.fl-cluster-grid a strong { color: var(--roost); }

.fl-search { margin: 1.5rem 0 2rem; }

.fl-search input[type="search"] {
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

/* ----- Footer ----- */
.fl-site-footer {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0 3rem;
  color: var(--roost-soft);
  font-size: 0.92rem;
  background: rgba(242, 230, 214, 0.35);
}

.fl-site-footer strong {
  font-family: var(--f-display);
  font-weight: 800;
  color: var(--roost);
}

.fl-site-footer a {
  color: var(--roost);
  text-decoration: none;
  font-weight: 600;
}

.fl-site-footer a:hover { color: var(--burnt); }

.fl-site-footer p { margin: 0 0 0.65rem; }

/* ----- WP chrome ----- */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.navigation.pagination {
  margin-top: 2rem;
}

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.navigation.pagination a,
.navigation.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--roost);
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.9rem;
}

.navigation.pagination .current {
  background: var(--burnt);
  border-color: var(--burnt);
  color: #fff;
}

/* ----- Reading progress ----- */
.fl-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 80;
  background: transparent;
  pointer-events: none;
}

.fl-reading-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sage-deep), var(--burnt));
  transition: width 80ms linear;
}

/* ----- Signature AEO blocks ----- */
.fl-quick-facts,
.fl-at-a-glance,
.fl-bottom-line,
.fl-takeaway,
.fl-community,
.fl-mistakes,
.fl-eeat,
.fl-sources,
.fl-data-soon,
.fl-toc {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
}

.fl-quick-facts {
  margin: 0 0 1.5rem;
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
}

.fl-quick-facts > h2,
.fl-at-a-glance > h2,
.fl-community > h2,
.fl-mistakes > h2,
.fl-eeat > h2,
.fl-sources > h2 {
  margin: 0 0 0.75rem;
  font-family: var(--f-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage-deep);
}

.fl-quick-facts table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.fl-quick-facts th,
.fl-quick-facts td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--roost);
}

.fl-quick-facts th {
  width: 38%;
  font-family: var(--f-display);
  font-weight: 700;
  color: var(--roost);
  background: rgba(242, 230, 214, 0.45);
}

.fl-quick-facts tr:last-child th,
.fl-quick-facts tr:last-child td {
  border-bottom: none;
}

.fl-at-a-glance {
  margin: 0 0 1.5rem;
  padding: 1.15rem 1.25rem 1.25rem;
  background: linear-gradient(180deg, #fff, var(--cream));
  box-shadow: var(--shadow-soft);
}

.fl-at-a-glance dl {
  display: grid;
  grid-template-columns: minmax(8.5rem, 34%) 1fr;
  gap: 0.65rem 1rem;
  margin: 0;
}

.fl-at-a-glance dt {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--roost);
}

.fl-at-a-glance dd {
  margin: 0;
  color: var(--roost-soft);
  font-size: 0.98rem;
}

@media (max-width: 520px) {
  .fl-at-a-glance dl {
    grid-template-columns: 1fr;
    gap: 0.25rem 0;
  }

  .fl-at-a-glance dd {
    margin-bottom: 0.55rem;
  }

  .fl-at-a-glance dd:last-child {
    margin-bottom: 0;
  }
}

.fl-bottom-line {
  margin: 1.25rem 0 2rem;
  padding: 0.95rem 1.15rem;
  background: var(--ok-bg);
  border-color: rgba(59, 109, 17, 0.22);
}

.fl-bottom-line strong {
  display: block;
  font-family: var(--f-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ok);
  margin-bottom: 0.35rem;
}

.fl-bottom-line p {
  margin: 0;
  color: var(--roost);
  font-size: 1.02rem;
}

.fl-takeaway {
  margin: -0.35rem 0 1.75rem;
  padding: 0.85rem 1.1rem;
  background: rgba(232, 176, 75, 0.14);
  border-color: rgba(232, 176, 75, 0.35);
}

.fl-takeaway strong {
  display: block;
  font-family: var(--f-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--burnt-deep);
  margin-bottom: 0.3rem;
}

.fl-takeaway p {
  margin: 0;
  color: var(--roost);
  font-size: 0.98rem;
}

/* Interactive checklists (progressive enhancement) */
.fl-interactive-checklist {
  margin: 1.25rem 0 2rem;
  padding: 1.15rem 1.25rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--cream));
  box-shadow: var(--shadow-soft);
}

.fl-interactive-checklist__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.fl-interactive-checklist__progress {
  margin: 0;
  flex: 1 1 auto;
  min-width: 7rem;
  font-family: var(--f-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--sage-deep);
}

/* Keep Reset + Download PDF side-by-side (never stacked/overlapping). */
.fl-interactive-checklist__actions {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.fl-interactive-checklist__reset,
.fl-interactive-checklist__pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: static;
  float: none;
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: var(--f-display);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--roost);
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

/* Fallback when markup has no .fl-interactive-checklist__actions wrapper */
.fl-interactive-checklist__toolbar > .fl-interactive-checklist__reset,
.fl-interactive-checklist__toolbar > .fl-interactive-checklist__pdf {
  display: inline-flex;
  flex: 0 0 auto;
}

.fl-interactive-checklist__pdf {
  background: var(--burnt);
  border-color: var(--burnt-deep);
  color: #fff;
}

.fl-interactive-checklist__pdf:hover,
.fl-interactive-checklist__pdf:focus-visible {
  filter: brightness(0.96);
}

.fl-interactive-checklist__reset:hover,
.fl-interactive-checklist__reset:focus-visible {
  border-color: var(--burnt);
}

.fl-interactive-checklist__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fl-interactive-checklist__list li {
  border-bottom: 1px solid var(--line);
}

.fl-interactive-checklist__list li:last-child {
  border-bottom: none;
}

.fl-interactive-checklist__list label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.7rem 0.15rem;
  cursor: pointer;
  color: var(--roost);
  font-family: var(--f-display);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.35;
}

.fl-interactive-checklist__list input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--sage-deep);
  flex-shrink: 0;
}

.fl-interactive-checklist__list label:has(input:checked) span {
  text-decoration: line-through;
  color: var(--roost-soft);
}

.fl-interactive-checklist.is-complete {
  border-color: rgba(59, 109, 17, 0.35);
}

.fl-interactive-checklist__note {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: var(--roost-soft);
}

@media print {
  .fl-interactive-checklist__toolbar {
    display: none;
  }

  .fl-interactive-checklist {
    box-shadow: none;
    break-inside: avoid;
  }

  .fl-interactive-checklist__list label:has(input:checked) span {
    text-decoration: none;
    color: var(--roost);
  }

  .fl-interactive-checklist__list input[type="checkbox"] {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

.fl-mistakes {
  margin: 1.5rem 0;
  padding: 1.15rem 1.25rem 1.3rem;
}

.fl-mistakes ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fl-mistakes li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.85rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--roost);
}

.fl-mistakes li:last-child { border-bottom: none; }

.fl-mistakes li::before {
  content: "✕";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  background: var(--urgent);
}

.fl-community {
  margin: 1.75rem 0;
  padding: 1.2rem 1.3rem 1.35rem;
  background:
    linear-gradient(160deg, rgba(167, 185, 110, 0.12), rgba(217, 107, 59, 0.06)),
    var(--paper);
}

.fl-community > p:first-of-type {
  margin-top: 0;
  color: var(--roost-soft);
  font-size: 0.98rem;
}

/* Never show mid-article E-E-A-T cards to readers (trust lives in byline + schema + sources). */
.fl-eeat {
  display: none !important;
}

.fl-sources {
  margin: 1.75rem 0;
  padding: 1.15rem 1.25rem 1.3rem;
}

.fl-sources ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

.fl-sources li {
  margin: 0.35rem 0;
  color: var(--roost-soft);
  font-size: 0.98rem;
}

.fl-data-soon {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  background: var(--cream);
  border-style: dashed;
}

.fl-data-soon strong {
  display: block;
  font-family: var(--f-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--roost-soft);
  margin-bottom: 0.35rem;
}

.fl-data-soon p {
  margin: 0;
  color: var(--roost-soft);
  font-size: 0.95rem;
}

.fl-content table:not(.fl-quick-facts table) {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.98rem;
}

.fl-content table:not(.fl-quick-facts table) th,
.fl-content table:not(.fl-quick-facts table) td {
  border: 1px solid var(--line-2);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.fl-content table:not(.fl-quick-facts table) th {
  background: rgba(242, 230, 214, 0.5);
  font-family: var(--f-display);
  font-weight: 700;
}

/* ----- In-content TOC (DigitalSilk-style card; never float) ----- */
.fl-toc {
  display: block;
  width: 100%;
  max-width: 100%;
  float: none;
  clear: both;
  margin: 0 0 2rem;
  padding: 0;
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.fl-toc__toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.95rem 1.15rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--roost);
}

.fl-toc__chevron {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--roost);
  border-bottom: 2px solid var(--roost);
  transform: rotate(45deg);
  transition: transform 160ms ease;
  margin-top: -0.2rem;
  flex-shrink: 0;
}

.fl-toc.is-open .fl-toc__chevron {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.fl-toc__panel {
  padding: 1.1rem 1.2rem 1.25rem;
}

.fl-toc__title {
  display: block;
  margin: 0 0 0.75rem;
  font-family: var(--f-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage-deep);
}

.fl-toc__toggle .fl-toc__label { display: none; }

.fl-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
  max-height: min(22rem, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.fl-toc__list a {
  display: block;
  text-decoration: none;
  color: var(--roost-soft);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.fl-toc__list a:hover {
  color: var(--burnt);
  background: rgba(217, 107, 59, 0.06);
}

.fl-toc__list a.is-active {
  color: var(--burnt-deep);
  border-left-color: var(--burnt);
  background: rgba(217, 107, 59, 0.08);
}

.fl-toc__sub a {
  font-weight: 500;
  font-size: 0.88rem;
  padding-left: 1.15rem;
}

/* Mobile / narrow: accordion TOC; content stays full-width */
@media (max-width: 899px) {
  .fl-toc__toggle {
    display: flex;
  }

  .fl-toc__title { display: none; }

  .fl-toc__toggle .fl-toc__label { display: inline; }

  .fl-toc__panel {
    display: none;
    padding-top: 0;
  }

  .fl-toc.is-open .fl-toc__panel {
    display: block;
  }

  .fl-toc.is-open .fl-toc__list {
    max-height: min(18rem, 45vh);
  }
}

/* Mesh planner uses tool-shell styles; tighten inline spacing */
#fl-mesh-planner {
  margin: 1.75rem 0 2rem;
}

#fl-mesh-planner .fl-mesh-row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  #fl-mesh-planner .fl-mesh-row {
    grid-template-columns: 1fr 1fr;
  }
}

#fl-mesh-planner .fl-mesh-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--roost);
}

#fl-mesh-planner .fl-mesh-check input {
  width: auto;
}

/* ----- Learn homepage ----- */
.fl-home-hero {
  display: grid;
  gap: 1.75rem;
  margin: 0.25rem 0 2rem;
  padding: 1.75rem 1.35rem 1.65rem;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(232, 176, 75, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 20%, rgba(167, 185, 110, 0.2), transparent 50%),
    linear-gradient(180deg, rgba(255, 246, 236, 0.95), rgba(242, 230, 214, 0.55) 70%, transparent);
  border-radius: var(--radius-xl);
}

@media (max-width: 480px) {
  .fl-home-hero {
    padding: 1.45rem 1.1rem 1.4rem;
    gap: 1.35rem;
  }
}

@media (min-width: 900px) {
  .fl-home-hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.75fr);
    align-items: end;
    gap: 2.5rem;
    padding: 2.5rem 2.25rem 2.35rem;
  }
}

.fl-home-hero__brand {
  margin: 0 0 0.55rem;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -0.03em;
  color: var(--burnt-deep);
}

.fl-home-hero h1 {
  margin-bottom: 0.9rem;
}

.fl-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.fl-home-hero__panel {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.92);
  box-shadow: var(--shadow-soft);
}

.fl-home-hero__panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--roost);
}

.fl-home-hero__panel ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--roost-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.fl-home-hero__panel li + li {
  margin-top: 0.45rem;
}

.fl-home-section {
  margin: 2.75rem 0;
}

.fl-home-section__head {
  margin-bottom: 1.25rem;
  max-width: 40rem;
}

.fl-home-section__head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  letter-spacing: -0.02em;
  color: var(--roost);
}

.fl-home-section__head p {
  margin: 0;
  color: var(--roost-soft);
  line-height: 1.5;
}

.fl-article-grid {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 640px) {
  .fl-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .fl-article-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fl-article-grid--tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.fl-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  border-radius: var(--radius-lg);
  transition: transform 160ms ease;
}

.fl-card-link:hover {
  transform: translateY(-3px);
}

.fl-card-link:focus-visible {
  outline: 2px solid var(--burnt);
  outline-offset: 3px;
}

.fl-article-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.fl-card-link:hover .fl-article-card {
  border-color: rgba(217, 107, 59, 0.35);
  box-shadow: 0 16px 32px -20px rgba(75, 47, 40, 0.32);
}

.fl-article-card__media {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(145deg, var(--cream), var(--cream-2));
  overflow: hidden;
}

.fl-article-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fl-article-card__placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 40%, rgba(232, 176, 75, 0.45), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(167, 185, 110, 0.4), transparent 40%),
    linear-gradient(160deg, var(--cream), #e8d9c4);
}

.fl-article-card--tool .fl-article-card__placeholder {
  background:
    radial-gradient(circle at 70% 30%, rgba(217, 107, 59, 0.28), transparent 40%),
    linear-gradient(160deg, #f7efe4, var(--cream-2));
}

.fl-article-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 1.3rem 1.35rem;
  flex: 1;
}

.fl-archive-hero {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.fl-archive-hero .fl-hero__lead {
  margin-top: 0.35rem;
}

.fl-article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.fl-article-card__meta .fl-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--roost);
  font-family: var(--f-display);
  font-size: 0.72rem;
  font-weight: 700;
}

.fl-article-card__meta .fl-chip--type {
  background: transparent;
  border: 1px solid var(--line);
  font-weight: 600;
}

.fl-article-card__title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--roost);
  text-wrap: balance;
}

.fl-article-card__excerpt {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--roost-soft);
}

.fl-article-card__cta {
  margin-top: 0.35rem;
  font-family: var(--f-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--burnt-deep);
}

.fl-start-path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  counter-reset: start-path;
}

@media (min-width: 800px) {
  .fl-start-path {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.fl-start-path li {
  counter-increment: start-path;
}

.fl-start-path a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.9rem;
  align-items: start;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  color: var(--roost);
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, transform 160ms ease;
}

.fl-start-path a::before {
  content: counter(start-path);
  grid-row: 1 / span 2;
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--cream);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--roost);
}

.fl-start-path a:hover {
  border-color: rgba(217, 107, 59, 0.4);
  transform: translateY(-2px);
}

.fl-start-path strong {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.fl-start-path span {
  grid-column: 2;
  color: var(--roost-soft);
  font-size: 0.92rem;
  line-height: 1.4;
}

.fl-guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.fl-guide-list li {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}

.fl-guide-list a {
  font-family: var(--f-display);
  font-weight: 700;
  color: var(--roost);
  text-decoration: none;
}

.fl-guide-list a:hover {
  color: var(--burnt-deep);
}

.fl-guide-list__cluster {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--roost-soft);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--cream);
}

.fl-home-trust {
  margin: 3rem 0 1rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.95), rgba(242, 230, 214, 0.45));
}

.fl-home-trust h2 {
  margin: 0 0 0.5rem;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--roost);
}

.fl-home-trust p {
  margin: 0;
  max-width: 42rem;
  color: var(--roost-soft);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .fl-card-link,
  .fl-card-link:hover,
  .fl-start-path a,
  .fl-start-path a:hover,
  .fl-article-card {
    transition: none;
    transform: none;
  }
}
