/* AI Factory visual library — shared styles.
   Layout: every visual is an HTML/CSS component that reflows to one column on phones;
   SVG only for small pictograms. Complete at rest: animations only replay a sequence
   on top of the visible final state (class .aw-play), never hide content waiting for it.
   Skins: altyca-dark (altyca.ch look), altyca-light (ALTYCA design system), severin (severin.io).
   Every ALTYCA colour comes from the design-system tokens (tokens/colors.css). */

.aw {
  /* ALTYCA palette (design-system tokens) */
  --altyca-white: #FFFFFF;
  --altyca-grey-50: #F2F3F5;
  --altyca-grey-100: #E6E8EB;
  --altyca-grey-200: #CBD0D6;
  --altyca-grey-500: #495159;
  --altyca-grey-700: #363E47;
  --altyca-grey-900: #232930;
  --altyca-green: #00CC99;
  --altyca-green-700: #009C76;
  --altyca-mint: #A9F7C0;
  --altyca-pink: #F84AA7;
  --altyca-pink-600: #E22F8F;

  --aw-font-h: "Figtree", "Inter", system-ui, sans-serif;
  --aw-font-b: "Manrope", "Figtree", system-ui, sans-serif;
  --aw-font-m: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --aw-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --aw-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --aw-radius: 16px;
  --aw-radius-sm: 8px;

  /* default skin: altyca-dark */
  --aw-bg: var(--altyca-grey-700);
  --aw-surface: rgba(255, 255, 255, 0.06);
  --aw-surface-2: rgba(255, 255, 255, 0.11);
  --aw-deep: var(--altyca-grey-900);
  --aw-line: rgba(255, 255, 255, 0.16);
  --aw-fg: var(--altyca-white);
  --aw-muted: var(--altyca-grey-200);
  --aw-accent: var(--altyca-green);
  --aw-accent-ink: var(--altyca-green);
  --aw-accent-soft: rgba(0, 204, 153, 0.16);
  --aw-mint: var(--altyca-mint);
  --aw-hot: var(--altyca-pink);
  --aw-hot-ink: var(--altyca-pink);
  --aw-hot-soft: rgba(248, 74, 167, 0.16);
  --aw-on-accent: var(--altyca-grey-700);
  --aw-on-hot: var(--altyca-white);
  --aw-glow: radial-gradient(60% 70% at 85% 10%, rgba(0, 204, 153, 0.20), transparent 70%);
  --aw-head-case: uppercase;

  position: relative;
  box-sizing: border-box;
  color: var(--aw-fg);
  background: var(--aw-glow), var(--aw-bg);
  font-family: var(--aw-font-b);
  font-size: 15px;
  line-height: 1.5;
  border-radius: var(--aw-radius);
  padding: clamp(18px, 3.2vw, 36px);
  overflow: hidden;
  container-type: inline-size;
}
.aw *, .aw *::before, .aw *::after { box-sizing: border-box; }

.aw[data-skin="altyca-light"] {
  --aw-bg: var(--altyca-white);
  --aw-surface: var(--altyca-grey-50);
  --aw-surface-2: var(--altyca-grey-100);
  --aw-deep: var(--altyca-grey-700);
  --aw-line: var(--altyca-grey-100);
  --aw-fg: var(--altyca-grey-700);
  --aw-muted: var(--altyca-grey-500);
  --aw-accent-ink: var(--altyca-green-700);
  --aw-accent-soft: rgba(0, 204, 153, 0.14);
  --aw-hot-ink: var(--altyca-pink-600);
  --aw-hot-soft: rgba(248, 74, 167, 0.12);
  --aw-glow: radial-gradient(60% 70% at 85% 10%, rgba(169, 247, 192, 0.35), transparent 70%);
  --aw-head-case: none;
}

/* severin.io's own tokens (not ALTYCA): system fonts, brick-red accent, auto dark mode */
.aw[data-skin="severin"] {
  --aw-font-h: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --aw-font-b: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --aw-bg: #ffffff;
  --aw-surface: #fafbfc;
  --aw-surface-2: #e6e8ec;
  --aw-deep: #16181d;
  --aw-line: #e6e8ec;
  --aw-fg: #16181d;
  --aw-muted: #626772;
  --aw-accent: #d13b2e;
  --aw-accent-ink: #d13b2e;
  --aw-accent-soft: rgba(209, 59, 46, 0.10);
  --aw-mint: rgba(209, 59, 46, 0.35);
  --aw-hot: #16181d;
  --aw-hot-ink: #16181d;
  --aw-hot-soft: rgba(22, 24, 29, 0.07);
  --aw-on-accent: #ffffff;
  --aw-on-hot: #ffffff;
  --aw-glow: none;
  --aw-head-case: none;
  --aw-radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .aw[data-skin="severin"] {
    --aw-bg: #0f1115; --aw-surface: #161920; --aw-surface-2: #23262d; --aw-deep: #e9ecf1;
    --aw-line: #23262d; --aw-fg: #e9ecf1; --aw-muted: #969ca8; --aw-accent: #ff6b5a;
    --aw-accent-ink: #ff6b5a; --aw-accent-soft: rgba(255, 107, 90, 0.14); --aw-mint: rgba(255, 107, 90, 0.4);
    --aw-hot: #e9ecf1; --aw-hot-ink: #e9ecf1; --aw-hot-soft: rgba(233, 236, 241, 0.08); --aw-on-hot: #0f1115;
  }
}
:root[data-theme="dark"] .aw[data-skin="severin"] {
  --aw-bg: #0f1115; --aw-surface: #161920; --aw-surface-2: #23262d; --aw-deep: #e9ecf1;
  --aw-line: #23262d; --aw-fg: #e9ecf1; --aw-muted: #969ca8; --aw-accent: #ff6b5a;
  --aw-accent-ink: #ff6b5a; --aw-accent-soft: rgba(255, 107, 90, 0.14); --aw-mint: rgba(255, 107, 90, 0.4);
  --aw-hot: #e9ecf1; --aw-hot-ink: #e9ecf1; --aw-hot-soft: rgba(233, 236, 241, 0.08); --aw-on-hot: #0f1115;
}

/* ---------- chrome ---------- */
.aw-head { display: grid; gap: 6px; margin-bottom: clamp(16px, 2.6vw, 28px); max-width: 60ch; }
.aw-eyebrow {
  font-family: var(--aw-font-h); font-weight: 600; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--aw-accent-ink);
}
.aw-title {
  margin: 0; font-family: var(--aw-font-h); font-weight: 700;
  font-size: clamp(22px, 3.4vw, 34px); line-height: 1.1; letter-spacing: -0.01em;
  text-transform: var(--aw-head-case); text-wrap: balance;
}
.aw-sub { margin: 0; color: var(--aw-muted); font-size: clamp(14px, 1.6vw, 16px); text-wrap: pretty; }
.aw-foot {
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: end;
  margin-top: clamp(16px, 2.6vw, 28px); padding-top: 12px; border-top: 1px solid var(--aw-line);
  font-size: 12px; color: var(--aw-muted);
}
.aw-src { max-width: 80ch; min-width: 0; }
.aw-src a { color: inherit; text-decoration: underline; text-decoration-color: var(--aw-line); text-underline-offset: 2px; }
.aw-src a:hover { color: var(--aw-fg); }
.aw-brand { font-family: var(--aw-font-h); font-weight: 700; letter-spacing: 0.18em; color: var(--aw-accent-ink); white-space: nowrap; }
.aw[data-skin="severin"] .aw-brand { letter-spacing: 0; }
.aw[data-chrome="none"] .aw-head { display: none; }
.aw-tag {
  display: inline-flex; align-items: center; gap: 6px; font: 700 11px/1 var(--aw-font-h);
  letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px;
  white-space: nowrap; max-width: 100%;
}
.aw-tag.is-hot { background: var(--aw-hot); color: var(--aw-on-hot); }
.aw-tag.is-accent { background: var(--aw-accent); color: var(--aw-on-accent); }
.aw-tag.is-ghost { border: 1.5px dashed var(--aw-mint); color: var(--aw-fg); }
.aw-tag.is-quiet { background: var(--aw-surface-2); color: var(--aw-muted); }

/* ---------- motion primitives (only while .aw-play is set) ---------- */
.aw.aw-play .aw-a { animation: aw-rise 620ms var(--aw-ease-out) both; animation-delay: calc(var(--d, 0) * 1ms); }
.aw.aw-play .aw-a.grow-y { animation-name: aw-grow-y; transform-origin: bottom; }
.aw.aw-play .aw-a.grow-x { animation-name: aw-grow-x; transform-origin: left; }
.aw.aw-play .aw-a.drop { animation-name: aw-drop; animation-duration: 700ms; }
.aw.aw-play .aw-a.pop { animation-name: aw-pop; }
.aw.aw-play .aw-a.fade { animation-name: aw-fade; }
.aw.aw-play .aw-a.type { animation-name: aw-type; animation-duration: 520ms; animation-timing-function: steps(24, end); }
@keyframes aw-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes aw-grow-y { from { transform: scaleY(0.04); } }
@keyframes aw-grow-x { from { transform: scaleX(0); } }
@keyframes aw-drop { 0% { opacity: 0; transform: translateY(-18px); } 70% { opacity: 1; transform: translateY(2px); } }
@keyframes aw-pop { from { opacity: 0; transform: scale(0.92); } }
@keyframes aw-fade { from { opacity: 0; } }
@keyframes aw-type { from { clip-path: inset(0 100% 0 0); } }
@keyframes aw-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(248, 74, 167, 0.0); } 50% { box-shadow: 0 0 0 8px rgba(248, 74, 167, 0.22); } }

/* ---------- 1 levels ---------- */
.lv-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; }
.lv-col { display: grid; grid-template-rows: 250px auto; gap: 10px; min-width: 0; }
/* the marker sits in the bar's own column, directly on top of its bar */
.lv-bar-wrap { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 6px; height: 250px; }
.lv-mark { display: flex; }
.lv-mark:empty { display: none; }
.lv-mark .aw-tag { white-space: normal; line-height: 1.15; }
.lv-bar {
  width: 100%; height: var(--h); border-radius: 10px 10px 4px 4px;
  background: var(--aw-surface-2); position: relative;
  display: flex; align-items: start; padding: 10px;
}
.lv-bar b { font: 700 20px/1 var(--aw-font-h); }
.lv-col.is-most .lv-bar { background: var(--aw-hot); color: var(--aw-on-hot); }
.lv-col.is-target .lv-bar { background: var(--aw-accent); color: var(--aw-on-accent); }
.lv-col.is-possible .lv-bar { background: transparent; border: 2px dashed var(--aw-mint); }
.lv-name { font: 700 14px/1.2 var(--aw-font-h); text-transform: var(--aw-head-case); letter-spacing: 0.02em; }
.lv-desc { margin: 4px 0 0; font-size: 13px; color: var(--aw-muted); text-wrap: pretty; }
.aw.aw-play .lv-col.is-most .lv-bar { animation: aw-grow-y 620ms var(--aw-ease-out) both, aw-pulse 1600ms var(--aw-ease) 1900ms 2; animation-delay: calc(var(--d, 0) * 1ms), 1900ms; }
@container (max-width: 680px) {
  .lv-grid { grid-template-columns: 1fr; gap: 8px; }
  .lv-col { grid-template-rows: auto; grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: "bar text" "bar mark"; gap: 4px 12px; align-items: center; }
  .lv-bar-wrap { display: contents; }
  .lv-bar { grid-area: bar; align-self: stretch; height: auto; min-height: 56px; width: 100%; border-radius: 8px; align-items: center; justify-content: center; padding: 6px; }
  .lv-text { grid-area: text; }
  .lv-mark { grid-area: mark; align-self: start; }
  .lv-mark:empty { display: none; }
  .aw.aw-play .lv-bar.grow-y { animation-name: aw-grow-x; transform-origin: left; }
}

/* ---------- 2 maturity ---------- */
.mt-track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; position: relative; }
.mt-line { position: absolute; left: 4%; right: 4%; top: 58px; height: 2px; background: linear-gradient(90deg, var(--aw-hot), var(--aw-accent) 55%, var(--aw-mint)); opacity: 0.7; }
.mt-step { position: relative; display: grid; gap: 10px; align-content: start; min-width: 0; }
.mt-pic { height: 116px; border-radius: 14px; background: linear-gradient(var(--aw-surface), var(--aw-surface)), var(--aw-bg); border: 1px solid var(--aw-line); display: grid; place-items: center; position: relative; z-index: 1; }
.mt-pic svg { width: 86%; height: 86%; }
.mt-n { font: 700 12px/1 var(--aw-font-h); color: var(--aw-muted); letter-spacing: 0.08em; }
.mt-name { font: 700 16px/1.2 var(--aw-font-h); text-transform: var(--aw-head-case); }
.mt-desc { margin: 0; font-size: 13px; color: var(--aw-muted); text-wrap: pretty; }
.mt-step .aw-tag { justify-self: start; }
.mt-step.is-now .mt-pic { border-color: var(--aw-hot); box-shadow: inset 0 0 0 1px var(--aw-hot); }
.mt-step.is-next .mt-pic { border-color: var(--aw-accent); box-shadow: inset 0 0 0 1px var(--aw-accent); }
.mt-p { fill: var(--aw-fg); }
.mt-f { fill: var(--aw-accent); }
.mt-f2 { fill: var(--aw-mint); }
.mt-fh { fill: var(--aw-hot); }
.mt-l { stroke: var(--aw-muted); stroke-width: 1.5; fill: none; }
.mt-b { fill: var(--aw-surface-2); stroke: var(--aw-line); }
@container (max-width: 680px) {
  .mt-track { grid-template-columns: 1fr; gap: 10px; }
  .mt-line { left: 44px; right: auto; top: 20px; bottom: 20px; width: 2px; height: auto; background: linear-gradient(180deg, var(--aw-hot), var(--aw-accent) 55%, var(--aw-mint)); }
  .mt-step { grid-template-columns: 88px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; }
  .mt-pic { grid-row: span 4; height: 76px; }
}

/* ---------- 3 gates ---------- */
.gt-flow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; position: relative; padding-top: 4px; }
.gt-rail { position: absolute; left: 6%; right: 6%; top: 42px; height: 2px; background: var(--aw-line); }
.gt-token {
  position: absolute; top: 36px; left: 6%; width: 14px; height: 14px; border-radius: 50%;
  background: var(--aw-accent); box-shadow: 0 0 0 5px var(--aw-accent-soft); opacity: 0; z-index: 2;
}
.aw.aw-play .gt-token { animation: gt-move 7.5s var(--aw-ease) 600ms 1 both; }
@keyframes gt-move {
  0% { left: 6%; opacity: 1; }
  10% { left: 20%; } 18% { left: 20%; }
  30% { left: 34%; } 36% { left: 49%; }
  52% { left: 49%; } 60% { left: 63%; }
  72% { left: 77%; } 82% { left: 77%; }
  95% { left: 92%; opacity: 1; } 100% { left: 92%; opacity: 0; }
}
.gt-node { display: grid; gap: 8px; justify-items: center; text-align: center; min-width: 0; }
.gt-dot {
  width: 76px; max-width: 100%; height: 76px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(var(--aw-surface), var(--aw-surface)), var(--aw-bg); border: 1px solid var(--aw-line); position: relative; z-index: 1;
  font: 700 12px/1 var(--aw-font-h); letter-spacing: 0.06em; color: var(--aw-muted);
}
.gt-dot svg { width: 34px; height: 34px; }
.gt-node.is-gate .gt-dot { border-radius: 50%; border: 2px solid var(--aw-hot); background: linear-gradient(var(--aw-hot-soft), var(--aw-hot-soft)), var(--aw-bg); color: var(--aw-hot-ink); }
.gt-node.is-agent .gt-dot { border-color: var(--aw-accent); background: linear-gradient(var(--aw-accent-soft), var(--aw-accent-soft)), var(--aw-bg); color: var(--aw-accent-ink); }
.gt-name { font: 700 14px/1.2 var(--aw-font-h); text-transform: var(--aw-head-case); }
.gt-who { font-size: 12px; color: var(--aw-muted); }
.gt-node.is-gate .gt-who { color: var(--aw-hot-ink); font-weight: 600; }
.gt-ask {
  grid-column: 4 / span 2; justify-self: center; margin-top: 6px; display: inline-flex; gap: 8px; align-items: center;
  font-size: 13px; padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--aw-hot); color: var(--aw-fg);
}
.gt-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 13px; color: var(--aw-muted); }
.gt-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }
.gt-legend .h { border: 2px solid var(--aw-hot); }
.gt-legend .a { background: var(--aw-accent); }
.aw.aw-play .gt-node.is-gate .gt-dot { animation: aw-pop 500ms var(--aw-ease-out) both, aw-pulse 1200ms var(--aw-ease) both; animation-delay: calc(var(--d, 0) * 1ms), calc(var(--g, 0) * 1ms); }
@container (max-width: 680px) {
  .gt-flow { grid-template-columns: 1fr; gap: 10px; }
  .gt-rail { left: 37px; right: auto; top: 20px; bottom: 60px; width: 2px; height: auto; }
  .gt-token { display: none; }
  .gt-node { grid-template-columns: 76px minmax(0, 1fr); justify-items: start; text-align: left; column-gap: 14px; row-gap: 2px; align-items: center; }
  .gt-dot { grid-row: span 2; width: 60px; height: 60px; margin-left: 8px; }
  .gt-name { align-self: end; }
  .gt-who { align-self: start; }
  .gt-ask { grid-column: auto; justify-self: start; margin-left: 90px; }
}

/* ---------- 4 evidence ---------- */
.ev-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 16px; align-items: stretch; }
.ev-card { border-radius: 14px; padding: 18px; background: var(--aw-surface); border: 1px solid var(--aw-line); display: grid; gap: 14px; align-content: start; min-width: 0; }
.ev-k { font: 700 12px/1 var(--aw-font-h); letter-spacing: 0.1em; text-transform: uppercase; color: var(--aw-muted); }
.ev-bubble { position: relative; padding: 14px 16px; border-radius: 14px 14px 14px 4px; background: var(--aw-surface-2); font-size: 16px; }
.ev-stamp { justify-self: start; transform: rotate(-4deg); border: 2px solid var(--aw-hot); color: var(--aw-hot-ink); font: 800 13px/1 var(--aw-font-h); letter-spacing: 0.12em; text-transform: uppercase; padding: 7px 10px; border-radius: 6px; }
.ev-note { margin: 0; font-size: 13px; color: var(--aw-muted); }
.ev-term { background: var(--altyca-grey-900); color: var(--altyca-grey-100); border-radius: 10px; padding: 14px; font: 13px/1.6 var(--aw-font-m); overflow-x: auto; }
.aw[data-skin="severin"] .ev-term { background: #16181d; color: #e9ecf1; }
.ev-line { display: flex; gap: 10px; white-space: nowrap; }
.ev-line .p { color: var(--altyca-grey-200); }
.ev-line .ok { color: var(--altyca-green); margin-left: auto; padding-left: 12px; }
.ev-line.cmd { color: var(--altyca-mint); }
.aw[data-skin="severin"] .ev-line.cmd { color: #ff6b5a; }
.ev-card.is-proof { border-color: var(--aw-accent); }
.ev-verdict { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--aw-accent-soft); border: 1px solid var(--aw-accent); }
.ev-verdict strong { font: 700 16px/1.2 var(--aw-font-h); }
.ev-verdict span { color: var(--aw-muted); font-size: 13px; }
@container (max-width: 680px) { .ev-grid { grid-template-columns: 1fr; } .ev-line { white-space: normal; overflow-wrap: anywhere; } .ev-line > span { min-width: 0; } .ev-line .ok { flex: none; } }

/* ---------- 5 dark factory ---------- */
.df-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.df-col { display: grid; gap: 12px; min-width: 0; }
.df-k { font: 700 12px/1 var(--aw-font-h); letter-spacing: 0.1em; text-transform: uppercase; color: var(--aw-muted); }
.df-mail { padding: 14px; border-radius: 12px; background: var(--aw-surface); border: 1px solid var(--aw-line); font-size: 14px; }
.df-mail b { display: block; font: 700 12px/1.3 var(--aw-font-h); color: var(--aw-muted); margin-bottom: 6px; }
.df-human { padding: 12px 14px; border-radius: 12px; border: 1.5px dashed var(--aw-hot); font-size: 14px; display: grid; gap: 6px; }
.df-human .q { color: var(--aw-fg); }
.df-human .a { color: var(--aw-hot-ink); font-weight: 600; }
.df-factory { position: relative; border-radius: 18px; padding: 18px; background: var(--altyca-grey-900); color: var(--altyca-white); display: grid; gap: 12px; overflow: hidden; }
.aw[data-skin="severin"] .df-factory { background: #16181d; color: #e9ecf1; }
.df-factory::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 0%, rgba(0, 204, 153, 0.22), transparent 70%); pointer-events: none; }
.df-ftitle { position: relative; display: flex; justify-content: space-between; gap: 8px; align-items: center; font: 700 15px/1.2 var(--aw-font-h); text-transform: var(--aw-head-case); }
.df-ftitle small { font: 600 11px/1 var(--aw-font-h); letter-spacing: 0.1em; color: var(--altyca-mint); text-transform: uppercase; }
.df-steps { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.df-step { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); font-size: 13px; display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.df-step i { font: 700 12px/1 var(--aw-font-h); font-style: normal; color: var(--altyca-green); }
.aw.aw-play .df-step { animation: aw-rise 520ms var(--aw-ease-out) both, df-glow 900ms var(--aw-ease) both; animation-delay: calc(var(--d, 0) * 1ms), calc(var(--d, 0) * 1ms + 500ms); }
@keyframes df-glow { 50% { border-color: rgba(0, 204, 153, 0.9); background: rgba(0, 204, 153, 0.16); } }
.df-report { padding: 12px 14px; border-radius: 12px; background: var(--aw-surface); border: 1px solid var(--aw-line); display: grid; gap: 4px; }
.df-report b { font: 700 12px/1.2 var(--aw-font-h); color: var(--aw-accent-ink); letter-spacing: 0.04em; }
.df-report span { font-size: 14px; }
@container (max-width: 760px) { .df-grid { grid-template-columns: 1fr; } }

/* ---------- 6 industrial ---------- */
.in-rows { display: grid; gap: 14px; }
.in-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px; border-radius: 14px; background: var(--aw-surface); border: 1px solid var(--aw-line); }
.in-era b { display: block; font: 700 16px/1.2 var(--aw-font-h); text-transform: var(--aw-head-case); }
.in-era span { font-size: 12px; color: var(--aw-muted); }
.in-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; min-width: 0; }
.in-end { display: grid; justify-items: center; gap: 4px; font-size: 12px; color: var(--aw-muted); text-align: center; min-width: 64px; }
.in-end .box { padding: 8px 10px; border-radius: 8px; background: var(--aw-surface-2); color: var(--aw-fg); font-weight: 600; font-size: 13px; white-space: nowrap; }
.in-end.is-human .who { color: var(--aw-hot-ink); font-weight: 700; }
.in-mid { position: relative; display: flex; gap: 6px; min-height: 56px; border-radius: 10px; align-items: stretch; overflow: hidden; }
.in-mid .st { flex: 1; display: grid; place-items: center; padding: 6px; border-radius: 8px; border: 1px solid var(--aw-line); font-size: 12px; text-align: center; min-width: 0; }
.in-mid.is-box { background: var(--altyca-grey-900); color: var(--altyca-grey-200); justify-content: center; align-items: center; padding: 8px 12px; font-size: 13px; gap: 10px; }
.aw[data-skin="severin"] .in-mid.is-box { background: #16181d; color: #969ca8; }
.in-mid.is-ai { box-shadow: inset 0 0 0 1.5px var(--altyca-green); }
.in-mid.is-ai::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 50% 50%, rgba(0, 204, 153, 0.18), transparent 70%); }
.in-flow { position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--altyca-mint); opacity: 0; }
.aw.aw-play .in-flow { animation: in-flow 2.6s linear calc(var(--d, 0) * 1ms) 3 both; }
@keyframes in-flow { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
.in-cap { grid-column: 2; margin: 0; font-size: 13px; color: var(--aw-muted); }
@container (max-width: 680px) {
  .in-row { grid-template-columns: 1fr; gap: 10px; }
  .in-cap { grid-column: 1; }
  .in-line { grid-template-columns: 1fr; }
  .in-end { justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; gap: 8px; }
  .in-mid { flex-wrap: wrap; }
  .in-mid .st { flex: 1 1 40%; }
}

/* ---------- 7 control board ---------- */
.cb-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cb-app { font: 700 14px/1 var(--aw-font-h); display: flex; gap: 10px; align-items: center; }
.cb-app i { width: 10px; height: 10px; border-radius: 50%; background: var(--aw-accent); }
.cb-wait { display: inline-flex; align-items: center; gap: 8px; background: var(--aw-hot); color: var(--aw-on-hot); border-radius: 999px; padding: 7px 12px; font: 700 13px/1 var(--aw-font-h); }
.cb-wait b { font-size: 16px; font-variant-numeric: tabular-nums; }
.aw.aw-play .cb-wait { animation: aw-pop 500ms var(--aw-ease-out) 1400ms both, aw-pulse 1400ms var(--aw-ease) 1900ms 2; }
.cb-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cb-col { display: grid; gap: 8px; align-content: start; padding: 10px; border-radius: 12px; background: var(--aw-surface); min-width: 0; }
.cb-col.is-you { background: var(--aw-hot-soft); box-shadow: inset 0 0 0 1.5px var(--aw-hot); }
.cb-h { display: flex; justify-content: space-between; font: 700 12px/1.2 var(--aw-font-h); letter-spacing: 0.06em; text-transform: uppercase; color: var(--aw-muted); padding: 2px 2px 4px; }
.cb-col.is-you .cb-h { color: var(--aw-hot-ink); }
.cb-card { padding: 9px 10px; border-radius: 9px; background: var(--aw-bg); border: 1px solid var(--aw-line); font-size: 12.5px; display: grid; gap: 4px; min-width: 0; }
.cb-card .id { font: 700 11px/1 var(--aw-font-m); color: var(--aw-muted); }
.cb-card .who { font-size: 11px; color: var(--aw-accent-ink); font-weight: 600; }
.cb-col.is-you .cb-card { border-color: var(--aw-hot); }
.cb-col.is-you .cb-card .who { color: var(--aw-hot-ink); }
.cb-card.is-done { opacity: 0.6; }
@container (max-width: 760px) {
  .cb-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cb-col.is-you { grid-column: 1 / -1; order: -1; }
}
@container (max-width: 420px) { .cb-board { grid-template-columns: 1fr; } }

/* ---------- 8 thesis ---------- */
.aw[data-visual="thesis"] .aw-title { font-size: clamp(28px, 5vw, 52px); max-width: 16ch; }
.aw[data-visual="thesis"] .aw-head { max-width: 62ch; }
.th-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.th-stat { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: 14px; background: var(--aw-surface); border-top: 3px solid var(--aw-hot); min-width: 0; }
.th-n { font: 800 clamp(34px, 5vw, 48px)/1 var(--aw-font-h); letter-spacing: -0.02em; color: var(--aw-fg); font-variant-numeric: tabular-nums; }
.th-l { margin: 0; font-size: 14px; color: var(--aw-muted); text-wrap: pretty; }
.th-s { font-size: 12px; color: var(--aw-muted); }
.th-s a { color: inherit; text-underline-offset: 2px; }
@container (max-width: 680px) { .th-grid { grid-template-columns: 1fr; } }

/* ---------- 9 levels-mountain ---------- */
.mt2-svg { display: block; width: 100%; height: auto; overflow: visible; }
.mt2-ridge { fill: var(--aw-surface); stroke: var(--aw-line); stroke-width: 1.5; }
.mt2-path { fill: none; stroke: var(--aw-muted); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1.2 1.6; }
.mt2-goal { fill: none; stroke: var(--aw-accent); stroke-width: 8; stroke-linecap: round; opacity: 0.85; }
.mt2-st circle { fill: var(--aw-bg); stroke: var(--aw-muted); stroke-width: 3; }
.mt2-s2 circle { fill: var(--aw-hot); stroke: var(--aw-hot); }
.mt2-s3 circle, .mt2-s4 circle { fill: var(--aw-accent); stroke: var(--aw-accent); }
.mt2-s5 circle { stroke: var(--aw-mint); stroke-dasharray: 5 4; }
.mt2-l { font: 800 15px var(--aw-font-h); fill: var(--aw-fg); }
.mt2-s2 .mt2-l { fill: var(--aw-on-hot); }
.mt2-s3 .mt2-l, .mt2-s4 .mt2-l { fill: var(--aw-on-accent); }
.mt2-n { font: 700 15px var(--aw-font-h); fill: var(--aw-fg); text-transform: var(--aw-head-case); letter-spacing: 0.02em; }
.mt2-flag line { stroke: var(--aw-fg); stroke-width: 2; }
.mt2-flag rect { stroke-width: 1.5; }
.mt2-flag text { font: 600 14px var(--aw-font-b); }
.mt2-flag text.k { font: 800 12px var(--aw-font-h); letter-spacing: 0.08em; text-transform: uppercase; }
.mt2-flag.is-hot rect { fill: var(--aw-hot); stroke: var(--aw-hot); }
.mt2-flag.is-hot text { fill: var(--aw-on-hot); }
.mt2-flag.is-accent rect { fill: var(--aw-accent); stroke: var(--aw-accent); }
.mt2-flag.is-accent text { fill: var(--aw-on-accent); }
.mt2-flag.is-ghost rect { fill: var(--aw-bg); stroke: var(--aw-mint); stroke-dasharray: 5 4; }
.mt2-flag.is-ghost text { fill: var(--aw-fg); }
/* the climber rests on the path just below base camp (L2 sits at 40 %) */
.mt2-you { offset-distance: 35%; offset-rotate: 0deg; }
.mt2-you circle { fill: var(--aw-fg); r: 13; }
.mt2-you text { font: 800 9px var(--aw-font-h); fill: var(--aw-bg); }
.aw.aw-play .mt2-path { stroke-dasharray: 100; animation: mt2-draw 2.2s var(--aw-ease) both; }
.aw.aw-play .mt2-goal { animation: aw-fade 600ms var(--aw-ease) 2300ms both; }
.aw.aw-play .mt2-you { animation: mt2-climb 2.4s var(--aw-ease) 300ms both, mt2-bob 900ms var(--aw-ease) 2800ms 2; }
@keyframes mt2-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes mt2-climb { from { offset-distance: 0%; } to { offset-distance: 35%; } }
@keyframes mt2-bob { 50% { offset-distance: 38%; } }
.mt2-list { display: none; list-style: none; margin: 0; padding: 0; gap: 8px; }
.mt2-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--aw-surface); }
.mt2-row b { font: 700 15px/1.2 var(--aw-font-h); text-transform: var(--aw-head-case); }
.mt2-row p { margin: 2px 0 6px; font-size: 13px; color: var(--aw-muted); }
.mt2-dot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--aw-font-h); border: 2.5px solid var(--aw-muted); }
.mt2-row.mt2-s2 .mt2-dot { background: var(--aw-hot); border-color: var(--aw-hot); color: var(--aw-on-hot); }
.mt2-row.mt2-s3 .mt2-dot, .mt2-row.mt2-s4 .mt2-dot { background: var(--aw-accent); border-color: var(--aw-accent); color: var(--aw-on-accent); }
.mt2-row.mt2-s5 .mt2-dot { border-style: dashed; border-color: var(--aw-mint); }
@container (max-width: 680px) { .mt2-svg { display: none; } .mt2-list { display: grid; } }
/* long flag texts wrap inside the row instead of running past the card */
.mt2-row .aw-tag { gap: 0; flex-wrap: wrap; white-space: normal; line-height: 15px; padding-block: 4px; border-radius: 13px; }
@container (max-width: 480px) { .mt2-row .aw-tag { flex-direction: column; align-items: flex-start; } .mt2-sep { display: none; } }

/* ---------- 10 maturity-factory ---------- */
.mf-svg { display: block; width: 100%; height: auto; }
.mf-floor { fill: var(--aw-surface-2); }
.mf-belt { fill: var(--aw-deep); }
.aw[data-skin="altyca-light"] .mf-belt { fill: var(--altyca-grey-500); }
.mf-belt-move { stroke: var(--aw-muted); stroke-width: 2; stroke-dasharray: 10 14; opacity: 0.7; }
.mf-roller { fill: var(--aw-surface-2); stroke: var(--aw-muted); stroke-width: 1.5; }
.mf-piece { fill: var(--aw-mint); stroke: var(--aw-accent); stroke-width: 1.5; }
.mf-person circle, .mf-person path { fill: var(--aw-fg); }
.mf-person.is-small { transform-box: fill-box; }
.mf-bench, .mf-leg { fill: var(--aw-muted); }
.mf-bubble { fill: var(--aw-surface-2); stroke: var(--aw-line); }
.mf-machine rect { fill: var(--aw-surface-2); stroke: var(--aw-muted); stroke-width: 1.5; }
.mf-machine .mf-screen { stroke: none; }
.mf-machine.is-a .mf-screen { fill: var(--aw-hot); }
.mf-machine.is-b .mf-screen { fill: var(--aw-mint); }
.mf-machine.is-c .mf-screen { fill: var(--aw-muted); }
.mf-machine.is-same .mf-screen { fill: var(--aw-accent); }
.mf-link { stroke: var(--aw-accent); stroke-width: 2; stroke-dasharray: 4 4; }
.mf-hall { fill: var(--aw-surface-2); stroke: var(--aw-accent); stroke-width: 2; stroke-linejoin: round; }
.mf-hall.is-big { stroke-width: 2.5; }
.mf-tower { fill: var(--aw-surface-2); stroke: var(--aw-accent); stroke-width: 2; }
.mf-gear path { fill: var(--aw-accent); }
.mf-gear .mf-hub { fill: var(--aw-deep); }
.aw[data-skin="altyca-light"] .mf-gear .mf-hub { fill: var(--altyca-white); }
.mf-sep { stroke: var(--aw-line); stroke-width: 1; stroke-dasharray: 3 5; }
.aw.aw-play .mf-belt-move { animation: mf-belt 1.2s linear 6; }
.aw.aw-play .mf-piece { animation: mf-move 2.4s linear calc(var(--i) * 120ms) 3 both; }
.aw.aw-play .mf-gear.is-fast { animation: mf-spin 2.4s linear 3; }
.aw.aw-play .mf-gear.is-rev { animation: mf-spin 1.8s linear 4 reverse; }
@keyframes mf-belt { to { stroke-dashoffset: -24; } }
@keyframes mf-move { from { transform: translateX(-60px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { transform: translateX(60px); opacity: 0; } }
@keyframes mf-spin { to { transform: rotate(360deg); } }
.mf-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.mf-txt { display: grid; gap: 6px; align-content: start; min-width: 0; }
.mf-txt b { font: 700 16px/1.2 var(--aw-font-h); text-transform: var(--aw-head-case); }
.mf-txt p { margin: 0; font-size: 13px; color: var(--aw-muted); text-wrap: pretty; }
.mf-txt .aw-tag { justify-self: start; }
.mf-rows { display: none; list-style: none; margin: 0; padding: 0; position: relative; }
/* vertical belt joining the stations on phones */
.mf-rows::before { content: ""; position: absolute; left: 58px; top: 40px; bottom: 40px; width: 6px; border-radius: 3px; background: var(--aw-deep); opacity: 0.55; }
.aw[data-skin="altyca-light"] .mf-rows::before { background: var(--altyca-grey-500); }
.mf-row { position: relative; display: grid; grid-template-columns: 122px minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px 0; }
.mf-mini { width: 122px; height: auto; display: block; border-radius: 12px; background: var(--aw-surface); border: 1px solid var(--aw-line); position: relative; z-index: 1; }
@container (max-width: 680px) {
  .mf-scene, .mf-grid { display: none; }
  .mf-rows { display: grid; gap: 4px; }
}

/* ---------- 11 industrial-lines (variant A) ---------- */
.il { display: grid; gap: 12px; }
.il-row { padding: 12px 14px 4px; border-radius: 14px; background: var(--aw-surface); border: 1px solid var(--aw-line); }
.il-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.il-head b { font: 700 16px/1.2 var(--aw-font-h); text-transform: var(--aw-head-case); }
.il-head span { font-size: 13px; color: var(--aw-muted); }
.il-svg { display: block; width: 100%; height: auto; }
.il-belt { fill: var(--aw-deep); opacity: 0.6; }
.il-st { fill: var(--aw-surface-2); stroke: var(--aw-line); stroke-width: 1.5; }
.il-box { fill: var(--aw-deep); }
.aw[data-skin="altyca-light"] .il-box { fill: var(--altyca-grey-500); }
.il-box.is-ai { stroke: var(--aw-accent); stroke-width: 3; }
.il-t { font: 600 17px var(--aw-font-b); fill: var(--aw-fg); }
.il-t.is-box { fill: var(--altyca-grey-200); font-size: 20px; }
.aw[data-skin="severin"] .il-t.is-box { fill: #e9ecf1; }
.il-p circle, .il-p path { fill: var(--aw-hot); }
.il-end { font: 700 15px var(--aw-font-h); fill: var(--aw-hot-ink); }
.il-piece { fill: var(--aw-mint); stroke: var(--aw-accent); stroke-width: 2; transform: translateX(840px); }
.aw.aw-play .il-piece { animation: il-move 3.2s var(--aw-ease) calc(var(--d) * 1ms) 2 both; }
.aw.aw-play .il-walk { animation: il-walk 3.2s var(--aw-ease) 600ms 2 both; }
.il-walk { transform: translateX(510px); }
@keyframes il-move { 0% { transform: translateX(0); } 100% { transform: translateX(840px); } }
/* phones: the 1000-unit scene shrinks to ~1/3, so labels, boxes and people grow in user units */
@container (max-width: 680px) {
  .il-st { y: 54px; height: 58px; }
  .il-t { font-size: 34px; }
  .il-t.is-box { font-size: 40px; }
  .il-end { font-size: 30px; }
  .il-head span { font-size: 12px; }
}
@keyframes il-walk { 0% { transform: translateX(0); } 33% { transform: translateX(170px); } 66% { transform: translateX(340px); } 100% { transform: translateX(510px); } }

/* ---------- 12 industrial-attention (variant B) ---------- */
.ia { display: grid; gap: 14px; }
.ia-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--aw-muted); align-items: center; }
.ia-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ia-note { margin-left: auto; font-style: italic; }
.ia-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: center; }
.ia-era { font: 700 16px/1.2 var(--aw-font-h); text-transform: var(--aw-head-case); }
.ia-bar { display: flex; height: 54px; border-radius: 12px; overflow: hidden; background: var(--aw-surface); }
.ia-seg { width: var(--w); display: grid; place-items: center; overflow: hidden; transition: width 600ms var(--aw-ease); }
.ia-seg em { font: 600 13px var(--aw-font-b); font-style: normal; white-space: nowrap; padding: 0 6px; }
.ia-s0 { background: var(--aw-accent); color: var(--aw-on-accent); }
.ia-s1 { background: var(--aw-surface-2); color: var(--aw-fg); }
.ia-s2 { background: var(--aw-hot); color: var(--aw-on-hot); }
.aw.aw-play .ia-seg { animation: ia-grow 1.4s var(--aw-ease) calc(var(--d) * 1ms) both; }
@keyframes ia-grow { from { width: 33.33%; } }
@container (max-width: 520px) { .ia-row { grid-template-columns: 1fr; gap: 6px; } .ia-seg em { font-size: 11px; } .ia-narrow em { visibility: hidden; } .ia-note { margin-left: 0; } }

/* ---------- 13 industrial-timeline (variant C) ---------- */
.it { position: relative; padding-top: 8px; }
.it-axis { position: absolute; left: 0; right: 0; top: 20px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--aw-line), var(--aw-accent)); }
.it-list { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.it-item { display: grid; gap: 4px; align-content: start; padding-top: 30px; position: relative; min-width: 0; }
.it-dot { position: absolute; top: 4px; left: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--aw-bg); border: 3px solid var(--aw-accent); }
.it-item:last-child .it-dot { background: var(--aw-accent); }
.it-year { margin-top: 14px; font: 800 24px/1 var(--aw-font-h); font-variant-numeric: tabular-nums; }
.it-name { font: 700 15px/1.2 var(--aw-font-h); text-transform: var(--aw-head-case); }
.it-what { font-size: 13px; color: var(--aw-muted); }
.it-role { justify-self: start; margin-top: 4px; font: 700 11px/1.2 var(--aw-font-h); letter-spacing: 0.04em; text-transform: uppercase; padding: 6px 8px; border-radius: 8px; background: var(--aw-hot-soft); color: var(--aw-hot-ink); }
.it-item:last-child .it-role { background: var(--aw-accent); color: var(--aw-on-accent); }
@container (max-width: 680px) {
  .it-axis { left: 16px; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; background: linear-gradient(180deg, var(--aw-line), var(--aw-accent)); }
  .it-list { grid-template-columns: 1fr; gap: 14px; }
  .it-item { padding: 0 0 0 52px; }
  .it-dot { top: 0; }
  .it-year { margin-top: 2px; }
  .aw.aw-play .it-axis.grow-x { animation-name: aw-grow-y; transform-origin: top; }
}

@media (prefers-reduced-motion: reduce) {
  .aw .aw-a, .aw * { animation: none !important; }
}
