/* Learning Card page — ApexGraf mockup layout. */

.am-learning-page {
  --am-font-math: "Open Sans", "Hanken Grotesk", system-ui, sans-serif;
}

@media (max-width: 1280px) {
  .am-learning-page > .am-back,
  .am-learning-page > .am-lc__browse,
  .am-learning-page > .am-admin-bar,
  .am-learning-page > .am-tp-status-banner,
  .am-learning-page > .am-tp-settle-stage,
  .am-learning-page > .am-admin-only {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* KaTeX on LC uses Open Sans instead of KaTeX_Main / mono. */
.am-learning-page .katex,
.am-learning-page .katex .mathnormal,
.am-learning-page .katex .mathrm,
.am-learning-page .katex .mathit,
.am-learning-page .katex .mathbf,
.am-learning-page .katex .textit,
.am-learning-page .katex .textrm,
.am-learning-page .katex .textsf,
.am-learning-page .katex .texttt,
.am-learning-page .katex .mord,
.am-learning-page .katex .mop,
.am-learning-page .katex .mbin,
.am-learning-page .katex .mrel,
.am-learning-page .katex .mopen,
.am-learning-page .katex .mclose,
.am-learning-page .katex .mpunct,
.am-learning-page .katex .minner,
.am-learning-page .katex .mtight {
  font-family: var(--am-font-math) !important;
}

/* Sans math slightly smaller than surrounding body copy. */
.am-learning-page .katex {
  font-size: 0.98em;
}

/* Same ∠ treatment as problem stems/solutions. Open Sans makes KaTeX ∠ a sliver. */
.am-learning-page .katex .am-angle {
  font-family: KaTeX_Main, "Iowan Old Style", Palatino, "Times New Roman", serif !important;
  display: inline-block;
  font-size: 1em;
  line-height: 1;
  vertical-align: baseline;
  transform: scale(1.42);
  transform-origin: left bottom;
  margin-right: 0.22em;
}

/* Try it only: one ink for all math tokens (no chroma blues/greens).
 * Covers LC page + TP warm-up Try-it (navy panel, light ink). */
.am-math-chroma .am-panel-navy .katex .mopen,
.am-math-chroma .am-panel-navy .katex .mclose,
.am-math-chroma .am-panel-navy .katex .mrel,
.am-math-chroma .am-panel-navy .katex .mbin,
.am-math-chroma .am-panel-navy .katex .msupsub .mord:not(.phantom),
.am-math-chroma .am-panel-navy .katex .msupsub .mop:not(.phantom),
.am-math-chroma .am-panel-navy .katex .msupsub .mbin:not(.phantom),
.am-math-chroma .am-panel-navy .katex .msupsub .mrel:not(.phantom),
.am-math-chroma .am-panel-navy .katex .msupsub .mathnormal:not(.phantom),
.am-math-chroma .am-panel-navy .katex .msupsub .mathrm:not(.phantom),
.am-math-chroma .am-panel-navy .katex .msupsub .mtight:not(.phantom),
.am-math-chroma .am-panel-navy .am-neq {
  color: inherit !important;
}

.am-lc__browse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 0.875rem;
}

.am-lc__browse-link {
  color: var(--am-primary, #0d6efd);
  text-decoration: none;
  white-space: nowrap;
}

.am-lc__browse-link:hover {
  text-decoration: underline;
}

.am-lc__browse-link--disabled {
  color: var(--am-muted, #6c757d);
  opacity: 0.55;
  pointer-events: none;
}

.am-lc__browse-here {
  color: var(--am-muted, #6c757d);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
}

.am-lc__masthead {
  position: relative;
  margin: 0 0 50px;
  padding: 6px 10px 12px 20px;
  border-radius: var(--am-radius-md);
  background: color-mix(in srgb, var(--am-soft-yellow) 10%, var(--am-white));
  border: none;
  box-shadow: none;
}

.am-lc__masthead::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(
    180deg,
    var(--am-mustard) 0%,
    color-mix(in srgb, var(--am-mustard) 45%, var(--am-soft-teal)) 55%,
    var(--am-soft-teal) 100%
  );
}

.am-lc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
  gap: 10px 16px;
}

.am-lc__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 12px;
}

.am-lc__meta--admin {
  margin: 0 0 8px;
}

.am-lc__meta-lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.am-lc__kind {
  font: 600 0.6875rem/1.2 var(--am-font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--am-navy) 50%, var(--am-ink));
}

.am-lc__kind--admin {
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
  opacity: 0.72;
}

/* Floating white breadcrumb pill on a divider (reference: img1). */
.am-lc__taxonomy-rail {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 16px;
  padding: 0 0 2px;
}

.am-lc__taxonomy-rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: color-mix(in srgb, var(--am-border) 70%, #d8d5cc);
  transform: translateY(-50%);
  pointer-events: none;
}

.am-lc__taxonomy-line {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45em;
  max-width: 100%;
  margin: 0;
  padding: 0.45em 0.95em 0.48em;
  border-radius: 999px;
  background: var(--am-white);
  box-shadow:
    0 1px 2px rgba(19, 24, 27, 0.04),
    0 6px 18px rgba(19, 24, 27, 0.07);
  font: 500 0.8125rem/1.25 var(--am-font-ui);
  letter-spacing: 0.005em;
  text-transform: none;
  color: color-mix(in srgb, var(--am-ink) 52%, #8a9096);
}

.am-lc__taxonomy-step {
  display: inline;
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  box-shadow: none;
  font-weight: 500;
}

.am-lc__taxonomy-step--current {
  font-weight: 700;
  color: var(--am-ink);
}

.am-lc__taxonomy-sep {
  margin: 0;
  font-weight: 500;
  opacity: 0.55;
  color: color-mix(in srgb, var(--am-ink) 42%, #9aa0a6);
}

.am-lc__title {
  font: 700 1.75rem/1.22 var(--am-font-page-title);
  letter-spacing: -0.012em;
  color: var(--am-navy);
  margin: 0 0 8px;
  max-width: 38rem;
}

/* Teaching spine — mission brief → stamped hinge (not twin section boxes). */
.am-lc__spine {
  display: grid;
  gap: 0;
  margin: 16px 0 2px;
  max-width: 42rem;
}

.am-lc__brief {
  position: relative;
  display: grid;
  grid-template-columns: 2.15rem 1fr;
  align-items: stretch;
  margin: 0;
  border-radius: 4px 12px 12px 4px;
  background: color-mix(in srgb, var(--am-math-exponent) 8%, var(--am-white));
  border: 1.5px dashed color-mix(in srgb, var(--am-math-exponent) 38%, transparent);
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--am-math-exponent) 12%, transparent);
  --am-lc-float-rot: -0.6deg;
  transform: rotate(var(--am-lc-float-rot));
  transform-origin: left center;
  overflow: hidden;
}

.am-lc__brief-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--am-math-exponent) 78%, var(--am-navy));
  color: color-mix(in srgb, var(--am-white) 92%, var(--am-soft-teal));
}

.am-lc__brief-rail-text {
  font: 700 0.68rem/1 var(--am-font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  user-select: none;
}

.am-lc__brief-main {
  padding: 12px 14px 13px 14px;
}

.am-lc__opening-kicker {
  display: block;
  font: 700 0.6875rem/1.2 var(--am-font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--am-math-exponent) 72%, var(--am-navy));
  margin: 0 0 7px;
  padding: 0;
}

.am-lc__opening-kicker::after {
  content: none;
}

.am-lc__opening {
  font: 400 0.9375rem/1.65 var(--am-font-body);
  color: var(--am-ink);
  max-width: 38rem;
  margin: 0;
}

/* Vocab tips — dotted underline on opener / The idea terms */
button.am-vocab {
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px dotted color-mix(in srgb, var(--am-primary) 55%, var(--am-ink-muted, #64748b));
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: help;
  position: relative;
  text-align: left;
  box-shadow: none;
}

button.am-vocab:hover,
button.am-vocab:focus-visible,
button.am-vocab.is-open {
  border-bottom-color: var(--am-primary);
  background: color-mix(in srgb, var(--am-soft-teal, #d8f3ef) 55%, transparent);
  outline: none;
}

.am-vocab__tip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.4rem);
  z-index: 40;
  min-width: 12rem;
  max-width: min(22rem, 78vw);
  padding: 0.55rem 0.7rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--am-primary) 22%, var(--am-border, #d7e0ea));
  background: var(--am-white, #fff);
  color: var(--am-ink);
  font: 400 0.8125rem/1.45 var(--am-font-body);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--am-ink) 14%, transparent);
  text-align: left;
  white-space: normal;
  pointer-events: none;
}

/* Live tip (portaled to body — avoids overflow:hidden clip on spine cards). */
.am-vocab-portal.am-vocab__tip {
  position: fixed;
  z-index: 1200;
  pointer-events: none;
}

.am-vocab__tip-label {
  display: block;
  margin-bottom: 0.2rem;
  font: 700 0.65rem/1.2 var(--am-font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--am-primary) 70%, var(--am-ink-muted, #64748b));
}

.am-lc__spine-join {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 1.5rem;
  margin: -2px 0 -2px 1.55rem;
  z-index: 1;
}

.am-lc__spine-join-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--am-math-exponent) 55%, var(--am-mustard));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--am-math-exponent) 12%, var(--am-white));
}

.am-lc__spine-join-line {
  width: 2px;
  height: 18px;
  background: repeating-linear-gradient(
    180deg,
    color-mix(in srgb, var(--am-math-exponent) 45%, transparent) 0 4px,
    transparent 4px 7px
  );
}

.am-lc__spine-join-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid color-mix(in srgb, var(--am-math-exponent) 70%, var(--am-navy));
}

.am-lc__keep {
  position: relative;
  margin: 0;
  padding: 18px 18px 16px 20px;
  border-radius: 3px 14px 14px 12px;
  background:
    radial-gradient(
      ellipse 120% 80% at 8% 0%,
      color-mix(in srgb, var(--am-math-exponent) 16%, var(--am-white)) 0%,
      color-mix(in srgb, var(--am-math-exponent) 9%, var(--am-white)) 55%,
      color-mix(in srgb, var(--am-soft-teal) 35%, var(--am-white)) 100%
    );
  border: 1px solid color-mix(in srgb, var(--am-math-exponent) 22%, transparent);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--am-white) 75%, transparent) inset,
    4px 8px 0 color-mix(in srgb, var(--am-math-exponent) 10%, transparent);
  --am-lc-float-rot: 0deg;
  transform: none;
}

.am-lc__idea-kicker {
  display: inline-block;
  font: 700 1.55rem/1 var(--am-font-hand);
  letter-spacing: 0.01em;
  text-transform: none;
  color: color-mix(in srgb, var(--am-math-exponent) 78%, var(--am-navy));
  margin: 0 0 10px;
  padding: 0;
  transform: none;
}

.am-lc__idea-kicker::after {
  content: none;
}

.am-lc__keep .am-lc__subtitle {
  font: 400 0.9375rem/1.65 var(--am-font-body);
  color: var(--am-navy);
  max-width: 38rem;
  margin: 0;
  padding: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .am-learning-page.am-lc--motion .am-lc__enter.is-in .am-lc__brief:not(.is-settled) {
    animation: am-lc-float-opening 2.45s ease-in-out 0.18s 1 both;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .am-lc__brief:hover,
  .am-learning-page.am-lc--motion .am-lc__enter.is-in .am-lc__brief:hover {
    z-index: 2;
  }

  .am-lc__brief:hover,
  .am-learning-page.am-lc--motion .am-lc__enter.is-in .am-lc__brief:hover {
    animation: am-lc-float-opening 2.7s ease-in-out infinite;
    box-shadow:
      4px 10px 0 color-mix(in srgb, var(--am-math-exponent) 14%, transparent),
      0 10px 18px color-mix(in srgb, var(--am-math-exponent) 12%, transparent);
  }
}

@keyframes am-lc-float-opening {
  0%,
  100% {
    transform: rotate(var(--am-lc-float-rot)) translate(0, 0);
  }
  34% {
    transform: rotate(var(--am-lc-float-rot)) translate(5px, -5px);
  }
  68% {
    transform: rotate(var(--am-lc-float-rot)) translate(-4px, -3px);
  }
}

.am-lc__masthead:has(.am-lc__spine) .am-lc__title,
.am-lc__masthead:has(.am-lc__opening) .am-lc__title {
  margin-bottom: 10px;
}

.am-lc__masthead:has(.am-lc__spine) .am-lc__subtitle,
.am-lc__masthead:has(.am-lc__opening) .am-lc__subtitle {
  max-width: 38rem;
}

.am-lc__card-title {
  font: 600 1.125rem/1.35 var(--am-font-ui);
  color: var(--am-ink);
  margin: 0 0 10px;
}

.am-lc__masthead .am-lc__card-title {
  display: block;
  font: 500 0.9375rem/1.4 var(--am-font-ui);
  color: color-mix(in srgb, var(--am-navy) 62%, var(--am-ink));
  margin: 0 0 10px;
  padding: 0;
  border-radius: 0;
  background: none;
}

/* Section titles — LCW language: serif + short mustard marker, still scannable. */
.am-learning-page .am-section-heading {
  margin: 0 0 16px;
  gap: 10px;
  align-items: flex-end;
}

.am-learning-page .am-section-heading .am-section-label,
.am-learning-page .am-lc__mistake-label,
.am-learning-page .am-panel-navy__label {
  position: relative;
  display: inline-block;
  font-family: var(--am-font-page-title);
  font-weight: 700;
  font-size: 1.38rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-transform: none;
  padding-bottom: 0.22em;
}

.am-learning-page .am-section-heading .am-section-label,
.am-learning-page .am-lc__mistake-label {
  color: var(--am-navy);
}

.am-learning-page .am-section-heading .am-section-label::after,
.am-learning-page .am-lc__mistake-label::after,
.am-learning-page .am-panel-navy__label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.12em;
  width: 2.15em;
  height: 0.2em;
  border-radius: 2px 3px 1px 2px;
  background: color-mix(in srgb, var(--am-mustard) 88%, var(--am-accent));
  transform: rotate(-1.8deg);
  opacity: 0.9;
  pointer-events: none;
}

.am-lc__subtitle {
  font: 400 0.9375rem/1.65 var(--am-font-body);
  color: color-mix(in srgb, var(--am-navy) 78%, var(--am-ink));
  max-width: none;
  margin: 0;
  padding: 2px 0;
  background: transparent;
  border-radius: 0;
  border-left: none;
}

.am-lc__beats {
  display: grid;
  gap: 12px;
  margin: 4px 0 18px;
}

@media (min-width: 720px) {
  .am-lc__beats {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .am-lc__beats:has(> :only-child) {
    grid-template-columns: 1fr;
  }
}

.am-lc__beat {
  margin: 0;
  padding: 14px 16px 16px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--am-navy) 10%, transparent);
}

.am-lc__beat--floor {
  background: color-mix(in srgb, var(--am-white) 82%, var(--am-soft-teal));
  border-left: 4px solid var(--am-primary);
}

.am-lc__beat--trap {
  background: color-mix(in srgb, var(--am-white) 88%, var(--am-accent));
  border-left: 4px solid var(--am-accent);
}

.am-lc__beat-kicker {
  font: 700 0.6875rem/1 var(--am-font-ui);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: color-mix(in srgb, var(--am-ink) 55%, transparent);
}

.am-lc__beat--trap .am-lc__beat-kicker {
  color: var(--am-accent);
}

.am-tp-g6-intro .am-lc__beat,
.am-tp-warmup-chain .am-lc__beat {
  margin-top: 8px;
}

.am-tp-g6-intro .am-lc__try,
.am-tp-warmup-chain .am-lc__try {
  margin-top: 8px;
}

.am-lc__beat .am-lc__body {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.am-lc__hero {
  position: relative;
  padding: 6px 0 10px 4px;
  margin-bottom: 56px;
  border-radius: 0;
  background: transparent;
  border: none;
}

/* Prototype (NT-DIV-03): optional ladder under the short masthead idea. */
.am-lc__how {
  margin: 0 0 40px;
  padding: 0;
  border: none;
  background: transparent;
}

.am-lc__how-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "heading chevron"
    "hint hint";
  align-items: center;
  gap: 4px 12px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.am-lc__how-summary::-webkit-details-marker {
  display: none;
}

.am-lc__how-summary .am-section-heading {
  grid-area: heading;
  margin: 0;
}

.am-lc__how-hint {
  grid-area: hint;
  position: relative;
  display: grid;
  grid-template-columns: 2.15rem 1fr;
  align-items: stretch;
  margin: 10px 0 0;
  padding: 0;
  border-radius: 4px 12px 12px 4px;
  background: color-mix(in srgb, var(--am-math-exponent) 8%, var(--am-white));
  border: 1.5px dashed color-mix(in srgb, var(--am-math-exponent) 38%, transparent);
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--am-math-exponent) 12%, transparent);
  --am-lc-float-rot: -0.6deg;
  transform: rotate(var(--am-lc-float-rot));
  transform-origin: left center;
  overflow: hidden;
}

.am-lc__how-hint-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--am-math-exponent) 78%, var(--am-navy));
  color: color-mix(in srgb, var(--am-white) 92%, var(--am-soft-teal));
}

.am-lc__how-hint-rail-text {
  font: 700 0.68rem/1 var(--am-font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  user-select: none;
}

.am-lc__how-hint-main {
  padding: 12px 14px 13px 14px;
  min-width: 0;
}

.am-lc__how-optional {
  display: block;
  font: 700 0.6875rem/1.2 var(--am-font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--am-math-exponent) 72%, var(--am-navy));
  margin: 0 0 7px;
  padding: 0;
  background: none;
  border-radius: 0;
}

.am-lc__how-hint-copy {
  font: 400 0.9375rem/1.65 var(--am-font-body);
  color: var(--am-ink);
  max-width: 38rem;
  margin: 0;
}

.am-lc__how-chevron {
  grid-area: chevron;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid color-mix(in srgb, var(--am-navy) 55%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--am-navy) 55%, transparent);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  margin-right: 4px;
}

.am-lc__how[open] .am-lc__how-chevron {
  transform: rotate(225deg);
  margin-top: 4px;
}

.am-lc__how-body {
  margin-top: 14px;
  margin-bottom: 16px;
}

.am-lc__how:not([open]) {
  margin-bottom: 24px;
}

/* Peek LC: collapsed How / steps — clear expand CTA when closed. */
.am-lc__how-expand-btn {
  display: inline-block;
  margin: 0 0 6px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--am-primary) 45%, transparent);
  background: color-mix(in srgb, var(--am-primary) 10%, var(--am-white));
  color: var(--am-primary);
  font: 700 0.875rem/1.2 var(--am-font-ui);
}

.am-lc__how[open] .am-lc__how-hint--expand,
.am-lc__steps[open] .am-lc__how-hint--expand {
  display: none;
}

.am-lc__steps {
  margin: 0 0 28px;
  padding: 0;
  border: none;
  background: transparent;
}

.am-lc__steps-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "heading chevron"
    "hint hint";
  align-items: center;
  gap: 4px 12px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.am-lc__steps-summary::-webkit-details-marker {
  display: none;
}

.am-lc__steps-summary .am-section-heading {
  grid-area: heading;
  margin: 0;
}

.am-lc__steps-summary .am-lc__how-hint {
  grid-area: hint;
}

.am-lc__steps-summary .am-lc__how-chevron {
  grid-area: chevron;
}

.am-lc__steps[open] .am-lc__how-chevron {
  transform: rotate(225deg);
  margin-top: 4px;
}

.am-lc__steps-body {
  margin-top: 14px;
}

.am-lc__pattern {
  margin: 4px 0 28px;
}

.am-lc__pattern .am-lc__pattern-visual {
  margin: 0 auto;
}

.am-lc__hero-mark {
  display: none;
}

.am-lc__hero-mark--tl {
  top: 10px;
  left: 10px;
  border-width: 3px 0 0 3px;
}

.am-lc__hero-mark--br {
  bottom: 10px;
  right: 10px;
  width: 14px;
  height: 14px;
  border-width: 0 3px 3px 0;
}

.am-lc__body {
  font: 400 0.9375rem/1.65 var(--am-font-body);
  color: var(--am-ink);
}

.am-lc__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 62px;
  margin-bottom: 78px;
}

@media (min-width: 768px) {
  .am-lc__grid:has(.am-lc__extra-idea) {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 56px;
    align-items: start;
  }
}

.am-learning-page .am-panel-soft {
  position: relative;
  padding: 8px 4px 8px 16px;
  border-radius: 0;
  border: none;
}

.am-learning-page .am-lc__panel-rule {
  background: transparent;
  border: none;
  box-shadow: none;
}

.am-learning-page .am-lc__panel-rule::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 1px;
  background: var(--am-primary);
}

/* Quick Tip — taped slip (same language as LCW beat-thought / sticky). */
.am-learning-page .am-lc__extra-idea {
  --am-lc-slip: color-mix(in srgb, var(--am-soft-teal) 48%, white);
  --am-lc-slip-mid: color-mix(in srgb, var(--am-soft-teal) 62%, color-mix(in srgb, var(--am-primary) 10%, white));
  --am-lc-slip-deep: color-mix(in srgb, var(--am-soft-teal) 78%, color-mix(in srgb, var(--am-primary) 22%, white));
  position: relative;
  margin-top: 10px;
  padding: 18px 16px 16px;
  overflow: visible;
  border-radius: var(--am-radius-md);
  border: none;
  background: linear-gradient(
    128deg,
    var(--am-lc-slip-deep) 0%,
    var(--am-lc-slip-mid) 42%,
    var(--am-lc-slip) 78%,
    color-mix(in srgb, var(--am-soft-teal) 28%, white) 100%
  );
  color: var(--am-navy);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--am-ink) 5%, transparent),
    2px 8px 18px color-mix(in srgb, var(--am-ink) 7%, transparent);
  transform: rotate(-0.8deg);
  transform-origin: 50% 0;
}

.am-learning-page .am-lc__extra-idea::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 34px;
  height: 14px;
  transform: translateX(-50%) rotate(-3deg);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.42),
    color-mix(in srgb, var(--am-soft-teal) 72%, transparent) 40%,
    color-mix(in srgb, var(--am-primary) 38%, transparent)
  );
  clip-path: polygon(4% 10%, 14% 0, 86% 3%, 100% 14%, 96% 90%, 82% 100%, 12% 96%, 0 76%);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--am-ink) 10%, transparent);
  pointer-events: none;
  z-index: 2;
}

.am-learning-page .am-lc__extra-idea::after {
  content: none;
}

.am-learning-page .am-lc__extra-idea .am-section-heading {
  color: var(--am-navy);
}

.am-learning-page .am-lc__extra-idea .am-section-heading .am-section-label::after {
  background: color-mix(in srgb, var(--am-primary) 55%, var(--am-soft-teal));
  opacity: 0.75;
}

.am-learning-page .am-lc__extra-idea .am-lc__body {
  color: var(--am-ink);
  font: 400 0.9375rem/1.65 var(--am-font-body);
}

/* Section icons — colored tiles (LC only). */
.am-learning-page .am-section-heading__icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--am-soft-teal) 85%, var(--am-surface));
}

.am-learning-page .am-section-heading__icon svg {
  width: 18px;
  height: 18px;
}

.am-learning-page .am-lc__grid > .am-panel-soft:not(.am-lc__extra-idea) .am-section-heading__icon {
  background: color-mix(in srgb, var(--am-primary) 18%, var(--am-soft-teal));
}

.am-learning-page .am-lc__extra-idea .am-section-heading__icon {
  background: color-mix(in srgb, var(--am-soft-teal) 70%, white);
  color: var(--am-primary);
}

.am-learning-page .am-lc__mistake .am-section-heading__icon {
  background: color-mix(in srgb, var(--am-accent) 16%, var(--am-soft-accent));
  color: var(--am-accent);
}

.am-learning-page .am-lc__examples .am-section-heading__icon {
  background: transparent;
  color: var(--am-mustard);
  width: 24px;
  height: 24px;
}

.am-learning-page .am-lc__hero .am-section-heading__icon,
.am-learning-page .am-lc__how .am-section-heading__icon {
  background: color-mix(in srgb, var(--am-primary) 16%, var(--am-soft-teal));
  color: var(--am-primary);
}

.am-learning-page .am-panel-navy .am-section-heading__icon {
  background: color-mix(in srgb, var(--am-soft-teal) 28%, var(--am-navy));
}

@media (max-width: 640px) {
  .am-lc__masthead { padding: 6px 4px 8px 16px; }
  .am-lc__title { font-size: 1.5rem; }
  .am-lc__masthead .am-lc__card-title { font-size: 0.875rem; }
  .am-lc__brief {
    --am-lc-float-rot: 0deg;
    transform: rotate(var(--am-lc-float-rot));
    grid-template-columns: 1.85rem 1fr;
  }
  .am-lc__keep {
    --am-lc-float-rot: 0deg;
    transform: rotate(var(--am-lc-float-rot));
    padding: 16px 14px 14px 16px;
  }
  .am-lc__idea-kicker { font-size: 1.35rem; }
  .am-lc__spine-join { margin-left: 1.25rem; }
  .am-lc__how-hint {
    --am-lc-float-rot: 0deg;
    transform: rotate(var(--am-lc-float-rot));
    grid-template-columns: 1.85rem 1fr;
  }
}

.am-lc__rule-mark {
  width: 22px;
  height: 2px;
  background: var(--am-primary);
  margin-bottom: 8px;
}

.am-lc__mistake {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 4px 0 8px 16px;
  align-items: stretch;
  margin: 22px 0 73px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.am-lc__mistake::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 8px;
  width: 3px;
  border-radius: 1px;
  background: var(--am-mustard);
  transform: rotate(-0.7deg);
  transform-origin: top center;
}

@media (max-width: 640px) {
  .am-lc__mistake {
    flex-direction: column;
    gap: 12px;
    padding: 4px 0 8px 14px;
  }
}

.am-lc__mistake-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.am-lc__mistake-label {
  font-size: 1.42rem;
}

.am-lc__mistake-label--wrong { color: var(--am-navy); }
.am-lc__mistake-label--ok { color: var(--am-navy); }

.am-lc__mistake-wrong {
  font: 600 1.125rem/1.3 var(--am-font-mono);
  color: var(--am-accent);
  text-decoration: line-through;
  opacity: 0.85;
}

.am-lc__mistake-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(248, 79, 26, 0.3);
}

@media (max-width: 640px) {
  .am-lc__mistake-divider {
    width: auto;
    height: 1px;
  }
}

.am-lc__examples {
  margin-bottom: 73px;
  padding: 14px 2px 4px;
  border-radius: 0;
  background: transparent;
  border: none;
  border-top: 1px solid color-mix(in srgb, var(--am-border) 85%, transparent);
  box-shadow: none;
}

@media (max-width: 640px) {
  .am-lc__examples {
    padding: 12px 0 4px;
  }
}

.am-lc__examples .am-section-heading {
  margin-top: 20px;
}

.am-lc__example {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  align-items: baseline;
}

.am-lc__example-num {
  font: 700 0.8125rem/1 var(--am-font-mono);
  color: var(--am-navy);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: color-mix(in srgb, var(--am-mustard) 62%, var(--am-surface));
  border-radius: 10px;
  flex: none;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--am-ink) 8%, transparent);
}

.am-lc__example-answer {
  margin-top: 4px;
  font: 600 0.9375rem/1.45 var(--am-font-body);
  color: var(--am-ink);
}

.am-lc__example .am-lc__body {
  margin: 0;
  padding: 0;
}

.am-lc__example-answer .katex-display {
  margin: 0.15em 0;
  padding-left: 0;
}

.am-lc__example-wave {
  height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='6'%3E%3Cpath d='M0 3 Q3.5 0.5 7 3 T14 3' stroke='%23D8D3C5' stroke-width='1.4' fill='none'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 14px 6px;
}

.am-lc__reveal {
  margin-top: 6px;
}

.am-lc__reveal summary {
  cursor: pointer;
  font: 600 0.875rem/1.35 var(--am-font-ui);
  color: var(--am-primary);
  list-style: none;
}

.am-lc__reveal summary::-webkit-details-marker { display: none; }

.am-lc__reveal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 12px 22px;
  border-radius: var(--am-radius-btn, 999px);
  border: 1px solid color-mix(in srgb, var(--am-soft-teal) 70%, transparent);
  background: color-mix(in srgb, var(--am-soft-teal) 22%, transparent);
  color: var(--am-canvas) !important;
  font: 700 0.9375rem/1 var(--am-font-ui) !important;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.am-lc__try-form {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.am-lc__try-form.is-done .am-lc__try-actions {
  opacity: 0.55;
}

.am-lc__try-input-label {
  font: 600 0.6875rem/1.2 var(--am-font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--am-soft-teal);
}

.am-lc__try-hints {
  margin: 0;
  max-width: 16rem;
  padding: 5px 10px;
  border-radius: 8px;
  font: 500 0.75rem/1.35 var(--am-font-ui);
  color: color-mix(in srgb, var(--am-navy) 72%, #1a5c45);
  background: color-mix(in srgb, #d8f3e4 88%, var(--am-canvas));
  border: 1px solid color-mix(in srgb, #a8dfc4 55%, transparent);
}

.am-lc__try-input {
  width: 100%;
  max-width: 11rem;
  box-sizing: border-box;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--am-soft-teal) 55%, transparent);
  background: color-mix(in srgb, var(--am-canvas) 92%, transparent);
  color: var(--am-ink);
  font: 500 0.9375rem/1.3 var(--am-font-body);
}

.am-lc__try-input:focus {
  outline: 2px solid color-mix(in srgb, var(--am-soft-teal) 70%, transparent);
  outline-offset: 1px;
}

.am-lc__try-input:disabled {
  opacity: 0.85;
}

.am-lc__try-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.am-lc__try-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--am-radius-btn, 999px);
  font: 700 0.875rem/1 var(--am-font-ui);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.am-lc__try-btn:disabled {
  cursor: default;
  transform: none;
  box-shadow: none;
}

.am-lc__try-btn--submit {
  border: 1px solid color-mix(in srgb, var(--am-accent) 78%, #000);
  background: var(--am-accent);
  background-image: var(--am-accent-btn);
  color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--am-accent) 28%, transparent);
}

.am-lc__try-btn--submit:hover:not(:disabled) {
  background: var(--am-accent);
  background-image: var(--am-accent-btn);
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.am-lc__try-btn--skip {
  border: 1px solid color-mix(in srgb, #e8b84a 65%, #fff);
  background: #f0c95a;
  color: color-mix(in srgb, var(--am-navy) 82%, #5a4200);
  box-shadow: 0 2px 8px color-mix(in srgb, #e8b84a 28%, transparent);
}

.am-lc__try-btn--skip:hover:not(:disabled) {
  background: #ebc047;
  transform: translateY(-1px);
}

.am-lc__try-feedback {
  margin: 2px 0 0;
  max-width: 22rem;
  min-height: 0;
  font: 600 0.875rem/1.4 var(--am-font-ui);
  color: var(--am-soft-teal);
}

.am-lc__try-feedback.is-ok {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 12px;
  border-radius: 12px;
  color: color-mix(in srgb, var(--am-navy) 70%, #0d5c3a);
  background: color-mix(in srgb, #c9f0d8 90%, var(--am-canvas));
  border: 1px solid color-mix(in srgb, #7dcea0 50%, transparent);
  box-shadow: 0 4px 14px color-mix(in srgb, #2f9e6b 18%, transparent);
  animation: am-lc-try-ok 0.34s ease-out;
}

.am-lc__try-feedback.is-ok::before {
  content: "✓";
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font: 800 1.45rem/1 var(--am-font-ui);
  color: #fff;
  background: #2f9e6b;
  box-shadow: 0 2px 6px color-mix(in srgb, #2f9e6b 40%, transparent);
}

.am-lc__try-feedback.is-soft {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  color: color-mix(in srgb, var(--am-navy) 65%, #4a5560);
  background: color-mix(in srgb, var(--am-canvas) 88%, #c5d4e0);
  border: 1px solid color-mix(in srgb, var(--am-soft-teal) 40%, transparent);
  animation: am-lc-try-nudge 0.3s ease-out;
}

.am-lc__try-feedback.is-nudge {
  color: color-mix(in srgb, var(--am-soft-teal) 85%, #ffe8a3);
  animation: am-lc-try-nudge 0.3s ease-out;
}

.am-lc__try-answer {
  margin-top: 16px;
  text-align: left;
}

.am-lc__try-answer-title {
  font: 700 0.75rem/1.2 var(--am-font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--am-soft-teal);
  margin-bottom: 8px;
}

.am-lc__reveal-btn:hover {
  background: color-mix(in srgb, var(--am-soft-teal) 38%, transparent);
  transform: translateY(-1px);
}

.am-lc__reveal--try {
  text-align: center;
}

.am-lc__reveal--try[open] > summary {
  display: none;
}

.am-lc__reveal-body {
  margin-top: 10px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--am-soft-teal) 55%, transparent);
  border-radius: var(--am-radius-md);
  font: 400 0.9375rem/1.65 var(--am-font-body);
  color: var(--am-ink);
}

.am-lc__reveal-body .solution-text {
  font: inherit;
  color: inherit;
}

.am-lc__reveal-body .am-lc__answer {
  font: inherit;
  font-weight: 600;
  color: inherit;
}

.am-lc__answer {
  font-weight: 600;
}

.am-lc__visual {
  margin-top: 12px;
}

.am-lc__figure {
  display: block;
  box-sizing: border-box;
  width: min(100%, 28rem);
  max-width: 28rem;
  margin: 14px 0 2px;
  padding: 0;
  background: transparent;
  border: none;
}

.am-lc__figure svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--am-math-exponent) 16%, var(--am-border));
  background: #f7f5f1;
}

.am-lc__figure-cap {
  margin: 8px 0 0;
  font: 600 0.8125rem/1.4 var(--am-font-ui);
  color: color-mix(in srgb, var(--am-navy) 72%, var(--am-ink-soft));
}

.am-lc__figure--solo {
  margin: 8px auto 28px;
}

.am-learning-page .am-rule {
  margin: 17px 0 67px;
}

.am-lc__walkthrough {
  margin: 0 0 67px;
}

.am-lc__walkthrough-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.am-lc__walkthrough-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.am-lc__walkthrough-cta {
  margin: 0;
  text-align: center;
  font: 700 1.0625rem/1.3 var(--am-font-ui);
  letter-spacing: 0.005em;
  color: var(--am-navy);
}

.am-lc__walkthrough-note {
  margin: 0 0 6px;
  max-width: 32rem;
  text-align: center;
  font: 400 0.8125rem/1.45 var(--am-font-ui);
  color: color-mix(in srgb, var(--am-navy) 58%, var(--am-ink));
  letter-spacing: 0.005em;
}

.am-lc__walkthrough-row--lite {
  align-items: flex-end;
  gap: 12px 20px;
}

.am-lc__walkthrough-video {
  flex: 0 1 480px;
  width: 100%;
}

.am-lc__walkthrough-stack .am-lc__walkthrough-video {
  flex: none;
  width: 100%;
}

.am-lc__walkthrough-row--lite .am-lc__walkthrough-video {
  flex: 0 1 300px;
}

.am-lc__walkthrough-copy {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 24rem;
}

.am-lc__walkthrough-row--lite .am-lc__walkthrough-copy {
  max-width: 18rem;
  padding-bottom: 4px;
}

.am-lc__walkthrough-blurb {
  margin: 0;
  font: 500 1.0625rem/1.55 var(--am-font-ui);
  color: var(--am-primary);
  letter-spacing: 0.01em;
}

.am-learning-page .am-lc__walkthrough-video .am-walkthrough-preview {
  width: min(100%, 380px);
  max-width: 380px;
  margin: 0;
}

.am-learning-page .am-lc__walkthrough-stack .am-walkthrough-preview--lite {
  width: 100%;
  max-width: none;
  margin: 0;
  border-color: color-mix(in srgb, var(--am-navy) 8%, var(--am-border));
  box-shadow:
    0 6px 18px color-mix(in srgb, var(--am-navy) 6%, transparent),
    0 0 0 1px color-mix(in srgb, #fff 80%, transparent) inset;
}

.am-learning-page .am-walkthrough-preview--lite .am-walkthrough-preview__media {
  min-height: 240px;
  border-bottom: none;
  border-radius: inherit;
  background: #fffef9;
}

.am-learning-page .am-walkthrough-preview--lite .am-walkthrough-preview__shade {
  display: none;
}

.am-learning-page .am-walkthrough-preview--lite .am-walkthrough-preview__overlay {
  background:
    linear-gradient(180deg, color-mix(in srgb, #fff 22%, transparent) 0%, transparent 30%),
    linear-gradient(0deg, color-mix(in srgb, var(--am-navy) 8%, transparent) 0%, transparent 36%);
}

.am-learning-page .am-walkthrough-preview--lite .am-walkthrough-preview__play {
  background: var(--am-accent-btn);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--am-accent) 18%, transparent),
    0 1px 0 color-mix(in srgb, #fff 28%, transparent) inset,
    0 8px 18px color-mix(in srgb, var(--am-accent) 28%, transparent);
  animation: am-lc-play-blink 1.35s ease-in-out infinite;
}

@keyframes am-lc-play-blink {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow:
      0 0 0 4px color-mix(in srgb, var(--am-accent) 18%, transparent),
      0 1px 0 color-mix(in srgb, #fff 28%, transparent) inset,
      0 8px 18px color-mix(in srgb, var(--am-accent) 28%, transparent);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.07);
    box-shadow:
      0 0 0 10px color-mix(in srgb, var(--am-accent) 0%, transparent),
      0 1px 0 color-mix(in srgb, #fff 28%, transparent) inset,
      0 10px 22px color-mix(in srgb, var(--am-accent) 36%, transparent);
  }
}

.am-learning-page .am-walkthrough-preview--lite:hover .am-walkthrough-preview__play {
  animation: none;
  transform: translate(-50%, -50%) scale(1.08);
  filter: brightness(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .am-learning-page .am-walkthrough-preview--lite .am-walkthrough-preview__play {
    animation: none;
  }

  .am-lc__brief:hover,
  .am-lc__keep:hover,
  .am-learning-page.am-lc--motion .am-lc__enter.is-in .am-lc__brief,
  .am-learning-page.am-lc--motion .am-lc__enter.is-in .am-lc__keep {
    animation: none !important;
  }

  .am-learning-page.am-lc--motion .am-lc__enter,
  .am-learning-page .am-lc__try-feedback.is-ok,
  .am-learning-page .am-lc__try-feedback.is-soft,
  .am-learning-page .am-lc__try-feedback.is-nudge,
  .am-learning-page.am-lc--motion .am-lc__enter.is-in .am-lc__extra-idea {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* LC section enter + Quick Tip settle (JS adds .am-lc--motion / .is-in). */
.am-learning-page.am-lc--motion .am-lc__enter {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.32s ease,
    transform 0.32s ease;
  transition-delay: calc(var(--am-lc-enter-i, 0) * 45ms);
  will-change: opacity, transform;
}

.am-learning-page.am-lc--motion .am-lc__enter.is-in {
  opacity: 1;
  transform: none;
}

.am-learning-page.am-lc--motion .am-lc__enter.is-in .am-lc__extra-idea {
  animation: am-lc-tip-settle 0.42s ease-out both;
}

@keyframes am-lc-tip-settle {
  from {
    opacity: 0.55;
    transform: rotate(-2.2deg) translateY(6px);
  }
  to {
    opacity: 1;
    transform: rotate(-0.8deg) translateY(0);
  }
}

@keyframes am-lc-try-ok {
  from {
    opacity: 0.35;
    transform: scale(0.94);
  }
  58% {
    transform: scale(1.03);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes am-lc-try-nudge {
  from {
    opacity: 0.4;
    transform: translateX(0);
  }
  30% {
    transform: translateX(-5px);
  }
  60% {
    transform: translateX(3px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 640px) {
  .am-lc__walkthrough-row {
    flex-direction: column;
    align-items: stretch;
  }

  .am-lc__walkthrough-row--lite {
    align-items: stretch;
  }

  .am-lc__walkthrough-stack {
    max-width: 100%;
  }

  .am-learning-page .am-lc__walkthrough-video .am-walkthrough-preview {
    max-width: 100%;
  }
}

/* Try it — the one playful CTA block. */
.am-learning-page .am-panel-navy {
  padding: 26px 28px;
  gap: 14px;
  margin-top: 17px;
  border-radius: var(--am-radius-xl);
  box-shadow:
    0 10px 28px color-mix(in srgb, var(--am-navy) 22%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--am-soft-teal) 25%, transparent);
}

.am-lc__try-prompt {
  font: 500 1rem/1.75 var(--am-font-body);
  color: var(--am-canvas);
  margin: 0;
}

.am-lc__neq-note {
  margin: 0 0 8px;
  font: italic 400 0.78rem/1.35 var(--am-font-body);
  color: color-mix(in srgb, var(--am-canvas) 72%, transparent);
  letter-spacing: 0.01em;
}

.am-lc__neq-note-sign {
  display: inline-block;
  margin-right: 0.2em;
  font-style: normal;
  font-family: "KaTeX_Main", "Times New Roman", Times, serif;
  font-size: 1.05em;
  font-weight: 400;
  color: color-mix(in srgb, var(--am-canvas) 88%, transparent);
  vertical-align: -0.05em;
}

/* Try it math: larger inline size so fractions / exponents stay readable on navy. */
.am-learning-page .am-panel-navy .am-lc__try-prompt .katex {
  font-size: 1.18em;
}

.am-learning-page .am-panel-navy .am-lc__try-prompt .katex-display {
  margin: 0.45em 0;
}

.am-lc__try-explanation {
  font: 400 0.9375rem/1.6 var(--am-font-body);
  color: var(--am-soft-teal);
}

.am-lc__rich-text .am-lc__list {
  margin: 0.65em 0;
  padding-left: 1.35em;
  list-style: disc;
  white-space: normal;
}

.am-lc__rich-text .am-lc__list--icons {
  list-style: none;
  padding-left: 0;
  margin: 0.75em 0;
}

.am-lc__rich-text .am-lc__list--numbered {
  list-style: none;
  padding-left: 0;
  margin: 0.75em 0;
  counter-reset: lc-step;
}

.am-lc__rich-text .am-lc__list--dashes {
  list-style: none;
  padding-left: 0;
  margin: 0.35em 0 0;
}

.am-lc__rich-text .am-lc__list--dashes .am-lc__list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45em;
  margin: 0.45em 0;
  padding-left: 0;
}

.am-lc__rich-text .am-lc__list--dashes .am-lc__list-dash {
  flex: none;
  box-sizing: border-box;
  width: 0.85em;
  /* Match body line-height so the dash centers on the first line box. */
  height: 1.65em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 0.95em/1 var(--am-font-body);
  color: var(--am-primary);
}

.am-lc__rich-text .am-lc__list--dashes .am-lc__list-text {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  line-height: 1.65;
}

.am-lc__rich-text .am-lc__list--numbered .am-lc__list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0.55em 0;
  padding-left: 0;
  counter-increment: lc-step;
}

.am-lc__rich-text .am-lc__list--numbered .am-lc__list-item::before {
  content: counter(lc-step);
  flex: none;
  box-sizing: border-box;
  width: 1.45rem;
  /* Same first-line strut as body text; center the digit inside. */
  height: 1.65em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font: 800 0.6875rem/1 var(--am-font-ui);
  color: var(--am-navy);
  background: color-mix(in srgb, var(--am-soft-teal) 28%, white);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--am-primary) 28%, transparent);
}

.am-lc__rich-text .am-lc__list--icons .am-lc__list-item {
  display: block;
  margin: 0.55em 0;
  padding-left: 2.05em;
  text-indent: -2.05em;
}

.am-lc__rich-text .am-lc__list--icons .am-lc__list-item::before {
  content: none;
  display: none;
}

/* Same line box as the text (incl. KaTeX chips) — not a side column. */
.am-lc__rich-text .am-lc__list--icons .am-lc__list-icon {
  display: inline-block;
  width: 1.05em;
  margin-right: calc(1em / 0.78);
  text-indent: 0;
  vertical-align: middle;
  color: var(--am-primary);
  font-size: 0.78em;
  line-height: 1;
  text-align: center;
  opacity: 0.9;
}

.am-lc__rich-text .am-lc__list--icons .am-lc__list-icon i {
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1;
  font-style: normal;
  vertical-align: middle;
  /* FA arrow sits high in its glyph box */
  transform: translateY(0.08em);
}

.am-lc__rich-text .am-lc__list--icons .am-lc__list-icon i::before {
  line-height: 1;
}

.am-lc__rich-text .am-lc__list--icons .am-lc__list-text {
  display: inline;
  white-space: pre-wrap;
}

.am-lc__rich-text .am-lc__list--numbered .am-lc__list-text {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  line-height: 1.65;
}

.am-lc__rich-text .am-lc__list-text {
  min-width: 0;
  white-space: pre-wrap;
}

.am-lc__rich-text .am-lc__list li {
  margin: 0.35em 0;
  padding-left: 0.15em;
}

.am-lc__rich-text .am-lc__list li:first-child {
  margin-top: 0;
}

.am-lc__rich-text .am-lc__list li:last-child {
  margin-bottom: 0;
}

.am-lc__rich-text .am-lc__para {
  margin: 0 0 0.65em;
  white-space: pre-wrap;
}

.am-lc__rich-text .am-lc__para:last-child {
  margin-bottom: 0;
}

.am-learning-page .am-panel-soft .am-lc__rich-text .am-lc__list {
  color: inherit;
}

.am-learning-page .am-panel-navy .am-lc__rich-text .am-lc__list {
  color: var(--am-canvas);
}

.am-lc__pattern-visual {
  margin: 0.45rem auto 0.1rem;
  width: min(640px, 100%);
  max-width: 100%;
  overflow: visible;
  border-radius: var(--am-radius-md);
  /* Same soft mustard wash as TP hint bar. */
  border: 1px solid color-mix(in srgb, var(--am-mustard) 28%, var(--am-border-soft));
  background: color-mix(in srgb, var(--am-soft-yellow) 72%, #fff);
  box-shadow: none;
  padding: 10px 8px 8px;
  /* Pattern SVGs use these semantic roles for title / expression / hint text. */
  --viz-role-primary: var(--am-navy);
  --viz-role-contrast: var(--am-ink);
  --viz-role-muted: color-mix(in srgb, var(--am-navy) 62%, var(--am-ink));
}

.am-lc__pattern-visual svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  border-radius: calc(var(--am-radius-md) - 2px);
  background: transparent;
}

/* Inline math chips: same hue as the section, one quieter shade. */
.am-learning-page .lc-view.am-lc__math-chip {
  --am-math-chip-ground: var(--am-canvas);
  --am-math-chip-bg: color-mix(in srgb, var(--am-math-chip-ground) 68%, white);
  --am-math-chip-border: color-mix(in srgb, var(--am-navy) 9%, transparent);
  --am-math-chip-ink: var(--am-navy);
}

.am-learning-page .lc-view.am-lc__math-chip .am-lc__extra-idea {
  --am-math-chip-ground: color-mix(in srgb, var(--am-soft-teal) 22%, white);
  --am-math-chip-bg: color-mix(in srgb, var(--am-math-chip-ground) 42%, white);
  --am-math-chip-border: color-mix(in srgb, var(--am-primary) 12%, transparent);
}

.am-learning-page .lc-view.am-lc__math-chip .am-lc__pm-card--trap {
  --am-math-chip-ground: color-mix(in srgb, var(--am-soft-accent) 62%, white);
  --am-math-chip-bg: color-mix(in srgb, var(--am-math-chip-ground) 55%, white);
  --am-math-chip-border: color-mix(in srgb, var(--am-accent) 14%, transparent);
}

.am-learning-page .lc-view.am-lc__math-chip .am-lc__pm-card--fix {
  --am-math-chip-ground: color-mix(in srgb, var(--am-white) 86%, var(--am-soft-teal));
  --am-math-chip-bg: color-mix(in srgb, var(--am-math-chip-ground) 52%, white);
  --am-math-chip-border: color-mix(in srgb, var(--am-primary) 12%, transparent);
}

.am-learning-page .lc-view.am-lc__math-chip .am-lc__sticky {
  --am-math-chip-ground: #f6edd8;
  --am-math-chip-bg: transparent;
  --am-math-chip-border: transparent;
  --am-math-chip-ink: #1a7c88;
}

/* Slip: no math-chip boxes — equations sit on the cream paper. */
.am-learning-page .lc-view.am-lc__math-chip .am-lc__sticky .katex,
.am-learning-page .lc-view.am-lc__math-chip .am-lc__sticky .katex-display {
  padding: 0;
  margin: 0 0.06em;
  border-radius: 0;
  background: transparent;
  border: none;
  color: inherit;
  box-shadow: none;
}

.am-learning-page .lc-view.am-lc__math-chip .am-lc__sticky .katex-display {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0.25em 0;
}

.am-learning-page .lc-view.am-lc__math-chip .am-lc__sticky .katex-display > .katex {
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
}

.am-learning-page .lc-view.am-lc__math-chip .am-panel-navy .katex,
.am-learning-page .lc-view.am-lc__math-chip .am-panel-navy .katex-display {
  padding: 0;
  margin: 0 0.06em;
  border-radius: 0;
  background: transparent;
  border: none;
  color: inherit;
  box-shadow: none;
}

.am-learning-page .lc-view.am-lc__math-chip .am-panel-navy .katex-display {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0.35em 0;
}

.am-learning-page .lc-view.am-lc__math-chip .am-panel-navy .katex-display > .katex {
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
}

.am-learning-page .lc-view.am-lc__math-chip .katex {
  display: inline-block;
  padding: 0.14em 0.42em 0.18em;
  margin: 0 0.08em;
  border-radius: 6px;
  background: var(--am-math-chip-bg);
  border: 1px solid var(--am-math-chip-border);
  color: var(--am-math-chip-ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  line-height: 1.35;
}

.am-learning-page .lc-view.am-lc__math-chip .katex .mord,
.am-learning-page .lc-view.am-lc__math-chip .katex .mop,
.am-learning-page .lc-view.am-lc__math-chip .katex .mbin,
.am-learning-page .lc-view.am-lc__math-chip .katex .mrel,
.am-learning-page .lc-view.am-lc__math-chip .katex .mopen,
.am-learning-page .lc-view.am-lc__math-chip .katex .mclose,
.am-learning-page .lc-view.am-lc__math-chip .katex .mpunct,
.am-learning-page .lc-view.am-lc__math-chip .katex .minner,
.am-learning-page .lc-view.am-lc__math-chip .katex .mfrac,
.am-learning-page .lc-view.am-lc__math-chip .katex .sqrt,
.am-learning-page .lc-view.am-lc__math-chip .katex .vlist-t {
  color: inherit;
}

.am-learning-page .lc-view.am-lc__math-chip .katex-display {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0.45em 0;
  padding: 0.45em 0.65em;
  border-radius: var(--am-radius-sm);
  background: var(--am-math-chip-bg);
  border: 1px solid var(--am-math-chip-border);
  color: var(--am-math-chip-ink);
  text-align: left;
  padding-left: 0.65em;
}

.am-learning-page .lc-view.am-lc__math-chip .katex-display > .katex {
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: inherit;
}

.am-math-chip-demo {
  max-width: 960px;
  margin: 0 auto;
}

.am-math-chip-demo__banner {
  margin-bottom: 1.25rem;
}

.am-math-chip-demo__banner h1 {
  font: 700 1.5rem/1.2 var(--am-font-ui);
  margin: 0 0 0.5rem;
}

.am-math-chip-demo__banner p {
  margin: 0;
  color: var(--am-muted);
  max-width: 42rem;
}

.am-math-chip-demo__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.am-math-chip-demo__panel h2 {
  font: 600 0.9375rem/1.3 var(--am-font-ui);
  margin: 0 0 0.65rem;
  color: var(--am-primary);
}

.am-math-chip-demo__panel .am-lc__hero {
  margin-bottom: 0;
}

.am-learning-page .am-panel-navy .am-chip {
  font-size: 0.9375rem;
  padding: 8px 16px;
}

.am-lc__edit {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 8px;
  padding: 0.55rem 0.65rem;
  border: 1px dashed rgba(19, 24, 27, 0.22);
  border-radius: var(--am-radius-sm);
  background: rgba(255, 255, 255, 0.85);
  color: inherit;
  font: inherit;
  line-height: 1.5;
  white-space: pre-wrap;
  resize: vertical;
}

.am-lc__title.am-lc__edit {
  font: 700 1.75rem/1.15 var(--am-font-ui);
}

/* Potential Mistake — objects on paper, not a nested wash. */
.am-lc__pm-sheet {
  container-type: inline-size;
  container-name: pm;
  margin-top: 2px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  min-width: 0;
  overflow: visible;
}

.am-lc__pm-stack {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, max-content) 32px minmax(0, 1fr);
  grid-template-areas:
    "trap arrow fix";
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
}

.am-lc__pm-stack:has(.am-lc__sticky) {
  grid-template-columns: minmax(0, max-content) minmax(7rem, 12rem) 32px minmax(0, 1fr);
  grid-template-areas:
    "trap sticky arrow fix";
}

.am-lc__pm-card--trap { grid-area: trap; }
.am-lc__sticky { grid-area: sticky; }
.am-lc__pm-bridge { grid-area: arrow; }
.am-lc__pm-card--fix { grid-area: fix; }

.am-lc__pm-card {
  min-width: 0;
  padding: 10px 12px 11px;
  border-radius: var(--am-radius-md);
  border: 1px solid var(--am-border-soft);
  color: var(--am-ink);
  background: var(--am-white);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--am-white) 80%, transparent);
}

.am-lc__pm-card--trap {
  margin-bottom: 0;
  border-left: 4px solid var(--am-accent);
  background: color-mix(in srgb, var(--am-soft-accent) 62%, white);
}

.am-lc__pm-card--fix {
  border-left: 4px solid var(--am-primary);
  background: color-mix(in srgb, var(--am-white) 86%, var(--am-soft-teal));
}

.am-lc__pm-kicker {
  font: 700 0.6875rem/1 var(--am-font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: color-mix(in srgb, var(--am-ink) 52%, transparent);
}

.am-lc__pm-card--trap .am-lc__pm-kicker {
  display: inline-block;
  font: 700 1.28rem/1 var(--am-font-hand);
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--am-accent);
  transform: rotate(-2.2deg);
  transform-origin: left center;
  margin: 0 0 8px;
}

.am-lc__pm-card--fix .am-lc__pm-kicker {
  color: var(--am-navy);
}

.am-lc__pm-card .am-lc__body {
  margin: 0;
  color: var(--am-ink);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.am-lc__sticky {
  position: relative;
  align-self: center;
  z-index: 1;
  max-width: 15rem; /* was 12rem; +25% */
  margin: 5px 0;
  padding: 15px 15px 14px;
  background: #f6edd8;
  color: #1a7c88;
  font: 700 1.3125rem/1.28 var(--am-font-hand); /* was 1.05rem; +25% */
  transform: rotate(-2.5deg);
  transform-origin: 50% 0;
  box-shadow: 2px 5px 14px rgba(28, 42, 50, 0.14);
  border-radius: 2px;
}

/* Slip body is Caveat — keep KaTeX in the same hand (LC page forces Open Sans globally). */
.am-learning-page .am-lc__sticky .katex,
.am-learning-page .am-lc__sticky .katex *,
.am-learning-page .am-lc__sticky .am-neq {
  font-family: var(--am-font-hand) !important;
  font-style: normal !important;
  font-weight: 700 !important;
}

.am-learning-page .am-lc__sticky .katex {
  font-size: 1em; /* match slip hand text; don't apply sans 95% shrink */
}

.am-lc__sticky::before {
  content: "";
  display: block;
  position: absolute;
  top: -9px;
  left: 50%;
  width: 35px;
  height: 15px;
  transform: translateX(-50%) rotate(-4deg);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.4),
    color-mix(in srgb, var(--am-soft-teal) 70%, transparent) 40%,
    color-mix(in srgb, var(--am-primary) 35%, transparent)
  );
  clip-path: polygon(4% 10%, 14% 0, 86% 3%, 100% 14%, 96% 90%, 82% 100%, 12% 96%, 0 76%);
}

.am-lc__pm-bridge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 0;
}

.am-lc__pm-arrow {
  width: 26px;
  height: 30px;
  align-self: center;
  margin: 0;
  overflow: visible;
  flex: none;
  transform: rotate(-90deg);
}

.am-lc__pm-arrow path {
  fill: none;
  stroke: var(--am-primary);
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.82;
}

@media (max-width: 1280px) {
  .am-lc__pm-stack,
  .am-lc__pm-stack:has(.am-lc__sticky) {
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-areas:
      "trap"
      "sticky"
      "arrow"
      "fix";
    row-gap: 10px;
  }

  .am-lc__sticky {
    max-width: none;
    width: 100%;
    justify-self: stretch;
    transform: rotate(-1.2deg);
  }

  .am-lc__pm-arrow {
    transform: none;
    width: 28px;
    height: 32px;
  }
}

@container pm (max-width: 1100px) {
  .am-lc__pm-stack,
  .am-lc__pm-stack:has(.am-lc__sticky) {
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-areas:
      "trap"
      "sticky"
      "arrow"
      "fix";
    row-gap: 10px;
  }

  .am-lc__sticky {
    max-width: none;
    width: 100%;
    justify-self: stretch;
    transform: rotate(-1.2deg);
  }

  .am-lc__pm-arrow {
    transform: none;
    width: 28px;
    height: 32px;
  }
}
