/* FREEDOM v8 — spot illustrations for .svc-ill slots (集める / つくる / 導く)
   Owner: illust.css + js/illust.js. Design notes: research/17_illust_system.md
   Public knobs (set on .svc-ill or any ancestor):
     --ill-max            max edge of the square slot (default 240px)
     --ill-sky / --ill-blue / --ill-lime / --ill-green   facet tones (lit / shade pairs)
     --ill-pale-a / --ill-pale-b                         pale plane gradient (top-left -> bottom-right)
     --ill-ink            lines + point markers
     --ill-paper          fill of point markers (match the surface)
     --ill-shadow-a       flat shadow strength (0–1)                                       */

.svc-ill {
  --ill-sky: #6DB6DC;
  --ill-blue: #3E86B8;
  --ill-lime: #9AC463;
  --ill-green: #5BA05A;
  --ill-pale-a: #D6E9F4;
  --ill-pale-b: #DCEFD9;
  --ill-ink: #12333D;
  --ill-paper: #F4F8F7;
  --ill-shade: #2B4F7B;
  --ill-shadow-a: .14;

  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--ill-max, 240px);
  aspect-ratio: 1 / 1;
  contain: layout;          /* nothing inside can move the row */
  pointer-events: none;     /* the whole row stays the hit target */
}
.svc-ill > svg.i8 {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  will-change: opacity, transform;
}

/* visibility by mode (set by illust.js) */
.svc-ill[data-ill-mode="hover"] > svg.i8,
.svc-ill[data-ill-mode="scroll"]:not([data-ill-shown]) > svg.i8 { opacity: 0; }

/* ---------- paint ---------- */
.i8 .i8-sky   { fill: var(--ill-sky); }
.i8 .i8-blue  { fill: var(--ill-blue); }
.i8 .i8-lime  { fill: var(--ill-lime); }
.i8 .i8-green { fill: var(--ill-green); }
.i8 .i8-stop-a { stop-color: var(--ill-pale-a); }
.i8 .i8-stop-b { stop-color: var(--ill-pale-b); }
.i8 .i8-sh { fill: var(--ill-shade); fill-opacity: var(--ill-shadow-a); }
.i8 .i8-ln {
  fill: none;
  stroke: var(--ill-ink);
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.i8 .i8-ln--3 { stroke-width: 3px; }
/* lines that are "drawn" use pathLength=1 dashes, which break under non-scaling-stroke,
   so they get user-unit widths scaled by --i8-k (= 160 / rendered px, set by illust.js) */
.i8 .i8-draw  { stroke-dasharray: 1 2; stroke-dashoffset: 0; vector-effect: none; stroke-width: calc(1.5px * var(--i8-k, 1)); }
.i8 .i8-draw.i8-ln--3 { stroke-width: calc(3px * var(--i8-k, 1)); }
.i8 .i8-dash  { stroke-dasharray: 3 5; stroke-opacity: .42; }
.i8 .i8-faint { stroke-opacity: .3; }
.i8 .i8-soft  { stroke-opacity: .42; }
.i8 .i8-dot {
  fill: var(--ill-paper);
  stroke: var(--ill-ink);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}
.i8 .i8-dot--lime { fill: var(--ill-lime); }
.i8 .i8-paperfill { fill: var(--ill-paper); }

/* ---------- transform origins ---------- */
.i8 .o-c  { transform-box: view-box; transform-origin: 80px 80px; }
.i8 .o-0  { transform-box: view-box; transform-origin: 0 0; }
.i8 .o-f  { transform-box: fill-box; transform-origin: 50% 50%; }
.i8 .o-fb { transform-box: fill-box; transform-origin: 50% 100%; }

/* parts that only exist during motion */
.i8 .b-ring, .i8 .g-wave, .i8 .g-glint { opacity: 0; }
.i8 .g-glint { fill: var(--ill-lime); }
