#main .ce-section {
 --ce-bg: #221341;
 --ce-edge: #38215f;
 --ce-title: #d5b9ff;
 --ce-white: #fff9ff;
 --ce-muted: #dccfea;
 --ce-line: #776593;
 --ce-stage-top: 86px;
 --ce-turn: clamp(190px, 27vh, 285px);
 padding: clamp(30px, 4vw, 54px) max(24px, calc((100% - 1240px) / 2));
 color: var(--ce-white);
 background: radial-gradient(ellipse at 50% 0%, var(--ce-edge), transparent 66%), var(--ce-bg);
}

[data-theme="dark"] #main .ce-section {
 --ce-bg: #1b112e;
 --ce-edge: #30204d;
 --ce-line: #78668d;
}

#main .ce-section[data-ce-theme] {
 --ce-white: #fff;
 --ce-muted: color-mix(in srgb, var(--ce-title) 52%, white);
}

#main .ce-section[data-ce-theme="video"] {
 --ce-bg: light-dark(#12203a,#0c1425); --ce-edge: light-dark(#254779,#172f52);
 --ce-title: #bcd8ff; --ce-line: #6889b6;
 --ce-paper: #e5f0ff; --ce-rule: #a6bedd; --ce-ink: #122951;
}
#main .ce-section[data-ce-theme="poster"] {
 --ce-bg: light-dark(#2a1733,#1c0e27); --ce-edge: light-dark(#643951,#43243a);
 --ce-title: #ffd9b5; --ce-line: #a78198;
 --ce-paper: #ffead5; --ce-rule: #d1ae89; --ce-ink: #412629;
}
#main .ce-section[data-ce-theme="document"] {
 --ce-bg: light-dark(#242038,#181326); --ce-edge: light-dark(#4f3c78,#34284f);
 --ce-title: #e4ceff; --ce-line: #9182a8;
 --ce-paper: #eee4f7; --ce-rule: #bdafd2; --ce-ink: #2c2143;
}
#main .ce-section[data-ce-theme="brief"] {
 --ce-bg: light-dark(#112d33,#0b1d25); --ce-edge: light-dark(#2b6263,#1a4049);
 --ce-title: #b7ebdf; --ce-line: #6f9ca0;
 --ce-paper: #def2ec; --ce-rule: #9dbcba; --ce-ink: #143c3a;
}
#main .ce-section[data-ce-theme="research"] {
 --ce-bg: light-dark(#192442,#101731); --ce-edge: light-dark(#473a7a,#312659);
 --ce-title: #d9d5ff; --ce-line: #8787b5;
 --ce-paper: #edebff; --ce-rule: #b7b1dc; --ce-ink: #23214f;
}

.ce-intro {
 margin-inline: auto;
 max-width: 940px;
 text-align: center;
}

#main .ce-intro > p {
 margin: 0 0 9px;
 color: var(--ce-white);
 font-size: .78rem;
 font-weight: 750;
 letter-spacing: .16em;
 text-transform: uppercase;
}

#main .ce-intro h2 {
 margin: 0;
 color: var(--ce-title);
 font-size: clamp(2rem, 4vw, 3.7rem);
 font-weight: 770;
 line-height: 1.02;
 letter-spacing: -.057em;
 text-wrap: balance;
}

.ce-intro > div {
 margin-top: 10px;
 color: var(--ce-muted);
 font-size: clamp(1rem, 1.5vw, 1.27rem);
 line-height: 1.5;
}

.ce-stage { display: grid; gap: clamp(17px, 2.25vh, 25px); }
.ce-section.is-pinned .ce-track::after { content: ""; display: block; height: calc(var(--ce-turn) * 2.25); }
.ce-section.is-pinned .ce-stage { position: sticky; top: var(--ce-stage-top); }

.ce-tabs {
 display: grid;
 margin-inline: auto;
 width: min(100%, 680px);
 grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ce-section [hidden] { display: none !important; }

#main .ce-tabs button {
 appearance: none;
 padding: 13px 6px 12px;
 border: 0;
 border-bottom: 2px solid var(--ce-line);
 background: transparent;
 color: var(--ce-muted);
 font: inherit;
 font-size: clamp(.78rem, 1.35vw, 1rem);
 font-weight: 650;
 line-height: 1.25;
 cursor: pointer;
 text-wrap: balance;
}

#main .ce-tabs button[aria-selected="true"] { color: var(--ce-white); border-color: var(--ce-title); }
#main .ce-section :is(button, a):focus-visible { outline: 2px solid var(--ce-title); outline-offset: 4px; }

.ce-panels { display: grid; gap: 34px; overflow-anchor: none; }
.ce-panel {
 display: grid;
 grid-template-columns: minmax(0, 1.2fr) minmax(0, .85fr);
 gap: clamp(26px, 4.4vw, 66px);
 align-items: center;
}

.ce-panel[data-example="refresher"] { --ce-paper: #f4e4c8; --ce-rule: #c8ab81; --ce-ink: #352716; }
.ce-panel[data-example="procedure"] { --ce-paper: #deebe9; --ce-rule: #a2c4bf; --ce-ink: #153332; }

.ce-media {
 width: 100%;
 overflow: hidden;
 border-radius: clamp(17px, 2.4vw, 30px);
 aspect-ratio: 3 / 2;
 box-shadow: 0 16px 42px #10071e55;
}

.ce-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ce-content { min-width: 0; }

#main .ce-content h3 {
 margin: 0;
 color: var(--ce-white);
 max-width: 19ch;
 font-size: clamp(1.6rem, 2.7vw, 2.6rem);
 line-height: 1.05;
 letter-spacing: -.045em;
 text-wrap: balance;
}

#main .ce-content > p {
 margin: 11px 0 clamp(15px, 2.4vh, 23px);
 color: var(--ce-muted);
 font-size: clamp(.98rem, 1.35vw, 1.15rem);
 line-height: 1.5;
}

.ce-preview {
 position: relative;
 padding: 14px clamp(13px, 1.6vw, 22px) 15px;
 border-radius: 17px;
 border: 1px solid #ffffff54;
 color: var(--ce-ink, #271743);
 background: var(--ce-paper, #eee0ff);
 box-shadow: 0 16px 33px #10071e55;
}

.ce-preview-top {
 display: flex;
 align-items: center;
 gap: 7px;
 padding-bottom: 9px;
 margin-bottom: 10px;
 border-bottom: 1px solid var(--ce-rule, #b9a4d5);
 font-size: .8rem;
 font-weight: 750;
}

.ce-preview-top img { flex: 0 0 auto; }
.ce-sample { margin-inline-start: auto; font-size: .72rem; opacity: .82; }
#main .ce-preview h4 { margin: 0; color: inherit; font-size: clamp(1rem, 1.6vw, 1.27rem); line-height: 1.2; letter-spacing: -.025em; }
.ce-outline { margin: 7px 0 0; padding-inline-start: 1.4em; font-size: .87rem; }
.ce-outline li { padding: 4px 0 4px .25em; }
.ce-outline li + li { border-top: 1px solid var(--ce-rule, #b9a4d5); }
.ce-outline li::marker { font-weight: 750; }

.ce-quiz { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.ce-quiz > div { padding: 8px; border: 1px solid var(--ce-rule); border-radius: 7px; background: #ffffff45; }
.ce-quiz dt, .ce-derived > span { font-size: .75rem; }
.ce-quiz dd { margin: 3px 0 0; font-weight: 750; }

.ce-file { display: flex; align-items: center; gap: 8px; font-size: .87rem; overflow-wrap: anywhere; }
.ce-file svg { flex: 0 0 17px; width: 17px; height: 17px; }
.ce-derived { margin-top: 10px; padding: 9px 10px; border-left: 2px solid var(--ce-rule); background: #ffffff45; }
.ce-derived > span { display: block; margin-bottom: 4px; }

.ce-fields { margin: 7px 0 0; }
.ce-fields > div {
 display: grid;
 grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr);
 gap: 12px;
 padding-block: 6px;
 font-size: .87rem;
 line-height: 1.3;
}
.ce-fields > div + div { border-top: 1px solid var(--ce-rule, #b9a4d5); }
.ce-fields dt { opacity: .86; }
.ce-fields dd { margin: 0; font-weight: 650; }

.ce-poster-proof {
 border-left: 5px solid #edb553;
 padding: 10px 14px;
 background: #2c1b2b;
 color: #fff5e9;
}
.ce-poster-proof > span { font-size: .73rem; font-weight: 750; text-transform: uppercase; letter-spacing: .075em; color: #ffcf91; }
#main .ce-poster-proof h4 { margin-block: 4px; font-weight: 790; }
#main .ce-poster-proof p { margin: 0; font-size: .82rem; color: inherit; }

.ce-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 11px; }
#main .ce-actions .eh-button { min-height: 47px; padding: 10px 18px; border-radius: 9px; border: 1px solid var(--ce-line); font-size: .96rem; }
#main .ce-actions .ce-primary { background: #e5d3ff; color: #26123e; border-color: transparent; }
#main .ce-actions .ce-secondary { background: transparent; color: var(--ce-white); }
#main .ce-actions .ce-primary:hover { background: #f1e6ff; }
#main .ce-actions .ce-secondary:hover { background: #ffffff14; }
#main .ce-section[data-ce-theme] .ce-primary { background: var(--ce-title); color: var(--ce-ink); }
#main .ce-section[data-ce-theme] .ce-primary:hover { background: color-mix(in srgb,var(--ce-title) 70%, white); }

@media (min-width: 1000px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
 .ce-section.is-pinned .ce-stage { gap: clamp(12px, 2vh, 20px); }
 #main .ce-section.is-pinned .ce-intro h2 {
  max-width: none;
  font-size: clamp(2rem, 3.25vw, 3.2rem);
 }
 .ce-section.is-pinned .ce-intro > div { font-size: 1rem; }
 #main .ce-section.is-pinned .ce-tabs button { padding-block: 10px; }
 .ce-section.is-pinned .ce-panels { isolation: isolate; }
 .ce-section.is-pinned .ce-panel { grid-area: 1 / 1; }
 .ce-section.is-pinned .ce-panel[hidden] { display: grid !important; visibility: hidden; }
 .ce-section.is-pinned .ce-media { max-height: min(45vh, 410px); }
 #main .ce-section.is-pinned .ce-content h3 { font-size: clamp(1.6rem, 2.35vw, 2.3rem); }
 #main .ce-section.is-pinned .ce-content > p { font-size: 1rem; line-height: 1.4; }
 .ce-section.is-pinned .ce-preview { padding-block: 11px; }
 .ce-section.is-pinned .ce-preview-top { padding-bottom: 7px; margin-bottom: 8px; }
}

@media (min-width: 1000px) and (min-height: 640px) and (max-height: 760px) {
 .ce-section[data-ce-theme] .ce-panel { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 46px); }
 #main .ce-section[data-ce-theme].is-pinned .ce-content h3 { max-width: 24ch; font-size: clamp(1.45rem, 2.1vw, 1.95rem); }
 #main .ce-section[data-ce-theme].is-pinned .ce-content > p { margin-block: 8px 12px; font-size: .94rem; }
 #main .ce-section[data-ce-theme].is-pinned .ce-preview h4 { font-size: .98rem; }
 .ce-section[data-ce-theme] .ce-fields > div { padding-block: 4px; font-size: .82rem; }
 .ce-section[data-ce-theme] .ce-outline { font-size: .82rem; }
}

@media (max-width: 730px) {
 #main .ce-section { padding-inline: 18px; }
 .ce-panel { grid-template-columns: 1fr; gap: 18px; }
 #main .ce-content h3 { max-width: 24ch; }
 .ce-stage { gap: 21px; }
}

@media (prefers-reduced-motion: no-preference) {
 .ce-panel.is-entering .ce-media img { animation: ce-photo-in 280ms ease-out; }
 .ce-panel.is-entering .ce-preview { animation: ce-preview-in 240ms ease-out; }
 @keyframes ce-photo-in {
  from { transform: scale(1.025); }
  to { transform: none; }
 }
 @keyframes ce-preview-in {
  from { transform: translateY(calc(5px * var(--ce-direction))); }
  to { transform: none; }
 }
}
