/* The homepage adds its bird control, entry cards and article rows
   on top of the shared shell. Inner pages never load this stylesheet. */
body.jelly-home #top { min-height: 66vh; }
:where(.jelly-home #home-view) a { color: inherit; text-decoration: none; }
:where(.jelly-home #home-view) :is(button, input) { font: inherit; color: inherit; }
.jelly-home #home-view button, .theme-pull { cursor: pointer; }
.jelly-home :is(#home-view, .theme-pull) img { display: block; max-width: 100%; }

/* Keep the bird equipped with a genuine button. Pulling or activating with
   keyboard both toggle the same saved theme. */
.theme-pull {
  --pull: 0px;
  position: fixed;
  z-index: 5;
  top: 70px;
  right: max(12px, calc((100% - var(--width)) / 2 + 13px));
  display: grid;
  width: 63px;
  min-height: 104px;
  padding: 29px 0 0;
  border: 0;
  border-radius: 18px;
  place-items: center;
  background: transparent;
  touch-action: none;
  user-select: none;
}
.theme-pin {
  position: absolute;
  top: 0;
  left: calc(50% - 8px);
  width: 16px;
  height: 9px;
  border: 1px solid #ac91cc;
  border-radius: 4px 4px 6px 6px;
  background: linear-gradient(#f8efff,#b8a0da);
  box-shadow: 0 1px 3px #4b326958;
}
.theme-line {
  position: absolute;
  left: calc(50% - 1.5px);
  top: 6px;
  height: calc(39px + var(--pull));
  width: 3px;
  border-radius: 3px;
  background: repeating-linear-gradient(145deg,#f8e8fd 0 2px,#ac89d0 2px 4px);
  box-shadow: 0 1px 2px #3b24584d;
  transition: height 190ms cubic-bezier(.2,.96,.53,1.34);
}
.theme-pull img {
  width: 100%;
  height: 65px;
  object-fit: contain;
  filter: drop-shadow(0 5px 9px #7449984a);
  transform: translateY(var(--pull));
  transition: transform 230ms cubic-bezier(.16,.96,.37,1.53);
}
.theme-pull:hover img { filter: drop-shadow(0 6px 10px #74499873); }
.theme-pull[data-pulling] :is(img,.theme-line) { transition: none; }

.entry-grid, .landing-lower {
  width: min(var(--width), calc(100% - 48px));
  margin-inline: auto;
}
.entry-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 12px;
  margin-top: 18px;
}
.entry-grid a {
  display: flex;
  align-items: center;
  gap: clamp(7px, 1vw, 14px);
  min-height: 84px;
  padding: 10px clamp(8px, 1.3vw, 18px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--paper), var(--soft));
  box-shadow: var(--shell-shadow);
  transition: transform 200ms cubic-bezier(.22,.78,.42,1.3);
}
.entry-grid a:hover { transform: translateY(-3px); }
.entry-grid a:active { transform: scale(.97); }
.entry-grid a>span:last-child { min-width: 0; }
.entry-grid strong { display: block; margin-bottom: 4px; font-size: 14px; line-height: 1.2; }
.entry-grid small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }

.landing-lower { margin-top: 26px; }
.latest-guides { margin-top: 37px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 15px; }
.section-heading h2 { margin: 0; font-size: clamp(21px, 2.2vw, 30px); letter-spacing: -.015em; }
.text-link { color: var(--accent); font-size: 14px; font-weight: 750; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.guide-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.guide-card {
  /* Each full-width link holds one thumbnail and its article details. */
  display: grid;
  grid-template-columns: clamp(136px, 24%, 248px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  padding: clamp(10px, 1.2vw, 15px);
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--paper);
  box-shadow: var(--shell-shadow);
  transition: transform 210ms cubic-bezier(.22,.8,.44,1.28);
}
.guide-card:hover { transform: translateY(-3px); }
.guide-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
/* Long imported summaries and links can wrap without widening the row. */
.guide-copy { overflow-wrap: anywhere; }
.guide-card small { color: var(--accent); font-size: 11px; font-weight: 770; }
.guide-card h3 { margin: 6px 0; font-size: 18px; }
.guide-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.guide-art { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(140deg,#d8f6ec,#9ed5c4 52%,#9fc0e2); }

.guide-art::before, .guide-art::after, .guide-art i {
  position: absolute;
  width: 36%;
  aspect-ratio: 1;
  border-radius: 38% 54% 49% 54%;
  background:
    radial-gradient(ellipse at 32% 18%,#fff 0 10%,#fff4 31%,transparent 52%),
    linear-gradient(130deg,#fff9,#fff1 62%,#fff7);
  box-shadow: inset 0 2px #fff7, 0 10px 22px #52648935;
  transform: rotate(-17deg);
  content: "";
}
.guide-art::before { left: 12%; top: 37%; }
.guide-art::after { left: 55%; top: 10%; }
.guide-art i { top: 44%; left: 42%; width: 21%; }

@media (max-width: 1120px) { .theme-pull { top: 112px; } }
@media (max-width: 760px) {
  .jelly-hero, .entry-grid, .landing-lower { width: calc(100% - 28px); }
.theme-pull {
    position: absolute;
    top: calc(var(--chrome-height, 135px) + 23px);
    right: 23px;
    width: 46px;
    min-height: 46px;
    padding: 3px;
    border: 1px solid #cab1e8;
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 2px 12px #50347130;
    touch-action: manipulation;
  }
  .theme-pull img { height: 38px; transform: none; }
  .theme-pull :is(.theme-pin, .theme-line) { display: none; }
  .entry-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
  .entry-grid a { min-height: 66px; border-radius: 15px; padding: 8px 9px; }
  .entry-grid a:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .entry-grid strong { font-size: 12px; }
  .entry-grid small { font-size: 10px; }
  .landing-lower { margin-top: 19px; }
  .latest-guides { margin-top: 28px; }
  .guide-grid { gap: 10px; }
  .guide-card {
    grid-template-columns: clamp(74px, 30%, 150px) minmax(0, 1fr);
    gap: 11px;
    padding: 10px;
    border-radius: 16px;
  }
  .guide-cover { border-radius: 9px; }
  .guide-card h3 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.gel-button, .entry-grid a, .guide-card, .theme-pull img, .theme-line) { transition: none !important; }
  :is(.gel-button, .entry-grid a, .guide-card):is(:hover,:active) { transform: none; }
}
