/* ============================================================
   LegiList Learn — landing page only.
   Deliberately different from the rest of the site: warm paper,
   chalkboard, index-card guides. Prefix: lh-
   ============================================================ */

.lh-body {
  margin: 0;
  color: #2b2b2b;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
  background-color: #faf7f2;
  background-image:
    linear-gradient(rgba(31, 61, 43, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 61, 43, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}

.lh-body .ll-breadcrumbs {
  max-width: 1080px;
}

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

.lh-wrap {
  max-width: 1080px;
  margin: 24px auto 64px;
  padding: 0 16px;
}

/* --- Chalkboard hero ---------------------------------------- */
.lh-board {
  position: relative;
  overflow: hidden;
  border: 10px solid #b07d4e;
  border-radius: 18px;
  padding: 36px 34px 46px;
  background:
    radial-gradient(ellipse 55% 16% at 28% 74%, rgba(255, 255, 255, 0.055), transparent 70%),
    radial-gradient(ellipse 42% 13% at 72% 33%, rgba(255, 255, 255, 0.045), transparent 70%),
    radial-gradient(ellipse 38% 11% at 56% 92%, rgba(255, 255, 255, 0.04), transparent 70%),
    radial-gradient(ellipse at 18% 12%, #335c45 0%, #21402e 52%, #1a3324 100%);
  box-shadow:
    0 16px 36px rgba(26, 51, 36, 0.26),
    inset 0 0 70px rgba(255, 255, 255, 0.05),
    inset 0 0 120px rgba(0, 0, 0, 0.35);
  color: #ffffff;
}

/* the faintest tooth of chalk dust over the slate */
.lh-board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.1;
  mix-blend-mode: overlay;
}

/* wooden chalk tray along the bottom edge */
.lh-board::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 17px;
  pointer-events: none;
  background: linear-gradient(180deg, #c08a58 0%, #a9744a 45%, #8e5f3a 100%);
  box-shadow: 0 -3px 9px rgba(0, 0, 0, 0.3);
}

/* a stub of chalk resting on the tray */
.lh-chalk {
  position: absolute;
  left: 42px;
  bottom: 7px;
  z-index: 2;
  width: 40px;
  height: 7px;
  border-radius: 3px 4px 4px 3px / 3px 3px 3px 3px;
  background: linear-gradient(180deg, #fdfaf1 0%, #ece4d2 60%, #cfc5b1 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transform: rotate(-1.5deg);
  pointer-events: none;
}

.lh-board-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.lh-eyebrow {
  margin: 0 0 10px;
  color: #c9e4d2;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lh-title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
}

.lh-lead {
  margin: 0;
  max-width: 620px;
  color: #e4f0e8;
  font-size: 1.04rem;
  line-height: 1.65;
}

.lh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* boxes drawn round the words in chalk, not UI buttons */
.lh-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 15px 19px 14px 21px / 20px 14px 22px 15px;
  background: transparent;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.4);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

/* each box drawn at its own slight angle */
.lh-chips .lh-chip:nth-child(1) { transform: rotate(-0.9deg); }
.lh-chips .lh-chip:nth-child(2) { transform: rotate(0.7deg); border-radius: 20px 14px 19px 15px / 15px 21px 14px 20px; }
.lh-chips .lh-chip:nth-child(3) { transform: rotate(-0.4deg); border-radius: 16px 21px 15px 18px / 21px 15px 19px 16px; }

.lh-chip:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.85);
  color: #ffffff;
  text-decoration: none;
}

/* the one you are meant to take: boxed in yellow chalk */
.lh-chip-solid {
  border-color: rgba(246, 193, 75, 0.9);
  background: rgba(246, 193, 75, 0.14);
  color: #f9d98a;
  text-shadow: 0 0 1px rgba(246, 193, 75, 0.5);
}

.lh-chip-solid:hover {
  background: rgba(246, 193, 75, 0.24);
  border-color: #f6c14b;
  color: #ffe6ad;
}

/* --- Glossary: a reference card pinned above the subjects ---- */
.lh-shelf {
  position: relative;
  display: block;
  max-width: 520px;
  margin: 34px 0 10px;
  padding: 17px 20px 18px;
  border: 1px solid #e7ded0;
  border-radius: 4px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 7px rgba(60, 45, 25, 0.06);
  transform: rotate(-0.5deg);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.lh-shelf::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 18px 18px;
  border-color: transparent transparent #ece3d3 transparent;
  transition: border-color 0.16s ease;
}

.lh-shelf:hover {
  transform: rotate(-0.5deg) translateY(-3px);
  box-shadow: 0 12px 24px rgba(60, 45, 25, 0.13);
  border-color: #cfc0a6;
  color: inherit;
  text-decoration: none;
}

.lh-shelf:hover::after {
  border-bottom-color: #ddd0b6;
}

/* scribbled in the margin of the card */
.lh-shelf-label {
  display: block;
  margin-bottom: 2px;
  font-family: "Caveat", "Segoe Script", "Bradley Hand", cursive;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1;
  color: #a1442f;
  transform: rotate(-1.2deg);
  transform-origin: left center;
}

.lh-shelf-title {
  display: block;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e7ddcc;
  font-size: 1.08rem;
  font-weight: 700;
  color: #26323c;
}

.lh-shelf-desc {
  display: block;
  font-size: 0.93rem;
  line-height: 1.5;
  color: #6f6558;
}

/* --- Subject sections --------------------------------------- */
.lh-subject {
  margin-top: 34px;
}

.lh-subject-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 2px 13px;
}

/* perforated rule, like the tear-off line on a worksheet */
.lh-subject-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-image: radial-gradient(circle, #d6cab3 1.1px, transparent 1.2px);
  background-size: 9px 2px;
  background-repeat: repeat-x;
}

/* hand-drawn ring, as if circled in pen, with the numeral written in */
.lh-num {
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--lh-accent, #2f4a7d);
  background: transparent;
  color: var(--lh-accent, #2f4a7d);
  font-family: "Caveat", "Segoe Script", "Bradley Hand", cursive;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 3px;
}

/* each ring drawn slightly differently, the way nobody circles twice alike */
.lh-subject--1 .lh-num {
  border-radius: 48% 52% 51% 49% / 51% 48% 52% 49%;
  transform: rotate(-4deg);
}

.lh-subject--2 .lh-num {
  border-radius: 57% 43% 46% 54% / 45% 56% 44% 55%;
  border-width: 2.5px;
  transform: rotate(3deg);
}

.lh-subject--3 .lh-num {
  border-radius: 43% 57% 55% 45% / 56% 44% 56% 44%;
  border-width: 2.5px;
  transform: rotate(-7deg);
}

.lh-subject--4 .lh-num {
  border-radius: 52% 48% 43% 57% / 47% 57% 43% 53%;
  border-width: 2.5px;
  transform: rotate(5deg);
}

.lh-subject--5 .lh-num {
  border-radius: 46% 54% 58% 42% / 54% 43% 57% 46%;
  transform: rotate(-2deg);
}

.lh-subject--6 .lh-num {
  border-radius: 59% 41% 44% 56% / 43% 58% 42% 57%;
  transform: rotate(8deg);
}

.lh-subject--7 .lh-num {
  border-radius: 42% 58% 53% 47% / 58% 42% 55% 45%;
  border-width: 2.5px;
  transform: rotate(-5deg);
}


.lh-subject-text {
  flex: 1;
  min-width: 0;
}

.lh-subject-title {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 700;
  color: #26323c;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* reads like a note pencilled under the heading */
.lh-subject-blurb {
  margin: 4px 0 0;
  font-size: 0.92rem;
  font-style: italic;
  color: #8a7c68;
}

.lh-count {
  flex-shrink: 0;
  color: #9b8f7c;
  font-size: 0.84rem;
  font-style: italic;
  white-space: nowrap;
}

/* --- Guide cards -------------------------------------------- */
.lh-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

/* Each card is a piece torn from a sheet of ruled loose-leaf. The blue
   rules run through every one; the red margin and the punched hole only
   appear on pieces that came from the left edge of a sheet — and those
   pieces are therefore torn on the right, never on the left. */
.lh-card {
  --tilt: 0deg;
  position: relative;
  display: block;
  padding: 16px 20px 18px 22px;
  background-color: #ffffff;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0 21px,
      rgba(74, 114, 180, 0.17) 21px 22px
    );
  background-position: 0 14px;
  color: inherit;
  text-decoration: none;
  transform: rotate(var(--tilt));
  filter: drop-shadow(0 2px 2px rgba(60, 45, 25, 0.16));
  transition: transform 0.16s ease, filter 0.16s ease;
}

/* each one set down by hand, slightly out of true. the cycle of five
   runs against the four-column grid so no column repeats an angle */
.lh-cards .lh-card:nth-child(5n + 1) { --tilt: -0.6deg; }
.lh-cards .lh-card:nth-child(5n + 2) { --tilt: 0.45deg; }
.lh-cards .lh-card:nth-child(5n + 3) { --tilt: -0.3deg; }
.lh-cards .lh-card:nth-child(5n + 4) { --tilt: 0.7deg; }
.lh-cards .lh-card:nth-child(5n + 5) { --tilt: -0.5deg; }

/* ---- where on the sheet each piece came from ----------------
   A cycle of seven against four columns, so no column repeats.
   1, 4, 6 — left edge of a sheet: red margin, punched hole, torn right
   2, 3, 5, 7 — further in: rules only, torn left
   ------------------------------------------------------------- */

.lh-card::before {
  pointer-events: none;
}

/* --- pieces from the left edge: margin, hole, torn on the right --- */
.lh-cards .lh-card:nth-child(7n + 1),
.lh-cards .lh-card:nth-child(7n + 4),
.lh-cards .lh-card:nth-child(7n + 6) {
  padding-left: 42px;
  padding-right: 24px;
  background-image:
    linear-gradient(
      to right,
      transparent 0 25px,
      rgba(196, 84, 78, 0.38) 25px 26px,
      transparent 26px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0 21px,
      rgba(74, 114, 180, 0.17) 21px 22px
    );
}

.lh-cards .lh-card:nth-child(7n + 1) {
  clip-path: polygon(0 0, 96.2% 0, 98.9% 6%, 95.4% 13%, 99.2% 21%, 96% 29%, 98.6% 37%, 94.9% 45%, 98.2% 53%, 95.6% 61%, 99.1% 69%, 95.9% 77%, 98.4% 85%, 95.2% 93%, 97.8% 100%, 0 100%);
}

.lh-cards .lh-card:nth-child(7n + 4) {
  clip-path: polygon(0 0, 98.6% 0, 95.3% 8%, 99% 15%, 96.1% 23%, 94.8% 31%, 98.8% 39%, 95.7% 47%, 99.2% 55%, 96.3% 63%, 94.9% 71%, 98.5% 79%, 95.4% 87%, 99% 94%, 96.2% 100%, 0 100%);
}

.lh-cards .lh-card:nth-child(7n + 6) {
  clip-path: polygon(0 0, 95.8% 0, 99.1% 7%, 96.4% 14%, 94.7% 22%, 98.9% 30%, 95.5% 38%, 99.2% 46%, 96% 54%, 94.9% 62%, 98.7% 70%, 95.8% 78%, 99% 86%, 95.3% 94%, 98.3% 100%, 0 100%);
}

/* the punched hole, never quite in the same spot */
.lh-cards .lh-card:nth-child(7n + 1)::before,
.lh-cards .lh-card:nth-child(7n + 4)::before,
.lh-cards .lh-card:nth-child(7n + 6)::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f3efe6;
  box-shadow: inset 0 1px 2px rgba(90, 75, 50, 0.32);
}

.lh-cards .lh-card:nth-child(7n + 1)::before { top: 17px; left: 15px; }
.lh-cards .lh-card:nth-child(7n + 4)::before { top: 50%; margin-top: -10px; left: 17px; }
.lh-cards .lh-card:nth-child(7n + 6)::before { bottom: 18px; left: 14px; }

/* --- pieces from further in: rules only, torn on the left --- */
.lh-cards .lh-card:nth-child(7n + 2) {
  clip-path: polygon(3.8% 0, 100% 0, 100% 100%, 4.2% 100%, 1.1% 93%, 4.6% 85%, 0.9% 77%, 3.9% 69%, 1.4% 61%, 5.1% 53%, 1% 45%, 4.3% 37%, 0.8% 29%, 3.7% 21%, 1.2% 13%, 4.8% 6%);
}

.lh-cards .lh-card:nth-child(7n + 3) {
  clip-path: polygon(1.4% 0, 100% 0, 100% 100%, 1.8% 100%, 4.9% 92%, 1.1% 84%, 4.2% 76%, 0.9% 68%, 3.8% 60%, 1.3% 52%, 5% 44%, 1.6% 36%, 4.4% 28%, 0.8% 20%, 3.6% 12%, 1.2% 5%);
}

.lh-cards .lh-card:nth-child(7n + 5) {
  clip-path: polygon(4.6% 0, 100% 0, 100% 100%, 3.2% 100%, 0.9% 92%, 4.1% 84%, 1.3% 76%, 5% 68%, 1.1% 60%, 3.7% 52%, 0.8% 44%, 4.5% 36%, 1.5% 28%, 3.9% 20%, 1% 12%, 4.2% 5%);
}

.lh-cards .lh-card:nth-child(7n + 7) {
  clip-path: polygon(2.1% 0, 100% 0, 100% 100%, 4.8% 100%, 1.2% 93%, 3.6% 85%, 0.9% 77%, 4.4% 69%, 1.6% 61%, 5.1% 53%, 1.1% 45%, 3.8% 37%, 0.8% 29%, 4.6% 21%, 1.3% 13%, 3.4% 6%);
}

.lh-cards .lh-card:nth-child(7n + 2),
.lh-cards .lh-card:nth-child(7n + 3),
.lh-cards .lh-card:nth-child(7n + 5),
.lh-cards .lh-card:nth-child(7n + 7) {
  padding-left: 26px;
}

/* picked up slightly, keeping its own angle */
.lh-card:hover {
  transform: translateY(-3px) rotate(calc(var(--tilt) * 1.6));
  filter: drop-shadow(0 7px 7px rgba(60, 45, 25, 0.2));
  color: inherit;
  text-decoration: none;
}

/* two lines are reserved whether the title needs them or not, so the
   rule and the description sit at the same height across a row */
.lh-card-title {
  position: relative;
  display: block;
  min-height: 2.75em;
  margin-bottom: 5px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.375;
  color: #233040;
}

/* an uneven stroke, drawn left to right under the title on hover.
   The SVG supplies the wobble as a mask; the colour comes from the
   section accent underneath. Revealed by clip-path so the line is
   uncovered rather than stretched. */
.lh-card-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 7px;
  background: var(--lh-accent, #2f4a7d);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='7' preserveAspectRatio='none'%3E%3Cpath d='M2 4.6 C 17 2.7 33 5.1 51 3.6 C 69 2.3 87 5.2 107 3.8 C 125 2.5 147 4.9 167 3.3 C 181 2.4 191 4.5 198 3.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='7' preserveAspectRatio='none'%3E%3Cpath d='M2 4.6 C 17 2.7 33 5.1 51 3.6 C 69 2.3 87 5.2 107 3.8 C 125 2.5 147 4.9 167 3.3 C 181 2.4 191 4.5 198 3.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.3s ease;
}

.lh-card:hover .lh-card-title::after {
  clip-path: inset(0 0 0 0);
}

.lh-card-desc {
  display: block;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #6f6558;
}

/* --- Closing note, written at the foot of the page ----------- */
.lh-ps {
  position: relative;
  max-width: 640px;
  margin: 44px 0 6px;
  padding: 17px 22px 18px;
  border: 1px solid #e6d9bd;
  border-radius: 4px;
  background: #fffdf3;
  box-shadow: 0 3px 10px rgba(60, 45, 25, 0.08);
  transform: rotate(0.6deg);
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.7;
  color: #776c5c;
}

/* folded corner, like the cards */
.lh-ps::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 18px 18px;
  border-color: transparent transparent #efe3c7 transparent;
}

.lh-ps-mark {
  margin-right: 6px;
  font-family: "Caveat", "Segoe Script", "Bradley Hand", cursive;
  font-size: 1.5rem;
  font-style: normal;
  font-weight: 700;
  color: #a1442f;
}

.lh-ps a {
  color: #2f4a7d;
  text-decoration-color: #b9c6da;
  text-underline-offset: 3px;
}

.lh-ps a:hover {
  color: #1f3558;
  text-decoration-color: #2f4a7d;
}

/* --- Responsive --------------------------------------------- */
@media (max-width: 720px) {
  .lh-wrap {
    margin-top: 16px;
    padding: 0 12px;
  }

  .lh-board {
    border-width: 7px;
    padding: 26px 20px 24px;
  }

  .lh-subject-head {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  /* number stays beside the title; only the count drops below */
  .lh-subject-text {
    flex: 1 1 auto;
    min-width: 0;
  }

  .lh-count {
    order: 3;
    flex: 1 1 100%;
    margin-left: 50px;
  }

  .lh-cards {
    grid-template-columns: 1fr;
  }
}
