:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --ink: #241f21;
  --muted: #667085;
  --line: rgba(139, 26, 36, .14);
  --red: #8b1a24;
  --red-dark: #5c1119;
  --gold: #d4af37;
  --gold-soft: #f6e5a7;
  --blue: #24405f;
  --max: 1120px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --shadow: 0 30px 90px rgba(36, 31, 33, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 18% 8%, rgba(212,175,55,.2), transparent 22rem),
    radial-gradient(circle at 86% 18%, rgba(139,26,36,.12), transparent 24rem),
    linear-gradient(180deg, #fff, var(--bg));
  overflow-x: hidden;
  line-height: 1.7;
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(139,26,36,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,26,36,.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
  z-index: -1;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
.ccse-hero, .section, .ccse-footer { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.ccse-nav {
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.back-link, .live-link, .btn-primary, .btn-secondary {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease, background .24s ease;
}
.back-link, .btn-secondary {
  color: var(--red);
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
}
.back-link::before { content: "<"; margin-right: .6rem; }
.live-link, .btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border: 1px solid rgba(139,26,36,.35);
  box-shadow: 0 16px 44px rgba(139,26,36,.2);
}
.btn-secondary { background: #fff; }
.back-link:hover, .live-link:hover, .btn-primary:hover, .btn-secondary:hover {
  transform: translateY(-3px);
}
.btn-primary:hover, .live-link:hover { box-shadow: 0 20px 58px rgba(139,26,36,.3); }

.hero-grid {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem) 0;
}
.eyebrow {
  margin: 0 0 1rem;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1, h2 {
  margin: 0;
  font-family: var(--serif);
  line-height: .96;
  letter-spacing: -.04em;
}
h1 { font-size: clamp(3rem, 7vw, 6.4rem); max-width: 920px; color: var(--red-dark); }
h2 { font-size: clamp(2.25rem, 5vw, 4.8rem); color: var(--red-dark); max-width: 980px; }
h3 { margin: 0; font-size: clamp(1.08rem, 1.5vw, 1.35rem); line-height: 1.2; }
.hero-lead, .section-head p, .problem-grid p, .process-grid p, .split p, .final-cta p {
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.12rem);
}
.hero-lead { max-width: 680px; margin: 1.4rem 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.hero-panel {
  min-height: 520px;
  display: grid;
  place-items: center;
  perspective: 1000px;
}
.exam-card {
  width: min(420px, 100%);
  min-height: 500px;
  border-radius: 28px;
  padding: 2rem;
  background:
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.72)),
    radial-gradient(circle at 35% 20%, rgba(212,175,55,.28), transparent 34%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: rotateY(-8deg) rotateX(5deg);
  animation: cardDrift 6s ease-in-out infinite;
}
.seal {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 2rem;
  color: #fff;
  background: radial-gradient(circle, var(--red), var(--red-dark));
  border: 8px solid var(--gold-soft);
  font-family: var(--serif);
  font-weight: 800;
  font-size: 2rem;
  box-shadow: 0 0 0 1px rgba(139,26,36,.16), 0 22px 60px rgba(139,26,36,.18);
}
.exam-card p {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  color: var(--red-dark);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.06;
}
.answer-list {
  display: grid;
  gap: .75rem;
  margin-top: 2rem;
}
.answer-list span {
  height: 18px;
  border-radius: 999px;
  background: #ece7df;
  position: relative;
  overflow: hidden;
}
.answer-list .is-ok { background: rgba(139,26,36,.1); }
.answer-list .is-ok::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 58%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  animation: answerFill 2.8s ease-in-out infinite;
}
@keyframes cardDrift {
  0%, 100% { transform: rotateY(-8deg) rotateX(5deg) translateY(0); }
  50% { transform: rotateY(-3deg) rotateX(2deg) translateY(-10px); }
}
@keyframes answerFill {
  0%, 100% { width: 42%; }
  50% { width: 78%; }
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .85rem;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.metrics-strip div, .problem-grid article, .process-grid article {
  background: rgba(255,255,255,.76);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 12px 38px rgba(36,31,33,.04);
}
.metrics-strip strong {
  display: block;
  color: var(--red);
  font-size: clamp(1.45rem, 2.8vw, 2.4rem);
  line-height: 1;
}
.metrics-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: .45rem;
}

.section { padding: clamp(4rem, 8vw, 7rem) 0; border-top: 1px solid var(--line); }
.section-head { max-width: 900px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.problem-grid, .process-grid, .tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.problem-grid span, .process-grid span {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.simulator-section { width: min(1240px, calc(100% - 40px)); }
.browser-mockup {
  overflow: hidden;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.browser-bar {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: 0 1rem;
  background: #f8f5ef;
  border-bottom: 1px solid var(--line);
}
.browser-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #cdbfaf;
}
.browser-bar strong {
  margin-left: .6rem;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.browser-mockup iframe {
  display: block;
  width: 100%;
  height: min(720px, 78vh);
  min-height: 560px;
  border: 0;
  background: #fff;
}

.dark-band {
  width: 100%;
  max-width: none;
  padding-left: max(20px, calc((100vw - var(--max)) / 2));
  padding-right: max(20px, calc((100vw - var(--max)) / 2));
  background: linear-gradient(135deg, var(--red-dark), var(--red));
}
.dark-band h2, .dark-band h3 { color: #fff; }
.dark-band .eyebrow, .dark-band .process-grid span { color: var(--gold-soft); }
.dark-band .process-grid article {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
  color: #fff;
}
.dark-band p { color: rgba(255,255,255,.76); }

.split, .final-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.check-list {
  display: grid;
  gap: .75rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}
.check-list li {
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
}
.check-list li::before {
  content: "✓";
  color: var(--red);
  font-weight: 900;
  margin-right: .6rem;
}
.ui-stack {
  position: relative;
  min-height: 460px;
  display: grid;
  place-items: center;
}
.question-card {
  width: min(420px, 100%);
  border-radius: 24px;
  padding: 1.3rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.question-card span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.question-card strong {
  display: block;
  margin: .9rem 0 1rem;
  color: var(--red-dark);
  font-size: 1.3rem;
  line-height: 1.25;
}
.option {
  margin: .65rem 0;
  padding: .85rem 1rem;
  border-radius: 14px;
  background: #f7f2ea;
  color: var(--muted);
}
.option.is-selected {
  color: #fff;
  background: var(--red);
}
.mini-score {
  position: absolute;
  right: 6%;
  bottom: 15%;
  color: var(--red-dark);
  background: var(--gold-soft);
  border: 1px solid rgba(212,175,55,.48);
  border-radius: 999px;
  padding: .7rem 1rem;
  font-weight: 900;
  box-shadow: 0 18px 44px rgba(212,175,55,.2);
  animation: chipPulse 2.4s ease-in-out infinite;
}
@keyframes chipPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.tool-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.tool-grid span {
  min-height: 70px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 18px;
  color: var(--red);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.final-cta {
  border-top: 1px solid var(--line);
}
.ccse-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.ccse-footer a:last-child { color: var(--red); font-weight: 800; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition: opacity .75s cubic-bezier(.22,1,.36,1), transform .75s cubic-bezier(.22,1,.36,1), filter .75s cubic-bezier(.22,1,.36,1);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
  filter: none;
}

@media (max-width: 920px) {
  .hero-grid, .split, .final-cta { grid-template-columns: 1fr; }
  .hero-panel { min-height: auto; }
  .exam-card { min-height: 420px; transform: none; }
  .metrics-strip, .problem-grid, .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .ccse-hero, .section, .ccse-footer, .simulator-section { width: min(var(--max), calc(100vw - 28px)); }
  .ccse-nav, .ccse-footer { flex-direction: column; align-items: flex-start; }
  .hero-actions { flex-direction: column; }
  .back-link, .live-link, .btn-primary, .btn-secondary { width: 100%; }
  h1 { font-size: clamp(2.7rem, 13vw, 4rem); }
  h2 { font-size: clamp(2rem, 11vw, 3.25rem); }
  .metrics-strip, .problem-grid, .process-grid, .tool-grid { grid-template-columns: 1fr; }
  .exam-card { min-height: 360px; padding: 1.4rem; }
  .seal { width: 108px; height: 108px; font-size: 1.55rem; border-width: 6px; }
  .browser-mockup { border-radius: 18px; }
  .browser-bar strong { max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .browser-mockup iframe { height: 620px; min-height: 620px; }
  .dark-band { width: 100vw; max-width: 100vw; }
  .ui-stack { min-height: auto; }
  .mini-score { position: static; width: fit-content; margin: -1rem auto 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}

html,
body {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden;
  overflow-y: auto !important;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
  scrollbar-gutter: stable;
}
