/* WEDX service details: approved brand tokens, native reading flow, no new palette. */
.service-editorial {
    --service-story: var(--wedx-periwinkle);
    --service-accent: var(--wedx-forest);
    --service-ink: var(--wedx-black);
    --service-rule: color-mix(in srgb, var(--wedx-text) 22%, transparent);
    color: var(--wedx-text);
    background: var(--wedx-canvas);
}
.service-variant--ai-signal { --service-story: var(--wedx-periwinkle); --service-accent: var(--wedx-purple); }
.service-variant--hospitality-table,
.service-variant--logistics-flow { --service-story: var(--wedx-orange); --service-accent: var(--wedx-black); }
.service-variant--stage-frame,
.service-variant--package-composer { --service-story: var(--wedx-purple); --service-accent: var(--wedx-purple); --service-ink: var(--wedx-ivory); }
.service-variant--people-system { --service-story: var(--wedx-pink); --service-accent: var(--wedx-black); }
.service-editorial [data-reveal] { opacity: 1; transform: none; }
.service-editorial .records-frame { width: min(calc(100% - 112px), 1328px); }
.service-editorial .breadcrumbs { flex-wrap: wrap; color: inherit; gap: 8px 12px; }
.service-editorial .breadcrumbs > span:last-child { overflow-wrap: anywhere; }
.service-editorial .service-hero {
    min-height: 0;
    padding-block: 36px 88px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 88px);
    align-items: center;
    border: 0;
}
.service-editorial .detail-hero__copy { grid-column: auto; padding: 0; border: 0; }
.service-editorial .detail-hero h1 { max-width: 16ch; color: var(--service-accent); font-size: clamp(42px, 4.7vw, 68px); line-height: 1.06; }
.service-editorial .detail-hero .records-lead { max-width: 45ch; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.6; }
.service-editorial .service-hero__field { grid-column: auto; width: 100%; max-width: 520px; border-radius: 0; justify-self: end; }
.service-editorial.service-no-media .service-hero { grid-template-columns: 1fr; max-width: 1328px; padding-block: 40px 88px; }
.service-editorial.service-no-media .detail-hero h1 { max-width: 22ch; }
.service-editorial .button { color: var(--service-ink); background: var(--service-story); border-radius: var(--wedx-radius-control); white-space: nowrap; }
.service-editorial .button:hover { text-decoration: underline; text-underline-offset: 5px; }
.service-editorial .button:active { transform: translateY(1px); }
.service-editorial .service-introduction {
    padding-block: 64px 80px;
    display: block;
    border-block: 1px solid var(--service-rule);
}
.service-editorial .service-introduction > p { max-width: 62ch; margin-inline: auto; font-size: clamp(20px, 1.75vw, 25px); }
.service-editorial .service-reading-layout { padding-block: 88px; display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 2.4fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.service-editorial .service-reading-layout > .records-frame { width: 100%; margin: 0; }
.service-editorial .service-chapter-nav { position: sticky; top: 32px; max-height: calc(100dvh - 64px); overflow-y: auto; padding: 0 8px 0 0; display: block; border: 0; }
.service-editorial .service-chapter-nav > p { margin-block-end: 20px; color: var(--service-accent); font-size: 20px; }
.service-editorial .service-chapter-nav ol { display: block; }
.service-editorial .service-chapter-nav a { padding-block: 12px; border-color: var(--service-rule); font-size: 15px; line-height: 1.55; }
.service-editorial .service-chapters { padding: 0; }
.service-editorial .service-chapter { padding-block: 0 72px; margin-block-end: 72px; border-color: var(--service-rule); }
.service-editorial .service-chapter:last-child { padding-block-end: 0; margin-block-end: 0; border: 0; }
.service-editorial .service-section { display: block; }
.service-editorial .service-section + .service-section { margin-block-start: 64px; }
.service-editorial .service-section > h2 { max-width: 24ch; margin-block-end: 24px; color: var(--service-accent); font-size: clamp(30px, 2.75vw, 40px); line-height: 1.18; scroll-margin-block-start: 32px; text-wrap: balance; }
.service-editorial .service-section > p { max-width: 62ch; font-size: 18px; }
.service-editorial .service-section > p + p { margin-block-start: 16px; }
.service-editorial .service-topics { margin-block-start: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.service-editorial .service-topic { min-height: 0; padding: 0; display: block; border: 0; }
.service-editorial .service-topic h3 { color: inherit; margin-block-end: 12px; font-size: 22px; line-height: 1.35; }
.service-editorial .service-topic p { font-size: 17px; line-height: 1.7; }
.service-editorial .service-chapter--operation .service-topics { display: block; }
.service-editorial .service-chapter--operation .service-topic { padding: 0; max-width: 62ch; }
.service-editorial .service-chapter--operation .service-topic + .service-topic { margin-block-start: 28px; }
.service-editorial .service-chapter--context { padding: 32px; border-radius: 0; color: var(--service-ink); background: var(--service-story); }
.service-editorial .service-chapter--context .service-section > h2 { color: inherit; }
.service-editorial .service-chapter--context .service-topic h3 { color: inherit; }
.service-editorial .service-chapter--assurance .service-topics { grid-template-columns: 1fr; }
.service-editorial .record-reading { padding-block: 64px 88px; border-color: var(--service-rule); }
.service-editorial .record-reading > h2 { color: var(--service-accent); }
.service-editorial.records-page--services .record-reading > h2 { padding: 0; background: transparent; }
.service-editorial .record-reading__body.service-introduction { padding: 0; border: 0; }
.service-editorial .record-reading__body > p { margin: 0 0 24px; font-size: 18px; }
.service-editorial .records-contact { padding: 64px 0 0; color: inherit; background: transparent; border-radius: 0; border-block-start: 1px solid var(--service-rule); }
.service-editorial .records-contact h2 { color: var(--service-accent); }
.service-editorial.records-page :where(a, button):focus-visible { outline: 3px solid var(--service-accent); outline-offset: 5px; }
.service-editorial .service-chapter--context a:focus-visible { outline-color: var(--service-ink); }
/* Retained service sections must not inherit the generic two-column media rail.
   Keep all authored copy and photos, but place galleries below the reading row. */
.service-editorial .legacy-details { inline-size: min(calc(100% - 112px), 1328px); }
.service-editorial .legacy-details .legacy-details__section { grid-template-columns: minmax(0, 1fr); padding-block: 64px; gap: 40px; }
.service-editorial .legacy-details .legacy-details__copy { max-inline-size: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.service-editorial .legacy-details .legacy-details__copy > h2 { margin: 0; font-size: clamp(28px, 2.5vw, 36px); color: var(--service-accent); line-height: 1.3; }
.service-editorial .legacy-details .legacy-details__body { max-inline-size: 65ch; }
html[dir="rtl"] .service-editorial .detail-hero h1 { max-width: 18ch; line-height: 1.35; }
html[dir="rtl"] .service-editorial .service-section > h2 { line-height: 1.4; }
:where(:root:not([data-theme="light"])) :is(.service-editorial) { --service-accent: var(--wedx-periwinkle); }
:where(:root:not([data-theme="light"])) :is(.service-variant--ai-signal,
    .service-variant--stage-frame,
    .service-variant--package-composer) { --service-accent: var(--wedx-lavender); }
:where(:root:not([data-theme="light"])) :is(.service-variant--hospitality-table,
    .service-variant--logistics-flow) { --service-accent: var(--wedx-orange); }
:where(:root:not([data-theme="light"])) :is(.service-variant--people-system) { --service-accent: var(--wedx-pink); }
@media (max-width: 1279px) {
    .service-editorial .legacy-details { inline-size: calc(100% - 64px); }
    .service-editorial .legacy-details .legacy-details__copy { gap: 32px; }
    .service-editorial .records-frame { width: calc(100% - 64px); }
    .service-editorial .service-hero { grid-template-columns: 1.25fr 1fr; gap: 32px; padding-block-end: 64px; }
    .service-editorial .detail-hero h1 { font-size: clamp(40px, 4.5vw, 56px); }
    .service-editorial .service-reading-layout { display: block; padding-block: 64px; }
    .service-editorial .service-chapter-nav { position: static; max-height: none; margin-block-end: 64px; padding: 0; }
    .service-editorial .service-chapter-nav ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
}
@media (max-width: 768px) {
    .service-editorial .legacy-details .legacy-details__section { padding-block: 48px; gap: 32px; }
    .service-editorial .legacy-details .legacy-details__copy { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .service-editorial .service-hero { grid-template-columns: 1fr; gap: 40px; padding-block: 24px 56px; }
    .service-editorial .detail-hero h1 { max-width: 22ch; font-size: clamp(36px, 6vw, 48px); }
    .service-editorial .service-hero__field { justify-self: start; max-width: 520px; width: 100%; }
    .service-editorial .service-introduction { padding-block: 48px; }
    .service-editorial .service-topics { grid-template-columns: 1fr; gap: 28px; }
    .service-editorial .service-chapter { padding-block-end: 56px; margin-block-end: 56px; }
    .service-editorial .service-chapter--context { padding: 28px; }
    .service-editorial .service-chapter-nav ol { grid-template-columns: 1fr; }
    .service-editorial .service-section > h2 { font-size: 32px; }
    .service-editorial .record-reading { display: block; }
    .service-editorial .record-reading > h2 { margin-block-end: 28px; }
    .service-editorial .records-contact { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 479px) {
    .service-editorial .legacy-details { inline-size: calc(100% - 40px); }
    .service-editorial .records-frame { width: calc(100% - 40px); }
    .service-editorial .detail-hero h1 { font-size: 36px; }
    .service-editorial .detail-hero .button { width: auto; }
    .service-editorial .service-chapter--context { padding: 24px; margin-inline: 0; }
    .service-editorial .service-section > h2 { font-size: 28px; }
    .service-editorial .service-introduction > p { font-size: 20px; }
    .service-editorial .service-section > p { font-size: 17px; }
    .service-editorial .records-contact .button { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
    .service-editorial .button { transition: transform 180ms ease; }
    .service-editorial .button:hover { transform: translateY(-2px); }
}
@media (forced-colors: active) {
    .service-editorial .button { border: 1px solid ButtonText; }
    .service-editorial :where(a,button):focus-visible { outline-color: Highlight; }
}
@media print {
    .service-editorial { color: black; background: white; padding: 0; }
    .service-editorial .service-reading-layout { display: block; }
    .service-editorial .service-chapter-nav { position: static; max-height: none; overflow: visible; }
    .service-editorial .service-chapter--context { color: black; background: transparent; }
}
