/* Shared reading-view openings. Home and the persistent application header are untouched. */
.reading-content{--reading-gutter:60px}
.spec-section-view .reading-content{padding:var(--header) 0 0}
.spec-document:has(>.section-layout),.web-guide.section-layout{max-width:none;margin:0;padding:0}
.document-chapter.section-layout{padding:0;border:0;min-width:0}
.section-opening{position:relative;isolation:isolate;overflow:hidden;border-top:3px solid #d0062f;background:linear-gradient(110deg,#fffdfc 4%,#fcf3f4 70%,#f4e1e7 100%);margin:0}
.section-opening::before{content:"";position:absolute;inset:0 0 auto;height:11px;pointer-events:none;background:linear-gradient(90deg,#cf002d,#e84464 34%,#ecc3cf 72%,transparent);clip-path:polygon(0 0,100% 0,100% 7%,28% 28%,4% 73%,0 100%)}
.section-opening::after{content:"";position:absolute;z-index:-1;inset:0 0 0 auto;width:min(78%,950px);pointer-events:none;background:url('/story-assets/specification-corner.svg') no-repeat right top / 100% auto;opacity:.75}
.section-opening-inner,.reading-section-body{box-sizing:content-box;max-width:940px;margin-inline:auto;padding-inline:var(--reading-gutter);min-width:0}
.section-opening-inner{padding-top:46px;padding-bottom:30px;min-height:100px}
.section-opening-inner::after{content:"";display:block;height:1px;background:linear-gradient(90deg,#d50031 0%,#dd3450 75%,transparent 100%);margin-top:24px}
.spec-document .section-opening h1,.web-guide .section-opening h1{font-family:InterDisplay,Inter,Arial,sans-serif;font-size:clamp(30px,2.65vw,40px);font-weight:700;line-height:1.19;letter-spacing:-.8px;margin:0 0 16px;color:#141b22;text-wrap:pretty;overflow-wrap:anywhere}
.spec-document .section-opening h1:last-child,.web-guide .section-opening h1:last-child{margin-bottom:0}
.section-opening .section-anchor{display:block;margin:0!important;padding:0!important;height:0;line-height:0}
.spec-document .section-opening p,.web-guide .section-opening p{font-size:18px;line-height:1.55;color:#59616b;margin:0;max-width:none}
.section-opening .ref-breadcrumb,.section-opening .ref-eyebrow,.section-opening .guide-eyebrow{font-size:11px!important;line-height:1.5!important;letter-spacing:1.4px;color:#b40b30!important;margin:0 0 16px!important}
.section-opening .ref-file-name{display:flex;align-items:baseline;flex-wrap:wrap;gap:7px 22px;font-size:14px!important;line-height:1.6!important;margin:0!important;overflow-wrap:anywhere}
.section-opening .ref-file-name code{color:#a51432;font-size:14px;overflow-wrap:anywhere;word-break:break-word}
.section-opening .ref-file-name span{font-size:12px;color:#766e73}
.section-opening .ref-file-name+.ref-lead{margin-top:16px}
.reading-section-body{padding-top:30px;padding-bottom:50px;overflow-wrap:anywhere}
.reading-section-body>.section-first-heading{margin-top:0!important}
.reading-section-body>.ref-toolbar:first-child{margin-top:0}
.section-layout>header a[id]{scroll-margin-top:0}
@media(min-width:1600px){.reading-content{--reading-gutter:65px}.section-opening-inner{padding-top:48px;padding-bottom:34px}}
@media(max-width:1100px) and (min-width:801px){.reading-content{--reading-gutter:35px}.section-opening-inner{padding-top:38px;padding-bottom:27px}}
@media(max-width:800px){
 .reading-content{--reading-gutter:24px}
 .spec-section-view .reading-content{padding:var(--header) 0 0}
 .spec-section-view .reader-sidebar.mobile-open+.reading-content{padding-top:0}
 .section-opening-inner{padding-top:30px;padding-bottom:23px;min-height:80px}
 .section-opening::after{width:100%;opacity:.55}
 .spec-document .section-opening h1,.web-guide .section-opening h1{font-size:29px;line-height:1.22;letter-spacing:-.55px}
 .spec-document .section-opening p,.web-guide .section-opening p{font-size:16px;line-height:1.55}
 .section-opening-inner::after{margin-top:20px}
 .reading-section-body{padding-top:25px;padding-bottom:35px}
}
@media print{
 .reading-content{--reading-gutter:0px}
 .section-opening{background:none;border-top:2px solid #c4002b;break-inside:avoid}
 .section-opening::before,.section-opening::after{display:none}
 .section-opening-inner{padding-top:24px;padding-bottom:16px;min-height:0}
 .reading-section-body{padding-top:20px}
}

/* Quiet ending for every decorated reading view. Purely visual, never fixed.
   The reserved space lifts the final content toward mid-screen at scroll end.
   No labels, logos, controls, or new document semantics are introduced. */
.section-layout::after{
 content:"";
 display:block;
 box-sizing:border-box;
 position:relative;
 width:100%;
 height:clamp(240px,calc(50vh - var(--header) / 2 - 40px),640px);
 height:clamp(240px,calc(50svh - var(--header) / 2 - 40px),640px);
 margin:0;
 padding:0;
 pointer-events:none;
 background: url('/story-assets/specification-ending.svg') no-repeat right bottom / 100% 100%;
}
@media print{
 .section-layout::after{display:none!important}
}
