/* Innerverse platform — built only on tokens.css (Design System 2.0). RTL-first, logical properties. */

/* ── base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--iv-bg-canvas); color: var(--iv-text-primary);
  font-family: var(--iv-type-body-family); font-size: var(--iv-type-body-size);
  line-height: var(--iv-type-body-line-height); font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
[data-theme="stage"] { color: var(--iv-text-primary); }
img { max-width: 100%; }
a { color: var(--iv-text-brand); text-underline-offset: 3px; }
a:hover { color: var(--iv-action-primary-bg-hover); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6, p, dl, dd, ol, ul, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0 0 10px; }
:focus-visible { outline: var(--iv-focus-ring-width) solid var(--iv-focus-ring-color); outline-offset: var(--iv-focus-ring-offset); }
::selection { background: var(--iv-violet-200); color: var(--iv-ink-950); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--iv-action-primary-bg); color: var(--iv-action-primary-fg); padding: 10px 16px; border-radius: var(--iv-radius-md); }
.skip-link:focus { top: 12px; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { animation: breathe 1.6s var(--iv-easing-standard) infinite; }
@keyframes breathe { 50% { opacity: .45; transform: scale(.94); } }

/* ── type ── */
.display, .h1, .h2, .h3, .h4, .h5, .h6, .label, .label-sm, .eyebrow, .eyebrow-latin, .btn, .badge, .ev { font-family: var(--iv-font-family-display); }
.display { font-weight: var(--iv-font-weight-hero); font-size: clamp(56px, 8vw, 112px); line-height: 1.12; letter-spacing: -0.01em; }
.h1 { font-weight: var(--iv-type-heading-1-weight); font-size: clamp(30px, 3.4vw, var(--iv-type-heading-1-size)); line-height: 1.3; }
.h2 { font-weight: var(--iv-type-heading-2-weight); font-size: clamp(26px, 2.6vw, var(--iv-type-heading-2-size)); line-height: 1.35; }
.h3 { font-weight: var(--iv-type-heading-3-weight); font-size: var(--iv-type-heading-3-size); line-height: 1.5; }
.h4 { font-weight: var(--iv-type-heading-4-weight); font-size: var(--iv-type-heading-4-size); line-height: 1.5; }
.h5 { font-weight: var(--iv-font-weight-heading); font-size: 19px; line-height: 1.5; }
.h6 { font-weight: var(--iv-font-weight-title); font-size: 17px; line-height: 1.5; }
.label { font-weight: var(--iv-font-weight-label); font-size: var(--iv-type-label-size); line-height: var(--iv-type-label-line-height); }
.label-sm { font-weight: var(--iv-font-weight-label); font-size: var(--iv-type-label-sm-size); line-height: var(--iv-type-label-sm-line-height); }
.body-lg { font-size: var(--iv-type-body-lg-size); line-height: var(--iv-type-body-lg-line-height); }
.body-sm { font-size: var(--iv-type-body-sm-size); line-height: var(--iv-type-body-sm-line-height); }
.caption { font-size: var(--iv-type-caption-size); line-height: var(--iv-type-caption-line-height); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-weight: var(--iv-font-weight-label); font-size: 16px; color: var(--iv-text-secondary); }
.eyebrow-latin { font-weight: var(--iv-font-weight-label); font-size: 13px; letter-spacing: 0.1em; color: var(--iv-text-brand); }
.muted { color: var(--iv-text-secondary); }
.muted-inverse { color: var(--iv-ink-300); }
.mono { font-family: var(--iv-font-family-mono); }
.center { text-align: center; }
.narrow { max-width: 760px; }
.text-success { color: var(--iv-text-success); } .text-warning { color: var(--iv-text-warning); } .text-error { color: var(--iv-text-error); } .text-neutral { color: var(--iv-status-neutral-fg); }
.signal-text { color: var(--iv-signal); }
.req { font-family: var(--iv-font-family-body); font-weight: 400; font-size: 12px; color: var(--iv-text-secondary); margin-inline-start: 4px; }
.skew-mark { display: inline-block; flex: none; width: 4px; height: 14px; border-radius: 1px; background: var(--iv-action-primary-bg); transform: skewY(-28deg); }

/* ── layout utils ── */
.row { display: flex; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .end { justify-content: flex-end; }
.center-y { align-items: center; } .end-y { align-items: flex-end; }
.page-head.end { align-items: flex-end; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-10 { gap: 10px; } .gap-16 { gap: 16px; }
.grow { flex: 1; } .grow-2 { flex: 1.5; } .min0 { min-width: 0; } .mt-auto { margin-top: auto; }
.stack-2, .stack-4, .stack-6, .stack-8, .stack-10, .stack-12, .stack-14, .stack-16, .stack-20 { display: flex; flex-direction: column; }
.stack-2 { gap: 2px; } .stack-4 { gap: 4px; } .stack-6 { gap: 6px; } .stack-8 { gap: 8px; } .stack-10 { gap: 10px; } .stack-12 { gap: 12px; } .stack-14 { gap: 14px; } .stack-16 { gap: 16px; } .stack-20 { gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px 16px; }
.page { max-width: 1280px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; gap: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-family: var(--iv-font-family-display); font-weight: var(--iv-font-weight-label); font-size: 14px; align-self: flex-start; }

/* ── buttons ── */
.btn {
  --h: var(--iv-button-height-md);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--iv-button-gap);
  min-height: var(--h); padding: 0 var(--iv-button-padding-inline-md);
  border: 0; border-radius: var(--iv-button-radius-md); cursor: pointer; text-decoration: none; white-space: nowrap;
  font-weight: var(--iv-button-typography-weight); font-size: var(--iv-button-typography-size); line-height: 1.2;
  transition: background var(--iv-duration-fast) var(--iv-easing-standard), box-shadow var(--iv-duration-fast), transform var(--iv-duration-fast);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; background: var(--iv-action-disabled-bg) !important; color: var(--iv-action-disabled-fg) !important; box-shadow: none !important; }
.btn-sm { --h: var(--iv-button-height-sm); padding: 0 var(--iv-button-padding-inline-sm); border-radius: var(--iv-button-radius-sm); font-size: 14px; }
.btn-lg { --h: var(--iv-button-height-lg); padding: 0 var(--iv-button-padding-inline-lg); border-radius: var(--iv-button-radius-lg); font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--iv-action-primary-bg); color: var(--iv-action-primary-fg); }
.btn-primary:hover { background: var(--iv-action-primary-bg-hover); color: var(--iv-action-primary-fg); }
.btn-primary:active { background: var(--iv-action-primary-bg-pressed); }
.btn-secondary { background: var(--iv-action-secondary-bg); color: var(--iv-action-secondary-fg); box-shadow: inset 0 0 0 1px var(--iv-action-secondary-border); }
.btn-secondary:hover { background: var(--iv-action-secondary-bg-hover); color: var(--iv-action-secondary-fg); }
.btn-tertiary { background: transparent; color: var(--iv-action-tertiary-fg); }
.btn-tertiary:hover { background: var(--iv-action-tertiary-bg-hover); color: var(--iv-action-tertiary-fg); }
.btn-signal { background: var(--iv-action-signal-bg); color: var(--iv-action-signal-fg); }
.btn-signal:hover { background: var(--iv-action-signal-bg-hover); color: var(--iv-action-signal-fg); }
.btn-destructive { background: var(--iv-action-destructive-bg); color: var(--iv-action-destructive-fg); }
.btn-destructive:hover { background: var(--iv-action-destructive-bg-hover); }
.btn-destructive-text { color: var(--iv-text-error); }
.btn-ghost { background: transparent; color: var(--iv-text-primary); }
.btn-ghost:hover { background: var(--iv-bg-subtle); }
.btn-icon { --h: 40px; width: var(--h); padding: 0; border-radius: var(--iv-radius-md); }
.btn-icon.btn-sm { --h: 32px; }
.btn-lg-icon { --h: 48px; border-radius: 14px; }
/* fixed stage-palette buttons for dark surfaces inside the day theme */
.btn-stage-primary { background: var(--iv-violet-400); color: var(--iv-ink-1000); }
.btn-stage-primary:hover { background: var(--iv-violet-300); color: var(--iv-ink-1000); }
.btn-stage-secondary { background: transparent; color: var(--iv-ink-50); box-shadow: inset 0 0 0 1px var(--iv-ink-700); }
.btn-stage-secondary:hover { background: var(--iv-ink-900); color: var(--iv-ink-50); }
.btn-stage-tertiary { background: transparent; color: var(--iv-violet-300); }
.btn-stage-tertiary:hover { background: var(--iv-violet-900); color: var(--iv-violet-200); }
.btn-ghost-stage { background: transparent; color: var(--iv-ink-50); box-shadow: inset 0 0 0 1px var(--iv-ink-700); }
.btn-ghost-stage:hover { background: var(--iv-stage-raised); color: var(--iv-ink-50); }
.btn-dark { background: rgb(18 17 31 / .7); color: var(--iv-ink-50); box-shadow: inset 0 0 0 1px var(--iv-ink-800); }
.btn-dark:hover { color: var(--iv-signal); }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--iv-text-brand); font-family: var(--iv-font-family-display); font-weight: var(--iv-font-weight-label); font-size: 13px; cursor: pointer; }
.link-btn:disabled { color: var(--iv-text-disabled); cursor: default; }

/* ── badges ── */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--iv-radius-full); font-weight: var(--iv-font-weight-label); font-size: 13px; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 6px; background: currentColor; opacity: .8; }
.badge-neutral { background: var(--iv-status-neutral-bg); color: var(--iv-status-neutral-fg); }
.badge-neutral .dot { background: var(--iv-status-neutral-solid); }
.badge-info { background: var(--iv-status-info-bg); color: var(--iv-status-info-fg); }
.badge-success { background: var(--iv-status-success-bg); color: var(--iv-status-success-fg); }
.badge-warning { background: var(--iv-status-warning-bg); color: var(--iv-status-warning-fg); }
.badge-error { background: var(--iv-status-error-bg); color: var(--iv-status-error-fg); }
.badge-signal { background: var(--iv-signal); color: var(--iv-text-on-signal); font-weight: 640; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--iv-radius-full); background: var(--iv-bg-surface); box-shadow: inset 0 0 0 1px var(--iv-border-subtle); font-family: var(--iv-font-family-display); font-weight: var(--iv-font-weight-label); font-size: 12px; color: var(--iv-status-neutral-fg); }
.count { display: inline-flex; min-width: 22px; height: 20px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 10px; background: var(--iv-bg-subtle); font-size: 12px; margin-inline-start: auto; }

/* evidence badges: shape changes with the level */
.ev { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--iv-radius-full); font-weight: 600; font-size: 13px; }
.ev-orderable { background: var(--iv-signal); color: var(--iv-ink-950); font-weight: 640; }
.ev-orderable .skew-mark { background: var(--iv-ink-950); height: 12px; }
.ev-tested { background: var(--iv-violet-100); color: var(--iv-violet-700); }
.ev-concept { background: var(--iv-ink-0); color: var(--iv-ink-700); box-shadow: inset 0 0 0 1px var(--iv-ink-500); }

/* ── forms ── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.input {
  width: 100%; min-height: var(--iv-input-height-md); padding: 0 var(--iv-input-padding-inline);
  border: 0; border-radius: var(--iv-input-radius); background: var(--iv-bg-surface); color: var(--iv-text-primary);
  box-shadow: inset 0 0 0 1px var(--iv-border-control); font-size: 15px;
  transition: box-shadow var(--iv-duration-fast);
}
.input::placeholder { color: var(--iv-text-secondary); opacity: .85; }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--iv-border-focus), 0 0 0 4px var(--iv-violet-200); }
[data-theme="stage"] .input:focus { box-shadow: inset 0 0 0 2px var(--iv-border-focus), 0 0 0 4px var(--iv-violet-900); }
.input:disabled { background: var(--iv-bg-subtle); color: var(--iv-text-secondary); box-shadow: inset 0 0 0 1px var(--iv-border-subtle); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--iv-border-error); }
.input-warning { box-shadow: inset 0 0 0 2px var(--iv-border-warning); }
.input-sm { min-height: 38px; font-size: 14px; }
.textarea { padding: 12px var(--iv-input-padding-inline); line-height: 1.85; resize: vertical; min-height: 96px; }
.input-group { display: flex; align-items: center; border-radius: var(--iv-input-radius); background: var(--iv-bg-surface); box-shadow: inset 0 0 0 1px var(--iv-border-control); }
.input-group:focus-within { box-shadow: inset 0 0 0 2px var(--iv-border-focus), 0 0 0 4px var(--iv-violet-200); }
.input-group .input { box-shadow: none !important; background: transparent; }
.input-group .unit { padding: 0 14px; font-size: 13px; color: var(--iv-text-secondary); border-inline-start: 1px solid var(--iv-border-subtle); }
.input-group.is-unknown { background: var(--iv-bg-subtle); box-shadow: inset 0 0 0 1px dashed var(--iv-border-control); box-shadow: inset 0 0 0 1px var(--iv-border-subtle); }
.input-group.is-warning { box-shadow: inset 0 0 0 2px var(--iv-border-warning); }
.hint { font-size: 13px; color: var(--iv-text-secondary); }
.field-error { color: var(--iv-text-error); font-size: 14px; }
.range { width: 100%; accent-color: var(--iv-action-primary-bg); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; cursor: pointer;
  border-radius: var(--iv-radius-full); background: var(--iv-bg-surface); color: var(--iv-text-primary);
  box-shadow: inset 0 0 0 1px var(--iv-border-strong); font-size: 15px;
}
.pill:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--iv-border-control); }
.pill[aria-pressed="true"] { background: var(--iv-bg-inverse); color: var(--iv-text-inverse); box-shadow: none; font-family: var(--iv-font-family-display); font-weight: 600; }
.pill-unknown { color: var(--iv-text-secondary); }
.pill:disabled { cursor: default; opacity: .75; }
.pill-radio { position: relative; }
.pill-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill-radio:has(input:checked) { background: var(--iv-bg-inverse); color: var(--iv-text-inverse); box-shadow: none; font-family: var(--iv-font-family-display); font-weight: 600; }
.pill-radio:has(input:focus-visible) { outline: 2px solid var(--iv-focus-ring-color); outline-offset: 2px; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--iv-bg-subtle); align-self: flex-start; }
.seg { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font-family: var(--iv-font-family-display); font-weight: var(--iv-font-weight-label); font-size: 14px; color: var(--iv-text-secondary); }
.seg[aria-pressed="true"] { background: var(--iv-bg-surface); color: var(--iv-text-primary); box-shadow: var(--iv-elevation-1); }
.seg .count { margin: 0; background: var(--iv-bg-brand-subtle); color: var(--iv-text-brand); }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span:first-of-type { display: block; width: 40px; height: 40px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgb(31 29 59 / .1); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--iv-bg-surface), 0 0 0 4px var(--iv-text-primary); }
.swatch input:focus-visible + span { outline: 2px solid var(--iv-focus-ring-color); outline-offset: 5px; }
.swatch-btn { width: 40px; height: 40px; border: 0; border-radius: 12px; cursor: pointer; }
.swatch-btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--iv-bg-surface), 0 0 0 4px var(--iv-text-primary); }

.search-field { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; background: var(--iv-bg-surface); box-shadow: inset 0 0 0 1px var(--iv-border-subtle); color: var(--iv-text-secondary); flex: 0 1 360px; }
.search-field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--iv-text-primary); font-size: 15px; }
.search-field:focus-within { box-shadow: inset 0 0 0 2px var(--iv-border-focus); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── surfaces ── */
.card { border-radius: var(--iv-card-radius, 24px); background: var(--iv-bg-surface); box-shadow: 0 0 0 1px var(--iv-border-subtle); padding: 22px; min-width: 0; }
.card-inverse { background: var(--iv-ink-950); color: var(--iv-ink-50); box-shadow: none; }
.card-inverse .muted { color: var(--iv-ink-400); }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; font-size: 14px; line-height: 1.8; }
.callout > .icon { flex: none; margin-top: 3px; }
.callout-neutral { background: var(--iv-status-neutral-bg); color: var(--iv-status-neutral-fg); }
.callout-info { background: var(--iv-status-info-bg); color: var(--iv-status-info-fg); }
.callout-success { background: var(--iv-status-success-bg); color: var(--iv-status-success-fg); }
.callout-warning { background: var(--iv-status-warning-bg); color: var(--iv-status-warning-fg); }
.callout-error { background: var(--iv-status-error-bg); color: var(--iv-status-error-fg); }

/* ── top bar ── */
.topbar { position: sticky; top: 0; z-index: var(--iv-z-sticky); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 24px; background: var(--iv-bg-surface); border-bottom: 1px solid var(--iv-border-subtle); }
.topbar-stage { background: var(--iv-ink-1000); border-color: var(--iv-stage-raised); color: var(--iv-ink-50); }
.topbar-stage .nav-link { color: var(--iv-ink-300); }
.topbar-stage .nav-link:hover, .topbar-stage .nav-link.active { color: var(--iv-ink-50); background: var(--iv-stage-raised); }
.topbar-stage .btn-tertiary { color: var(--iv-violet-300); }
.topbar-stage .btn-tertiary:hover { background: var(--iv-violet-900); }
.topbar-stage .btn-ghost { color: var(--iv-ink-50); }
.topbar-stage .btn-ghost:hover { background: var(--iv-stage-raised); }
.topbar-start, .topbar-end { display: flex; align-items: center; gap: 16px; }
.topbar-end { gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { height: 30px; width: auto; display: block; }
.brand-word { height: 18px; width: auto; display: block; clip-path: inset(14% 0 0 0); }
.topnav { display: flex; gap: 4px; padding-inline-start: 16px; border-inline-start: 1px solid var(--iv-border-subtle); }
.topbar-stage .topnav { border-color: var(--iv-stage-raised); }
.nav-link { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--iv-text-secondary); text-decoration: none; font-family: var(--iv-font-family-display); font-weight: var(--iv-font-weight-label); font-size: 15px; }
.nav-link:hover { background: var(--iv-bg-canvas); color: var(--iv-text-primary); }
.nav-link.active { background: var(--iv-bg-brand-subtle); color: var(--iv-text-brand); }
.avatar { width: 38px; height: 38px; border: 0; border-radius: 38px; cursor: pointer; background: var(--iv-violet-100); color: var(--iv-violet-700); font-family: var(--iv-font-family-display); font-weight: 640; font-size: 14px; }
.bell { position: relative; }
.bell-dot { position: absolute; top: 9px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 8px; background: var(--iv-action-destructive-bg); box-shadow: 0 0 0 2px var(--iv-bg-surface); }
.pop-wrap { position: relative; }
.popover { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: var(--iv-z-popover); width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; border-radius: 18px; background: var(--iv-bg-raised); color: var(--iv-text-primary); box-shadow: var(--iv-elevation-3); padding: 8px; }
.popover.menu { width: 240px; }
.menu-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--iv-border-subtle); margin-bottom: 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: start; font-size: 15px; }
.menu-item:hover { background: var(--iv-bg-subtle); }
.notes li a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--iv-text-primary); }
.notes li a:hover { background: var(--iv-bg-subtle); }
.notes li.unread a { background: var(--iv-bg-brand-subtle); }
.pad { padding: 12px; } .pop-loading { padding: 16px; }

.site-foot { border-top: 1px solid var(--iv-border-subtle); background: var(--iv-bg-surface); }
.foot-in { max-width: 1280px; margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ── landing ── */
.landing { display: block; }
.hero { background: var(--iv-bg-canvas); color: var(--iv-text-primary); overflow: hidden; }
.hero-in { max-width: 1280px; margin: 0 auto; padding: 72px 24px 88px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 56px; align-items: stretch; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.hero-copy .eyebrow { color: var(--iv-ink-300); }
.hero-lead { color: var(--iv-ink-300); max-width: 620px; }
.hero-art { position: relative; min-height: 440px; border-radius: 36px; background: var(--iv-stage-surface); border: 1px solid var(--iv-stage-line); overflow: hidden; display: grid; place-items: center; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--iv-stage-raised) 1px, transparent 1px), linear-gradient(90deg, var(--iv-stage-raised) 1px, transparent 1px); background-size: 32px 32px; background-position: center; }
.portal { position: relative; display: flex; align-items: center; gap: 22px; }
.portal-a, .portal-b { width: 120px; border-radius: 30px; background: var(--iv-logo-violet); }
.portal-a { height: 240px; transform: skewY(-14deg); animation: floatA 7s var(--iv-easing-standard) infinite; }
.portal-b { height: 200px; background: var(--iv-violet-500); transform: skewY(14deg); margin-top: 40px; animation: floatB 7s var(--iv-easing-standard) infinite; }
.portal-door { width: 14px; height: 150px; border-radius: 4px; background: var(--iv-signal); transform: skewY(-28deg); margin-top: 60px; box-shadow: 0 0 40px 4px rgb(220 248 102 / .35); animation: glow 3.5s ease-in-out infinite; }
@keyframes floatA { 50% { transform: skewY(-14deg) translateY(-10px); } }
@keyframes floatB { 50% { transform: skewY(14deg) translateY(8px); } }
@keyframes glow { 50% { box-shadow: 0 0 70px 10px rgb(220 248 102 / .5); } }
.hero-tag { position: absolute; bottom: 18px; inset-inline-start: 22px; font-size: 13px; color: var(--iv-ink-400); }
.band { background: var(--iv-bg-canvas); color: var(--iv-text-primary); }
.band-alt { background: var(--iv-bg-surface); }
.band-in { max-width: 1280px; margin: 0 auto; padding: 72px 24px; display: flex; flex-direction: column; gap: 28px; }
.section-head { display: flex; flex-direction: column; gap: 10px; }
.section-head.row { flex-direction: row; align-items: flex-end; }
.steps4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps4 li { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 24px; background: var(--iv-bg-surface); box-shadow: 0 0 0 1px var(--iv-border-subtle); }
.step-n { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--iv-action-primary-bg); color: var(--iv-action-primary-fg); font-family: var(--iv-font-family-display); font-weight: 700; }
.areas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; border-radius: 24px; overflow: hidden; background: var(--iv-border-subtle); box-shadow: 0 0 0 1px var(--iv-border-subtle); }
.area { background: var(--iv-bg-surface); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.area-n { font-family: var(--iv-font-family-display); font-weight: 600; font-size: 13px; color: var(--iv-text-brand); letter-spacing: .04em; }
.cta-band { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }

/* ── experience cards ── */
.cards3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.exp-card { border-radius: 24px; background: var(--iv-bg-surface); box-shadow: var(--iv-elevation-1); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow var(--iv-duration-base), transform var(--iv-duration-base); }
.exp-card:hover { box-shadow: var(--iv-elevation-2); transform: translateY(-2px); }
.exp-card.flat { box-shadow: 0 0 0 1px var(--iv-border-subtle); }
.exp-card-media { position: relative; }
.exp-card-badge { position: absolute; top: 14px; inset-inline-start: 14px; }
.exp-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.exp-card-body .btn { margin-top: auto; }
.meta3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid var(--iv-border-subtle); }
.meta3 div { display: flex; flex-direction: column; gap: 2px; }
.meta3 dt { font-size: 12px; color: var(--iv-text-secondary); }
.meta3 dd { font-family: var(--iv-font-family-display); font-weight: 600; font-size: 15px; }

.exp-visual { position: relative; height: 220px; display: flex; align-items: center; justify-content: center; gap: 14px; overflow: hidden; }
.exp-visual.big { height: 100%; min-height: 320px; }
.vis-panels .pn { width: 70px; border-radius: 18px; transition: background var(--iv-duration-slow); }
.vis-panels .pn-a { height: 150px; transform: skewY(-14deg); }
.vis-panels .pn-b { height: 120px; transform: skewY(14deg); margin-top: 30px; }
.vis-panels .pn-door { width: 10px; height: 92px; border-radius: 3px; background: var(--iv-signal); transform: skewY(-28deg); margin-top: 40px; }
.big.vis-panels .pn { width: 120px; border-radius: 28px; } .big.vis-panels .pn-a { height: 240px; } .big.vis-panels .pn-b { height: 200px; margin-top: 40px; }
.big.vis-panels .pn-door { width: 14px; height: 150px; margin-top: 60px; }
.bars { display: grid; grid-template-columns: repeat(3, 44px); gap: 12px; transform: rotate(-8deg); }
.bars i { display: block; height: 120px; border-radius: 14px; }
.bars i:nth-child(2) { height: 160px; margin-top: -20px; } .bars i:nth-child(3) { height: 100px; margin-top: 30px; }
.dots { display: grid; grid-template-columns: repeat(6, 18px); gap: 12px; transform: perspective(400px) rotateX(38deg); }
.dots i { display: block; width: 18px; height: 18px; border-radius: 6px; opacity: .9; }
.facade { display: grid; grid-template-columns: repeat(5, 26px); gap: 8px; padding: 18px 16px 0; border-radius: 10px 10px 0 0; background: rgb(255 255 255 / .04); align-self: flex-end; }
.facade i { display: block; height: 34px; border-radius: 6px 6px 2px 2px; }
.vis-concept { background: var(--iv-bg-subtle); }
.concept-ring { width: 150px; height: 150px; border-radius: 36px; border: 2px dashed var(--iv-border-control); display: grid; place-items: center; }
.concept-ring div { width: 60px; height: 60px; border-radius: 60px; border: 2px dashed var(--iv-ink-400); }

.exp-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.exp-detail-media { position: relative; border-radius: 28px; overflow: hidden; min-height: 420px; display: flex; }
.exp-detail-media .exp-visual { flex: 1; }
.spec-table { display: grid; grid-template-columns: 1fr; border-radius: 20px; background: var(--iv-bg-surface); box-shadow: 0 0 0 1px var(--iv-border-subtle); overflow: hidden; }
.spec-table div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 12px 18px; border-top: 1px solid var(--iv-border-subtle); }
.spec-table div:first-child { border-top: 0; }
.spec-table dt { color: var(--iv-text-secondary); font-size: 14px; }
.spec-table dd { font-family: var(--iv-font-family-display); font-weight: 560; font-size: 15px; }

/* ── auth ── */
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: min(440px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 32px; border-radius: 28px; background: var(--iv-bg-surface); box-shadow: var(--iv-elevation-2); }
.auth-mark { width: 44px; height: auto; }
.demo-box { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; background: var(--iv-bg-canvas); border: 1px dashed var(--iv-border-strong); }

/* ── projects list ── */
.proj-list { display: flex; flex-direction: column; gap: 12px; }
.proj-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) minmax(200px, auto); gap: 18px; align-items: center; padding: 12px; padding-inline-end: 20px; border-radius: 22px; background: var(--iv-bg-surface); box-shadow: 0 0 0 1px var(--iv-border-subtle); text-decoration: none; color: var(--iv-text-primary); transition: box-shadow var(--iv-duration-fast); }
.proj-row:hover { box-shadow: var(--iv-elevation-2); color: var(--iv-text-primary); }
.proj-thumb { position: relative; border-radius: 14px; overflow: hidden; height: 84px; }
.proj-thumb .exp-visual { position: absolute; top: 0; inset-inline-start: 0; width: 295px; height: 220px; transform: scale(.38); transform-origin: top right; }
.proj-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.proj-next { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; color: var(--iv-text-secondary); }
.proj-next .caption { grid-column: 2; }
.proj-next.mine { color: var(--iv-text-brand); }

/* ── empty ── */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 16px; }
.empty-art { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.empty-art i { width: 26px; height: 52px; border-radius: 9px; background: var(--iv-violet-200); transform: skewY(-14deg); }
.empty-art i:last-child { transform: skewY(14deg); height: 44px; background: var(--iv-violet-300); }
.empty-art b { width: 4px; height: 30px; border-radius: 1px; background: var(--iv-lime-400); transform: skewY(-28deg); margin-top: 18px; }

/* ── workspace ── */
.shell { min-height: calc(100vh - 140px); }
.ws { display: flex; flex-wrap: wrap; gap: 24px; padding: 24px; align-items: flex-start; max-width: 1560px; margin: 0 auto; }
.ws-nav { flex: 1 1 220px; max-width: 256px; position: sticky; top: 84px; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 24px; background: var(--iv-bg-surface); box-shadow: 0 0 0 1px var(--iv-border-subtle); }
.nav-title { padding: 8px 12px 10px; font-family: var(--iv-font-family-display); font-weight: 600; font-size: 13px; color: var(--iv-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item { min-height: 44px; padding: 0 12px; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--iv-text-secondary); text-decoration: none; font-family: var(--iv-font-family-display); font-weight: 560; font-size: 15px; }
.nav-item:hover { background: var(--iv-bg-canvas); color: var(--iv-text-primary); }
.nav-item.active { background: var(--iv-bg-brand-subtle); color: var(--iv-violet-800); font-weight: 660; }
[data-theme="stage"] .nav-item.active { color: var(--iv-violet-200); }
.nav-item.plain { justify-content: flex-start; font-family: var(--iv-font-family-body); font-weight: 400; }
.nav-item.plain.active { font-family: var(--iv-font-family-display); font-weight: 600; }
.nav-num { width: 24px; height: 24px; border-radius: 8px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; border: 1.5px solid var(--iv-border-strong); }
.nav-num.cur { background: var(--iv-action-primary-bg); color: var(--iv-action-primary-fg); border: 0; }
.nav-num.done { background: var(--iv-status-success-bg); color: var(--iv-status-success-fg); border: 0; }
.nav-sep { height: 1px; background: var(--iv-bg-subtle); margin: 8px 12px; }
.ws-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ws-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ws-aside { flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.axis-line { min-height: 32px; }

.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stepper button { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 0 0 4px; border: 0; background: none; cursor: pointer; text-align: start; }
.stepper .bar { display: block; height: 6px; border-radius: 6px; background: var(--iv-violet-200); overflow: hidden; }
[data-theme="stage"] .stepper .bar { background: var(--iv-stage-raised); }
.stepper .bar i { display: block; height: 100%; background: var(--iv-action-primary-bg); border-radius: 6px; transition: width var(--iv-duration-slow) var(--iv-easing-standard); }
.step-label { display: flex; align-items: center; gap: 6px; font-family: var(--iv-font-family-display); font-weight: 600; font-size: 14px; }
.stepper li.cur .step-label { color: var(--iv-text-brand); font-weight: 700; }
.stepper li.done .step-label .icon { color: var(--iv-text-brand); }
.stepper li.warn .bar { background: var(--iv-red-200); }
.save-state { display: inline-flex; align-items: center; gap: 6px; }
.save-state.saved .icon { color: var(--iv-text-success); }
.save-state.error { color: var(--iv-text-error); }
.step-foot { display: flex; justify-content: space-between; gap: 8px; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--iv-bg-canvas) 30%); z-index: 2; }

.preview { position: relative; border-radius: 28px; background: var(--iv-bg-media); color: var(--iv-text-primary); overflow: hidden; min-height: 340px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; }
.preview-art { position: absolute; inset: 0; display: flex; }
.preview-art .exp-visual { flex: 1; min-height: 0; height: auto; }
.preview-top { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chip-dark { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: var(--iv-radius-full); background: rgb(18 17 31 / .72); box-shadow: inset 0 0 0 1px var(--iv-ink-800); color: var(--iv-ink-50); font-family: var(--iv-font-family-display); font-weight: 560; font-size: 13px; }
.preview-tags { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.preview-tags span { padding: 6px 10px; border-radius: 10px; background: rgb(18 17 31 / .72); font-size: 13px; color: var(--iv-ink-300); }
.version-preview { position: relative; border-radius: 22px; overflow: hidden; height: 220px; background: var(--iv-bg-media); }
.version-preview .exp-visual { height: 100%; }
.version-preview .chip-dark { position: absolute; bottom: 12px; inset-inline-start: 12px; }

.compat { display: flex; flex-direction: column; }
.compat-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 56px; border-bottom: 1px solid var(--iv-bg-subtle); }
.compat-row:last-child { border-bottom: 0; }
.compat.compact .compat-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 38px; }
.compat.compact .compat-text .label { font-family: var(--iv-font-family-body); font-weight: 400; font-size: 14px; }
.compat-text { display: flex; flex-direction: column; min-width: 0; }
.compat-status { font-family: var(--iv-font-family-display); font-weight: 560; font-size: 13px; }
.compat-icon { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--iv-font-family-display); font-weight: 700; font-size: 13px; }
.tone-success { background: var(--iv-status-success-bg); color: var(--iv-status-success-fg); }
.tone-warning { background: var(--iv-status-warning-bg); color: var(--iv-status-warning-fg); }
.tone-error { background: var(--iv-status-error-bg); color: var(--iv-status-error-fg); }
.tone-neutral { border: 1.5px dashed var(--iv-border-control); color: var(--iv-status-neutral-fg); }

/* AI result: lilac, labelled, never lime */
.ai-card { border-radius: var(--iv-ai-result-radius, 22px); background: var(--iv-ai-bg); box-shadow: inset 0 0 0 1px var(--iv-ai-border); padding: 22px; }
.ai-card.is-muted .ai-text { color: var(--iv-text-secondary); }
.ai-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--iv-font-family-display); font-weight: 640; font-size: 15px; color: var(--iv-ai-fg); }
.ai-state { display: inline-flex; align-items: center; gap: 6px; font-family: var(--iv-font-family-display); font-weight: 600; font-size: 13px; }
.ai-text { font-size: 16px; line-height: 1.95; min-height: 1.95em; }
.ai-text mark { background: var(--iv-ai-highlight); color: inherit; border-radius: 4px; padding: 0 3px; }
.cite { font-family: var(--iv-font-family-display); font-weight: 600; font-size: 12px; text-decoration: none; padding: 1px 6px; border-radius: 6px; background: var(--iv-bg-surface); box-shadow: inset 0 0 0 1px var(--iv-violet-300); }
.ai-unknowns { padding: 14px 16px; border-radius: 14px; background: var(--iv-bg-surface); }
.src { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 8px; background: var(--iv-bg-surface); box-shadow: inset 0 0 0 1px var(--iv-border-subtle); font-size: 13px; }
.src b { font-family: var(--iv-font-family-display); font-weight: 600; color: var(--iv-text-brand); }
.src:target { box-shadow: inset 0 0 0 2px var(--iv-border-focus); }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--iv-ai-fg); vertical-align: middle; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.summary { display: grid; grid-template-columns: 1fr; }
.summary div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--iv-bg-subtle); align-items: baseline; }
.summary div:first-child { border-top: 0; }
.summary dt { color: var(--iv-text-secondary); font-size: 14px; }
.summary dd { font-size: 15px; overflow-wrap: anywhere; }
.notes-list { display: flex; flex-direction: column; gap: 6px; }
.notes-list li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: var(--iv-bg-canvas); }

.dropzone { min-height: 120px; border: 1.5px dashed var(--iv-violet-400); border-radius: 18px; background: var(--iv-violet-50); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; cursor: pointer; transition: background var(--iv-duration-fast); }
[data-theme="stage"] .dropzone { background: var(--iv-ai-bg); }
.dropzone:hover, .dropzone.over { background: var(--iv-violet-100); }
.dropzone:focus-within { outline: 2px solid var(--iv-focus-ring-color); outline-offset: 2px; }
.dz-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--iv-violet-100); color: var(--iv-violet-600); display: inline-flex; align-items: center; justify-content: center; }
.file-list { display: flex; flex-direction: column; }
.file-list li { display: flex; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid var(--iv-bg-subtle); flex-wrap: wrap; }
.file-list a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-icon { color: var(--iv-text-secondary); display: inline-flex; }

.review-row { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 10px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--iv-bg-subtle); }
.review-row .input { grid-column: 1 / -1; }
.review-row .pill { min-height: 38px; font-size: 14px; padding: 0 12px; }

.diff { display: flex; flex-direction: column; gap: 8px; }
.diff-row { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--iv-bg-canvas); }
.history { display: flex; flex-direction: column; }
.history li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--iv-bg-subtle); }
.history li:first-child { border-top: 0; }
.grow-line { flex-basis: 100%; }

.gates { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 8px; }
.gates li { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; background: var(--iv-bg-canvas); color: var(--iv-text-secondary); }
.gates li.ok { background: var(--iv-status-success-bg); color: var(--iv-status-success-fg); }
.pkg { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--iv-ink-900); }
.pkg-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--iv-ink-800); color: var(--iv-violet-300); display: flex; align-items: center; justify-content: center; flex: none; }
.pkg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.sha { text-align: right; }
.card-inverse .btn:disabled { background: var(--iv-ink-800) !important; color: var(--iv-ink-500) !important; }

.axes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.axis { padding: 16px; border-radius: 18px; background: var(--iv-bg-canvas); display: flex; flex-direction: column; gap: 10px; }
.axis-name { font-family: var(--iv-font-family-display); font-weight: 640; font-size: 16px; }
.axis-states { display: flex; flex-direction: column; gap: 4px; }
.axis-states li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--iv-text-secondary); }
.axis-states .dot { width: 8px; height: 8px; border-radius: 8px; background: var(--iv-border-strong); }
.axis-states li.on { color: var(--iv-text-primary); font-family: var(--iv-font-family-display); font-weight: 600; }
.axis-states li.on .dot { background: var(--iv-action-primary-bg); }

.timeline { display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 10px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 5px; top: 26px; bottom: -6px; width: 1px; background: var(--iv-border-subtle); }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 11px; height: 11px; border-radius: 11px; margin-top: 8px; background: var(--iv-violet-300); box-shadow: 0 0 0 3px var(--iv-bg-surface); }
.guide-list { list-style: decimal; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ── dialog & toast ── */
.dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 24px; background: var(--iv-bg-raised); color: var(--iv-text-primary); box-shadow: var(--iv-elevation-3); }
.dialog::backdrop { background: rgb(18 17 31 / .55); backdrop-filter: blur(2px); }
.dialog-inner { display: flex; flex-direction: column; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px 8px; }
.dialog-body { padding: 8px 22px 16px; display: flex; flex-direction: column; gap: 12px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 20px; flex-wrap: wrap; }
#toasts { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: var(--iv-z-toast); display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.toast { padding: 12px 16px; border-radius: 14px; background: var(--iv-ink-950); color: var(--iv-ink-50); box-shadow: var(--iv-elevation-3); font-size: 14px; animation: toastIn var(--iv-duration-slow) var(--iv-easing-emphasized); }
.toast-success { border-inline-start: 4px solid var(--iv-teal-300); }
.toast-error { border-inline-start: 4px solid var(--iv-red-400); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all var(--iv-duration-slow); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* ── stage mode ── */
.bare { min-height: 100vh; }
.stage { min-height: 100vh; background: var(--iv-bg-canvas); color: var(--iv-text-primary); display: flex; flex-direction: column; }
.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 24px; border-bottom: 1px solid var(--iv-stage-raised); }
.vsep { width: 1px; height: 22px; background: var(--iv-ink-800); }
.stage-body { flex: 1; display: flex; flex-wrap: wrap; gap: 20px; padding: 20px 24px 24px; align-items: stretch; }
.stage-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.stage-canvas { position: relative; flex: 1; min-height: 520px; border-radius: 28px; background: var(--iv-stage-deep); box-shadow: inset 0 0 0 1px var(--iv-stage-raised); overflow: hidden; }
.stage-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.stage-canvas:fullscreen { border-radius: 0; }
.stage-note, .stage-res, .stage-sample { position: absolute; padding: 6px 12px; border-radius: 10px; background: rgb(11 10 21 / .8); font-size: 13px; color: var(--iv-ink-400); pointer-events: none; }
.stage-note { top: 16px; inset-inline-start: 16px; max-width: calc(100% - 200px); }
.stage-res { top: 16px; inset-inline-end: 16px; font-family: var(--iv-font-family-display); }
.stage-sample { bottom: 16px; inset-inline-start: 16px; color: var(--iv-ink-300); }
.transport { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 20px; background: var(--iv-stage-surface); box-shadow: inset 0 0 0 1px var(--iv-stage-line); flex-wrap: wrap; }
.time { min-width: 44px; }
.track { flex: 1; min-width: 200px; position: relative; height: 6px; border-radius: 6px; background: var(--iv-ink-800); cursor: pointer; }
.track::before { content: ""; position: absolute; inset: -12px 0; }
.track-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: 6px; background: var(--iv-violet-300); }
.track-knob { position: absolute; top: -5px; inset-inline-start: -8px; width: 16px; height: 16px; border-radius: 16px; background: var(--iv-ink-50); box-shadow: 0 0 0 4px rgb(192 186 253 / .25); }
.stage-aside { flex: 1 1 300px; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }
.stage-card { border-radius: 24px; background: var(--iv-stage-surface); box-shadow: inset 0 0 0 1px var(--iv-stage-line); padding: 22px; display: flex; }
.stage .range { accent-color: var(--iv-violet-400); }
.checklist { display: flex; flex-direction: column; }
.check-item { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; border-top: 1px solid var(--iv-stage-raised); background: none; color: var(--iv-ink-400); cursor: pointer; text-align: start; font-size: 14px; }
.checklist li:first-child .check-item { border-top: 0; }
.check-item .caption { margin-inline-start: auto; }
.check-item.on { color: var(--iv-ink-50); }
.check-item.on .icon { color: var(--iv-teal-300); }
.stage .brand-word { clip-path: inset(14% 0 0 0); }

/* ── responsive ── */
@media (max-width: 1100px) {
  .steps4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .area:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ws-aside { max-width: none; position: static; }
}
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-art { min-height: 340px; }
  .exp-detail { grid-template-columns: 1fr; }
  .exp-detail-media { min-height: 300px; }
  .ws-nav { max-width: none; position: static; flex-direction: row; overflow-x: auto; flex-basis: 100%; padding: 8px; gap: 4px; scrollbar-width: none; }
  .ws-nav .nav-title, .ws-nav .nav-sep { display: none; }
  .ws-nav .nav-item { flex: none; }
  .ws-nav .nav-item .skew-mark { display: none; }
}
@media (max-width: 720px) {
  .topbar { padding: 8px 16px; }
  .topnav { padding-inline-start: 8px; }
  .topnav .nav-link span { display: none; }
  .brand-word { display: none; }
  .page { padding: 20px 16px 48px; }
  .ws { padding: 16px; gap: 16px; }
  .card { padding: 18px; border-radius: 20px; }
  .stepper { gap: 4px; }
  .stepper .caption { display: none; }
  .step-label { font-size: 13px; }
  .summary div, .spec-table div { grid-template-columns: 1fr; gap: 2px; }
  .proj-row { grid-template-columns: 72px minmax(0, 1fr); }
  .proj-thumb, .proj-thumb .exp-visual { height: 72px; }
  .proj-next { grid-column: 1 / -1; }
  .steps4, .areas { grid-template-columns: 1fr; }
  .band-in { padding: 48px 16px; }
  .hero-in { padding: 40px 16px 56px; gap: 32px; }
  .review-row { grid-template-columns: 1fr; }
  .step-foot { position: sticky; bottom: 0; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--iv-bg-surface); box-shadow: 0 -1px 0 var(--iv-border-subtle); }
  .step-foot .btn { flex: 1; }
  .input, .input-group { min-height: var(--iv-input-height-mobile); }
  .input { font-size: 16px; }
  .stage-body { padding: 12px; }
  .stage-canvas { min-height: 360px; }
  .stage-aside { max-width: none; }
  .diff-row { grid-template-columns: 1fr; gap: 2px; }
  #toasts { inset-inline: 12px; bottom: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ═════════════ public site: breadcrumbs, blog, prose, footer ═════════════ */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: var(--iv-text-secondary); }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; }
.crumbs a { color: var(--iv-text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--iv-text-brand); text-decoration: underline; }
.crumbs [aria-current] { color: var(--iv-text-primary); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.narrow-page { max-width: 860px; }
.card-link { color: inherit; text-decoration: none; }
.card-link:hover { color: var(--iv-text-brand); }
.exp-card, .post-card { cursor: pointer; }
.chip { display: inline-flex; align-self: flex-start; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--iv-radius-full); background: var(--iv-bg-brand-subtle); color: var(--iv-text-brand); font-family: var(--iv-font-family-display); font-weight: 600; font-size: 12px; text-decoration: none; }
.post-card { border-radius: 24px; background: var(--iv-bg-surface); box-shadow: var(--iv-elevation-1); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow var(--iv-duration-base), transform var(--iv-duration-base); }
.post-card:hover { box-shadow: var(--iv-elevation-2); transform: translateY(-2px); }
.post-media { display: block; aspect-ratio: 1200 / 630; overflow: hidden; }
.post-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cover-ph { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 100%; min-height: 160px; background: var(--iv-ink-1000); }
.cover-ph i { width: 46px; height: 92px; border-radius: 14px; background: var(--iv-violet-600); transform: skewY(-14deg); }
.cover-ph i:last-child { background: var(--iv-violet-500); transform: skewY(14deg); height: 76px; margin-top: 20px; }
.cover-ph b { width: 7px; height: 56px; border-radius: 2px; background: var(--iv-signal); transform: skewY(-28deg); margin-top: 24px; }
.post { max-width: 1100px; }
.post-head { max-width: 760px; }
.post-hero { width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: 28px; display: block; }
div.post-hero { min-height: 260px; border-radius: 28px; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.post-layout:has(.toc) { grid-template-columns: 240px minmax(0, 1fr); }
.toc { position: sticky; top: 84px; align-self: start; padding: 16px; border-radius: 18px; background: var(--iv-bg-surface); box-shadow: 0 0 0 1px var(--iv-border-subtle); }
.toc ol { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.toc a { font-size: 14px; color: var(--iv-text-secondary); text-decoration: none; }
.toc a:hover { color: var(--iv-text-brand); }
.toc .lv3 { padding-inline-start: 12px; }
.prose { max-width: 72ch; font-size: 17px; line-height: 2; color: var(--iv-text-primary); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-family: var(--iv-font-family-display); font-weight: 660; font-size: 26px; line-height: 1.5; margin-top: 1.6em; scroll-margin-top: 90px; }
.prose h3 { font-family: var(--iv-font-family-display); font-weight: 620; font-size: 21px; line-height: 1.5; margin-top: 1.4em; scroll-margin-top: 90px; }
.prose h4 { font-family: var(--iv-font-family-display); font-weight: 600; font-size: 18px; }
.prose ul, .prose ol { padding-inline-start: 24px; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--iv-text-brand); }
.prose strong { font-family: var(--iv-font-family-display); font-weight: 640; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-inline-start: 4px solid var(--iv-action-primary-bg); border-radius: 0 14px 14px 0; background: var(--iv-bg-brand-subtle); }
.prose code { font-family: var(--iv-font-family-mono); font-size: .88em; padding: 1px 6px; border-radius: 6px; background: var(--iv-bg-subtle); }
.prose pre { overflow-x: auto; padding: 16px; border-radius: 14px; background: var(--iv-ink-1000); color: var(--iv-ink-50); text-align: left; }
.prose pre code { background: none; padding: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 18px; }
.prose hr { border: 0; border-top: 1px solid var(--iv-border-subtle); margin: 2em 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 13px; padding: 4px 10px; border-radius: var(--iv-radius-full); background: var(--iv-bg-subtle); color: var(--iv-text-secondary); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 16px; border-top: 1px solid var(--iv-border-subtle); }
.share a { font-size: 14px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 12px; }
.page-num { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border-radius: 10px; text-decoration: none; color: var(--iv-text-primary); font-family: var(--iv-font-family-display); font-weight: 600; }
.page-num:hover { background: var(--iv-bg-subtle); }
.page-num.cur { background: var(--iv-action-primary-bg); color: var(--iv-action-primary-fg); }
a.seg { text-decoration: none; }
.foot-grid { max-width: 1280px; margin: 0 auto; padding: 40px 24px 8px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-grid ul { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.foot-grid a { color: var(--iv-text-secondary); text-decoration: none; font-size: 14px; }
.foot-grid a:hover { color: var(--iv-text-brand); }
.foot-brand { display: flex; flex-direction: column; gap: 8px; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form { margin-top: 8px; }
.mock-pay { max-width: 520px; margin: 40px auto; }
.align-start { align-self: flex-start; }

/* ═════════════ panels: account & admin ═════════════ */
.panel-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.side-nav, .admin-nav { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 24px; background: var(--iv-bg-surface); box-shadow: 0 0 0 1px var(--iv-border-subtle); position: sticky; top: 84px; }
.account-head { display: flex; align-items: center; gap: 16px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 64px; cursor: default; }
a.avatar { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.danger-zone { box-shadow: inset 0 0 0 1px var(--iv-status-error-border); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 5px; accent-color: var(--iv-action-primary-bg); flex: none; }
select.input { appearance: auto; padding-inline-end: 8px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-family: var(--iv-font-family-display); font-weight: 600; font-size: 13px; color: var(--iv-text-secondary); padding: 10px 12px; border-bottom: 1px solid var(--iv-border-subtle); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--iv-bg-subtle); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .input { min-height: 36px; font-size: 14px; }
.pay-list { display: flex; flex-direction: column; gap: 8px; }
.pay-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; padding: 24px; max-width: 1560px; margin: 0 auto; align-items: start; }
.admin-main { min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 20px; background: var(--iv-bg-surface); box-shadow: 0 0 0 1px var(--iv-border-subtle); }
.stat-value { font-family: var(--iv-font-family-display); font-weight: 700; font-size: 26px; line-height: 1.3; }
.rank { display: flex; flex-direction: column; gap: 8px; }
.rank li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.editor-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
.md-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--iv-border-subtle); }
.md-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.md-input { font-family: var(--iv-font-family-body); font-size: 15px; min-height: 480px; }
.md-preview { padding: 12px 16px; border-radius: var(--iv-input-radius); background: var(--iv-bg-canvas); max-height: 640px; overflow-y: auto; font-size: 15px; }
.seo-checks { display: flex; flex-direction: column; gap: 6px; }
.seo-checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--iv-text-warning); }
.seo-checks li.ok { color: var(--iv-text-success); }
.seo-checks .icon { flex: none; margin-top: 4px; }
.serp { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--iv-border-subtle); font-family: Arial, Tahoma, sans-serif; }
.serp-url { font-size: 12px; color: #4d5156; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { font-size: 17px; color: #1a0dab; line-height: 1.4; }
.serp-desc { font-size: 13px; color: #4d5156; line-height: 1.6; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 50vh; overflow-y: auto; margin-top: 12px; }
.media-tile { padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 1; background: var(--iv-bg-subtle); }
.media-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-tile:focus-visible { outline: 3px solid var(--iv-focus-ring-color); }
.media-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.media-card { padding: 0; overflow: hidden; margin: 0; }
.media-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; height: auto; }
.media-card figcaption { padding: 12px; }
.cover-thumb { width: 100%; border-radius: 12px; aspect-ratio: 1200 / 630; object-fit: cover; }
.sticky-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: 12px 0; background: linear-gradient(transparent, var(--iv-bg-canvas) 35%); }
.redirect-row { display: grid; grid-template-columns: 1fr 1fr 160px auto; gap: 12px; align-items: end; }
.msg.unread { box-shadow: inset 4px 0 0 var(--iv-action-primary-bg), 0 0 0 1px var(--iv-border-subtle); }
.msg-body, .mail-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-body { font-family: var(--iv-font-family-body); font-size: 14px; line-height: 1.9; max-height: 50vh; overflow: auto; margin: 0; padding: 12px; border-radius: 12px; background: var(--iv-bg-canvas); }
.new-proj-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: center; }
.new-proj-art { position: relative; border-radius: 18px; overflow: hidden; }
.new-proj-art .exp-visual { height: 150px; }

@media (max-width: 1100px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-side { position: static; max-height: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .admin, .panel-layout { grid-template-columns: 1fr; padding: 16px; }
  .admin-nav, .side-nav { position: static; flex-direction: row; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .admin-nav .nav-title { display: none; }
  .admin-nav .nav-item, .side-nav .nav-item { flex: none; }
  .post-layout:has(.toc) { grid-template-columns: 1fr; }
  .toc { position: static; }
  .md-panes { grid-template-columns: 1fr; }
  .redirect-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr; padding: 28px 16px 0; }
  .prose { font-size: 16px; }
  .new-proj-head { grid-template-columns: 1fr; }
  .table { font-size: 13px; }
}

/* Current platform brief: central brand overrides, applied after the archived DS. */
:root {
  --iv-violet-600: #5540C4;
  --iv-violet-100: #E7E2FF;
  --iv-ink-950: #272444;
  --iv-lime-300: #DDFC67;
  --iv-teal-700: #08766C;
  --iv-action-primary-fg: #F5F4FA;
  --iv-type-heading-3-weight: 620;
}
.btn, .label, .label-sm, .badge, .ev, .input, .nav-link, .menu-item {
  font-family: var(--iv-font-family-body);
}
.btn, .label, .label-sm { font-weight: 400; }
.stage-note { inset-inline-start: 16px; inset-inline-end: auto; top: auto; bottom: 58px; max-width: calc(100% - 32px); }
.stage-res { inset-inline-end: 16px; inset-inline-start: auto; }
.stage-sample { max-width: calc(100% - 32px); }
.input, .field, .grid2 > *, .ws-main, .ws-panel { min-width: 0; }
textarea.input { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .stage-note { font-size: 11px; bottom: 64px; }
  .stage-sample { font-size: 11px; }
  .btn-icon, .avatar, .swatch-btn { min-width: 44px; min-height: 44px; }
  .h1 { font-size: 30px; }
  .h3 { font-size: 28px; }
  .h4 { font-size: 22px; }
}
