/* fx.css (foundation, F-C, frozen after the foundation): shared atoms. Scenes use these classes and never redefine them;
   a scene that needs a new atom defines it inside its own prefixed stylesheet. Colours come from site-tokens.css.
   Vermilion (--signal) is only for people and decisions: a flag, a gate, the CTA, the close slab. No hazard stripes anywhere (D3). No animated filters, no animated box-shadow. */

:root {
  --chamfer: 14px;
  --grain-svg: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Grain: one static fixed layer above the canvas and section backgrounds, under the nav. 6% on bone, 5% on ink. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background-image: var(--grain-svg); background-size: 180px 180px;
  opacity: .06;
}
html[data-theme=ink] body::before, html[data-theme=signal] body::before { opacity: .05; }
html.static body::before { opacity: .04; }

/* Paper fibre on bone worlds: two huge soft radial gradients, CSS only. A tilted section paints it on its clipped ::before
   (layout.css), so the wash never spills across the cut onto the section above. */
:root {
  --fibre:
    radial-gradient(120% 80% at 12% 0%, rgb(255 255 255 / .34), transparent 62%),
    radial-gradient(90% 70% at 92% 100%, rgb(60 40 10 / .05), transparent 62%);
}
.sec[data-theme=bone]:not(.sec--tilt), .site-footer[data-theme=bone]:not(.sec--tilt) { background-image: var(--fibre); }

/* Chip furniture: fixed, never animated out, never covered. */
.tag {
  display: inline-block; width: fit-content; justify-self: start; padding: .38em .8em .34em;
  border: 1px solid currentColor; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  font-family: var(--font-mono); font-size: var(--t-data); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2;
  color: var(--fg);
}
.tag--selective { color: var(--fg); background: var(--line); border-color: transparent; }
.evidence-note, .boundary {
  max-width: 62ch; padding: .7rem 1rem; border-left: 3px solid var(--signal);
  font-size: .95rem; line-height: 1.45; color: var(--fg);
}
.boundary { border-left-width: 6px; font-weight: 500; }

/* Stencil stamp, chamfer, pallet-slat divider, registration mark */
.stamp { display: inline-block; padding: .3em .6em; border: 2px solid var(--signal); color: var(--signal); font-family: var(--font-display); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; transform: rotate(-6deg); }
.chamfer { clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%); }
.slats { height: 18px; color: var(--fg); background: repeating-linear-gradient(90deg, currentColor 0 calc(100% / 7 - 8px), transparent calc(100% / 7 - 8px) calc(100% / 7)); }
.regmark { position: relative; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; }
.regmark::before, .regmark::after { content: ''; position: absolute; background: currentColor; }
.regmark::before { left: -8px; right: -8px; top: 50%; height: 1px; }
.regmark::after { top: -8px; bottom: -8px; left: 50%; width: 1px; }

