/* September 30: one quiet ground, considered borders, distinct reading intervals.
   Scope is the beta candidate. Native demo canvases and their type stay intact. */
html { --ground: #f1efe8; }
main {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, #f1efe8 0%, #f4f2ec 26%, #f1efe8 57%, #efece3 82%, #e9e4d7 100%);
}
main::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url('ground-stock.svg') repeat; background-size: 384px 384px;
  opacity: .035; mix-blend-mode: multiply;
}
html[data-ground=flat] main { background: var(--ground); }
html[data-ground=flat] main::before { display: none; }
html[data-paper=cloth] .closing-story {
  background: linear-gradient(180deg, transparent, #ece8de 55%, #e4dece 100%);
}
html:not([data-paper=flat]) :is(#unify,#filing,#return) {
  box-shadow: 0 1px 1px #443c2d24, 0 5px 8px -5px #443c2d30, 0 18px 26px -23px #443c2d30;
}
#unify,#filing,#return { scroll-margin-top: 16px; }
#unify { padding-top: 28px; padding-bottom: 32px; }
#unify .unify-title { margin-bottom: 16px; }
#unify .merge-controls { margin-top: 8px; }
#filing { padding: 28px 0 52px; }
#filing > header { margin-bottom: 24px; }
#filing > header h2 { max-width: none; font-size: 34px; margin: 8px 0; }
#filing > header p { font-size: 16px; padding-right: 150px; }
#filing .scene-controls { bottom: 0; }
#filing .filing-caption h3 { font-size: 27px; }
#filing .filing-caption p { font-size: 14px; line-height: 1.65; }
#return { padding: 28px 0 60px; }
#return > header { margin-bottom: 12px; }
#return .third-caption-band { margin-bottom: 12px; }
#return .third-actions { margin-bottom: 6px; }
:is(#unify,#filing,#return) .eyebrow { letter-spacing: .12em; }

/* A brief private observation, followed later by a more developed argument.
   The note strokes always accompany the left edge of their text. */
#rest,#sentence { box-sizing: border-box; text-align: left; }
#rest {
  max-width: 680px; width: calc(100% - 64px);
  padding: 140px 30px 156px;
}
#rest h2 { max-width: 21ch; font-size: clamp(34px,3.2vw,46px); line-height: 1.2; }
#rest p { max-width: 32ch; font-size: 21px; line-height: 1.6; margin-top: 28px; }
#sentence {
  width: calc(100% - 64px); max-width: 760px;
  padding: 168px 28px 180px;
}
#sentence h2 { max-width: 21ch; font-size: clamp(36px,3.5vw,50px); line-height: 1.17; }
#sentence .bridge-thought { max-width: 36ch; font-size: 23px; line-height: 1.6; margin-top: 36px; }
#sentence aside { max-width: 42ch; margin-top: 44px; }
#sentence aside em { font-size: 25px; }
#sentence aside p + p { max-width: 40ch; margin-top: 12px; }
#rest h2::before,#sentence h2::before { width: 3px; border-radius: 2px; }
#philosophy { padding-block: 152px 172px; }
#philosophy .philosophy-inner { max-width: 700px; }

/* The craft title and complete workspace share an edge and a scale budget. */
#craft {
  --craft-measure: min(1050px, calc((100svh - 192px) * 1.5947));
  width: calc(100% - 80px); max-width: 1320px; padding: 12px 0 132px;
}
#craft .craft-introduction {
  max-width: var(--craft-measure); margin: 0 auto 48px; padding: 0;
}
#craft .craft-introduction .eyebrow { margin-bottom: 18px; }
#craft h2 { font-size: clamp(38px,4vw,58px); line-height: 1.14; }
#craft .native-section { margin-top: 24px; gap: 24px; }
#craft .craft-workspace { max-width: var(--craft-measure); }
#craft .craft-instruction { margin-bottom: 20px; }
#craft .craft-live {
  box-shadow: 0 1px 2px #302c2310, 0 12px 24px -19px #302c2336;
}
#craft .craft-workspace figcaption { margin: 8px 0 0; font-size: 11px; }
#craft .craft-restore { margin-top: 12px; }

/* Comparison controls are available without occupying the composition. */
.options {
  display: block; left: 14px; bottom: 14px; padding: 0;
  max-width: calc(100vw - 28px); white-space: normal;
  background: #faf8f1f5; border: 1px solid #655a4320;
}
.options summary { cursor: pointer; padding: 9px 13px; font: 11px/1.5 -apple-system,sans-serif; color: #665f53; }
.options summary:focus-visible { outline: 2px solid #8a652b; outline-offset: 3px; }
.options-panel { display: flex; gap: 16px; flex-wrap: wrap; padding: 8px 16px 16px; max-width: 600px; }
.options .recovery-nav { position: static; box-shadow: none; padding: 4px 0 0; background: none; width: 100%; justify-content: flex-start; }
.options .recovery-nav a { font-size: 11px; }
@media(max-height:840px) and (min-width:1151px) {
  #unify { padding-top: 16px; padding-bottom: 24px; scroll-margin-top: 8px; }
  #unify .unify-title { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 6px; }
  #unify .centered-frame { height: 584px; }
  #unify .unify-title h2 { font-size: 32px; }
  #unify .unify-title > em { margin-top: 0; font-size: 23px; }
  #unify .merge-controls { margin-top: 0; }
  #filing { padding-top: 16px; padding-bottom: 36px; scroll-margin-top: 8px; }
  #filing > header { margin-bottom: 12px; }
  #filing > header .eyebrow { display: block; line-height: 14px; }
  #filing > header h2 { font-size: 30px; margin: 6px 0; }
  #filing > header p { font-size: 15px; }
  #return { padding-top: 8px; padding-bottom: 40px; scroll-margin-top: 8px; }
  #return > header { margin-bottom: 4px; }
  #return > header h2 { font-size: 32px; }
  #return > header .eyebrow { margin-bottom: 0; }
  #return .third-actions { min-height: 30px; margin-bottom: 0; }
  #return .third-actions button { min-height: 30px; padding-block: 4px; }
  #return .third-caption-band { height: 26px; margin-bottom: 6px; }
}
@media(max-width:1150px) {
  #filing > header p { padding-right: 0; }
  #filing > header h2 { max-width: none; }
}
@media(max-width:760px) {
  #unify,#filing,#return { width: calc(100% - 32px); }
  #filing,#return { padding-bottom: 40px; }
  #rest { width: calc(100% - 40px); padding: 108px 8px 120px; }
  #rest h2 { font-size: clamp(31px,6vw,40px); }
  #rest p { font-size: 20px; }
  #sentence { width: calc(100% - 40px); padding: 128px 8px 140px; }
  #sentence h2 { font-size: clamp(33px,6.3vw,44px); }
  #sentence .bridge-thought { font-size: 21px; margin-top: 28px; }
  #sentence aside { margin-top: 34px; }
  #sentence aside em { font-size: 23px; }
  #philosophy { padding: 116px 28px 124px; }
  #philosophy h2 { font-size: clamp(36px,7vw,44px); }
  #craft { width: calc(100% - 40px); padding-bottom: 100px; --craft-measure: 100%; }
  #craft .craft-introduction { padding: 0 8px; margin-bottom: 36px; }
  #craft h2 { font-size: clamp(35px,7vw,44px); }
  #craft .native-section { gap: 12px 22px; }
  #craft .craft-instruction { margin-bottom: 16px; }
}

@media(min-width:1151px) and (max-width:1200px) { #return .recall-stage { padding-inline: 16px; } }
