:root {
  --primary: var(--ap-navy); --primary-light: var(--ap-navy-soft); --primary-dark: var(--ap-navy-deep);
  --accent: var(--ap-gold); --accent-hover: #9b6126; --gold: var(--ap-gold-bright);
  --text-dark: var(--ap-ink); --heading: var(--ap-navy); --text-gray: var(--ap-muted); --text-light: #7c8798;
  --bg: var(--ap-paper); --bg-white: var(--ap-white); --bg-light: var(--ap-paper-deep); --bg-dark: var(--ap-navy-deep);
  --card-bg: rgba(255,255,255,.4); --card-border: var(--ap-line);
}
.market-page { background: var(--ap-paper); }
.market-page main { overflow: clip; }
.market-page .container { width: min(calc(100% - 48px),var(--ap-shell)); margin-inline: auto; }
.market-section { position: relative; isolation: isolate; }
.market-section:not(.ed-hero):not(.stats) { padding: clamp(100px,11vw,160px) 0; }
.market-section:not(.ed-hero):not(.stats)::after { content: attr(data-market-index); position: absolute; right: clamp(18px,4vw,64px); top: clamp(32px,5vw,72px); z-index: -1; color: var(--ap-navy); font: 600 clamp(9rem,20vw,19rem)/.75 var(--ap-heading); letter-spacing: -.09em; opacity: .025; pointer-events: none; }
.market-section.is-story-active::after { opacity: .045; }
.market-section:nth-of-type(even):not(.stats):not(.contact) { background: rgba(255,255,255,.3); }

.ed-hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; padding: 124px 0 78px; background: linear-gradient(145deg,#fffdf8,var(--ap-paper) 58%,var(--ap-paper-deep)); }
.ed-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: .58; background-image: linear-gradient(rgba(30,58,95,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(30,58,95,.045) 1px,transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom,transparent,#000 17%,#000 82%,transparent); }
.ed-hero::after { content: ""; position: absolute; width: min(48vw,690px); aspect-ratio: 1; right: -15vw; top: -20%; z-index: -1; border: 1px dashed rgba(184,119,47,.27); border-radius: 50%; }
.ed-hero-inner { width: min(calc(100% - 48px),var(--ap-shell)); margin-inline: auto; display: grid; grid-template-columns: minmax(0,1.08fr) minmax(390px,.92fr); align-items: center; gap: clamp(62px,8vw,128px); }
.ed-hero-copy { position: relative; z-index: 2; max-width: 810px; }
.ed-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 24px; color: var(--ap-gold); font-size: .68rem; font-weight: 750; letter-spacing: .17em; text-transform: uppercase; }
.ed-eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.ed-h1 { max-width: 12ch; margin: 0; color: var(--ap-navy); font: 600 clamp(4rem,7.2vw,7.6rem)/.9 var(--ap-heading); letter-spacing: -.065em; text-wrap: balance; }
.ed-h1 em { color: var(--ap-gold); font-weight: 500; }
.ed-lede { max-width: 58ch; margin: 30px 0 0; color: var(--ap-muted); font-size: clamp(1rem,1.4vw,1.15rem); line-height: 1.8; }
.ed-cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; margin-top: 34px; }
.ed-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 21px; border: 1px solid var(--ap-navy); border-radius: 4px; font-size: .82rem; font-weight: 750; text-decoration: none; transition: transform .25s var(--ap-ease),background .25s ease,color .25s ease,border-color .25s ease; }
.ed-btn-primary { background: var(--ap-navy); color: #fff; }
.ed-btn-ghost { background: transparent; color: var(--ap-navy); }
.ed-btn:hover { transform: translateY(-2px); border-color: var(--ap-gold); background: var(--ap-gold); color: #fff; }
.ed-btn svg { width: 18px; height: 18px; }
.ed-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 27px; color: var(--ap-muted); font-size: .72rem; }
.ed-stars { color: var(--ap-gold); font-size: .64rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.ed-guarantees { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 18px 0 0; padding: 0; color: var(--ap-muted); font-size: .68rem; list-style: none; }
.ed-guarantees li { display: inline-flex; align-items: center; gap: 7px; }
.ed-ck { color: var(--ap-gold); }

.ed-hero-art { position: relative; min-height: 570px; display: grid; place-items: center; perspective: 1200px; }
.ed-hero-art::before { content: ""; position: absolute; width: min(40vw,510px); aspect-ratio: 1; border: 1px solid rgba(30,58,95,.13); border-radius: 50%; }
.ed-hero-art::after { content: ""; position: absolute; width: min(31vw,400px); aspect-ratio: 1; border: 1px dashed rgba(184,119,47,.28); border-radius: 50%; animation: marketOrbit 38s linear infinite; }
@keyframes marketOrbit { to { transform: rotate(360deg); } }
.ed-paper-stack { position: relative; width: min(30vw,360px); aspect-ratio: .78; }
.ed-paper-back { position: absolute; inset: 14px -14px -14px 14px; background: var(--ap-navy); opacity: .16; transform: rotate(5deg); }
.ed-paper { position: absolute; inset: 0; padding: 28px; overflow: hidden; background: linear-gradient(145deg,#fff,var(--ap-paper)); color: var(--ap-navy); box-shadow: var(--ap-shadow); transform: rotate(-3deg); animation: marketFloat 6s var(--ap-ease) infinite alternate; }
.ed-paper::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(30,58,95,.045) 1px,transparent 1px); background-size: 100% 34px; }
@keyframes marketFloat { to { transform: translateY(-10px) rotate(-1deg); } }
.ed-paper-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 17px; border-bottom: 1px solid var(--ap-line); }
.ed-paper-title { font: 600 1.05rem/1.1 var(--ap-heading); }
.ed-paper-course { color: var(--ap-gold); font-size: .52rem; font-weight: 750; letter-spacing: .08em; text-align: right; text-transform: uppercase; }
.ed-paper-lines { position: relative; display: grid; gap: 12px; margin-top: 35px; }
.ed-paper-lines span { height: 3px; background: rgba(30,58,95,.1); }
.ed-paper-lines .hl { width: 78%; background: rgba(184,119,47,.3); }
.ed-paper-lines .short { width: 55%; }
.ed-paper-note { position: relative; max-width: 16ch; margin-top: 32px; color: var(--ap-muted); font: 500 1.08rem/1.35 var(--ap-heading); }
.ed-stamp { position: absolute; right: 26px; bottom: 25px; display: grid; place-items: center; width: 74px; aspect-ratio: 1; border: 1px solid rgba(184,119,47,.55); border-radius: 50%; color: var(--ap-gold); transform: rotate(8deg); }
.ed-stamp strong { font: 600 1.7rem/1 var(--ap-heading); }
.ed-stamp span { font-size: .48rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.ed-chip { position: absolute; z-index: 3; padding: 10px 13px; border: 1px solid var(--ap-line); background: rgba(255,253,250,.93); color: var(--ap-navy); box-shadow: 0 12px 28px rgba(13,28,46,.12); font-size: .62rem; font-weight: 700; backdrop-filter: blur(12px); }
.ed-chip svg { display: inline-block; vertical-align: middle; margin-right: 5px; color: var(--ap-gold); }
.ed-chip-a { left: -17%; bottom: 20%; }
.ed-chip-b { right: -22%; top: 19%; }

.stats { padding: 0; background: var(--ap-navy-deep); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.stat-item { min-height: 150px; display: flex; flex-direction: column; justify-content: center; padding: 27px; border-right: 1px solid var(--ap-dark-line); }
.stat-item:last-child { border-right: 0; }
.stat-number { color: #fff; font: 600 clamp(2rem,3.8vw,3.4rem)/1 var(--ap-heading); letter-spacing: -.04em; }
.stat-label { margin-top: 9px; color: rgba(255,255,255,.5); font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.section-title { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(260px,.85fr); align-items: end; gap: 24px 60px; margin-bottom: 58px; text-align: left; }
.section-tag { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--ap-gold); font-size: .66rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.section-tag::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.section-title h2 { max-width: 13ch; margin: 0; color: var(--ap-navy); font: 600 clamp(3rem,5.8vw,5.8rem)/.94 var(--ap-heading); letter-spacing: -.055em; text-wrap: balance; }
.section-title p { max-width: 48ch; margin: 0 0 8px; color: var(--ap-muted); line-height: 1.8; }

.services-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid var(--ap-line); border-left: 1px solid var(--ap-line); }
.service-card { position: relative; min-height: 340px; display: flex; flex-direction: column; padding: 25px; overflow: hidden; border-right: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); background: rgba(255,255,255,.18); color: var(--ap-navy); transition: background .35s ease,color .35s ease; }
.service-card::after { content: ""; position: absolute; width: 160px; height: 160px; right: -110px; bottom: -110px; border: 1px solid rgba(184,119,47,.35); border-radius: 50%; transition: transform .6s var(--ap-ease); }
.service-card:hover { background: var(--ap-navy); color: #fff; }
.service-card:hover::after { transform: scale(2); }
.service-media { position: relative; z-index: 1; display: flex; align-items: center; justify-content: flex-start; min-height: 74px; }
.service-icon { width: 50px; height: 50px; fill: none; stroke: currentColor; stroke-width: 1.25; }
.service-content { position: relative; z-index: 1; margin-top: auto; }
.service-content h3 { margin: 0 0 12px; font: 600 clamp(1.55rem,2.2vw,2.15rem)/1.08 var(--ap-heading); letter-spacing: -.03em; }
.service-content p { max-width: 40ch; margin: 0; color: currentColor; font-size: .84rem; line-height: 1.7; opacity: .64; }

.steps-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid var(--ap-line); border-left: 1px solid var(--ap-line); }
.step-card { position: relative; min-height: 300px; display: flex; flex-direction: column; padding: 26px; border-right: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); }
.step-number { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid var(--ap-line); border-radius: 50%; color: var(--ap-gold); font-size: .7rem; font-weight: 750; }
.step-content { margin-top: auto; }
.step-content h3 { margin: 0 0 11px; color: var(--ap-navy); font: 600 1.8rem/1.08 var(--ap-heading); }
.step-content p { margin: 0; color: var(--ap-muted); font-size: .86rem; }
.step-arrow { position: absolute; right: -15px; top: 50%; z-index: 3; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--ap-line); border-radius: 50%; background: var(--ap-paper); color: var(--ap-gold); transform: translateY(-50%); }

.features-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--ap-line); border-left: 1px solid var(--ap-line); }
.feature-card { position: relative; min-height: 290px; display: flex; flex-direction: column; padding: 24px; border-right: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); background: rgba(255,255,255,.18); }
.feature-icon { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--ap-line); border-radius: 50%; color: var(--ap-gold); font-size: .62rem; font-weight: 750; letter-spacing: .08em; }
.feature-card h3 { margin: auto 0 11px; color: var(--ap-navy); font: 600 1.55rem/1.1 var(--ap-heading); letter-spacing: -.025em; }
.feature-card p { margin: 0; color: var(--ap-muted); font-size: .82rem; line-height: 1.68; }

.testimonials { background: var(--ap-navy-deep) !important; color: #fff; }
.testimonials::after { color: #fff !important; }
.testimonials .section-title h2 { color: #fff; }
.testimonials .section-title p { color: rgba(255,255,255,.55); }
.testimonials .section-tag { color: var(--ap-gold-bright); }
.testimonials-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--ap-dark-line); border-left: 1px solid var(--ap-dark-line); }
.testimonial-card { min-height: 340px; display: flex; flex-direction: column; padding: 30px; border-right: 1px solid var(--ap-dark-line); border-bottom: 1px solid var(--ap-dark-line); }
.testimonial-stars { color: var(--ap-gold-bright); font-size: .62rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.testimonial-text { max-width: 40ch; margin: auto 0 28px; color: #fff; font: 500 clamp(1.3rem,2.3vw,2rem)/1.45 var(--ap-heading); }
.testimonial-author { display: flex; align-items: center; gap: 13px; }
.testimonial-avatar { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: var(--ap-gold-bright); font-weight: 750; }
.testimonial-info h4 { margin: 0; font-size: .82rem; }
.testimonial-info p { margin: 2px 0 0; color: rgba(255,255,255,.48); font-size: .7rem; }

.faq-list { width: min(100%,900px); margin-inline: auto; border-top: 1px solid var(--ap-line); }
.faq-item { border-bottom: 1px solid var(--ap-line); }
.faq-question { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding: 25px 0; cursor: pointer; }
.faq-question h3 { margin: 0; color: var(--ap-navy); font: 600 clamp(1.25rem,2vw,1.7rem)/1.25 var(--ap-heading); }
.faq-toggle { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--ap-line); color: var(--ap-gold); transition: transform .3s var(--ap-ease); }
.faq-item.active .faq-toggle { transform: rotate(45deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ap-ease); }
.faq-answer > * { overflow: hidden; }
.faq-answer p { max-width: 70ch; margin: 0; color: var(--ap-muted); line-height: 1.8; }
.faq-item.active .faq-answer { grid-template-rows: 1fr; }
.faq-item.active .faq-answer p { padding-bottom: 25px; }

.contact { overflow: hidden; background: var(--ap-navy) !important; color: #fff; text-align: left; }
.contact::after { color: #fff !important; }
.contact > .container > h2 { max-width: 13ch; margin: 0; color: #fff; font: 600 clamp(3.2rem,6vw,6.2rem)/.93 var(--ap-heading); letter-spacing: -.06em; }
.contact > .container > p { max-width: 44ch; margin: 22px 0 44px; color: rgba(255,255,255,.58); }
.contact-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: min(100%,820px); border-top: 1px solid var(--ap-dark-line); border-left: 1px solid var(--ap-dark-line); }
.contact-card { position: relative; min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; padding: 25px; border-right: 1px solid var(--ap-dark-line); border-bottom: 1px solid var(--ap-dark-line); color: #fff; text-decoration: none; transition: background .3s ease; }
.contact-card:hover { background: rgba(255,255,255,.07); }
.contact-icon { position: absolute; right: 20px; top: 17px; color: var(--ap-gold-bright); font-size: .62rem; font-weight: 750; }
.contact-card h3 { margin: 0 0 8px; font: 600 2rem/1 var(--ap-heading); }
.contact-card span { color: rgba(255,255,255,.55) !important; font-size: .84rem !important; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.trust-badge { padding: 8px 11px; border: 1px solid var(--ap-dark-line); color: rgba(255,255,255,.58); font-size: .62rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }

#universities .features-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
#subjects > .container > div[style], #specialties > .container > div[style], #universities > .container > div[style] { max-width: 100% !important; margin-inline: 0 !important; }
#subjects .fade-up[style], #specialties .fade-up[style], #universities .fade-up[style] { padding: 28px !important; border: 1px solid var(--ap-line) !important; border-radius: 0 !important; background: rgba(255,255,255,.32) !important; }
#subjects h3[style], #specialties h3[style], #universities h3[style] { color: var(--ap-navy) !important; font-family: var(--ap-heading) !important; }
#subjects p[style], #specialties p[style], #universities p[style] { color: var(--ap-muted) !important; }
#universities > .container > div[style*="max-width:900px"] { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
#universities > .container > div[style*="max-width:900px"] > h3,
#universities > .container > div[style*="max-width:900px"] > p { margin: 0 !important; padding: 24px !important; border: 1px solid var(--ap-line); background: rgba(255,255,255,.25); }
#universities > .container > div[style*="max-width:900px"] > h3 { align-self: start; font-size: 1.35rem !important; }
#universities > .container > div[style*="max-width:900px"] > p { margin-left: -19px !important; padding-top: 72px !important; font-size: .85rem !important; }

.market-story { position: fixed; left: 18px; bottom: 18px; z-index: 82; display: grid; grid-template-columns: minmax(120px,auto) 74px auto; align-items: center; gap: 11px; min-height: 44px; padding: 0 13px; border: 1px solid rgba(30,58,95,.12); border-radius: 4px; background: rgba(255,253,250,.9); color: var(--ap-navy); box-shadow: 0 12px 30px rgba(13,28,46,.1); backdrop-filter: blur(14px); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .35s ease,transform .45s var(--ap-ease),background .3s ease,color .3s ease; }
.market-story.is-visible { opacity: 1; transform: none; }
.market-story.is-dark { background: rgba(13,28,46,.9); color: #fff; border-color: rgba(255,255,255,.12); }
.market-story-current { display: flex; align-items: center; gap: 8px; min-width: 0; }
.market-story-current span { color: var(--ap-gold); font-size: .6rem; font-weight: 800; letter-spacing: .12em; }
.market-story-current strong { max-width: 130px; overflow: hidden; font-size: .64rem; letter-spacing: .07em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.market-story-track { height: 1px; overflow: hidden; background: rgba(30,58,95,.16); }
.market-story.is-dark .market-story-track { background: rgba(255,255,255,.18); }
.market-story-track i { display: block; width: 100%; height: 100%; background: var(--ap-gold); transform: scaleX(0); transform-origin: left; }
.market-story small { font-size: .58rem; opacity: .5; }
.market-page .ap-footer { padding-bottom: 82px; }
.market-motion .fade-up { opacity: 0; transform: translateY(22px); transition: opacity .7s ease,transform .85s var(--ap-ease); }
.market-motion .fade-up.is-visible { opacity: 1; transform: none; }

@media (max-width: 1040px) {
  .ed-hero-inner { grid-template-columns: minmax(0,1fr) minmax(330px,.7fr); gap: 35px; }
  .ed-paper-stack { width: min(34vw,320px); }
  .features-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .services-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .market-page .container, .ed-hero-inner { width: min(calc(100% - 32px),var(--ap-shell)); }
  .ed-hero { min-height: auto; padding: 110px 0 68px; }
  .ed-hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .ed-h1 { font-size: clamp(3.25rem,13vw,5.4rem); }
  .ed-hero-art { min-height: 420px; }
  .ed-hero-art::before { width: min(90vw,410px); }
  .ed-hero-art::after { width: min(70vw,330px); }
  .ed-paper-stack { width: min(58vw,270px); }
  .ed-chip-a { left: -24%; }
  .ed-chip-b { right: -27%; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-item { border-bottom: 1px solid var(--ap-dark-line); }
  .section-title { grid-template-columns: 1fr; gap: 18px; }
  .section-tag { grid-column: auto; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 230px; }
  .step-arrow { right: 24px; top: auto; bottom: -15px; transform: rotate(90deg); }
  #universities > .container > div[style*="max-width:900px"] { grid-template-columns: 1fr; }
  #universities > .container > div[style*="max-width:900px"] > p { margin-left: 0 !important; margin-top: -19px !important; padding-top: 24px !important; }
}
@media (max-width: 560px) {
  .market-section:not(.ed-hero):not(.stats) { padding: 82px 0 100px; }
  .ed-hero-copy { min-width: 0; }
  .ed-cta-row { align-items: stretch; flex-direction: column; }
  .ed-btn { width: 100%; }
  .ed-rating { align-items: flex-start; flex-direction: column; }
  .ed-hero-art { min-height: 365px; }
  .ed-paper-stack { width: min(66vw,238px); }
  .ed-paper { padding: 20px; }
  .ed-paper-note { font-size: .92rem; }
  .ed-stamp { right: 18px; bottom: 18px; width: 60px; }
  .ed-chip { max-width: 145px; padding: 8px 9px; font-size: .52rem; }
  .ed-chip-a { left: -20%; bottom: 16%; }
  .ed-chip-b { right: -22%; top: 17%; }
  .stats-grid, .services-grid, .features-grid, .testimonials-grid, .contact-cards, #universities .features-grid { grid-template-columns: 1fr; }
  .stat-item { min-height: 120px; border-right: 0; }
  .service-card { min-height: 300px; }
  .feature-card { min-height: 245px; }
  .testimonial-card { min-height: 320px; }
  .market-story { left: 10px; right: 68px; bottom: 10px; grid-template-columns: minmax(100px,auto) 1fr; }
  .market-story small { display: none; }
  .market-page .ap-footer { padding-bottom: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  .ed-hero-art::after, .ed-paper { animation: none; }
  .market-motion .fade-up { opacity: 1; transform: none; }
}
