/* Копия дизайн-системы станции: /mnt/d/projects/_shared/web/static/css/ds-base.css
   Снята 2026-08-27. Держим копией, а не ссылкой: на VPS уезжает только каталог
   сервиса, общей папки там нет. Правки вносить в общий файл и пересинхронивать. */
/* ============================================================
   Промеры × Персонал — design tokens + components
   Steel/ochre, dark-first, system fonts, no kitsch.
   ============================================================ */

:root {
  /* Palette — Dark (primary) */
  --bg:           #0E1014;
  --surface:      #161A21;
  --surface-2:    #1E232C;
  --surface-3:    #262C36;
  --border:       #262C36;
  --border-soft:  #1E232C;
  --text:         #E7EAF0;
  --text-2:       #A8B0BD;
  --text-3:       #6F7787;
  --accent:       #D08A2A;
  --accent-2:     #E0A04A;
  --accent-soft:  #3A2A12;

  /* Risk scale (5) */
  --r1: #3F8C5A;  --r1-bg: #16261C;
  --r2: #B8A23C;  --r2-bg: #2A2616;
  --r3: #D08A2A;  --r3-bg: #2D1F10;
  --r4: #C75935;  --r4-bg: #2C1611;
  --r5: #A8392E;  --r5-bg: #27110E;

  /* Type */
  --font-sans: system-ui, -apple-system, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Shadows */
  --el-1: 0 0 0 1px var(--border);
  --el-2: 0 1px 0 0 rgba(0,0,0,0.4), 0 0 0 1px var(--border), 0 8px 24px -12px rgba(0,0,0,0.6);
  --el-3: 0 1px 0 0 rgba(0,0,0,0.4), 0 0 0 1px var(--border), 0 24px 48px -16px rgba(0,0,0,0.7);

  /* Density */
  --row-h: 44px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
}

[data-theme="light"] {
  --bg:           #F4F2EE;
  --surface:      #FFFFFF;
  --surface-2:    #EEEAE3;
  --surface-3:    #E0DBD0;
  --border:       #D8D2C7;
  --border-soft:  #E6E1D7;
  --text:         #161A21;
  --text-2:       #4A5160;
  --text-3:       #7B8294;
  --accent:       #A86B14;
  --accent-2:     #B97C20;
  --accent-soft:  #F1E4CC;

  --r1: #2F7A48;  --r1-bg: #DCEEDF;
  --r2: #8C7A1F;  --r2-bg: #F4ECCC;
  --r3: #A86B14;  --r3-bg: #F1E4CC;
  --r4: #A04323;  --r4-bg: #F2D5C8;
  --r5: #8A2D22;  --r5-bg: #F0CCC4;

  --el-2: 0 1px 0 0 rgba(0,0,0,0.04), 0 0 0 1px var(--border), 0 8px 20px -10px rgba(40,30,20,0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; letter-spacing: -0.01em; }
button { font: inherit; color: inherit; cursor: pointer; }

/* =====================================================
   HEADER
   ===================================================== */
.hdr {
  display: grid;
  grid-template-columns: 280px auto 1fr auto;
  align-items: center;
  gap: var(--space-5);
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 64px;
}
.hdr--dense { padding: 8px 16px; min-height: 52px; }

.hdr__brand { display: flex; align-items: center; gap: 10px; }
.hdr__logo {
  width: 36px; height: 36px; border-radius: 6px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
}
.hdr__brand-name { font-weight: 600; font-size: 14px; line-height: 18px; letter-spacing: 0.01em; }
.hdr__brand-meta { font-size: 12px; color: var(--text-3); line-height: 14px; }

/* Service switch — segmented */
.svc-switch {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.svc-switch__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.svc-switch__btn.is-on {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgba(0,0,0,0.2);
}
.svc-switch__dot {
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}
.svc-switch__dot--p { background: #5A8DB0; border-radius: 999px; transform: none; }

.hdr__ctx { min-width: 0; }
.hdr__ctx-row { display: flex; align-items: center; gap: 8px; }
.hdr__ctx-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3);
}
.hdr__ctx-pick {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 14px; font-weight: 500;
  color: var(--text);
}
.hdr__ctx-pick:hover { background: var(--surface-2); }
.hdr__ctx-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
}
.hdr__ctx-sep { color: var(--text-3); opacity: 0.5; }

.role-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.role-badge--admin { background: var(--accent-soft); color: var(--accent-2); border: 1px solid color-mix(in oklch, var(--accent) 25%, transparent); }
.role-badge--editor { background: #1A2A36; color: #6FA9CF; border: 1px solid #2C4256; }
.role-badge--viewer { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

.hdr__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn__dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--r4);
  border: 2px solid var(--surface);
}

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 4px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}
.user-chip__avatar {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--accent); color: #1a1208;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
}
.user-chip__meta { padding-right: 10px; line-height: 14px; }
.user-chip__name { font-size: 13px; font-weight: 500; }
.user-chip__role { font-size: 11px; color: var(--text-3); }

/* Subnav */
.subnav {
  display: flex; gap: 2px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.subnav__item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  text-decoration: none;
  font-size: 14px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.subnav__item:hover { color: var(--text); }
.subnav__item.is-on {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 500;
}
.subnav__count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}

/* =====================================================
   TOKENS ARTBOARD
   ===================================================== */
.tokens { padding: 32px; max-width: 1100px; }
.tokens__head { margin-bottom: 32px; }
.kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 600; }
.tokens__title { font-size: 28px; line-height: 32px; margin: 6px 0 8px; font-weight: 600; letter-spacing: -0.01em; }
.tokens__lede { color: var(--text-2); margin: 0; max-width: 60ch; }

.tokens__section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.tokens__section--split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.tokens__section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.tokens__section-head h2 { font-size: 18px; margin: 0; font-weight: 600; }
.tokens__section-meta { font-size: 12px; color: var(--text-3); }

.palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.palette-col { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.palette-col--dark { background: #0E1014; }
.palette-col--light { background: #F4F2EE; color: #161A21; }
.palette-col__head { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: inherit; opacity: 0.6; margin-bottom: 12px; }
.palette-col__swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.swatch { display: flex; align-items: center; gap: 10px; }
.swatch__chip { width: 28px; height: 28px; border-radius: 6px; flex: none; }
.swatch__name { font-size: 12px; font-weight: 500; }
.swatch__hex { font-size: 11px; opacity: 0.6; font-family: var(--font-mono); }

.risk-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.risk { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center; }
.risk__chip {
  width: 56px; height: 56px;
  border-radius: 10px;
  display: grid; place-items: center;
  margin: 0 auto 10px;
  position: relative;
  color: white;
}
.risk__num { position: absolute; bottom: 4px; right: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; opacity: 0.8; }
.risk__name { font-size: 13px; font-weight: 500; }
.risk__code { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); margin-top: 2px; }
.risk-stripe { display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 8px; overflow: hidden; }
.risk-stripe__seg { padding: 10px 12px; color: rgba(0,0,0,0.7); font-size: 12px; font-weight: 600; }
.risk-stripe__seg:first-child { color: white; }
.risk-stripe__seg:last-child { color: white; }

.type-grid { display: flex; flex-direction: column; gap: 12px; }
.type-row {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 16px; align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.type-row__name { font-size: 13px; font-weight: 600; }
.type-row__spec { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.type-row__use { font-size: 11px; color: var(--text-3); }
.type-row__sample { color: var(--text); }

.space-row { display: flex; align-items: flex-end; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.space { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.space__bar { background: var(--accent); border-radius: 2px; min-width: 4px; min-height: 4px; }
.space__label { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }

.radii-row { display: flex; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.radius { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.radius__box { width: 44px; height: 44px; background: var(--surface-2); border: 1px solid var(--border); }
.radius__label { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }

.shadow-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shadow-card {
  padding: 24px;
  background: var(--surface);
  border-radius: 10px;
  font-size: 13px; font-weight: 500;
}
.shadow-card span { display: block; margin-top: 4px; font-size: 11px; color: var(--text-3); font-weight: 400; }
.shadow-card--1 { box-shadow: var(--el-1); }
.shadow-card--2 { box-shadow: var(--el-2); }
.shadow-card--3 { box-shadow: var(--el-3); }

/* =====================================================
   INSPECTION POINT CARD
   ===================================================== */
.ipc {
  background: var(--bg);
  display: flex; flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* TOP — sticky, identity, risk */
.ipc__top {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px 12px;
  position: sticky; top: 0; z-index: 5;
}
.ipc__nav {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.ipc__nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-2);
  min-height: 40px;
}
.ipc__nav-btn:hover { color: var(--text); background: var(--surface-3); }
.ipc__nav-btn--next { justify-self: end; }
.ipc__pos { text-align: center; }
.ipc__pos-num {
  font-size: 24px; font-weight: 700; line-height: 26px;
  letter-spacing: -0.01em;
  font-family: var(--font-mono);
}
.ipc__pos-meta { font-size: 12px; color: var(--text-3); }

.ipc__risk {
  border-radius: 10px;
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
}
.ipc__risk::before {
  content: ""; position: absolute; inset: 0; left: auto; width: 4px;
  background: var(--r4);
}
.ipc__risk-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  color: white;
  font-size: 13px; font-weight: 600;
  margin-bottom: 6px;
}
.ipc__risk-name { letter-spacing: 0.01em; }
.ipc__risk-score { background: rgba(0,0,0,0.25); padding: 1px 6px; border-radius: 999px; font-size: 11px; }
.ipc__risk-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.ipc__risk-sep { color: var(--text-3); opacity: 0.5; }
.ipc__risk-bar {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}
.ipc__risk-seg { background: var(--surface-3); }
.ipc__risk-seg.is-on { /* color set inline */ }

.ipc__sub {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 12px; color: var(--text-3);
  padding-top: 4px;
}

/* PRIMARY actions */
.ipc__primary {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.bigbtn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  color: var(--text);
}
.bigbtn:hover { background: var(--surface-3); }
.bigbtn--primary {
  background: var(--accent);
  color: #1a1208;
  border-color: color-mix(in oklch, var(--accent) 60%, black);
}
.bigbtn--primary:hover { background: var(--accent-2); }
.bigbtn__count {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.35);
  color: inherit;
  font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 999px;
}

/* GROUPS */
.group {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px;
}
.group__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.group__title { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -0.005em; }
.group__meta { font-size: 11px; color: var(--text-3); text-align: right; }
.group__body { display: flex; flex-direction: column; gap: 12px; }
.group--warn { background: linear-gradient(180deg, var(--r3-bg), var(--surface) 64px); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* FIELDS */
.field {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 64px;
  display: flex; flex-direction: column; justify-content: center;
}
.field__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 4px;
  line-height: 14px;
}
.field__row { display: flex; align-items: baseline; gap: 6px; }
.field__value {
  font-size: 18px; font-weight: 600; line-height: 22px;
  color: var(--text);
}
.field--big .field__value { font-size: 22px; line-height: 26px; }
.field__unit { font-size: 12px; color: var(--text-3); }
.field__hint { font-size: 11px; color: var(--text-3); margin-top: 4px; line-height: 14px; }
.field--warn { border-color: color-mix(in oklch, var(--r4) 50%, var(--border)); background: var(--r4-bg); }
.field--warn .field__value { color: var(--r4); }
.field--warn .field__hint { color: color-mix(in oklch, var(--r4) 70%, var(--text-2)); }

/* PILLS */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
}
.pill__val { font-family: var(--font-mono); font-size: 11px; opacity: 0.85; padding-left: 4px; border-left: 1px solid currentColor; margin-left: 2px; opacity: 0.7; }
.pill--neutral { /* default */ }
.pill--warn   { background: var(--r2-bg); color: var(--r2); border-color: color-mix(in oklch, var(--r2) 35%, var(--border)); }
.pill--risk   { background: var(--r4-bg); color: var(--r4); border-color: color-mix(in oklch, var(--r4) 35%, var(--border)); }

/* RECOMMENDATIONS */
.reclist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rec {
  display: grid; grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.rec--danger { border-color: color-mix(in oklch, var(--r4) 40%, var(--border)); background: var(--r4-bg); }
.rec__bullet { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-3); }
.rec--danger .rec__bullet { background: var(--r4); }
.rec__title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.rec__desc { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.rec__meta { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; flex-wrap: wrap; }

/* CTA row */
.ipc__cta { display: flex; gap: 8px; justify-content: flex-end; padding-top: 4px; }
/* В ГПЗ кнопки бутстраповские, и общий .btn забивал их фон своим. Здесь
   имя разведено: ds-btn — кнопка дизайн-системы, .btn — бутстраповская.
   Единственное расхождение с общим файлом, отсюда и комментарий. */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.ds-btn:hover { background: var(--surface-3); }
.ds-btn--primary { background: var(--accent); color: #1a1208; border-color: color-mix(in oklch, var(--accent) 60%, black); }
.ds-btn--primary:hover { background: var(--accent-2); }
.ds-btn--ghost { background: transparent; }

/* =====================================================
   STATES (empty / loading / error)
   ===================================================== */
.ipc--state .ipc__top { padding-bottom: 14px; }
.state {
  padding: 40px 24px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--surface);
  flex: 1;
}
.state__icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  margin-bottom: 16px;
}
.state__icon--err { color: var(--r4); border-color: color-mix(in oklch, var(--r4) 35%, var(--border)); background: var(--r4-bg); }
.state__title { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.state__desc { font-size: 14px; color: var(--text-2); max-width: 42ch; margin: 0 0 16px; line-height: 20px; }
.state__details {
  width: 100%; max-width: 480px;
  margin-bottom: 16px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.state__details summary {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  list-style: none;
}
.state__details[open] summary { border-bottom: 1px solid var(--border); }
.state__pre {
  margin: 0;
  padding: 12px;
  font-size: 12px; line-height: 18px;
  color: var(--text-3);
  white-space: pre-wrap;
}
.state__cta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; }
.state__sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* Skeletons */
.sk {
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3) 50%, var(--surface-2));
  background-size: 200% 100%;
  animation: sk 1.6s linear infinite;
  border-radius: 6px;
}
@keyframes sk { from { background-position: 200% 0 } to { background-position: 0 0 } }
.sk--btn { height: 40px; width: 80px; }
.sk--num { height: 24px; width: 80px; margin: 0 auto 4px; }
.sk--meta { height: 12px; width: 140px; margin: 0 auto; }
.sk--chip { height: 28px; width: 200px; border-radius: 999px; margin-bottom: 8px; }
.sk--bar { height: 6px; width: 100%; }
.sk--big { height: 56px; }
.sk--h2 { height: 18px; width: 120px; }
.sk--field { height: 64px; }

/* Progress strip */
.ipc__progress { padding: 14px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.ipc__progress-bar {
  height: 4px; background: var(--surface-2); border-radius: 999px; overflow: hidden;
  margin-bottom: 8px;
}
.ipc__progress-fill {
  height: 100%; width: 40%;
  background: var(--accent);
  border-radius: 999px;
  animation: progress 1.6s ease-in-out infinite;
}
@keyframes progress {
  0%   { transform: translateX(-50%); width: 30%; }
  50%  { width: 60%; }
  100% { transform: translateX(180%); width: 30%; }
}
.ipc__progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }
.link { background: none; border: none; color: var(--accent); padding: 0; font-size: 12px; }
.link:hover { text-decoration: underline; }

/* =====================================================
   Mobile-frame wrapper used inside design canvas
   ===================================================== */
.phone {
  width: 380px;
  height: 760px;
  border-radius: 28px;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--border), 0 0 0 8px #0A0C10, 0 0 0 9px var(--border);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.phone__statusbar {
  height: 28px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
}
.phone__statusbar-right { display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); }
.phone__scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
.phone__scroll::-webkit-scrollbar { width: 4px; }
.phone__scroll::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; }
.phone .ipc { max-width: none; border: none; }

/* Header preview wrapper */
.hdr-preview {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.hdr-preview__caption {
  padding: 8px 16px;
  font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* Annotation note inside artboards */
.note {
  font-size: 12px; color: var(--text-3);
  line-height: 18px;
  max-width: 56ch;
  margin: 8px 16px 0;
}
.note strong { color: var(--text-2); }
