/* Full-bleed notebook homepage — match mockup */
@font-face {
  font-family: 'Gandom';
  src: url('/static/fonts/gandom/Gandom-FD.woff2') format('woff2'),
       url('/static/fonts/gandom/Gandom-FD.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body:has(.hn-home) {
  background: #fffdf8 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hn-home {
  --ink: #1a1630;
  --muted: #5c566c;
  --paper: #fffdf8;
  --rule: #c5d6ec;
  --margin-red: #e85b6a;
  --purple: #5b3fd4;
  --purple-soft: #efeaff;
  --yellow: #ffe56a;
  --hand: 'Gandom', IRANYekanXFaNum, Tahoma, sans-serif;
  --mark-yellow: rgba(255, 229, 106, .78);
  --gutter: 56px;
  --edge: 20px;
  --max: 1240px;
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--hand);
  background-color: var(--paper);
  background-image:
    linear-gradient(
      90deg,
      transparent 0,
      transparent calc(100% - var(--gutter)),
      var(--margin-red) calc(100% - var(--gutter)),
      var(--margin-red) calc(100% - var(--gutter) + 2.5px),
      transparent calc(100% - var(--gutter) + 2.5px)
    ),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px);
  background-attachment: local;
}

/* header sits ON the paper */
.hn-home .hn-chrome-header,
.hn-home .bf-site-header.hn-chrome-header {
  background: transparent !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.hn-home .hn-chrome-inner {
  max-width: var(--max) !important;
  width: 100%;
  margin: 0 auto;
  padding-right: calc(var(--gutter) + 6px);
  padding-left: var(--edge);
}
.hn-home .hn-chrome-right .hn-tape:not(.hn-tape-btn) { display: none !important; }
.hn-home .hn-chrome-nav .bf-nav a.is-active {
  background: none !important;
  border-bottom: 2.5px solid var(--ink);
  color: var(--ink) !important;
}
.hn-tape-btn {
  display: inline-flex !important;
  align-items: center;
  position: relative;
  font-family: var(--hand);
  font-size: .9rem;
  font-weight: 800;
  color: #5c4a00 !important;
  background: #ffe56a;
  border: 2px solid #e0c64a;
  padding: 7px 16px;
  border-radius: 999px;
  transform: rotate(-4deg);
  text-decoration: none !important;
  box-shadow: 1px 2px 0 rgba(0,0,0,.06);
  line-height: 1;
}
.hn-tape-btn:before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 26px;
  height: 10px;
  transform: translateX(-50%);
  background:
    linear-gradient(#ffe56a, #ffe56a) 2px 0 / 3px 9px no-repeat,
    linear-gradient(#ffe56a, #ffe56a) 11px 0 / 3px 10px no-repeat,
    linear-gradient(#ffe56a, #ffe56a) 20px 0 / 3px 8px no-repeat;
}
.hn-login-btn {
  border: 1.8px solid #2a2438 !important;
  background: #fff !important;
  color: #2a2438 !important;
  text-decoration: none !important;
  font-family: var(--hand);
}
.hn-login-btn:hover { background: var(--purple-soft) !important; }

.hn-clip-top {
  position: absolute;
  top: 8px;
  left: 10px;
  width: 44px;
  height: auto;
  z-index: 40;
  transform: rotate(-22deg);
  pointer-events: none;
  filter: drop-shadow(1px 2px 0 rgba(0,0,0,.12));
}
.hn-search-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1.6px solid #e5e0ef;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2a2438;
  text-decoration: none;
}
.hn-search-btn:hover { background: var(--purple-soft); }

.hn-holes {
  position: fixed;
  right: 12px;
  top: 90px;
  bottom: 90px;
  width: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  pointer-events: none;
  z-index: 5;
}
.hn-holes i {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f7f4ee 0 40%, #b8c0d0 75%);
  box-shadow: inset 0 2px 3px rgba(0,0,0,.25), 0 0 0 2px #d5dce8;
}

.hn-wrap {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 8px calc(var(--gutter) + 8px) 32px var(--edge);
  position: relative;
}

/* —— HERO: copy RIGHT, card LEFT (RTL first column = right) —— */
.hn-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 430px);
  gap: 16px 36px;
  align-items: center;
  padding: 12px 0 8px;
  position: relative;
  min-height: 440px;
  overflow: visible;
}
.hn-hero-deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.hn-hero-deco-dots {
  top: 4px;
  left: 2px;
  width: 52px;
  height: 52px;
  opacity: .55;
  background:
    radial-gradient(circle, #b8c4dc 1.5px, transparent 1.6px) 0 0 / 12px 12px;
}
.hn-hero-deco-cube {
  top: 0;
  right: 0;
  width: 58px;
  height: 58px;
  opacity: .75;
}
.hn-hero-deco-cpu {
  bottom: 8px;
  left: 0;
  width: 64px;
  height: 64px;
  opacity: .8;
}
.hn-hero-deco-formula {
  bottom: 6px;
  right: 0;
  margin: 0;
  max-width: 220px;
  font-size: 11px;
  line-height: 1.45;
  color: #6a6280;
  font-family: Georgia, 'Times New Roman', serif;
  direction: ltr;
  text-align: left;
  opacity: .72;
}
.hn-hero > .hn-hero-clip {
  position: absolute;
  pointer-events: none;
  z-index: 4;
  left: 0;
  bottom: 4px;
  width: 42px;
  transform: rotate(-28deg);
  filter: drop-shadow(1px 2px 0 rgba(0,0,0,.12));
}

.hn-hero-copy {
  position: relative;
  padding: 20px 4px 28px 0;
  min-width: 0;
  width: 100%;
  overflow: visible;
  z-index: 2;
}
.hn-hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.2vw, 3.05rem);
  font-weight: 800;
  line-height: 1.58;
  max-width: none;
  letter-spacing: -.01em;
  position: relative;
  z-index: 2;
  color: #16122a;
}
.hn-hero-copy .hl {
  background: linear-gradient(transparent 28%, rgba(255, 224, 70, .92) 28% 88%, transparent 88%);
  padding: 0 .12em;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  box-shadow: inset 0 -.08em 0 rgba(255, 200, 40, .35);
}
.hn-hero-copy .ul {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.hn-hero-copy .ul::after {
  content: "";
  position: absolute;
  right: -.06em;
  left: -.06em;
  bottom: .08em;
  height: .18em;
  background: var(--purple);
  border-radius: 3px;
  transform: rotate(-1.5deg);
  z-index: -1;
  opacity: .92;
}
.hn-hero-copy .circ {
  border: 3px solid var(--purple);
  border-radius: 48% 52% 50% 49% / 46% 54% 48% 52%;
  padding: .06em .4em .04em;
  white-space: nowrap;
  display: inline-block;
  transform: rotate(-2.5deg);
  box-shadow: 2px 2px 0 rgba(91, 63, 212, .12);
}
.hn-hero-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.9;
  max-width: 46ch;
  position: relative;
  z-index: 2;
}
.hn-hero-lead mark {
  background: linear-gradient(transparent 45%, rgba(220, 210, 255, .85) 45%);
  color: inherit;
  padding: 0 .12em;
  border-radius: 3px;
  font-weight: 800;
}
.hn-icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 2;
  margin-bottom: 10px;
}
.hn-icon-row span {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 74px;
  padding: 10px 12px 8px;
  border-radius: 14px;
  background: #f3f7ff;
  border: 2px solid #d8e4f8;
  font-size: 13px;
  font-weight: 800;
  color: #3d3558;
  box-shadow: 0 3px 0 rgba(100, 120, 180, .1);
}
.hn-icon-row img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.hn-math-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 14px;
  margin-top: 10px;
  padding-top: 4px;
  position: relative;
  z-index: 1;
  opacity: .88;
}
.hn-math {
  flex: 0 0 auto;
  height: auto;
}
.hn-math-graph { width: 88px; }
.hn-math-sum { width: 118px; }
.hn-math-matrix { width: 72px; }
.hn-math-net { width: 96px; }
/* sticky note sits IN FLOW under lead — never overlays headline */
.hn-start-note {
  position: relative;
  display: inline-block;
  left: auto;
  top: auto;
  z-index: 2;
  width: auto;
  max-width: 140px;
  background: #fff59d;
  border: 0;
  border-radius: 2px;
  padding: 14px 10px 8px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  color: #5c4a00;
  text-align: center;
  line-height: 1.4;
  transform: rotate(-6deg);
  box-shadow: 2px 4px 10px rgba(80,60,20,.12);
}
.hn-washi {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 52px;
  height: 16px;
  transform: translateX(-50%) rotate(-5deg);
  background: rgba(255, 236, 170, .75);
  border: 1px solid rgba(210, 180, 80, .35);
}
.hn-note-arr {
  display: block;
  width: 32px;
  height: 24px;
  margin: 2px auto 0;
}
.hn-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
  position: relative;
  z-index: 2;
}
.hn-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px;
  font-family: var(--hand); font-weight: 800; font-size: 1.08rem;
  text-decoration: none; border: 2px solid transparent;
}
.hn-btn-primary {
  background: var(--purple); color: #fff;
  box-shadow: 0 5px 0 rgba(70,50,160,.22);
}
.hn-btn-primary img { width: 16px; height: 16px; filter: brightness(12); }
.hn-btn-primary b { font-size: 1.1rem; line-height: 1; }
.hn-btn-primary:hover { filter: brightness(1.06); }
.hn-btn-ghost { background: #fff; color: var(--purple); border-color: var(--purple); }

.hn-stage { position: relative; margin-top: 4px; min-width: 0; z-index: 2; }
.hn-pl-frame {
  position: relative;
  background: #fff;
  border-radius: 10px 20px 18px 12px;
  padding: 38px 20px 46px 30px;
  min-height: 400px;
  box-shadow: 0 14px 36px rgba(80, 70, 140, .13), 0 0 0 1px rgba(40,30,80,.05);
  transform: rotate(-1.4deg);
  overflow: visible;
}
.hn-pl-spiral {
  position: absolute;
  top: 44px;
  bottom: 44px;
  left: 6px;
  width: 16px;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 10px, #2a2438 0 3px, transparent 3.2px) 0 0 / 16px 20px repeat-y;
}
.hn-pl-tape {
  position: absolute;
  top: -11px;
  left: 46%;
  width: 92px;
  height: 24px;
  transform: translateX(-50%) rotate(-5deg);
  background: rgba(255, 248, 196, .72);
  border: 1px solid rgba(220, 200, 120, .42);
  border-radius: 2px;
  z-index: 5;
  pointer-events: none;
}
.hn-pl-frame:before { content: none; }
.hn-pl-frame:after { content: none; }
.hn-pl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0 2px;
}
.hn-pl-series {
  font-size: .92rem;
  font-weight: 800;
  color: #5c566c;
  direction: ltr;
  unicode-bidi: isolate;
}
.hn-slides { min-height: 300px; position: relative; }
.hn-slide {
  display: none;
  animation: hnIn .4s ease;
}
.hn-slide.is-active { display: block; }
.hn-slide-num {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--purple-soft);
  border: 2px solid #d8cbff;
  color: var(--purple);
  font-weight: 800;
  font-size: 1.05rem;
  transform: rotate(-4deg);
}
.hn-slide-cover {
  margin: 0 0 10px;
  border: 2.5px solid #3a3648;
  border-radius: 12px 14px 10px 12px;
  overflow: hidden;
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(197,217,238,.28) 27px 28px),
    #fffdf8;
  box-shadow: 3px 5px 0 rgba(58,54,72,.1);
  transform: rotate(-.3deg);
}
.hn-slide-cover img {
  width: 100%;
  display: block;
  max-height: 196px;
  object-fit: cover;
  object-position: center;
  background: #fff;
}
.hn-slide-cover.is-fallback {
  min-height: 160px;
  display: grid;
  place-items: center;
  background: var(--purple-soft);
}
.hn-slide-cover.is-fallback img {
  width: 72px;
  height: 72px;
  max-height: none;
  object-fit: contain;
  opacity: .9;
}
.hn-slide-copy { margin: 0 0 8px; }
.hn-slide-kicker {
  margin: 0 0 8px;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.65;
  color: var(--ink);
}
.hn-slide-kicker mark {
  background: linear-gradient(transparent 42%, rgba(214, 205, 255, .75) 42%, rgba(214, 205, 255, .75) 92%, transparent 92%);
  padding: 0 .12em;
  color: inherit;
}
.hn-slide-desc {
  margin: 0;
  font-size: .96rem;
  color: var(--muted);
  line-height: 1.75;
}
.hn-slide-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 2px;
}
.hn-slide-go {
  font-weight: 800;
  color: var(--purple);
  text-decoration: none;
  font-size: 1.02rem;
  line-height: 1.4;
}
.hn-slide-go:hover { filter: brightness(1.08); }
@keyframes hnIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.hn-pl-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 8px;
}
.hn-dots { display: flex; gap: 8px; }
.hn-dot {
  width: 11px; height: 11px; border-radius: 50%;
  border: 0; background: #e6e0f4; padding: 0; cursor: pointer;
}
.hn-dot.is-active { background: var(--yellow); box-shadow: 0 0 0 2px #e0c64a; }
.hn-pl-nav { display: none; }

/* topics */
.hn-topics {
  display: flex; flex-wrap: wrap; gap: 10px 12px;
  margin: 18px 0 6px; padding: 10px 0 4px;
  position: relative;
}
.hn-topics a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px;
  background: #fff; border: 1.5px solid #e5e0ef;
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px;
  box-shadow: 0 2px 0 rgba(0,0,0,.04);
  position: relative;
}
.hn-topics a:first-child:before {
  content: "";
  position: absolute;
  top: -8px;
  right: 18px;
  width: 36px;
  height: 14px;
  background: rgba(255, 248, 196, .7);
  border: 1px solid rgba(220, 200, 120, .35);
  transform: rotate(-8deg);
}
.hn-topics a:hover { border-color: #c9bff0; background: var(--purple-soft); }
.hn-topics img { width: 20px; height: 20px; }
.hn-clip {
  position: absolute;
  left: -6px;
  top: 4px;
  width: 42px;
  transform: rotate(-28deg);
  filter: drop-shadow(1px 2px 0 rgba(0,0,0,.12));
}

/* sections */
.hn-sec { margin-top: 1.6rem; position: relative; }
.hn-sec-head {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.hn-sec-head h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(transparent 52%, var(--mark-yellow) 52%);
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hn-sec-head a.hn-sec-more {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-family: Gandom, Tahoma, sans-serif;
  font-size: .88rem;
  font-weight: 800;
  color: #6f63c7 !important;
  text-decoration: none !important;
  padding: .35rem .75rem;
  border: 2px dashed #c6b8f2;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  margin-right: auto;
  transition: border-color .12s, transform .12s;
}
.hn-sec-head a.hn-sec-more:hover {
  border-color: #6f63c7;
  transform: translateY(-1px);
}
.hn-sec-head a:not(.hn-sec-more) { display: none; }
.hn-spark { width: 22px; height: 22px; }

.hn-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 18px;
  padding-top: 8px;
}
.hn-card.hn-note-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 0;
  border-radius: 8px 18px 16px 10px;
  overflow: visible;
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: 0 12px 28px rgba(80, 70, 140, .12), 0 0 0 1px rgba(40,30,80,.04);
  transition: transform .15s ease, box-shadow .15s ease;
  padding: 34px 14px 16px;
}
.hn-note-card.hn-tilt-1 { transform: rotate(-1.4deg); }
.hn-note-card.hn-tilt-2 { transform: rotate(1.1deg); }
.hn-note-card.hn-tilt-3 { transform: rotate(-.7deg); }
.hn-note-card:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow: 0 16px 34px rgba(80, 70, 140, .16);
}
.hn-card-pin {
  position: absolute;
  top: -14px;
  left: 12px;
  width: 34px;
  height: 34px;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(1px 2px 0 rgba(0,0,0,.12));
}
.hn-card-tape {
  position: absolute;
  top: -9px;
  left: 44%;
  width: 62px;
  height: 16px;
  transform: translateX(-50%) rotate(-5deg);
  background: rgba(255, 248, 196, .65);
  border: 1px solid rgba(220, 200, 120, .4);
  border-radius: 2px;
  z-index: 3;
  pointer-events: none;
}
.hn-card-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff3a0;
  border: 1.5px solid #e8d56a;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  color: #7a6500;
  transform: rotate(5deg);
  box-shadow: 1px 2px 0 rgba(0,0,0,.05);
  pointer-events: none;
}
.hn-card-badge img { width: 12px; height: 12px; }
.hn-card-cover {
  aspect-ratio: 4 / 3;
  min-height: 140px;
  max-height: 190px;
  margin: 0 0 10px;
  background:
    repeating-linear-gradient(180deg, transparent 0 22px, rgba(197,217,238,.25) 22px 23px),
    #fffdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px solid #3a3648;
  border-radius: 10px 14px 8px 12px;
  overflow: hidden;
  box-shadow: 2px 4px 0 rgba(58,54,72,.08);
}
.hn-card-cover img:not(.ico) {
  width: 100%;
  height: 100%;
  max-height: 190px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
}
.hn-card-cover img.ico { width: 52px; height: 52px; object-fit: contain; }
.hn-card-cover.is-icon {
  background: linear-gradient(160deg, #f3eeff, #e8f1ff);
}
.hn-yt-card .hn-card-cover { position: relative; }
.hn-yt-play { display: none !important; }
.hn-yt-head {
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.hn-yt-head-ico {
  width: 34px;
  height: 34px;
  object-fit: contain;
  transform: rotate(8deg);
  margin-right: 4px;
}
.hn-yt-sticky {
  flex: 0 0 auto;
  width: 92px;
  padding: .55rem .4rem;
  background: #fff59a;
  font-family: Gandom, Tahoma, sans-serif;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.4;
  color: #5a4a20;
  text-align: center;
  transform: rotate(-6deg);
  box-shadow: 2px 4px 10px rgba(80,50,10,.12);
}
.hn-yt-sticky img { display: block; margin: 0 auto .15rem; }
.hn-yt-lead {
  margin: -.4rem 0 1rem;
  font-family: Gandom, Tahoma, sans-serif;
  font-size: .92rem;
  color: var(--muted);
  font-weight: 700;
}
.hn-yt-sticker {
  position: absolute;
  z-index: 5;
  width: 52px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(1px 2px 0 rgba(0,0,0,.12));
}
.hn-yt-sticker.s1 { bottom: 58px; left: -10px; transform: rotate(-12deg); width: 48px; }
.hn-yt-sticker.s2 { top: 28px; right: -12px; transform: rotate(10deg); width: 58px; }
.hn-yt-sticker.s3 { bottom: 52px; right: -10px; transform: rotate(8deg); width: 48px; }
.hn-yt-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: .45rem 1rem !important;
  border: 1.8px solid #b9a8ef;
  border-radius: 999px;
  background: rgba(239,234,255,.55);
  color: #5b4db8 !important;
  text-decoration: none !important;
}
.hn-card-body {
  padding: 0 2px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.hn-card-body h3 {
  margin: 0;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.5;
}
.hn-card-kicker {
  margin: 0;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.55;
}
.hn-card-kicker mark {
  background: linear-gradient(transparent 42%, rgba(214, 205, 255, .75) 42%, rgba(214, 205, 255, .75) 92%, transparent 92%);
  padding: 0 .1em;
  color: inherit;
}
.hn-card-desc {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}
.hn-card-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  padding-top: 2px;
}
.hn-card-meta,
.hn-card-metas {
  font-size: .74rem;
  color: #7a7588;
  font-weight: 700;
  width: 100%;
  text-align: center;
}
.hn-card-metas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hn-card-go {
  font-weight: 800;
  color: var(--purple);
  font-size: .88rem;
  line-height: 1.35;
}
.hn-card-scribble {
  display: block;
  width: min(130px, 70%);
  height: 8px;
  background:
    radial-gradient(circle at 12% 70%, rgba(111,99,199,.75) 0 38%, transparent 40%),
    radial-gradient(circle at 62% 65%, rgba(111,99,199,.72) 0 34%, transparent 36%),
    radial-gradient(circle at 88% 35%, rgba(111,99,199,.68) 0 32%, transparent 34%);
  border-bottom: 2px solid rgba(111,99,199,.5);
  border-radius: 40%;
  transform: rotate(-1deg);
  opacity: .85;
}
.hn-sticky { display: none; }
.hn-card-btn { display: none; }
.hn-mascot-side { display: none !important; }

/* stats tape banner */
.hn-stats {
  margin: 2.4rem 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: #fff6c8;
  border: 0;
  border-radius: 12px;
  padding: 22px 16px 18px;
  box-shadow: 0 6px 18px rgba(160, 130, 40, .08);
}
.hn-stats:before,
.hn-stats:after {
  content: "";
  position: absolute;
  top: -9px;
  width: 52px;
  height: 20px;
  background: rgba(255, 250, 210, .78);
  border: 1px solid rgba(220, 200, 120, .45);
}
.hn-stats:before { right: 28px; transform: rotate(-9deg); }
.hn-stats:after { left: 28px; transform: rotate(8deg); }
.hn-stats .hn-tape-bl,
.hn-stats .hn-tape-br {
  position: absolute;
  bottom: -8px;
  width: 48px;
  height: 18px;
  background: rgba(255, 250, 210, .78);
  border: 1px solid rgba(220, 200, 120, .4);
}
.hn-stats .hn-tape-bl { left: 40px; transform: rotate(-6deg); }
.hn-stats .hn-tape-br { right: 40px; transform: rotate(7deg); }
.hn-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  color: var(--ink) !important;
}
.hn-stats b {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}
.hn-stats span {
  font-weight: 700;
  font-size: .88rem;
  color: #3d3850;
}
.hn-stats img { width: 34px; height: 34px; }
.hn-mascot-stats {
  position: absolute;
  width: 86px;
  left: -30px;
  bottom: -22px;
  transform: rotate(-8deg);
  z-index: 2;
}

/* newsletter */
.hn-news {
  margin: 2.4rem 0 1.2rem;
  position: relative;
  text-align: center;
  border: 2.5px dashed #6d53d4;
  border-radius: 22px;
  padding: 28px 28px 24px;
  background: #f7f3ff;
  overflow: visible;
}
.hn-news-art {
  position: absolute;
  left: -18px;
  bottom: -28px;
  z-index: 2;
}
.hn-news-art img {
  width: 128px;
  height: auto;
  transform: rotate(-6deg);
  filter: drop-shadow(0 8px 16px rgba(60, 48, 120, .16));
}
.hn-news-copy { position: relative; z-index: 1; }
.hn-news h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  background: none;
  display: block;
}
.hn-news p { margin: 0 0 16px; color: var(--muted); }
.hn-news-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 460px;
  margin: 0 auto;
  justify-content: center;
}
.hn-news-form input {
  flex: 1; min-width: 200px; height: 46px;
  border: 1.5px solid #e2dceb; border-radius: 999px;
  padding: 0 18px; font-family: var(--hand); background: #fff;
}
.hn-news-form button {
  height: 46px; border: 0; border-radius: 999px;
  padding: 0 22px; background: var(--purple); color: #fff;
  font-family: var(--hand); font-weight: 800; cursor: pointer;
}
.hn-news-plane {
  position: absolute;
  right: 18px;
  top: 8px;
  width: 88px;
  opacity: .98;
  transform: rotate(12deg);
  pointer-events: none;
  filter: drop-shadow(0 8px 16px rgba(60, 48, 120, .16));
}
.hn-news-trail {
  position: absolute;
  right: 70px;
  top: 36px;
  width: 90px;
  height: 40px;
  border: 2px dashed #c9b8f0;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 40px 0 0;
  pointer-events: none;
}

/* footer: full-bleed notebook (sitewide styles in befarma-hero.css) */
.hn-home .hn-chrome-footer,
.hn-home .bf-footer.hn-chrome-footer {
  background: transparent;
  margin: 1.25rem 0 0;
  padding: 0;
  width: 100%;
}
.hn-home .hn-footer-desk { display: contents; }
.hn-home .hn-footer-sheet {
  /* keep lined paper + full width from hero.css — do not flatten */
  background-color: #fffdf8 !important;
  background-image: repeating-linear-gradient(180deg, transparent 0 31px, #c9d8ec 31px 32px) !important;
  box-shadow: 0 -8px 28px rgba(40, 55, 90, .08) !important;
  border-radius: 0 !important;
  padding: 0 0 1.1rem !important;
  width: 100% !important;
}
.hn-home .hn-footer-grid {
  display: grid;
  grid-template-columns: 1.55fr .9fr .9fr .9fr;
  gap: 0;
  align-items: start;
}
.hn-home .hn-footer-grid > * {
  align-self: start;
  height: auto;
}
.hn-home .hn-footer-grid > div {
  padding: .35rem 1.1rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hn-home .hn-footer-grid > div + div {
  border-right: 1.5px dashed #d5cfe0;
}
.hn-home .hn-footer-brand {
  position: relative;
  padding-right: .2rem;
  padding-bottom: 4.5rem;
  overflow: visible;
}
.hn-home .hn-footer-copy {
  justify-content: center;
  text-align: center;
  border-top: 2px dotted #e8ddb0;
  margin-top: .9rem;
}
.hn-home .hn-footer-copy p {
  display: block;
  text-align: center;
}
.hn-heart { width: 16px; height: 16px; }

@media (max-width: 980px) {
  .hn-home { --gutter: 18px; --edge: 14px; }
  .hn-holes { display: none; }
  .hn-home .hn-chrome-inner {
    padding-right: 14px !important;
    padding-left: 12px !important;
    gap: .45rem;
  }
  .hn-home .hn-search-btn { display: none; }
  .hn-tape-btn {
    padding: 6px 10px !important;
    font-size: .78rem !important;
  }
  .hn-wrap {
    padding: 6px 14px 28px 12px;
  }
  .hn-hero { grid-template-columns: 1fr; min-height: 0; align-items: start; }
  .hn-hero-deco,
  .hn-hero > .hn-hero-clip { display: none; }
  .hn-hero-copy {
    padding-bottom: 8px;
  }
  .hn-hero-copy h1 { font-size: clamp(1.75rem, 6.5vw, 2.25rem); }
  .hn-math-row { justify-content: center; gap: 6px 10px; }
  .hn-math-graph { width: 72px; }
  .hn-math-sum { width: 100px; }
  .hn-math-matrix { width: 60px; }
  .hn-math-net { width: 80px; }
  .hn-pl-nav { display: flex; gap: 8px; }
  .hn-pl-bar { justify-content: space-between; }
  .hn-pl-nav button {
    width: 38px; height: 38px; border-radius: 50%;
    border: 2px solid #d8cbff; background: #fff; cursor: pointer; color: var(--purple); font-size: 1.1rem;
  }
  .hn-start-note {
    position: static;
    transform: rotate(-3deg);
    margin: 0 0 12px;
    width: auto;
    display: inline-block;
  }
  .hn-cards { grid-template-columns: 1fr 1fr; gap: 18px 14px; }
  .hn-note-card.hn-tilt-1 { transform: rotate(-1.2deg); }
  .hn-note-card.hn-tilt-2 { transform: rotate(.9deg); }
  .hn-note-card.hn-tilt-3 { transform: rotate(-.5deg); }
  .hn-card-pin { width: 30px; height: 30px; top: -12px; }
  .hn-card-tape { display: block; width: 56px; height: 14px; }
  .hn-stats { display: none !important; }

  .hn-sparkle { display: none; }
  .hn-icon-row { justify-content: center; }
  .hn-icon-row span { min-width: 68px; padding: 8px 10px 6px; }
  .hn-mascot {
    display: block !important;
    position: static !important;
    pointer-events: none;
    margin: 10px auto 0;
  }
  .hn-mascot-hero { display: none !important; }
  .hn-mascot-pl {
    width: 88px !important;
    margin: 10px auto 2px !important;
    transform: rotate(-6deg);
  }
  .hn-mascot-side {
    width: 68px !important;
    margin: 0 0 10px auto !important;
    transform: rotate(6deg);
  }
  .hn-mascot-foot {
    position: static !important;
    display: block !important;
    width: 64px !important;
    margin: 12px 0 4px !important;
    transform: rotate(4deg);
  }
  .hn-home .hn-footer-brand {
    overflow: visible;
    padding-bottom: 0;
  }
  .hn-clip-top {
    display: block !important;
    width: 30px;
    top: 8px;
    left: 8px;
  }
  .hn-clip { display: none !important; }
  .hn-news-art {
    display: block !important;
    position: static;
    text-align: center;
    margin: 0 0 10px;
  }
  .hn-news-art img {
    width: 76px;
    height: auto;
    transform: rotate(-4deg);
  }
  .hn-news-plane,
  .hn-news-trail {
    display: none !important;
  }

  .hn-pl-frame {
    transform: rotate(-1.6deg);
    margin: 14px 8px 8px;
    overflow: visible;
    padding: 32px 14px 52px;
    min-height: 0;
  }
  .hn-pl-pin {
    display: block;
    width: 36px;
    height: 36px;
    top: -16px;
    left: 12px;
  }
  .hn-pl-tape {
    display: block;
    top: -10px;
    left: 46%;
    width: 72px;
    height: 18px;
  }
  .hn-pl-badge {
    top: 10px;
    right: 10px;
    font-size: 12px;
    padding: 6px 10px;
  }
  .hn-slides { min-height: 300px; }
  .hn-slide-title { font-size: 1.12rem; }
  .hn-slide-cover img { max-height: 180px; }
  .hn-slide-desc { font-size: .9rem; }
  .hn-home .hn-footer-grid { grid-template-columns: 1fr 1fr; }
  .hn-home .hn-footer-brand { grid-column: 1 / -1; }
  .hn-home .hn-footer-grid > div:nth-child(3) { border-right: 0; }
}
@media (max-width: 640px) {
  .hn-home { --gutter: 12px; --edge: 10px; }
  .hn-wrap { padding: 4px 12px 24px 10px; }
  .hn-cards { grid-template-columns: 1fr; gap: 20px; }
  .hn-note-card.hn-tilt-1,
  .hn-note-card.hn-tilt-2,
  .hn-note-card.hn-tilt-3 { transform: rotate(-1deg); }
  .hn-topics { margin-top: 12px; }
  .hn-icon-row { gap: 6px; }
  .hn-icon-row span { padding: 6px 11px; font-size: 12.5px; }
  .hn-btn { padding: 11px 18px; font-size: 1rem; }
  .hn-mascot-hero { display: none !important; }
  .hn-mascot-pl { width: 80px !important; }
  .hn-sticker { width: 50px; }
  .hn-sticker-main { width: 76px !important; }
  .hn-home .hn-footer-grid { grid-template-columns: 1fr; }
  .hn-news { padding: 20px 16px; }
  .hn-login-btn span { font-size: .72rem; }
  .hn-login-btn { padding-inline: 10px !important; }
}
