:root {
  --ink: #122b26;
  --ink-soft: #50625c;
  --cream: #f5efe4;
  --paper: #fffaf2;
  --sage: #cad8c3;
  --apple: #c8d69b;
  --apple-strong: #b5c66c;
  --coral: #c76f56;
  --coral-dark: #a9533f;
  --gold: #d4af37;
  --line: rgba(18, 43, 38, .17);
  --white: #fff;
  --display: "Outfit", sans-serif;
  --body: "DM Sans", sans-serif;
  --max: 1240px;
  --shadow: 0 30px 80px rgba(18, 43, 38, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 16px; }
a { color: inherit; }
button { font: inherit; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 100; padding: .7rem 1rem; background: var(--ink); color: var(--white); font-weight: 700; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid rgba(199,111,86,.45); outline-offset: 3px; }
.resource-container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }

.resource-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(245, 239, 228, .9); backdrop-filter: blur(16px); transition: box-shadow .25s ease, background .25s ease; }
.resource-header.is-scrolled { background: rgba(255,250,242,.94); box-shadow: 0 12px 35px rgba(18,43,38,.07); }
.resource-header::after { content: ""; position: absolute; bottom: -1px; left: 50%; width: 118px; height: 3px; transform: translateX(-50%); background: var(--gold); }
.resource-header-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.resource-brand { display: flex; align-items: center; gap: .72rem; font-family: var(--display); font-size: 1.2rem; font-weight: 700; text-decoration: none; }
.resource-brand img { width: 42px; height: 42px; }
.resource-brand span { display: grid; line-height: 1; }
.resource-brand small { margin-top: .35rem; font-family: var(--body); font-size: .47rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.resource-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.2rem); }
.resource-nav a { position: relative; font-size: .75rem; font-weight: 700; text-decoration: none; }
.resource-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -.45rem; height: 2px; background: var(--coral); transition: right .22s ease; }
.resource-nav a:not(.nav-cta):hover::after { right: 0; }
.nav-cta { min-height: 42px; padding: .65rem 1rem; border-radius: 10px; display: inline-flex; align-items: center; background: var(--ink); color: var(--white); transition: transform .2s ease, background .2s ease; }
.nav-cta:hover { background: #1b4945; transform: translateY(-2px); }
.nav-cta:active { transform: scale(.98); }

.resource-hero { position: relative; padding: clamp(4.5rem, 10vw, 9rem) 0 clamp(5.5rem, 11vw, 10rem); overflow: hidden; }
.resource-hero::before { content: ""; position: absolute; width: min(48vw, 660px); aspect-ratio: 1; right: -18vw; top: -23vw; border: 1px solid rgba(199,111,86,.18); border-radius: 50%; box-shadow: 0 0 0 11vw rgba(199,111,86,.035); pointer-events: none; }
.resource-hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(250px, .45fr); gap: clamp(3rem, 9vw, 8rem); align-items: end; }
.resource-label { display: inline-flex; width: fit-content; padding: .55rem .75rem; border-radius: 10px; background: var(--sage); font-size: .67rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.resource-hero h1 { max-width: 930px; margin: 1.25rem 0 1.4rem; font-family: var(--display); font-size: clamp(3.6rem, 7.5vw, 7.5rem); font-weight: 600; line-height: .86; letter-spacing: -.068em; text-wrap: balance; }
.resource-hero h1 em { color: var(--coral); font-style: normal; }
.resource-lede { max-width: 720px; margin: 0; color: var(--ink-soft); font-size: clamp(1rem, 1.55vw, 1.2rem); line-height: 1.7; text-wrap: pretty; }
.hero-marker { width: clamp(180px, 22vw, 260px); aspect-ratio: 1; margin-left: auto; display: grid; place-items: center; align-content: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--ink); text-align: center; }
.hero-marker span { font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero-marker strong { display: block; margin: .25rem 0; font-family: var(--display); font-size: clamp(3.2rem, 6vw, 5.8rem); line-height: .85; letter-spacing: -.07em; }
.hero-marker small { max-width: 120px; color: var(--ink-soft); font-size: .64rem; line-height: 1.35; }
.resource-page-nclc .hero-marker { background: var(--apple); }
.resource-page-tef .hero-marker { background: var(--sage); }
.resource-page-quebec .hero-marker { background: rgba(199,111,86,.18); }

.resource-main { padding-bottom: clamp(6rem, 12vw, 11rem); }
.resource-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(3.5rem, 9vw, 9rem); align-items: start; }
.resource-toc { position: sticky; top: 120px; padding-top: 1.1rem; border-top: 1px solid var(--ink); }
.resource-toc > span { display: block; margin-bottom: 1rem; color: var(--coral-dark); font-size: .63rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.resource-toc a { position: relative; display: block; padding: .55rem 0 .55rem 1rem; color: var(--ink-soft); font-size: .76rem; font-weight: 600; line-height: 1.35; text-decoration: none; transition: color .2s ease, transform .2s ease; }
.resource-toc a::before { content: ""; position: absolute; left: 0; top: 1rem; width: 5px; height: 5px; border-radius: 50%; background: var(--sage); transition: transform .2s ease, background .2s ease; }
.resource-toc a:hover, .resource-toc a.is-active { color: var(--ink); transform: translateX(4px); }
.resource-toc a.is-active::before { background: var(--coral); transform: scale(1.6); }
.resource-article { min-width: 0; }
.resource-section { scroll-margin-top: 115px; padding: clamp(3.5rem, 7vw, 6.5rem) 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: clamp(1.4rem, 4vw, 3rem); }
.resource-section:first-child { border-top-color: var(--ink); }
.section-number { padding-top: .4rem; color: var(--coral-dark); font-family: var(--display); font-size: .78rem; font-weight: 700; letter-spacing: .06em; }
.section-copy h2 { max-width: 760px; margin: 0 0 1.25rem; font-family: var(--display); font-size: clamp(2.3rem, 4.7vw, 4.7rem); font-weight: 600; line-height: .95; letter-spacing: -.055em; text-wrap: balance; }
.section-copy p, .section-copy li { max-width: 720px; color: var(--ink-soft); font-size: .96rem; line-height: 1.82; text-wrap: pretty; }
.section-copy p { margin: 0 0 1.15rem; }
.section-copy strong { color: var(--ink); }
.section-copy a { color: var(--ink); font-weight: 700; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: .28rem; }
.section-copy a:hover { color: var(--coral-dark); }
.resource-list { max-width: 780px; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; list-style: none; }
.resource-list li { position: relative; min-height: 84px; padding: 1.05rem 0 1.05rem 1.4rem; border-top: 1px solid var(--line); }
.resource-list li::before { content: ""; position: absolute; left: 0; top: 1.65rem; width: 7px; height: 7px; border-radius: 50%; background: var(--apple-strong); }
.resource-note { max-width: 760px; margin: 2rem 0 0; padding: 1.2rem 1.3rem; border-radius: 14px; background: var(--sage); color: var(--ink-soft); font-size: .82rem; line-height: 1.65; }
.resource-note strong { color: var(--ink); }

.resource-cta { position: relative; margin: clamp(3rem, 7vw, 6rem) 0; padding: clamp(2rem, 6vw, 5rem); border-radius: 28px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 2rem; align-items: end; background: var(--coral); }
.resource-cta::after { content: ""; position: absolute; width: 260px; height: 260px; right: -110px; top: -140px; border: 1px solid rgba(18,43,38,.2); border-radius: 50%; }
.resource-cta > * { position: relative; z-index: 1; }
.resource-cta span { display: block; margin-bottom: .8rem; font-size: .65rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.resource-cta h2 { max-width: 720px; margin: 0 0 .85rem; font-family: var(--display); font-size: clamp(2.5rem, 5vw, 5.2rem); font-weight: 600; line-height: .9; letter-spacing: -.06em; }
.resource-cta p { max-width: 660px; margin: 0; color: #4d4f47; line-height: 1.6; }
.resource-button { min-height: 54px; padding: .9rem 1.25rem; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: .7rem; background: var(--ink); color: var(--white); font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .2s ease, background .2s ease; }
.resource-button:hover { background: #1b4945; transform: translateY(-2px); }
.resource-button:active { transform: scale(.98); }

.related-section { padding-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--ink); }
.related-section > span { color: var(--coral-dark); font-size: .65rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.related-section h2 { max-width: 680px; margin: .8rem 0 2rem; font-family: var(--display); font-size: clamp(2.3rem, 4.5vw, 4.5rem); line-height: .95; letter-spacing: -.05em; }
.resource-related { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.resource-related a { min-height: 112px; padding: 1.2rem 2.7rem 1.2rem 0; border-bottom: 1px solid var(--line); position: relative; display: flex; align-items: flex-end; font-family: var(--display); font-size: clamp(1.15rem, 2vw, 1.55rem); font-weight: 600; line-height: 1.05; text-decoration: none; transition: color .2s ease, padding .2s ease; }
.resource-related a:not(:last-child) { margin-right: 2rem; }
.resource-related a::after { content: "→"; position: absolute; right: .2rem; bottom: 1.15rem; color: var(--coral-dark); transition: transform .2s ease; }
.resource-related a:hover { padding-left: .45rem; color: var(--coral-dark); }
.resource-related a:hover::after { transform: translateX(5px); }

.resource-footer { padding: 4rem 0 5rem; background: var(--ink); color: #dce5e0; }
.resource-footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: end; }
.resource-footer-brand { display: flex; align-items: center; gap: .8rem; font-family: var(--display); font-size: 1.2rem; font-weight: 700; }
.resource-footer-brand img { width: 42px; filter: none; }
.resource-footer p { max-width: 680px; margin: 1rem 0 0; color: #98aaa3; font-size: .7rem; line-height: 1.6; }
.resource-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1rem; }
.resource-footer a { color: var(--white); font-size: .72rem; font-weight: 700; text-underline-offset: .25rem; }

.js .resource-reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.8,.2,1); }
.js .resource-reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .resource-hero-inner { grid-template-columns: 1fr; }
  .hero-marker { width: 170px; margin: 0; }
  .resource-layout { grid-template-columns: 1fr; }
  .resource-toc { position: static; display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
  .resource-toc > span { width: 100%; }
  .resource-toc a { padding-left: .85rem; }
  .resource-cta { grid-template-columns: 1fr; }
  .resource-related { grid-template-columns: 1fr; }
  .resource-related a:not(:last-child) { margin-right: 0; }
}

@media (max-width: 680px) {
  .resource-container { width: min(100% - 30px, var(--max)); }
  .resource-header-inner { min-height: 72px; }
  .resource-brand img { width: 36px; height: 36px; }
  .resource-brand { font-size: 1rem; }
  .resource-nav a:not(.nav-cta) { display: none; }
  .nav-cta { min-height: 40px; padding: .6rem .8rem; font-size: .7rem !important; }
  .resource-hero { padding-top: 4rem; }
  .resource-hero h1 { font-size: clamp(3.2rem, 16vw, 5.4rem); }
  .resource-section { grid-template-columns: 1fr; gap: .7rem; }
  .section-number { padding-top: 0; }
  .section-copy h2 { font-size: clamp(2.25rem, 12vw, 3.7rem); }
  .resource-list { grid-template-columns: 1fr; }
  .resource-cta { border-radius: 20px; }
  .resource-button { width: 100%; white-space: normal; text-align: center; }
  .resource-footer-grid { grid-template-columns: 1fr; }
  .resource-footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .js .resource-reveal { opacity: 1; transform: none; }
}
