/* The SuperPower Normals page (spnormals.pro-motion.dev, owner 2026-10-21): the shared template (style.css, the header K01 with the
   product's drawing, the stage band) in the app's lavender instead of the orange. Loaded after style.css on that host only; every rule is under body.spn.
   The Pro-Motion name tag keeps its orange: the guideline never recolours it, and its colours are written into style.css, not taken
   from the accent. The footer's small Pro-Motion mark stays as it is too.
   The palette, on the canvas #141414 (WCAG contrast ratio):
     --accent      #8f8fff  6.6:1  the app's own accent (about 128,128,255, the colour of a flat normal): links, rings, buttons
     --accent-2    #b3b3ff  9.5:1  a button under the pointer
     --accent-ink  #15153a  6.3:1 on --accent, 9.0:1 on --accent-2: the text of a button
     --grow        #5a5ab8  3.2:1  hairline rings, the marks of a list and the border of the text field (graphics need 3:1)
     --grow-text   #a59fe8  7.7:1  quieter text in the accent */
body.spn {
  --accent: #8f8fff;
  --accent-2: #b3b3ff;
  --accent-ink: #15153a;
  --grow: #5a5ab8;
  --grow-text: #a59fe8;
  background: radial-gradient(1100px 560px at 88% -120px, rgba(143, 143, 255, .07), transparent 70%) no-repeat, var(--canvas);
  /* the product's opening (style.css, "The opening of a product page"): the glow of the logo and the bar of the main action */
  --pi-glow: 143 143 255;
  --pi-glow-2: 128 128 255;
  --pi-act: linear-gradient(90deg, #8f8fff, #b78cff 45%, #ff8fc4);
  --pi-act-glow: 183 140 255;
}
body.spn::before { background: linear-gradient(90deg, transparent, rgba(143, 143, 255, .5) 28%, rgba(143, 143, 255, .5) 72%, transparent); }
.spn .button { white-space: nowrap; }
.spn .button:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.spn a.more { color: var(--accent); }
.spn a.more:hover { color: var(--accent-2); }


/* The owner's picture: height map, normal map, lit result. Shown whole, never cropped (3:1). */
.spn-hero { position: relative; margin: 0 0 -10px; }  /* the width of the page's column (owner, 2026-10-22: not the whole window), docked to the button bar above it */
body.spn { overflow-x: clip; }
/* The picture fills the page's column (owner, 2026-10-22; it ran the whole window before) and melts into the page at the bottom and on both sides (owner, 2026-10-22: "bring the fade back"); a lavender
   glow sits behind it. */
.spn-hero::before { content: ""; position: absolute; inset: 8% 12%; background: radial-gradient(60% 70% at 50% 50%, rgba(143, 143, 255, .28), transparent 70%); filter: blur(30px); pointer-events: none; }
.spn-hero picture { position: relative; display: block; }
/* the page's pen lines stop before the picture (owner, 2026-10-22: "the background lies over the picture"): an opaque backing in the page's
   colour under the picture, larger than it and soft at its own edges, so the lines fade out around the picture instead of showing
   through its faded edges */
.spn-hero::after { --sx: min(80px, var(--left, 24px)); content: ""; position: absolute; top: -40px; bottom: -60px; left: calc(-1 * var(--sx)); right: calc(-1 * min(80px, var(--right, 24px))); z-index: -1; background: var(--canvas); pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--sx), #000 calc(100% - var(--sx)), transparent), linear-gradient(to bottom, transparent, #000 40px, #000 calc(100% - 60px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--sx), #000 calc(100% - var(--sx)), transparent), linear-gradient(to bottom, transparent, #000 40px, #000 calc(100% - 60px), transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.spn-hero img, .spn-hero canvas { display: block; width: 100%; height: auto; border: 0; border-radius: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 70%, transparent 100%), linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 70%, transparent 100%), linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }

/* The live picture (hero.js, owner, 2026-10-22): on capable machines a WebGL copy of the picture fades in over it; its two handles move
   the dividers, and the lit part is lit from the pointer. The picture underneath stays (and keeps its alt text). */
.spn-hero canvas { position: absolute; top: 0; left: 0; height: 100%; opacity: 0; transition: opacity .5s; }
.spn-hero.is-live canvas { opacity: 1; }
.spn-hero picture { transition: opacity .3s .5s; }
.spn-hero.is-live picture { opacity: 0; }   /* under the faded edges it would show through; opacity keeps its alt text for screen readers */
.spn-handle { position: absolute; top: 50%; left: var(--x, 50%); z-index: 1; display: grid; place-items: center; box-sizing: border-box; width: max(30px, 2%); aspect-ratio: 1; padding: 0; translate: -50% -50%; border: 2px solid rgba(245, 245, 255, .86); border-radius: 50%; background: rgba(24, 25, 31, .82); color: #fff; cursor: ew-resize; touch-action: none; opacity: 0; transition: opacity .5s, scale .15s; }
.spn-hero.is-live .spn-handle { opacity: 1; }
.spn-handle:hover, .spn-handle.is-dragging { scale: 1.12; }
.spn-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.spn-handle svg { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Sections: each opens on a hairline (owner, 2026-10-22: no ring at its start any more), the title on the left and its lead on the right. */
.spn-tune, .spn-pair, .spn-also, .spn-videos { position: relative; border-top: 1px solid var(--line); }
.spn-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 56px; align-items: end; margin: 0 0 40px; }
.spn-head h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); line-height: 1.12; letter-spacing: -.03em; }
.spn-head p { max-width: 520px; margin: 0; font-size: 16.5px; line-height: 1.65; color: var(--text-2); }

/* The main point: the way from the height to the normal (nodes on a hairline, the ends filled), then the six settings, each with a
   small drawing */
.spn-tune { padding: 60px 0 56px; margin-top: 56px; }
.spn-adv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 36px; margin: 0; padding: 0; list-style: none; }
.spn-adv li { padding-top: 20px; border-top: 1px solid var(--tick); }
.spn-icon { display: block; width: 40px; height: 40px; margin: 0 0 14px; fill: none; stroke: var(--text-3); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.spn-icon .a { stroke: var(--accent); stroke-width: 1.7; }
.spn-adv h3 { margin: 0 0 8px; font-size: 17.5px; font-weight: 560; line-height: 1.3; letter-spacing: -.015em; }
.spn-adv p { margin: 0; font-size: 14.5px; line-height: 1.62; color: var(--text-2); }

/* Two advantages side by side, each with a drawing of what it does: clean flat surfaces, relief that fades out */
.spn-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; padding: 60px 0; }
.spn-feature figure { margin: 0 0 26px; padding: 22px 22px 16px; border: 1px solid var(--line); border-radius: 6px; background: #17171d; }
.spn-diagram { display: block; width: 100%; height: auto; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.spn-diagram .soft { stroke: #8a8a96; stroke-width: 1.6; }
.spn-diagram .thin { stroke: #5c5c68; stroke-width: 1.3; }
.spn-diagram .a { stroke: var(--accent); stroke-width: 1.6; }
.spn-feature h2 { margin: 0 0 12px; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.spn-feature p { margin: 0; font-size: 15.5px; line-height: 1.68; color: var(--text-2); }

/* Formats as chips in three groups, the rest one short line each, and the app once more */
.spn-also { padding: 60px 0 64px; }
.spn-formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 36px; margin: 0 0 40px; }
.spn-formats h3 { margin: 0 0 14px; font-size: 15px; font-weight: 560; color: var(--text); }
.spn-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.spn-chips li { padding: 5px 10px; border: 1px solid var(--tick); border-radius: 5px; font: 12.5px/1.3 var(--mono); color: var(--text-2); white-space: nowrap; }
.spn-formats p { margin: 12px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-3); }

/* Video tutorials: shown only when the page has videos (NORMALS_VIDEOS in site/pages.mjs); files of this host */
.spn-videos { padding: 60px 0 64px; }
.spn-videos ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; }
.spn-videos figure { margin: 0; }
.spn-videos video { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: #000; }
.spn-videos figcaption { margin-top: 10px; font-size: 15px; color: var(--text-2); }


@media (max-width: 1000px) {
  .spn-adv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spn-pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 780px) {
  .spn nav.main { flex-wrap: wrap; row-gap: 20px; }   /* the menu wraps instead of running past the edge (Russian); 20 px keeps the rows' taller targets apart */
  .spn-hero { margin: 0 0 -6px; }
  
  .spn-tune { margin-top: 40px; }
  .spn-tune, .spn-pair, .spn-also, .spn-videos { padding: 44px 0 44px; }
  .spn-head { grid-template-columns: minmax(0, 1fr); margin-bottom: 30px; }
  /* the way from height to normal runs down the left edge */
  .spn-formats, .spn-videos ul { grid-template-columns: minmax(0, 1fr); }
  .spn-feature figure { padding: 16px 14px 12px; }
}
@media (max-width: 560px) {
  .spn-adv { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* Colour (owner, 2026-10-21: "the whole page is very dull"): the hues of a normal map, lavender, cyan, pink and green, one to a
   setting, one to a group of formats, one to a section's ring. */
.spn { --h1: #8f8fff; --h2: #27c5f9; --h3: #fa5baf; --h4: #b16df7; --h5: #e757e7; }   /* the logo's own colours: cyan, violet, magenta, pink (owner, 2026-10-21) */
.spn-head h2 { background: linear-gradient(90deg, #fff 30%, var(--h1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spn-adv li { --c: var(--h1); position: relative; isolation: isolate; padding: 26px 4px 0 0; border: 0; background: none; }
/* Owner, 2026-10-21: dividers with a glow instead of cards: a line in the setting's colour that fades out to the right, a soft light under it. */
.spn-adv li::before, .spn-formats > div::before, .spn-feature::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--c) 9%, color-mix(in srgb, var(--c) 10%, transparent) 92%); filter: drop-shadow(0 0 7px color-mix(in srgb, var(--c) 65%, transparent)); }
.spn-adv li::after, .spn-formats > div::after, .spn-feature::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 90px; background: radial-gradient(70% 100% at 18% 0, color-mix(in srgb, var(--c) 18%, transparent), transparent 75%); pointer-events: none; z-index: -1; -webkit-mask-image: linear-gradient(90deg, transparent, #000 32%); mask-image: linear-gradient(90deg, transparent, #000 32%); }
.spn-adv li:nth-child(4n+2) { --c: var(--h2); }
.spn-adv li:nth-child(4n+3) { --c: var(--h3); }
.spn-adv li:nth-child(4n) { --c: var(--h4); }
.spn-adv li:nth-child(n+5):nth-child(odd) { --c: var(--h5); }
.spn-adv .spn-icon { stroke: color-mix(in srgb, var(--c) 55%, #fff); }
.spn-adv .spn-icon .a { stroke: var(--c); }
.spn-adv h3 { color: #fff; }
.spn-pair { grid-template-rows: auto auto 1fr; }
.spn-feature { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
.spn-feature figure { display: flex; flex-direction: column; justify-content: space-between; margin-bottom: 26px; border-color: color-mix(in srgb, var(--h2) 35%, transparent); background: color-mix(in srgb, var(--h2) 6%, #14141a); }
.spn-feature figure .spn-diagram { flex: 1; min-height: 0; margin: auto 0; }
.spn-feature:nth-child(2) figure { border-color: color-mix(in srgb, var(--h3) 35%, transparent); background: color-mix(in srgb, var(--h3) 6%, #14141a); }
.spn-feature h2 { margin-bottom: 12px; }
.spn-formats { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; margin-bottom: 0; }
.spn-formats > div { --c: var(--h1); position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 14px; padding: 26px 4px 0 0; border: 0; background: none; }
.spn-formats .f-export { --c: var(--h3); }
.spn-formats h3 { margin: 0; font-size: 17px; color: var(--c); }
.spn-formats .spn-chips li { border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); color: #fff; }
@media (max-width: 780px) { .spn-pair { grid-template-rows: none; } .spn-feature { grid-row: auto; display: block; } }

/* the two pictures belong to the features above: the same glowing divider, no cards */
.spn-tune .spn-pair { margin-top: 40px; padding: 0; border-top: 0; gap: 40px 36px; }
.spn-feature { --c: var(--h2); position: relative; isolation: isolate; padding-top: 26px; }
.spn-feature:nth-child(2) { --c: var(--h3); }
.spn-feature figure, .spn-feature:nth-child(2) figure { padding: 0; border: 0; border-radius: 0; background: none; }
.spn-feature h3 { margin: 0 0 8px; font-size: 17.5px; font-weight: 560; line-height: 1.3; letter-spacing: -.015em; color: #fff; }
.spn-feature p { font-size: 14.5px; line-height: 1.62; }
.spn-feature figure .spn-diagram { flex: none; max-height: 150px; width: 100%; margin: 0; }
.spn-feature figure { justify-content: flex-start; margin-bottom: 20px; }
.spn-tune .spn-feature p { font-size: 14.5px; line-height: 1.62; }

/* the pen-line background of this page (owner, 2026-10-22): 09 "diagonal bow" of the collection, in the app's lavender */
.lines-normals { --lines: url("/lines-normals.svg?v=2bff8415"); --lines-narrow: url("/lines-normals.svg?v=2bff8415"); }

/* The one big point of the features (owner, 2026-10-22): sharp edges and clean flats where a plain conversion smears them; the four
   small graphs it replaced said the same in parts. The diagram as wide as the column, the title and the text under it; it opens
   the features, right under their title. */
.spn-edge { --c: var(--h1); margin: 0 0 56px; }   /* right under the title "Features" (owner, 2026-10-22), before the list */
.spn-edge figure { margin: 0 0 22px; }
.spn-tune .spn-edge figure .spn-diagram { max-height: none; }
/* three labelled rows (owner, 2026-10-22): ours on top, the height map in the middle, a plain conversion below; each drawn as a cut (sparse,
   quiet hatching under the line) with its normals in green */
.spn-cmp { display: grid; gap: 14px; }
.spn-cmp-row { display: grid; gap: 6px; }
.spn-cmp-label { margin: 0; font-size: 13px; line-height: 1.3; color: var(--text-3); }
.spn-cmp .is-ours .spn-cmp-label { color: var(--accent); }
.spn-cmp .ours { stroke: var(--accent); stroke-width: 2.2; }
.spn-cmp .cut { stroke: rgba(205, 205, 230, .24); stroke-width: 1; }
.spn-cmp .cut-area { stroke: none; }
.spn-cmp .n { stroke: #7fdca3; stroke-width: 1.3; opacity: .85; }
.spn-cmp .src { stroke: #d6d6e0; stroke-width: 2; }
.spn-cmp .plain { stroke: #8a8a96; stroke-width: 2; }
.spn-edge h3 { max-width: 34ch; font-size: clamp(20px, 2vw, 24px); line-height: 1.25; }
.spn-tune .spn-edge p { max-width: 62ch; font-size: 15.5px; }
