:root {
  --learn-blue: #83d8ff;
  --learn-mint: #8defcb;
  --learn-warm: #fff4e8;
}

.learn-body { background: #f4f6f2; }

.learn-header {
  color: white;
  background:
    radial-gradient(ellipse 65% 70% at 5% 0%, rgba(60, 158, 232, .48), transparent 70%),
    radial-gradient(ellipse 60% 80% at 100% 15%, rgba(39, 215, 158, .4), transparent 70%),
    linear-gradient(145deg, #071b32 0%, #073b43 54%, #0b4b39 100%);
}

.learn-header .nav-links > a:not(.nav-cta) { color: rgba(255, 255, 255, .78); }
.learn-header .nav-links > a[aria-current="page"] { color: white; }
.language-switcher { display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, .4); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.language-switcher a { color: rgba(255, 255, 255, .64); }
.language-switcher a:hover,
.language-switcher a[aria-current="true"] { color: white; }

.learn-hero { max-width: 1020px; padding: 72px 0 104px; }
.learn-breadcrumbs { display: flex; gap: 9px; margin-bottom: 66px; color: rgba(255, 255, 255, .56); font-size: 13px; font-weight: 700; }
.learn-breadcrumbs a { color: rgba(255, 255, 255, .82); }
.learn-breadcrumbs a:hover { color: white; }
.learn-hero h1 { max-width: 980px; font-size: clamp(52px, 7.5vw, 94px); }
.learn-hero h1 span { color: var(--learn-mint); }
.learn-hero-lead { max-width: 760px; margin-top: 30px; color: rgba(255, 255, 255, .74); font-size: clamp(18px, 2vw, 22px); line-height: 1.58; }
.learn-reading-time { margin-top: 30px; color: rgba(255, 255, 255, .5); font-size: 13px; font-weight: 750; letter-spacing: .03em; }

.learn-main { display: grid; grid-template-columns: 250px minmax(0, 760px); justify-content: center; align-items: start; gap: 86px; padding-top: 88px; padding-bottom: 130px; }
.learn-main-wide { display: block; max-width: 1060px; }

.learn-toc { position: sticky; top: 28px; padding: 24px; background: #e3f2e9; border: 1px solid rgba(17, 35, 30, .08); border-radius: 22px; }
.learn-toc ol { display: grid; gap: 12px; padding: 0; margin: 18px 0 0; list-style: none; counter-reset: guide-toc; }
.learn-toc li { display: grid; grid-template-columns: 22px 1fr; gap: 7px; counter-increment: guide-toc; color: #4d5e58; font-size: 13px; line-height: 1.4; }
.learn-toc li::before { color: var(--teal); content: counter(guide-toc, decimal-leading-zero); font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.learn-toc a:hover { color: var(--teal); }

.learn-copy { min-width: 0; }
.learn-copy > :first-child { margin-top: 0; }
.learn-copy h2 { margin-top: 80px; color: var(--ink); font-size: clamp(34px, 4.5vw, 50px); line-height: 1.08; scroll-margin-top: 24px; }
.learn-copy h3 { margin-top: 42px; color: var(--ink); font-size: 24px; line-height: 1.2; letter-spacing: -.025em; scroll-margin-top: 24px; }
.learn-copy h4 { margin: 30px 0 0; font-size: 16px; }
.learn-copy p,
.learn-copy li { color: #4d5d58; font-size: 17px; line-height: 1.75; }
.learn-copy p { margin-top: 20px; }
.learn-copy ul,
.learn-copy ol { display: grid; gap: 10px; margin: 22px 0 0; padding-left: 25px; }
.learn-copy strong { color: var(--ink); }
.learn-copy a:not(.learn-card, .learn-next, .learn-button) { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.learn-copy hr { margin: 72px 0; border: 0; border-top: 1px solid var(--line); }
.learn-copy blockquote { margin: 30px 0 0; padding: 24px 28px; background: #e4f2ea; border-left: 4px solid var(--teal); border-radius: 0 18px 18px 0; }
.learn-copy blockquote p { margin: 0; color: #315249; font-size: 18px; }

.learn-intro { max-width: 790px; margin-bottom: 72px; }
.learn-intro h2 { margin-top: 0; }
.learn-intro p { max-width: 720px; font-size: 20px; }

.learn-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 38px; }
.learn-card { display: flex; min-height: 250px; flex-direction: column; padding: 30px; background: white; border: 1px solid var(--line); border-radius: 24px; transition: transform 160ms ease, box-shadow 160ms ease; }
.learn-card:hover { box-shadow: 0 18px 48px rgba(5, 30, 23, .1); transform: translateY(-3px); }
.learn-card .card-number { color: var(--teal); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.learn-card h3 { margin-top: 28px; font-size: 28px; }
.learn-card p { margin-top: 13px; font-size: 15px; line-height: 1.6; }
.learn-card .card-link { margin-top: auto; padding-top: 24px; color: var(--teal); font-size: 13px; font-weight: 800; }

.principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 38px; }
.principle-grid > div { min-height: 210px; padding: 24px; background: #e3f2e9; border: 1px solid rgba(17, 35, 30, .08); border-radius: 22px; }
.principle-grid span { color: var(--teal); font-size: 11px; font-weight: 850; }
.principle-grid h3 { margin-top: 28px; font-size: 21px; }
.principle-grid p { margin-top: 11px; font-size: 14px; line-height: 1.55; }

.money-example { margin-top: 30px; overflow: hidden; background: #0b4035; border-radius: 24px; color: white; }
.money-example-header { display: flex; justify-content: space-between; gap: 20px; padding: 22px 25px; background: rgba(255, 255, 255, .07); }
.money-example-header span { color: rgba(255, 255, 255, .62); font-size: 13px; }
.money-example-header strong { color: white; }
.money-example dl { margin: 0; padding: 8px 25px 18px; }
.money-example dl div { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.money-example dl div:last-child { border-bottom: 0; }
.money-example dt { color: rgba(255, 255, 255, .74); }
.money-example dd { margin: 0; font-weight: 800; }
.money-example p { margin: 0; padding: 18px 25px; color: #173b32; background: var(--learn-mint); font-size: 14px; }

.concept-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.concept-pair > div { padding: 26px; background: white; border: 1px solid var(--line); border-radius: 20px; }
.concept-pair h3 { margin: 0; font-size: 23px; }
.concept-pair p { margin-top: 12px; font-size: 15px; }

.learn-note { margin-top: 30px; padding: 24px 26px; background: var(--learn-warm); border: 1px solid rgba(139, 85, 35, .13); border-radius: 20px; }
.learn-note strong { display: block; }
.learn-note p { margin-top: 7px; color: #6b5542; font-size: 15px; line-height: 1.62; }

.step-list { padding: 0 !important; counter-reset: setup-step; list-style: none; }
.step-list > li { position: relative; padding: 6px 0 42px 66px; counter-increment: setup-step; }
.step-list > li::before { position: absolute; top: 0; left: 0; display: grid; width: 44px; height: 44px; color: white; content: counter(setup-step); place-items: center; background: var(--forest); border-radius: 50%; font-weight: 850; }
.step-list > li::after { position: absolute; top: 50px; bottom: 2px; left: 21px; width: 2px; content: ""; background: #d7e1dc; }
.step-list > li:last-child::after { display: none; }
.step-list h3 { margin-top: 0; }
.step-list p { margin-top: 10px; }

.glossary-index { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 !important; list-style: none; }
.glossary-index a { display: grid; width: 38px; height: 38px; color: var(--teal) !important; place-items: center; background: white; border: 1px solid var(--line); border-radius: 10px; text-decoration: none !important; font-size: 13px; font-weight: 800; }
.glossary-group { margin-top: 64px; scroll-margin-top: 24px; }
.glossary-group > h2 { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.glossary-list { margin: 0; }
.glossary-list div { padding: 27px 0; border-bottom: 1px solid var(--line); }
.glossary-list dt { color: var(--ink); font-size: 20px; font-weight: 800; }
.glossary-list dt small { color: #6e7c77; font-size: 12px; font-weight: 650; }
.glossary-list dd { margin: 9px 0 0; color: #4d5d58; font-size: 16px; line-height: 1.7; }

.learn-next { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: center; margin-top: 80px; padding: 28px 30px; color: white; background: var(--forest); border-radius: 22px; }
.learn-next span:first-child { color: rgba(255, 255, 255, .62); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.learn-next strong { grid-column: 1; color: white; font-size: 21px; }
.learn-next span:last-child { grid-column: 2; grid-row: 1 / 3; font-size: 28px; }

@media (max-width: 900px) {
  .learn-main { grid-template-columns: 1fr; gap: 50px; }
  .learn-toc { position: static; }
  .learn-toc ol { grid-template-columns: repeat(2, 1fr); }
  .principle-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .learn-header .nav-links { gap: 14px; }
  .learn-header .nav-cta { display: none; }
  .learn-hero { padding-top: 48px; padding-bottom: 78px; }
  .learn-breadcrumbs { margin-bottom: 46px; }
  .learn-hero h1 { font-size: clamp(46px, 13vw, 66px); }
  .learn-main { padding-top: 54px; padding-bottom: 90px; }
  .learn-toc ol,
  .learn-card-grid,
  .principle-grid,
  .concept-pair { grid-template-columns: 1fr; }
  .learn-card { min-height: 220px; }
  .learn-copy h2 { margin-top: 62px; font-size: 36px; }
  .learn-copy h3 { font-size: 22px; }
  .learn-copy p,
  .learn-copy li { font-size: 16px; }
  .step-list > li { padding-left: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  .learn-card { transition: none; }
}

/* Editorial refinement */
.learn-body { background: var(--paper); }
.learn-header { background: radial-gradient(ellipse 60% 68% at 4% 0%, rgba(57, 153, 224, .4), transparent 72%), radial-gradient(ellipse 62% 70% at 100% 10%, rgba(46, 207, 157, .34), transparent 72%), linear-gradient(145deg, #071b32 0%, #073740 54%, #0a4437 100%); }
.learn-hero { max-width: none; padding-top: 64px; padding-bottom: 92px; }
.learn-breadcrumbs { margin-bottom: 58px; font-size: 13px; font-weight: 560; }
.learn-hero h1 { max-width: 15ch; font-size: clamp(50px, 7vw, 82px); line-height: 1.04; }
.learn-hero-lead { max-width: 62ch; margin-top: 26px; font-size: 19px; text-wrap: pretty; }
.learn-reading-time { font-weight: 560; }

.learn-main { grid-template-columns: 240px minmax(0, 760px); gap: 72px; padding-top: 82px; padding-bottom: 116px; }
.learn-main-wide { max-width: 1060px; }
.learn-toc { padding: 22px; background: #eaf4ee; border: 0; border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(17, 35, 30, .07); }
.learn-toc li { font-size: 13px; }

.learn-copy h2 { margin-top: 72px; font-size: clamp(32px, 4vw, 46px); line-height: 1.12; }
.learn-copy h3 { margin-top: 38px; font-size: 23px; font-weight: 620; }
.learn-copy p,
.learn-copy li { font-size: 16px; line-height: 1.78; text-wrap: pretty; }
.learn-copy blockquote { padding: 22px 24px; background: #eaf4ee; border-left-width: 3px; border-radius: 0 14px 14px 0; }
.learn-copy blockquote p { font-size: 17px; }
.learn-intro { max-width: 790px; }
.learn-intro p { max-width: 64ch; font-size: 18px; }

.learn-card-grid { gap: 16px; }
.learn-card { min-height: 235px; padding: 28px; border-color: rgba(17, 35, 30, .1); border-radius: 20px; }
.learn-card:hover { box-shadow: 0 16px 42px rgba(5, 30, 23, .08); }
.learn-card .card-number { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 11px; font-weight: 700; }
.learn-card h3 { margin-top: 26px; font-size: 26px; }
.learn-card p { font-size: 15px; }
.learn-card .card-link { font-size: 13px; font-weight: 650; }

.principle-grid { gap: 24px; margin-top: 36px; }
.principle-grid > div { min-height: 190px; padding: 22px 8px 0 0; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.principle-grid span { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-weight: 700; }
.principle-grid h3 { margin-top: 26px; font-size: 20px; }
.principle-grid p { font-size: 14px; }

.money-example { border-radius: 20px; }
.money-example dt { color: rgba(255, 255, 255, .78); font-weight: 560; }
.money-example dd { color: white; font-weight: 620; }
.concept-pair { gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.concept-pair > div { padding: 24px 20px; background: transparent; border: 0; border-radius: 0; }
.concept-pair > div + div { border-left: 1px solid var(--line); }
.learn-note { background: #fff5e9; border: 0; border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(139, 85, 35, .12); }
.step-list > li::before { font-weight: 650; }
.glossary-index a { border-color: rgba(17, 35, 30, .1); }
.glossary-list dt { font-weight: 620; }
.learn-next { border-radius: 18px; }
.learn-next strong { font-weight: 620; }

@media (max-width: 900px) {
  .learn-main { gap: 42px; }
}

@media (max-width: 640px) {
  .learn-hero { padding-top: 42px; padding-bottom: 70px; }
  .learn-breadcrumbs { margin-bottom: 40px; }
  .learn-hero h1 { font-size: 44px; }
  .learn-hero-lead { font-size: 17px; }
  .learn-main { padding-top: 50px; padding-bottom: 86px; }
  .learn-toc li,
  .learn-card p,
  .principle-grid p { font-size: 16px; }
  .learn-copy h2 { font-size: 34px; }
  .learn-copy p,
  .learn-copy li { font-size: 16px; }
  .learn-card { min-height: 215px; }
  .principle-grid { gap: 34px; }
  .principle-grid > div { min-height: 0; padding-top: 20px; }
  .concept-pair > div { padding: 22px 0; }
  .concept-pair > div + div { border-top: 1px solid var(--line); border-left: 0; }
}
