/* Appily twentyone — Harvest Ledger help center */

.page-harvest-ledger {
  --hl-ink: #15201c;
  --hl-muted: #5a6b64;
  --hl-line: #d8e4de;
  --hl-paper: #fafcf9;
  --hl-margin: #e07a6a;
  --hl-leaf: #0b7a45;
  --hl-leaf-pale: #e8f5ee;
  --hl-root: #c45c26;
  --hl-root-pale: #fdf0e8;
  --hl-crisp: #2a8f6e;
  --hl-crisp-pale: #e6f5ef;
  --hl-soil: #5c4a32;
  --hl-soil-pale: #f3ede4;
  --hl-ice: #b8e4d4;
  background: var(--hl-paper);
}

/* ── Hero ── */
.hl-hero {
  position: relative;
  padding: 52px 0 40px;
  background: linear-gradient(155deg, #0a2e1f 0%, #0b7a45 55%, #12a35c 100%);
  color: #fff;
  overflow: hidden;
}

.hl-hero-rings {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  pointer-events: none;
  opacity: 0.22;
}

.hl-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.hl-ring-a {
  inset: 0;
  background: radial-gradient(circle, transparent 42%, rgba(255, 255, 255, 0.08) 43%, transparent 44%);
}

.hl-ring-b {
  inset: 18%;
  border-style: dashed;
  animation: hl-spin 40s linear infinite;
}

.hl-ring-c {
  inset: 36%;
  background: rgba(255, 255, 255, 0.06);
}

@keyframes hl-spin {
  to { transform: rotate(360deg); }
}

.hl-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 36px;
  align-items: end;
}

.hl-kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hl-ice);
}

.hl-hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.12;
  margin: 0 0 14px;
  color: #fff;
  font-weight: 700;
}

.hl-hero-copy h1 em {
  font-style: normal;
  color: #c8f5dc;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 6px;
}

.hl-lede {
  margin: 0 0 22px;
  max-width: 54ch;
  line-height: 1.7;
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.88);
}

.hl-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 480px;
  padding: 4px 6px 4px 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hl-search-icon {
  font-size: 1.1rem;
  opacity: 0.75;
  flex-shrink: 0;
}

.hl-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 10px 0;
  outline: none;
}

.hl-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.hl-search-clear {
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.hl-search-clear:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hl-hero-meta {
  display: grid;
  gap: 12px;
}

.hl-meta-card {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
}

.hl-meta-card-alt {
  background: rgba(0, 0, 0, 0.15);
}

.hl-meta-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 6px;
}

.hl-meta-card strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.hl-meta-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hl-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7dffb8;
  box-shadow: 0 0 0 0 rgba(125, 255, 184, 0.6);
  animation: hl-pulse 2s ease infinite;
}

@keyframes hl-pulse {
  70% { box-shadow: 0 0 0 10px rgba(125, 255, 184, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 255, 184, 0); }
}

.hl-meta-card p {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.8;
}

/* ── Chapter chip rail ── */
.hl-chip-rail {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 252, 249, 0.92);
  border-bottom: 1px solid var(--hl-line);
  backdrop-filter: blur(10px);
}

.hl-chip-inner {
  display: flex;
  gap: 10px;
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.hl-chip-inner::-webkit-scrollbar { display: none; }

.hl-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--hl-line);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hl-muted);
  transition: var(--transition);
}

.hl-chip-no {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.65;
}

.hl-chip:hover {
  border-color: var(--hl-leaf);
  color: var(--hl-leaf);
}

.hl-chip.is-active {
  color: #fff;
  border-color: transparent;
}

.hl-chip-leaf.is-active { background: var(--hl-leaf); }
.hl-chip-root.is-active { background: var(--hl-root); }
.hl-chip-crisp.is-active { background: var(--hl-crisp); }
.hl-chip-soil.is-active { background: var(--hl-soil); }

/* ── Main layout ── */
.hl-floor {
  padding: 36px 0 64px;
}

.hl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 32px;
  align-items: start;
}

/* ── Ledger book ── */
.hl-ledger {
  position: relative;
  padding: 28px 24px 32px 48px;
  background:
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 31px,
      var(--hl-line) 31px,
      var(--hl-line) 32px
    ),
    #fff;
  border: 1px solid var(--hl-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hl-margin {
  position: absolute;
  left: 32px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--hl-margin);
  opacity: 0.55;
}

.hl-chapter {
  position: relative;
  margin-bottom: 36px;
  scroll-margin-top: 88px;
}

.hl-chapter:last-of-type {
  margin-bottom: 0;
}

.hl-chapter-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.hl-chapter-no {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 8px;
  color: #fff;
}

.hl-chapter-leaf .hl-chapter-no { background: var(--hl-leaf); }
.hl-chapter-root .hl-chapter-no { background: var(--hl-root); }
.hl-chapter-crisp .hl-chapter-no { background: var(--hl-crisp); }
.hl-chapter-soil .hl-chapter-no { background: var(--hl-soil); }

.hl-chapter-tag {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hl-muted);
}

.hl-chapter-head h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.hl-chapter-head p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--hl-muted);
}

.hl-entries {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hl-entry {
  background: var(--hl-paper);
  border: 1px solid var(--hl-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.hl-entry[open] {
  border-color: rgba(11, 122, 69, 0.35);
  box-shadow: 0 4px 16px rgba(11, 122, 69, 0.08);
}

.hl-entry.is-hidden {
  display: none;
}

.hl-entry summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--hl-ink);
}

.hl-entry summary::-webkit-details-marker { display: none; }

.hl-entry-mark {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border: 2px solid var(--hl-line);
  border-radius: 3px;
  background: #fff;
  transition: var(--transition);
}

.hl-entry[open] .hl-entry-mark {
  background: var(--hl-leaf);
  border-color: var(--hl-leaf);
}

.hl-entry-q {
  flex: 1;
  min-width: 0;
}

.hl-entry-toggle {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  position: relative;
}

.hl-entry-toggle::before,
.hl-entry-toggle::after {
  content: '';
  position: absolute;
  background: var(--hl-muted);
  transition: transform var(--transition);
}

.hl-entry-toggle::before {
  top: 8px;
  left: 3px;
  right: 3px;
  height: 2px;
}

.hl-entry-toggle::after {
  left: 8px;
  top: 3px;
  bottom: 3px;
  width: 2px;
}

.hl-entry[open] .hl-entry-toggle::after {
  transform: scaleY(0);
}

.hl-entry-body {
  padding: 0 16px 16px 42px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--hl-muted);
}

.hl-entry-body a {
  color: var(--hl-leaf);
  font-weight: 600;
}

.hl-no-results {
  margin: 20px 0 0;
  padding: 16px;
  text-align: center;
  color: var(--hl-muted);
  background: var(--hl-leaf-pale);
  border-radius: var(--radius-md);
}

.hl-no-results a {
  color: var(--hl-leaf);
  font-weight: 600;
}

/* ── Sidebar ── */
.hl-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 72px;
}

.hl-stamp {
  position: relative;
  padding: 28px 22px 24px;
  text-align: center;
  background: #fff;
  border: 2px dashed var(--hl-leaf);
  border-radius: 50%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.hl-stamp-ring {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(11, 122, 69, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.hl-stamp-brand {
  margin: 0 0 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hl-leaf);
}

.hl-stamp h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.hl-stamp > p {
  margin: 0 0 14px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--hl-muted);
  max-width: 18ch;
}

.hl-stamp-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--hl-leaf);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  transition: background var(--transition);
}

.hl-stamp-btn:hover {
  background: var(--green-dark);
}

.hl-stamp-email,
.hl-stamp-phone {
  margin: 10px 0 0;
  font-size: 0.75rem;
}

.hl-stamp-email a,
.hl-stamp-phone a {
  color: var(--hl-leaf);
  font-weight: 600;
  word-break: break-all;
}

.hl-slip {
  position: relative;
  padding: 18px 18px 22px;
  background: #fff;
  border: 1px solid var(--hl-line);
  border-radius: var(--radius-md);
  font-family: 'Courier New', Courier, monospace;
}

.hl-slip-title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hl-muted);
}

.hl-slip-rows {
  margin: 0;
}

.hl-slip-rows div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--hl-line);
  font-size: 0.8rem;
}

.hl-slip-rows div:last-child {
  border-bottom: 0;
}

.hl-slip-rows dt {
  margin: 0;
  color: var(--hl-muted);
}

.hl-slip-rows dd {
  margin: 0;
  font-weight: 700;
  color: var(--hl-ink);
  text-align: right;
}

.hl-slip-tear {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 12px;
  background:
    radial-gradient(circle at 8px 0, transparent 6px, #fff 6px) 0 0 / 16px 12px repeat-x;
}

.hl-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hl-shortcut {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--hl-line);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), transform var(--transition);
}

.hl-shortcut:hover {
  border-color: var(--hl-leaf);
  transform: translateX(4px);
}

.hl-shortcut-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--hl-leaf-pale);
  color: var(--hl-leaf);
  border-radius: 8px;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.hl-shortcut span span {
  display: block;
}

.hl-shortcut strong {
  display: block;
  font-size: 0.88rem;
  color: var(--hl-ink);
}

.hl-shortcut em {
  display: block;
  font-size: 0.75rem;
  font-style: normal;
  color: var(--hl-muted);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hl-hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hl-hero-meta {
    grid-template-columns: 1fr 1fr;
  }

  .hl-layout {
    grid-template-columns: 1fr;
  }

  .hl-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .hl-stamp {
    grid-column: 1 / -1;
    max-width: 280px;
    margin: 0 auto;
  }

  .hl-shortcuts {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hl-hero {
    padding: 36px 0 28px;
  }

  .hl-hero-meta {
    grid-template-columns: 1fr;
  }

  .hl-ledger {
    padding: 22px 16px 24px 36px;
  }

  .hl-margin {
    left: 22px;
  }

  .hl-sidebar {
    grid-template-columns: 1fr;
  }

  .hl-shortcuts {
    grid-template-columns: 1fr;
  }

  .hl-stamp {
    max-width: 100%;
  }
}
