/* ==========================================================================
   FlutterBy — meadow field-notebook styling
   Palette, naming and motion are exclusive to this site: no shared tokens,
   no shared component names. Every panel is drawn as if inked by hand, so
   borders are asymmetric and offset outlines are dashed rather than solid.
   ========================================================================== */

:root {
  --paper-meadow: #eef2e6;
  --nectary: #f7f9f1;
  --meadow-sage: #4a5d3a;
  --ink-fern: #5a6b4a;
  --lavender: #7d6aa0;
  --flutter-pink: #c77d9b;
  --blade: #cfdab9;
  --shade: #2c3626;
  --pollen: #ecdfae;
  --wing-edge: rgba(90, 107, 74, 0.42);
  --hand: "Segoe Print", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", cursive;
  --round: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Text", "Segoe UI",
    system-ui, -apple-system, "Hiragino Maru Gothic ProN", sans-serif;
  --rail: 232px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper-meadow);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(125, 106, 160, 0.06) 0 22%, transparent 60%),
    radial-gradient(circle at 88% 76%, rgba(199, 125, 155, 0.07) 0 18%, transparent 58%);
  color: var(--shade);
  font-family: var(--round);
  font-size: 17px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--meadow-sage); text-decoration-color: var(--blade); text-underline-offset: 3px; }
a:hover { color: var(--lavender); }

h1, h2, h3, .handed {
  font-family: var(--hand);
  color: var(--meadow-sage);
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: 0.2px;
}

h1 { font-size: clamp(1.85rem, 4.2vw, 2.9rem); margin: 0 0 0.5rem; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); margin: 2.4rem 0 0.7rem; }
h3 { font-size: 1.13rem; margin: 1.6rem 0 0.45rem; }

p { margin: 0 0 1rem; }

.skein {
  font-family: var(--hand);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lavender);
}

.handrule {
  height: 0;
  border: 0;
  border-top: 1.5px dashed var(--wing-edge);
  margin: 2rem 0;
}

/* ------------------------------------------------------------------ shell */

.flutterby-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 64px;
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  gap: 34px;
  align-items: start;
}

.flutterby-main { min-width: 0; }

/* ----------------------------------------------------------------- header */

.meadowhead {
  background: linear-gradient(180deg, #f4f7e9 0%, var(--paper-meadow) 100%);
  border-bottom: 1.6px solid var(--blade);
  margin-bottom: 30px;
}

.meadowhead__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: flex-end;
  justify-content: space-between;
}

.meadowhead__mark { display: flex; align-items: center; gap: 12px; }

.meadowhead__glyph { width: 46px; height: 46px; flex: none; }

.meadowhead__wordmark {
  font-family: var(--hand);
  font-size: 1.75rem;
  margin: 0;
  color: var(--meadow-sage);
}

.meadowhead__tagline {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-fern);
}

.meadowhead__nav { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }

.meadowhead__nav a {
  font-size: 0.93rem;
  text-decoration: none;
  border-bottom: 1.6px dotted transparent;
  padding-bottom: 2px;
}
.meadowhead__nav a:hover { border-bottom-color: var(--flutter-pink); }

.linguabar { display: inline-flex; gap: 2px; border: 1.4px solid var(--blade); border-radius: 999px; padding: 2px; background: var(--nectary); }
.linguabar__link {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--ink-fern);
}
.linguabar__link[aria-current="true"] { background: var(--meadow-sage); color: #f6f8ee; }

/* ------------------------------------------------------------------- rail */

.meadowrail { position: sticky; top: 18px; font-size: 0.92rem; }

.meadowrail__panel {
  position: relative;
  background: var(--nectary);
  border: 1.6px solid var(--wing-edge);
  border-radius: 16px 7px 18px 9px / 9px 18px 7px 16px;
  padding: 16px 16px 14px;
  margin-bottom: 18px;
}
.meadowrail__panel::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1.2px dashed rgba(90, 107, 74, 0.3);
  border-radius: 20px 9px 22px 11px / 11px 22px 9px 20px;
  pointer-events: none;
}

.meadowrail__heading {
  font-family: var(--hand);
  font-size: 0.95rem;
  color: var(--meadow-sage);
  margin: 0 0 8px;
}

.keelist { list-style: none; margin: 0; padding: 0; }

.keelist__row { margin-bottom: 3px; }

.keelist__row a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 9px;
  border-radius: 10px 4px 11px 5px / 5px 11px 4px 10px;
  text-decoration: none;
  color: var(--shade);
}
.keelist__row a:hover { background: #eaf0dd; color: var(--meadow-sage); }
.keelist__row[data-current="true"] a { background: #e7eed8; color: var(--meadow-sage); font-weight: 600; }

.keelist__count {
  font-size: 0.78rem;
  color: var(--ink-fern);
  background: var(--paper-meadow);
  border-radius: 999px;
  padding: 0 8px;
}

.meadowrail__note { font-size: 0.83rem; color: var(--ink-fern); margin: 0; }

/* -------------------------------------------------------------- brood line */

.broodline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 22px 0 34px;
  position: relative;
}

.broodline::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 26px;
  border-top: 2px dashed rgba(125, 106, 160, 0.4);
  z-index: 0;
}

.broodstage {
  position: relative;
  z-index: 1;
  text-decoration: none;
  color: inherit;
  background: var(--nectary);
  border: 1.5px solid var(--wing-edge);
  border-radius: 14px 6px 16px 8px / 8px 16px 6px 14px;
  padding: 14px 14px 12px;
  display: block;
  transition: border-color 160ms ease;
}
.broodstage:hover { border-color: var(--lavender); animation: flutter 560ms ease-in-out both; }

.broodstage__bead {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--hand);
  font-size: 0.95rem;
  color: #f7f9f1;
  background: var(--meadow-sage);
  margin-bottom: 9px;
}
.broodstage:nth-child(2) .broodstage__bead { background: var(--ink-fern); }
.broodstage:nth-child(3) .broodstage__bead { background: var(--lavender); }
.broodstage:nth-child(4) .broodstage__bead { background: var(--flutter-pink); }

.broodstage__name { font-family: var(--hand); margin: 0 0 3px; color: var(--meadow-sage); font-size: 1.02rem; }
.broodstage__blurb { margin: 0; font-size: 0.84rem; color: var(--ink-fern); }

@keyframes flutter {
  0%   { transform: rotate(-1.2deg) translateY(0); }
  45%  { transform: rotate(1deg) translateY(-3px); }
  100% { transform: rotate(-0.6deg) translateY(0); }
}

/* ------------------------------------------------------------------ grids */

.winggrid, .nectarygrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 20px;
  margin: 18px 0 10px;
  padding: 0;
  list-style: none;
}

.wingcard, .nectarycard {
  position: relative;
  background: var(--nectary);
  border: 1.6px solid var(--wing-edge);
  border-radius: 18px 7px 20px 9px / 9px 20px 7px 18px;
  padding: 14px 15px 15px;
  display: flex;
  flex-direction: column;
  transition: border-color 160ms ease, background 160ms ease;
}
.wingcard::after, .nectarycard::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1.1px dashed rgba(90, 107, 74, 0.26);
  border-radius: 22px 9px 24px 11px / 11px 24px 9px 22px;
  pointer-events: none;
}
.wingcard:hover, .nectarycard:hover { border-color: var(--lavender); animation: flutter 620ms ease-in-out both; }

.platethumb {
  display: block;
  width: 100%;
  border-radius: 12px 5px 13px 6px / 6px 13px 5px 12px;
  margin-bottom: 11px;
  background: var(--paper-meadow);
  border: 1px solid rgba(90, 107, 74, 0.16);
}

.wingcard__name { font-family: var(--hand); font-size: 1.07rem; margin: 0 0 2px; color: var(--meadow-sage); }
.wingcard__name a { text-decoration: none; color: inherit; }
.wingcard__name a:hover { color: var(--lavender); }
.wingcard__latin { font-style: italic; font-size: 0.83rem; color: var(--ink-fern); margin: 0 0 9px; }
.wingcard__meta { margin: auto 0 0; font-size: 0.82rem; color: var(--ink-fern); }

/* ------------------------------------------------------------------ chips */

.chippery { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }

.chip {
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1.2px solid var(--blade);
  background: var(--paper-meadow);
  color: var(--ink-fern);
}
.chip--host { border-color: var(--flutter-pink); color: #8d4a63; background: #faeef3; }
.chip--nectar { border-color: var(--lavender); color: #5b4a7d; background: #f1ecf7; }
.chip--sun { border-color: var(--pollen); background: #fbf5df; color: #7c6a24; }
.chip--shade { border-color: var(--meadow-sage); background: #e9efdd; color: var(--meadow-sage); }
.chip--pin { border-color: var(--blade); }

/* ---------------------------------------------------------------- dossier */

.dossier__head { display: grid; grid-template-columns: 1fr 260px; gap: 28px; align-items: start; margin-bottom: 8px; }
.dossier__intro { font-size: 1.04rem; }

.fieldstrip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 1px;
  background: var(--blade);
  border: 1.5px solid var(--wing-edge);
  border-radius: 14px 6px 16px 8px / 8px 16px 6px 14px;
  overflow: hidden;
  margin: 22px 0 8px;
}
.fieldcell { background: var(--nectary); padding: 11px 14px; }
.fieldcell__key { display: block; font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--lavender); }
.fieldcell__val { font-size: 0.92rem; color: var(--shade); }

.proseblock { margin: 0 0 1.1rem; }

.caresteps { margin: 0; padding: 0; list-style: none; counter-reset: carestep; }
.caresteps__item {
  position: relative;
  padding: 0 0 0 46px;
  margin-bottom: 15px;
  counter-increment: carestep;
}
.caresteps__item::before {
  content: counter(carestep);
  position: absolute;
  left: 0;
  top: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%;
  background: #eaf0dd;
  border: 1.4px solid var(--wing-edge);
  display: grid;
  place-items: center;
  font-family: var(--hand);
  font-size: 0.85rem;
  color: var(--meadow-sage);
}

.planttable { width: 100%; border-collapse: collapse; margin: 10px 0 4px; font-size: 0.92rem; }
.planttable caption { text-align: left; font-size: 0.82rem; color: var(--ink-fern); padding-bottom: 8px; }
.planttable th, .planttable td { text-align: left; padding: 8px 10px; border-bottom: 1.3px dashed rgba(90, 107, 74, 0.3); }
.planttable th { font-family: var(--hand); font-weight: 600; color: var(--meadow-sage); font-size: 0.88rem; }
.planttable tr:last-child td { border-bottom: 0; }
.planttable .latin { font-style: italic; color: var(--ink-fern); }

.wingnote {
  background: #f4f2f8;
  border-left: 4px solid var(--lavender);
  border-radius: 0 12px 12px 0;
  padding: 13px 16px;
  font-size: 0.9rem;
  color: #40385a;
  margin: 22px 0;
}
.wingnote--caution { background: #fbf2f5; border-left-color: var(--flutter-pink); color: #6f3c50; }

.pagerail { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin: 32px 0 0; padding: 16px 0 0; border-top: 1.5px dashed var(--wing-edge); font-size: 0.9rem; }
.pagerail a { text-decoration: none; }

/* --------------------------------------------------------------- legal etc */

.ledger { max-width: 760px; }
.ledger h2 { margin-top: 1.9rem; }
.ledger ul { padding-left: 1.15rem; }
.ledger li { margin-bottom: 0.4rem; }
.stamp { font-size: 0.82rem; color: var(--ink-fern); border: 1.3px dashed var(--wing-edge); border-radius: 10px; padding: 7px 12px; display: inline-block; margin-bottom: 18px; }

/* ----------------------------------------------------------------- footer */

.seedfoot {
  border-top: 1.6px solid var(--blade);
  margin-top: 54px;
  background: #f4f7ea;
}
.seedfoot__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 20px 34px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px;
  font-size: 0.88rem;
}
.seedfoot h4 { font-family: var(--hand); color: var(--meadow-sage); margin: 0 0 7px; font-size: 0.95rem; }
.seedfoot ul { list-style: none; margin: 0; padding: 0; }
.seedfoot li { margin-bottom: 4px; }
.seedfoot a { text-decoration: none; }
.seedfoot__fine { grid-column: 1 / -1; border-top: 1.2px dashed var(--wing-edge); padding-top: 14px; color: var(--ink-fern); font-size: 0.83rem; }

/* ------------------------------------------------------------------- misc */

.trailcrumbs { font-size: 0.83rem; color: var(--ink-fern); margin: 0 0 12px; }
.trailcrumbs a { text-decoration: none; }

.lede { font-size: 1.06rem; color: #3a4531; }

.sectionhead { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 34px 0 4px; }
.sectionhead h2 { margin: 0; }

.familyblock { margin-bottom: 40px; scroll-margin-top: 20px; }

.statrow { display: flex; flex-wrap: wrap; gap: 22px; margin: 18px 0 6px; padding: 0; list-style: none; }
.statrow li { font-size: 0.9rem; color: var(--ink-fern); }
.statrow strong { font-family: var(--hand); font-size: 1.3rem; color: var(--meadow-sage); display: block; }

@media (max-width: 900px) {
  .flutterby-shell { grid-template-columns: 1fr; gap: 22px; }
  .meadowrail { position: static; }
  .dossier__head { grid-template-columns: 1fr; }
  .broodline { grid-template-columns: repeat(2, 1fr); }
  .broodline::before { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .broodline { grid-template-columns: 1fr; }
}
