/* Shared study frame: change the atmosphere without changing the workspace. */
#craft .craft-introduction { text-align: center; }
#craft .craft-introduction .eyebrow { text-align: center; }
#craft .native-section { justify-content: center; text-align: center; }

.aesthetic-comparison { border: 0; padding: 0 0 14px; margin: 0; width: 100%; border-bottom: 1px solid #655a4320; }
.aesthetic-comparison legend { padding: 0; margin: 0 0 12px; font: 11px/1.4 -apple-system,sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #746b60; }
.aesthetic-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.aesthetic-choices button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid transparent; border-radius: 5px; background: transparent; font: 13px/1.2 -apple-system,sans-serif; color: #595247; cursor: pointer; }
.aesthetic-choices button::before { content: ''; width: 13px; height: 13px; border: 1px solid #756a5326; border-radius: 50%; background: #f1efe8; }
.aesthetic-choices button[data-aesthetic-choice=cloud]::before { background: linear-gradient(135deg,#adc0c0,#faf5e9 60%,#bdab94); }
.aesthetic-choices button[data-aesthetic-choice=daylight]::before { background: linear-gradient(130deg,#bcb9ba,#fffaf0 65%); }
.aesthetic-choices button[data-aesthetic-choice=folio]::before { background: repeating-linear-gradient(0deg,#e1d7c6 0 1px,#f5eee0 1px 3px); }
.aesthetic-choices button[aria-pressed=true] { background: #ffffffb3; border-color: #80725b60; color: #302d26; }
.aesthetic-choices button:focus-visible { outline: 2px solid #84673a; outline-offset: 3px; }
.aesthetic-description { max-width: 49ch; margin: 12px 0 0; font: 12px/1.55 -apple-system,sans-serif; color: #746b60; }
.options summary { font-size: 12px; padding: 10px 14px; }
.options summary .aesthetic-summary { color: #3e382e; }
.options-panel { max-width: 640px; }
@media(max-width:600px) { .aesthetic-choices { display: grid; grid-template-columns: 1fr 1fr; } .aesthetic-choices button { justify-content: flex-start; } }

/* Cloudlight: complete painted forms, with clear paper between them.
   The approved #rest frame remains the visual anchor. Companion paintings
   vary the amount and position of pigment rather than fading it into stains. */
html[data-aesthetic=cloud] { --ground: #f3f0e8; }
html[data-aesthetic=cloud] main { background: linear-gradient(180deg,#f3f0e8,#f7f4ed 22%,#f1eee6 60%,#efebe1 84%,#e7e0d1); overflow-x: clip; }
html[data-aesthetic=cloud] main::before { display: block; opacity: .025; }
/* Let the painting release into the shared paper over a little more space.
   Its crop and the white navigation invitation retain their positions. */
html[data-aesthetic=cloud]:not([data-edge=framed]) .hero .art {
  --hero-release: linear-gradient(180deg,#000 calc(100% - 112px),#000e calc(100% - 92px),#000b calc(100% - 68px),#0006 calc(100% - 40px),#0002 calc(100% - 18px),transparent);
  -webkit-mask-image: var(--hero-release);
  mask-image: var(--hero-release);
}

html[data-aesthetic=cloud] :is(#intro,#rest,#sentence,#philosophy) { position: relative; isolation: isolate; }
html[data-aesthetic=cloud] :is(#intro,#rest,#sentence,#philosophy)::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  top: -8%; height: 116%; left: 50%; width: 100vw; transform: translateX(-50%);
  background: url('assets/aesthetic-cloudlight.webp') center / 100% 100% no-repeat;
  mix-blend-mode: multiply; opacity: .8;
  mask-image: linear-gradient(180deg,transparent,#000 20%,#000 78%,transparent);
  -webkit-mask-image: linear-gradient(180deg,transparent,#000 20%,#000 78%,transparent);
}
/* Preserve the user-selected desktop frame. */
html[data-aesthetic=cloud] #rest::after { transform: translateX(-50%) scaleX(-1); opacity: .8; }
/* The opening opens onto a low bank of pigment. Preserve its aspect ratio.
   The layer extends 12% above this section: hold its paper transparent there
   so the hero and intro meet on the same ground, without a pale raster seam. */
html[data-aesthetic=cloud] #intro::after {
  top: -12%; height: 124%;
  background-image: url('assets/cloudlight-pigment-bank.webp');
  background-size: 100% auto; background-position: center calc(100% + clamp(120px, 12vw, 180px));
  opacity: .72;
  mask-image: linear-gradient(180deg,transparent 12%,#000 28%,#000 84%,transparent);
  -webkit-mask-image: linear-gradient(180deg,transparent 12%,#000 28%,#000 84%,transparent);
}
/* A fuller blue passage leads into Recall, opposite the preceding wash. */
html[data-aesthetic=cloud] #sentence::after {
  top: -4%; height: 108%;
  background-image: url('assets/cloudlight-pigment-sides.webp');
  background-size: 100% auto; background-position: center;
  opacity: .72;
  mask-image: linear-gradient(180deg,transparent,#000 14%,#000 86%,transparent);
  -webkit-mask-image: linear-gradient(180deg,transparent,#000 14%,#000 86%,transparent);
}
/* A quieter reflection: one complete pigment mass at the outer margin.
   The crop ends in the source painting's unpainted centre; the natural
   inner edge is preserved, and the canvas edge falls beyond the viewport. */
html[data-aesthetic=cloud] #philosophy::after {
  top: auto; bottom: -8%; left: auto; right: 0;
  width: clamp(110px,calc((100vw - 760px) / 2),400px);
  height: clamp(146.67px,calc((100vw - 760px) * 2 / 3),533.33px);
  transform: scaleX(-1);
  background-image: url('assets/aesthetic-cloudlight.webp');
  background-size: 200% auto; background-position: left center;
  opacity: .8;
  /* Dissolve only the unpainted half of this crop into the page ground. */
  -webkit-mask-image: linear-gradient(90deg,#000 58%,transparent), linear-gradient(180deg,transparent,#000 20%,#000 78%,transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg,#000 58%,transparent), linear-gradient(180deg,transparent,#000 20%,#000 78%,transparent);
  mask-composite: intersect;
}
/* The complete workspace rests on clear ground before the closing drawing. */
html[data-aesthetic=cloud] .closing-story { background: linear-gradient(180deg,transparent,#f2efe7 24%,#ebe6da 62%,#e4dece); }
html[data-aesthetic=cloud] .painted-invitation { background-color: transparent; }
@media(max-width:1100px) {
  html[data-aesthetic=cloud] #rest::after {
    top: auto; bottom: -32px; height: 190px;
    background-size: 100% auto; background-position: center;
    opacity: .8;
    mask-image: linear-gradient(180deg,transparent,#000 40%,#000 76%,transparent);
    -webkit-mask-image: linear-gradient(180deg,transparent,#000 40%,#000 76%,transparent);
  }
  /* Keep pigment out of the narrow text measure. On compact screens the low bank
     becomes the pause below each text, with colour intact rather than diluted. */
  html[data-aesthetic=cloud] :is(#intro,#sentence,#philosophy)::after {
    top: auto; bottom: -40px; height: 260px;
    left: 50%; right: auto; width: 100vw; transform: translateX(-50%);
    background-image: url('assets/cloudlight-pigment-bank.webp');
    background-size: 100% auto; background-position: center bottom;
    opacity: .68;
    mask-composite: add; -webkit-mask-composite: source-over;
    mask-image: linear-gradient(180deg,transparent,#000 20%,#000 80%,transparent);
    -webkit-mask-image: linear-gradient(180deg,transparent,#000 20%,#000 80%,transparent);
  }
  html[data-aesthetic=cloud] #sentence::after { transform: translateX(-50%) scaleX(-1); }
}
