/* ============================================================
   LegiList Learn — guide pages.
   The whole article is one sheet of ruled loose-leaf: punched,
   margin-ruled, written on in ink. Matches /learn/.
   Works with the existing article markup, so no page needs its
   content changed. Prefix: la-
   ============================================================ */

.la-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;
}

.la-body .container {
  max-width: 900px;
  margin: 26px auto 60px;
  padding: 0 16px;
}

/* --- the sheet ---------------------------------------------- */
.la-body .profile-card {
  position: relative;
  padding-left: 34px;
  border: 0;
  border-radius: 2px;
  background-color: #ffffff;
  background-image:
    /* punched holes down the left edge */
    radial-gradient(circle 10px at 24px 7%, #f1ece1 0 10px, transparent 10px),
    radial-gradient(circle 10px at 22px 50%, #f1ece1 0 10px, transparent 10px),
    radial-gradient(circle 10px at 25px 93%, #f1ece1 0 10px, transparent 10px),
    /* red margin */
    linear-gradient(to right, transparent 0 48px, rgba(196, 84, 78, 0.4) 48px 49px, transparent 49px),
    /* ruled lines */
    repeating-linear-gradient(to bottom, transparent 0 25px, rgba(74, 114, 180, 0.15) 25px 26px);
  background-position: 0 0, 0 0, 0 0, 0 0, 0 18px;
  box-shadow: 0 3px 14px rgba(60, 45, 25, 0.13);
}

.la-body .info-column {
  position: relative;
}

/* --- title -------------------------------------------------- */
.la-body .legislator-name {
  margin: 0 0 4px;
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #26323c;
}

/* perforated rule under the title, as on the landing page */
.la-body .divider {
  height: 2px;
  margin: 0 0 26px;
  border: 0;
  background-color: transparent;
  background-image: radial-gradient(circle, #d6cab3 1.1px, transparent 1.2px);
  background-size: 9px 2px;
  background-repeat: repeat-x;
}

/* --- steps -------------------------------------------------- */
/* [class] raises specificity above the per-page .step-box.colour rules,
   so this catches every colour variant, including any not listed here */
.la-body .step-box,
.la-body .step-box[class] {
  display: block;
  margin: 0 0 26px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  line-height: 1.75;
  color: #4b463e;
}

.la-body .step-content {
  display: block;
}

.la-body .step-box h5 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 7px;
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.3;
  color: #26323c;
}

/* the icon, circled by hand in ink */
.la-body .circle-icon,
.la-body .circle-icon[class] {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin-right: 0;
  border: 2px solid currentColor;
  border-radius: 49% 51% 50% 50% / 52% 48% 52% 48%;
  background: transparent;
  font-size: 0.82rem;
  transform: rotate(-3deg);
}

.la-body .circle-icon.blue   { color: #2f4a7d; background: transparent; }
.la-body .circle-icon.red    { color: #a1442f; background: transparent; }
.la-body .circle-icon.orange { color: #9a6424; background: transparent; }
.la-body .circle-icon.teal   { color: #2f6b5e; background: transparent; }
.la-body .circle-icon.green  { color: #4a5b2f; background: transparent; }
.la-body .circle-icon.purple { color: #5a4a7a; background: transparent; }

/* vary the wobble so no two rings match */
.la-body .step-box:nth-of-type(3n + 1) .circle-icon { border-radius: 52% 48% 47% 53% / 48% 54% 46% 52%; transform: rotate(4deg); }
.la-body .step-box:nth-of-type(3n + 2) .circle-icon { border-radius: 46% 54% 53% 47% / 55% 45% 55% 45%; transform: rotate(-6deg); }

/* --- the little note under a step ---------------------------- */
.la-body .legend {
  margin-top: 10px;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.6;
  color: #8a7c68;
}

.la-body .legend i {
  margin-right: 5px;
  color: #a1442f;
}

/* --- slips of paper for sub-lists ---------------------------- */
.la-body .bill-prefixes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin: 14px 0 4px;
}

/* boxes drawn round the entries in pen — the paper and its rules show
   straight through, because the box was drawn on the page */
/* boxes drawn round the entries in pen — the paper and its rules show
   straight through, because the box was drawn on the page. Corners are
   irregular and each side carries a different weight, the way a line
   drawn by hand bears down more in some places than others. */
/* boxes drawn round the entries in pen — the paper and its rules show
   straight through, because the box was drawn on the page. Each outline
   is an SVG path with a wobble in it; non-scaling-stroke keeps the pen
   an even weight however the box stretches. */
.la-body .prefix-card {
  display: block;
  padding: 13px 15px 14px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: none;
  font-size: 0.93rem;
  transform: rotate(-0.7deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90' preserveAspectRatio='none'%3E%3Cpath d='M7 8 C 45 4 85 10 125 6 C 155 3 180 9 193 7 C 196 28 192 58 194 82 C 155 86 108 80 68 85 C 44 88 22 83 7 86 C 4 60 9 33 7 8 Z' fill='none' stroke='%232f4a7d' stroke-opacity='0.66' stroke-width='2' vector-effect='non-scaling-stroke' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* no two drawn quite alike */
.la-body .bill-prefixes > .prefix-card:nth-child(3n + 2) {
  transform: rotate(0.6deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90' preserveAspectRatio='none'%3E%3Cpath d='M6 6 C 50 10 95 3 140 8 C 168 11 184 5 194 9 C 191 32 196 57 192 84 C 150 80 105 87 62 82 C 38 79 20 86 8 83 C 10 58 3 31 6 6 Z' fill='none' stroke='%232f4a7d' stroke-opacity='0.74' stroke-width='2.4' vector-effect='non-scaling-stroke' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}

.la-body .bill-prefixes > .prefix-card:nth-child(3n + 3) {
  transform: rotate(-0.25deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90' preserveAspectRatio='none'%3E%3Cpath d='M9 5 C 42 9 78 2 118 7 C 152 11 178 4 192 8 C 195 34 190 61 193 85 C 158 81 112 88 72 83 C 46 79 24 87 7 84 C 5 57 11 29 9 5 Z' fill='none' stroke='%232f4a7d' stroke-opacity='0.56' stroke-width='1.7' vector-effect='non-scaling-stroke' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}

.la-body .prefix-card strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.98rem;
  color: #2f4a7d;
}

.la-body .prefix-card span {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #6f6558;
}

/* --- lists -------------------------------------------------- */
.la-body .step-content ul {
  margin: 8px 0 0;
  padding-left: 22px;
}

.la-body .step-content li {
  margin-bottom: 5px;
  line-height: 1.7;
}

.la-body .step-content li i {
  margin-right: 6px;
  color: #2f6b5e;
}

/* ============================================================
   Glossary (learn/glossary.php)
   Same sheet of paper; terms boxed in pen, A–Z headings ruled off.
   ============================================================ */

.la-body .intro {
  margin: 0 0 26px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: #4b463e;
}

.la-body .section-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 16px;
  padding: 0 2px 11px;
  border: 0;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #26323c;
}

.la-body .section-header i {
  font-size: 0.95rem;
  color: #a1442f;
}

/* the same tear-off rule used on the Learn index */
.la-body .section-header::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;
}

.la-body .glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

/* terms boxed in pen, like the entries on a guide page */
.la-body .term-card {
  display: block;
  padding: 13px 15px 14px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: none;
  transform: rotate(-0.6deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90' preserveAspectRatio='none'%3E%3Cpath d='M7 8 C 45 4 85 10 125 6 C 155 3 180 9 193 7 C 196 28 192 58 194 82 C 155 86 108 80 68 85 C 44 88 22 83 7 86 C 4 60 9 33 7 8 Z' fill='none' stroke='%232f4a7d' stroke-opacity='0.66' stroke-width='2' vector-effect='non-scaling-stroke' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}

.la-body .glossary-grid > .term-card:nth-child(3n + 2) {
  transform: rotate(0.5deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90' preserveAspectRatio='none'%3E%3Cpath d='M6 6 C 50 10 95 3 140 8 C 168 11 184 5 194 9 C 191 32 196 57 192 84 C 150 80 105 87 62 82 C 38 79 20 86 8 83 C 10 58 3 31 6 6 Z' fill='none' stroke='%232f4a7d' stroke-opacity='0.74' stroke-width='2.4' vector-effect='non-scaling-stroke' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}

.la-body .glossary-grid > .term-card:nth-child(3n + 3) {
  transform: rotate(-0.25deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90' preserveAspectRatio='none'%3E%3Cpath d='M9 5 C 42 9 78 2 118 7 C 152 11 178 4 192 8 C 195 34 190 61 193 85 C 158 81 112 88 72 83 C 46 79 24 87 7 84 C 5 57 11 29 9 5 Z' fill='none' stroke='%232f4a7d' stroke-opacity='0.56' stroke-width='1.7' vector-effect='non-scaling-stroke' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}

.la-body .term-card h5 {
  margin: 0 0 5px;
  font-size: 1rem;
  font-weight: 700;
  color: #26323c;
}

.la-body .term-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #6f6558;
}

.la-body .term-card a {
  color: #2f4a7d;
  font-weight: 600;
  text-decoration-color: #b9c6da;
  text-underline-offset: 2px;
}

.la-body .term-card a:hover {
  color: #1f3558;
  text-decoration-color: #2f4a7d;
}

/* the closing note, on a slip of its own */
.la-body .note {
  position: relative;
  max-width: 640px;
  margin: 34px 0 4px;
  padding: 16px 20px 17px;
  border: 1px solid #e6d9bd;
  border-radius: 3px;
  background: #fffdf3;
  box-shadow: 0 3px 10px rgba(60, 45, 25, 0.08);
  transform: rotate(0.5deg);
  font-size: 0.97rem;
  font-style: italic;
  line-height: 1.7;
  color: #776c5c;
}

/* --- closing block from bottom-cta.php ----------------------- */
.la-body .learn-bottom-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 900px;
  margin: 26px auto 0;
  padding: 20px 24px;
  border: 1px solid #e6d9bd;
  border-radius: 3px;
  background: #fffdf3;
  box-shadow: 0 3px 10px rgba(60, 45, 25, 0.08);
  transform: rotate(0.5deg);
}

.la-body .learn-bottom-cta > div:first-child {
  flex: 1;
  min-width: 250px;
}

.la-body .learn-eyebrow {
  margin: 0 0 3px;
  font-family: "Caveat", "Segoe Script", "Bradley Hand", cursive;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  color: #a1442f;
}

.la-body .learn-bottom-cta-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #26323c;
}

.la-body .learn-bottom-cta-copy {
  margin: 0;
  font-size: 0.96rem;
  font-style: italic;
  line-height: 1.6;
  color: #7b7063;
}

.la-body .learn-bottom-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.la-body .learn-button,
.la-body .learn-button-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 2px solid #2f4a7d;
  border-radius: 15px 19px 14px 20px / 19px 14px 21px 15px;
  background: transparent;
  color: #2f4a7d;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.la-body .learn-button-secondary {
  border-color: #b3a893;
  color: #7b7063;
  border-radius: 19px 14px 20px 15px / 14px 20px 15px 19px;
  transform: rotate(-0.6deg);
}

.la-body .learn-button:hover {
  background: rgba(47, 74, 125, 0.09);
  color: #2f4a7d;
  text-decoration: none;
}

.la-body .learn-button-secondary:hover {
  background: rgba(123, 112, 99, 0.08);
  color: #5f574b;
  text-decoration: none;
}

/* --- responsive --------------------------------------------- */
@media (max-width: 720px) {
  .la-body .container {
    margin-top: 16px;
    padding: 0 12px;
  }

  .la-body .profile-card {
    padding-left: 14px;
    background-image:
      linear-gradient(to right, transparent 0 26px, rgba(196, 84, 78, 0.35) 26px 27px, transparent 27px),
      repeating-linear-gradient(to bottom, transparent 0 25px, rgba(74, 114, 180, 0.15) 25px 26px);
    background-position: 0 0, 0 18px;
  }

  .la-body .step-box h5 {
    font-size: 1.05rem;
  }

  .la-body .bill-prefixes {
    grid-template-columns: 1fr;
  }
}
