/* =====================================================================
 * theme-arctic — a scoped CSS theme for SGApps webapps.
 *
 * Lifted (pixel-close) from the HoReCa UIMocks v1.2.1 vocabulary at
 *   /mnt/web/WebDevelopment/hub.sgapps.io/sgapps.io/
 *     cnc-invoices--research/TODOs/ArchitecturalContentExtension/
 *     Horeca_Entity_Concept/UIMocks/v1.2.1/CONVENTIONS.md
 * plus the auth-service-mock language pill at
 *   /mnt/web/WebDevelopment/hub.sgapps.io/sgapps.io/cnc-invoices/
 *     TODOs/AuthServiceRestyle/design/auth-service-mock.html
 *
 * Everything is scoped behind `[data-theme="arctic"]` so the theme can
 * be enabled per-window / per-section without leaking into RegalRoyal
 * apps that haven't opted in.
 *
 * Variants:
 *   [data-theme="arctic"]              → light (default)
 *   [data-theme="arctic"][data-mode="dark"]
 *                                     → force dark
 *   @media (prefers-color-scheme: dark)
 *                                     → auto dark if not forced light
 * ===================================================================== */

[data-theme="arctic"] {
	/* --- Palette (CONVENTIONS.md §1 — Anthropic-like) --- */
	--ark-ink:         #0B0B0B;
	--ark-text-2:      #383835;
	--ark-text-3:      #52514E;
	--ark-muted:       #6B6A65; /* was #6D6B67 — STK/ROL render body meta at #6B6A65 */
	--ark-muted-2:     #898781;
	--ark-muted-3:     #9A9992; /* STK .search / .qty-zero */
	--ark-fill-on-ink: #C9C8C2; /* ROL:72 — meta color on ink-active rows */
	--ark-switch-off:  #898781; /* CONVENTIONS §1 */
	--ark-page:        #FAF9F5;
	--ark-surface:     #FFFFFF;
	--ark-fill-1:      #F6F6F4;
	--ark-fill-2:      #F0EFEC;
	--ark-fill-3:      #EDECE8;
	--ark-muted-bg-2:  #F0EFEA;              /* segmented track bg */
	--ark-line:        rgba(11, 11, 11, .12);
	--ark-line-soft:   rgba(11, 11, 11, .08); /* soft row divider */
	--ark-line-input:  rgba(11, 11, 11, .25);
	--ark-line-strong: rgba(11, 11, 11, .20); /* strong input / select border */

	--ark-accent:      #256ABF;
	--ark-accent-hv:   #184F95;
	--ark-accent-bg:   #E2EEFA;
	--ark-on-accent:   #FFFFFF;              /* text / icons on an --ark-accent fill */
	--ark-link-ink:    #1C4F8F;              /* info-note ink, blue-chip text */

	--ark-success:     #005400;
	--ark-success-ink: #005400;              /* alias of success for deep ink on success-bg */
	--ark-success-bg:  #E0F2DE;
	--ark-success-dot: #0CA30C;

	--ark-warning:     #623900;
	--ark-warning-bg:  #FAEBCE;
	--ark-warning-ac:  #C98500;
	--ark-warn-line:   #F0D29A;              /* warn stripe border */

	/* HRC canonical + Fiscal solid-danger button paint. Chip variant alone
	 * reads better on the deeper #8E2626 ink; keep that shade as hover so
	 * `--ark-danger` stays bright for button fills while hover darkens by
	 * one step. (2026-11-01 — shift one step: #8E2626 → --ark-danger-hv.) */
	--ark-danger:      #A32C2C;
	--ark-danger-hv:   #8E2626;              /* danger hover ink */
	--ark-danger-bg:  #FEF3F3;
	--ark-danger-fill: #FAD6D6;
	--ark-danger-line: #F3C2C2;              /* danger stripe border */

	--ark-violet:      #4A2C8A;
	--ark-violet-ink:  #4A2C8A;              /* violet chip text */
	--ark-violet-bg:   #EDE7F6;

	/* sgapps-studio v0.2.5: "published" state, media frames, popovers */
	--ark-teal:        #065F49;
	--ark-teal-bg:     #DCF2EA;
	--ark-media-bg:    #141A24;              /* video / image frames — dark in both modes */
	--ark-on-media:    #FFFFFF;
	--ark-scrim:       rgba(11, 11, 11, .32); /* sheet / menu backdrop */
	--ark-shadow-pop:  rgba(11, 11, 11, .16); /* menus, sheets, popovers */

	--ark-annotation:  #5645BE;

	/* Data viz — FiscalReceiptsSqlite mocks (Main / Sales / Products / Usage).
	 * Series = categorical slots in fixed order; heat = sequential blue ramp
	 * (0 = no data); tier = ordered A/B/C ramp with the ink that sits on it.
	 * Dark steps come from the same ramps, validated against #1A1A1A. */
	--ark-series-1:    #2A78D6;
	--ark-series-2:    #EB6834;
	--ark-series-3:    #1BAF7A;
	--ark-series-4:    #EDA100;
	--ark-series-rest: #C3C2B7;              /* "other", total-only, de-emphasised bars */
	--ark-series-soft: #8CB6EA;              /* series-1 lighter step: period in progress, min–max span */
	--ark-chart-grid:  #E9E8E3;
	--ark-chart-base:  #C3C2B7;              /* zero line */
	--ark-chart-trend: #B9B8B1;              /* sparkline line */
	--ark-chart-hover: brightness(.85);      /* filter on the hovered mark */
	--ark-heat-0:      #F1F0EC;
	--ark-heat-1:      #CDE2FB;
	--ark-heat-2:      #9EC5F4;
	--ark-heat-3:      #5598E7;
	--ark-heat-4:      #2A78D6;
	--ark-heat-5:      #184F95;
	--ark-tier-1:      #184F95;
	--ark-tier-2:      #3987E5;
	--ark-tier-3:      #86B6EF;
	--ark-on-tier-1:   #FFFFFF;
	--ark-on-tier-2:   #0B0B0B;
	--ark-on-tier-3:   #0B0B0B;

	/* --- Shape --- */
	--ark-radius-card:   14px;
	--ark-radius-panel:  14px;
	--ark-radius-input:  10px;
	--ark-radius-button: 10px;
	--ark-radius-chip:    6px;
	--ark-radius-pill:  999px;

	/* --- Type (CONVENTIONS §1 — kept pixel-exact) --- */
	--ark-font:      ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--ark-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "SF Mono", monospace;

	/* --- Base --- */
	color: var(--ark-ink);
	background: var(--ark-page);
	font-family: var(--ark-font);
	font-size: 14px;
	line-height: 1.45;
}

/* Automatic dark mode — only when the host hasn't forced `data-mode="light"`. */
@media (prefers-color-scheme: dark) {
	[data-theme="arctic"]:not([data-mode="light"]) {
		--ark-ink:         #FAF9F5;
		--ark-text-2:      #DCDBD4;
		--ark-text-3:      #B8B6AF;
		--ark-muted:       #898781;
		--ark-muted-2:     #6D6B67;
		--ark-page:        #0B0B0B;
		--ark-surface:     #1A1A1A;
		--ark-fill-1:      #202020;
		--ark-fill-2:      #262626;
		--ark-fill-3:      #2B2B2B;
		--ark-muted-bg-2:  #262626;
		--ark-line:        rgba(255, 255, 255, .14);
		--ark-line-soft:   rgba(255, 255, 255, .08);
		--ark-line-input:  rgba(255, 255, 255, .28);
		--ark-line-strong: rgba(255, 255, 255, .20);

		--ark-accent:      #6AA8EE;
		--ark-accent-hv:   #4F8DD3;
		--ark-accent-bg:   #15283F;
		--ark-on-accent:   #0B0B0B;
		--ark-link-ink:    #86B4EC;

		--ark-success:     #86D97A;
		--ark-success-ink: #86D97A;
		--ark-success-bg:  #0F2E0A;

		--ark-warning:     #F2C779;
		--ark-warning-bg:  #2F1E04;
		--ark-warn-line:   #5C4210;

		--ark-danger:      #F39A9A;
		--ark-danger-hv:   #B35050;
		--ark-danger-bg:   #2E0D0D;
		--ark-danger-line: #5A1C1C;

		--ark-violet:      #B9A7F2;
		--ark-violet-ink:  #BAA3EC;
		--ark-violet-bg:   #211734;
		--ark-teal:        #7FD6BC;
		--ark-teal-bg:     #0C2A22;
		--ark-media-bg:    #0D1117;
		--ark-on-media:    #FFFFFF;
		--ark-scrim:       rgba(0, 0, 0, .55);
		--ark-shadow-pop:  rgba(0, 0, 0, .55);

		--ark-series-1:    #3987E5;
		--ark-series-2:    #D95926;
		--ark-series-3:    #199E70;
		--ark-series-4:    #C98500;
		--ark-series-rest: #55544F;
		--ark-series-soft: #1C5CAB;
		--ark-chart-grid:  #2C2C2A;
		--ark-chart-base:  #383835;
		--ark-chart-trend: #6D6B67;
		--ark-chart-hover: brightness(1.25);
		--ark-heat-0:      #262626;
		--ark-heat-1:      #184F95;
		--ark-heat-2:      #256ABF;
		--ark-heat-3:      #3987E5;
		--ark-heat-4:      #6DA7EC;
		--ark-heat-5:      #B7D3F6;
		--ark-tier-1:      #9EC5F4;
		--ark-tier-2:      #3987E5;
		--ark-tier-3:      #1C5CAB;
		--ark-on-tier-1:   #0B0B0B;
		--ark-on-tier-2:   #0B0B0B;
		--ark-on-tier-3:   #FFFFFF;
	}
}
/* Forced dark via data attribute. */
[data-theme="arctic"][data-mode="dark"] {
	--ark-ink:         #FAF9F5;
	--ark-text-2:      #DCDBD4;
	--ark-text-3:      #B8B6AF;
	--ark-muted:       #898781;
	--ark-muted-2:     #6D6B67;
	--ark-page:        #0B0B0B;
	--ark-surface:     #1A1A1A;
	--ark-fill-1:      #202020;
	--ark-fill-2:      #262626;
	--ark-fill-3:      #2B2B2B;
	--ark-muted-bg-2:  #262626;
	--ark-line:        rgba(255, 255, 255, .14);
	--ark-line-soft:   rgba(255, 255, 255, .08);
	--ark-line-input:  rgba(255, 255, 255, .28);
	--ark-line-strong: rgba(255, 255, 255, .20);
	--ark-accent:      #6AA8EE;
	--ark-accent-hv:   #4F8DD3;
	--ark-accent-bg:   #15283F;
	--ark-on-accent:   #0B0B0B;
	--ark-link-ink:    #86B4EC;
	--ark-success:     #86D97A;
	--ark-success-ink: #86D97A;
	--ark-success-bg:  #0F2E0A;
	--ark-warning:     #F2C779;
	--ark-warning-bg:  #2F1E04;
	--ark-warn-line:   #5C4210;
	--ark-danger:      #F39A9A;
	--ark-danger-hv:   #B35050;
	--ark-danger-bg:   #2E0D0D;
	--ark-danger-line: #5A1C1C;
	--ark-violet:      #B9A7F2;
	--ark-violet-ink:  #BAA3EC;
	--ark-violet-bg:   #211734;
	--ark-teal:        #7FD6BC;
	--ark-teal-bg:     #0C2A22;
	--ark-media-bg:    #0D1117;
	--ark-on-media:    #FFFFFF;
	--ark-scrim:       rgba(0, 0, 0, .55);
	--ark-shadow-pop:  rgba(0, 0, 0, .55);
	--ark-series-1:    #3987E5;
	--ark-series-2:    #D95926;
	--ark-series-3:    #199E70;
	--ark-series-4:    #C98500;
	--ark-series-rest: #55544F;
	--ark-series-soft: #1C5CAB;
	--ark-chart-grid:  #2C2C2A;
	--ark-chart-base:  #383835;
	--ark-chart-trend: #6D6B67;
	--ark-chart-hover: brightness(1.25);
	--ark-heat-0:      #262626;
	--ark-heat-1:      #184F95;
	--ark-heat-2:      #256ABF;
	--ark-heat-3:      #3987E5;
	--ark-heat-4:      #6DA7EC;
	--ark-heat-5:      #B7D3F6;
	--ark-tier-1:      #9EC5F4;
	--ark-tier-2:      #3987E5;
	--ark-tier-3:      #1C5CAB;
	--ark-on-tier-1:   #0B0B0B;
	--ark-on-tier-2:   #0B0B0B;
	--ark-on-tier-3:   #FFFFFF;
}

/* =====================================================================
 * Typography primitives
 * ===================================================================== */

[data-theme="arctic"] .ark-h1 {
	font-size: 22px; line-height: 1.25; font-weight: 700;
	letter-spacing: -.01em; margin: 0 0 8px;
}
[data-theme="arctic"] .ark-h2 {
	font-size: 18px; line-height: 1.3; font-weight: 700; margin: 0 0 6px;
	color: var(--ark-ink);
}
[data-theme="arctic"] .ark-h3 {
	font-size: 14px; line-height: 1.3; font-weight: 700; margin: 0 0 6px;
	color: var(--ark-ink);
}
[data-theme="arctic"] .ark-sub {
	font-size: 13px; color: var(--ark-text-3); margin: 2px 0 0;
}
[data-theme="arctic"] .ark-sect {
	font-size: 12px; font-weight: 700; letter-spacing: .06em;
	text-transform: uppercase; color: var(--ark-muted);
	margin-bottom: 6px;
}
[data-theme="arctic"] .ark-muted  { color: var(--ark-muted); }
[data-theme="arctic"] .ark-mono   { font-family: var(--ark-font-mono); }

/* =====================================================================
 * Buttons
 * ===================================================================== */

[data-theme="arctic"] .ark-btn {
	min-height: 40px;
	padding: 0 14px;
	display: inline-flex; align-items: center; gap: 8px;
	border-radius: var(--ark-radius-button);
	border: .5px solid var(--ark-line);
	background: var(--ark-surface);
	color: var(--ark-ink);
	font: inherit; font-size: 13px; font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background .12s ease, border-color .12s ease, color .12s ease;
}
[data-theme="arctic"] .ark-btn:hover {
	background: var(--ark-fill-1);
}
[data-theme="arctic"] .ark-btn:focus-visible {
	outline: 2px solid var(--ark-accent);
	outline-offset: 2px;
}
[data-theme="arctic"] .ark-btn--primary {
	border-color: var(--ark-ink);
	background: var(--ark-ink);
	color: var(--ark-page);
}
[data-theme="arctic"] .ark-btn--primary:hover {
	background: var(--ark-text-2);
}
[data-theme="arctic"] .ark-btn--accent {
	border-color: var(--ark-accent);
	background: var(--ark-accent);
	color: #FFF;
}
[data-theme="arctic"] .ark-btn--accent:hover {
	background: var(--ark-accent-hv);
}
[data-theme="arctic"] .ark-btn--danger {
	border-color: var(--ark-danger);
	color: var(--ark-danger);
	background: transparent;
}
[data-theme="arctic"] .ark-btn--danger:hover {
	background: var(--ark-danger-bg);
}
[data-theme="arctic"] .ark-btn--sm {
	min-height: 32px;
	padding: 0 10px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 8px;
}
/* Ghost — no border, no fill, inherits ink. Hover gets a soft fill. */
[data-theme="arctic"] .ark-btn--ghost {
	background: transparent;
	border: 0;
	color: var(--ark-ink);
}
[data-theme="arctic"] .ark-btn--ghost:hover {
	background: var(--ark-fill-1);
}
[data-theme="arctic"] .ark-btn[disabled],
[data-theme="arctic"] .ark-btn.is-disabled {
	opacity: .55; cursor: not-allowed;
}
[data-theme="arctic"] .ark-icon-btn {
	width: 40px; height: 40px;
	display: inline-flex; align-items: center; justify-content: center;
	border: .5px solid var(--ark-line);
	border-radius: var(--ark-radius-button);
	background: var(--ark-surface);
	cursor: pointer;
	color: var(--ark-text-2);
}
[data-theme="arctic"] .ark-icon-btn:hover {
	background: var(--ark-fill-1);
}

/* =====================================================================
 * Inputs + segmented controls
 * ===================================================================== */

[data-theme="arctic"] .ark-input,
[data-theme="arctic"] .ark-select {
	min-height: 40px;
	padding: 0 12px;
	border-radius: var(--ark-radius-input);
	border: .5px solid var(--ark-line-input);
	background: var(--ark-surface);
	color: var(--ark-ink);
	font: inherit; font-size: 13px; font-weight: 500;
	outline: 0;
}
/* Replace the UA select arrow with an arctic chevron. `currentColor`
 * follows the ink/text swap so the chevron reads in both light + dark. */
[data-theme="arctic"] .ark-select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 32px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none' stroke='currentColor' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M6 8l4 4 4-4'/></svg>");
	background-repeat: no-repeat;
	background-position: right 12px center;
}
[data-theme="arctic"] .ark-input:focus,
[data-theme="arctic"] .ark-select:focus {
	border-color: var(--ark-accent);
	box-shadow: 0 0 0 3px var(--ark-accent-bg);
}
[data-theme="arctic"] .ark-input::placeholder { color: var(--ark-muted-2); }
[data-theme="arctic"] .ark-field {
	display: inline-flex; align-items: center; gap: 8px;
	font-size: 13px; color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-seg {
	/* Fiscal segmented-group track rides on --ark-fill-1 (#F6F6F4) — a
	 * shade lighter than --ark-fill-2; keeps the active pill readable
	 * against the surrounding panel surface. */
	display: inline-flex; gap: 2px; padding: 2px;
	border-radius: 12px; background: var(--ark-fill-1);
}
[data-theme="arctic"] .ark-seg button {
	min-height: 36px; padding: 0 12px;
	border: 0; border-radius: 10px;
	background: transparent;
	font: inherit; font-size: 13px; font-weight: 600;
	color: var(--ark-text-3);
	cursor: pointer;
}
[data-theme="arctic"] .ark-seg button[aria-pressed="true"] {
	background: var(--ark-surface);
	color: var(--ark-ink);
	box-shadow: 0 0 0 .5px var(--ark-line);
}

/* =====================================================================
 * Chips
 * ===================================================================== */

[data-theme="arctic"] .ark-chip {
	display: inline-flex; align-items: center;
	height: 22px; padding: 0 8px;
	border-radius: var(--ark-radius-chip);
	font-size: 12px;
	background: var(--ark-fill-1);
	color: var(--ark-text-3);
	white-space: nowrap;
}
[data-theme="arctic"] .ark-chip--blue    { background: var(--ark-accent-bg);  color: var(--ark-accent); }
[data-theme="arctic"] .ark-chip--green   { background: var(--ark-success-bg); color: var(--ark-success); }
[data-theme="arctic"] .ark-chip--amber   { background: var(--ark-warning-bg); color: var(--ark-warning); }
[data-theme="arctic"] .ark-chip--red     { background: var(--ark-danger-bg);  color: var(--ark-danger); }
[data-theme="arctic"] .ark-chip--violet  { background: var(--ark-violet-bg);  color: var(--ark-violet); }
[data-theme="arctic"] .ark-chip--dark    { background: var(--ark-ink);        color: var(--ark-page); }
[data-theme="arctic"] .ark-chip--outline { background: transparent; border: .5px solid var(--ark-line); }

/* Permission-style pill chip (CONVENTIONS §2) — monospace, clickable. */
[data-theme="arctic"] .ark-pchip {
	display: inline-flex; align-items: center;
	padding: 3px 8px;
	border-radius: var(--ark-radius-chip);
	border: .5px solid var(--ark-line);
	background: var(--ark-fill-1);
	color: var(--ark-text-2);
	font: 12px/1 var(--ark-font-mono);
	cursor: pointer;
}
[data-theme="arctic"] .ark-pchip:hover { background: var(--ark-fill-2); }
[data-theme="arctic"] .ark-pchip--deep   { background: #FCE3D9; color: #8A2A0A; border-color: #F2B49C; }
[data-theme="arctic"] .ark-pchip--amber  { background: var(--ark-warning-bg); color: var(--ark-warning); border-color: #F0D29A; }
[data-theme="arctic"] .ark-pchip--red    { background: var(--ark-danger-bg);  color: var(--ark-danger);  border-color: #F3C2C2; }
[data-theme="arctic"] .ark-pchip--yellow { background: #FFF6C7; color: #5C4A00; }

/* =====================================================================
 * Panels, cards, tiles
 * ===================================================================== */

[data-theme="arctic"] .ark-panel,
[data-theme="arctic"] .ark-card {
	padding: 16px 18px;
	border-radius: var(--ark-radius-panel);
	border: .5px solid var(--ark-line);
	background: var(--ark-surface);
}
[data-theme="arctic"] .ark-panel__head,
[data-theme="arctic"] .ark-card__head {
	display: flex; align-items: center; gap: 10px;
	margin-bottom: 10px;
}
/* Title stack first; whatever follows (chips, actions, sync-dot) sits on
   the right edge without each webapp needing its own right-slot wrapper. */
[data-theme="arctic"] .ark-panel__head > :first-child:not(:only-child) {
	margin-right: auto;
}
[data-theme="arctic"] .ark-panel__title,
[data-theme="arctic"] .ark-card__title {
	font-size: 12px; font-weight: 700;
	letter-spacing: .06em; text-transform: uppercase;
	color: var(--ark-ink); /* mocks (STK/ROL) inherit ink, not text-2 */
}
[data-theme="arctic"] .ark-panel__sub,
[data-theme="arctic"] .ark-card__sub {
	font-size: 13px; color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-tiles {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
@media (max-width: 720px) {
	[data-theme="arctic"] .ark-tiles { grid-template-columns: repeat(2, 1fr); }
}
[data-theme="arctic"] .ark-tile {
	padding: 14px 16px;
	border-radius: var(--ark-radius-panel);
	border: .5px solid var(--ark-line);
	background: var(--ark-surface);
}
[data-theme="arctic"] .ark-tile__label {
	/* Mock parity: STK:95 / ROL:81 render tile labels plain 12 px,
	 * not uppercase + letter-spaced. Priority #1 of
	 * arctic-vs-mocks-delta.md. */
	font-size: 12px; color: var(--ark-muted);
}
[data-theme="arctic"] .ark-tile__value {
	font-size: 22px; font-weight: 700; letter-spacing: -.01em;
	font-variant-numeric: tabular-nums;
}
[data-theme="arctic"] .ark-tile__note {
	font-size: 12px; color: var(--ark-muted);
}

/* =====================================================================
 * Tables (soft theme — Registru bonuri look)
 * ===================================================================== */

[data-theme="arctic"] .ark-table {
	width: 100%;
	border-collapse: separate; border-spacing: 0;
	border: .5px solid var(--ark-line);
	border-radius: 10px;
	overflow: hidden;
	font-size: 13px;
}
[data-theme="arctic"] .ark-table th {
	text-align: left; padding: 10px 12px;
	background: var(--ark-fill-1);
	font-weight: 600;
	color: var(--ark-text-2);
	border-bottom: .5px solid var(--ark-line);
	white-space: nowrap;
}
[data-theme="arctic"] .ark-table th.num,
[data-theme="arctic"] .ark-table td.num {
	text-align: right; font-variant-numeric: tabular-nums;
}
[data-theme="arctic"] .ark-table td {
	padding: 9px 12px;
	border-bottom: .5px solid var(--ark-line-soft);
}
[data-theme="arctic"] .ark-table tr:last-child td { border-bottom: 0; }
[data-theme="arctic"] .ark-table tr.total td {
	background: var(--ark-page);
	font-weight: 700;
	border-top: .5px solid var(--ark-line);
}
[data-theme="arctic"] .ark-table tr:hover td {
	background: var(--ark-fill-1);
}

/* =====================================================================
 * Notes / callouts
 * ===================================================================== */

[data-theme="arctic"] .ark-note {
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--ark-accent-bg);
	color: var(--ark-link-ink);
	font-size: 13px;
}
[data-theme="arctic"] .ark-note--info {
	background: var(--ark-accent-bg);
	color: var(--ark-link-ink);
}
[data-theme="arctic"] .ark-note--warning {
	background: var(--ark-warning-bg);
	color: var(--ark-warning-ac);
}
[data-theme="arctic"] .ark-note--danger {
	background: var(--ark-danger-bg);
	color: var(--ark-danger);
}
[data-theme="arctic"] .ark-note--success {
	background: var(--ark-success-bg);
	color: var(--ark-success-ink);
}
[data-theme="arctic"] .ark-callout {
	display: flex; gap: 10px;
	padding: 12px 16px;
	border-radius: 12px;
	background: var(--ark-warning-bg);
	color: var(--ark-warning);
	font-size: 13px;
}

/* =====================================================================
 * Dot indicators
 * ===================================================================== */

[data-theme="arctic"] .ark-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	display: inline-block;
	background: var(--ark-muted-2);
	vertical-align: middle;
}
[data-theme="arctic"] .ark-dot--on       { background: var(--ark-success-dot); }
[data-theme="arctic"] .ark-dot--off      { background: var(--ark-muted-2); }
[data-theme="arctic"] .ark-dot--busy     { background: var(--ark-warning-ac); }
[data-theme="arctic"] .ark-dot--err      { background: var(--ark-danger); }

/* =====================================================================
 * Pager
 * ===================================================================== */

[data-theme="arctic"] .ark-pager {
	display: flex; justify-content: space-between; align-items: center;
	margin-top: 12px;
	font-size: 13px; color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-pager__btns {
	display: flex; gap: 6px;
}
[data-theme="arctic"] .ark-pager__btns span {
	min-width: 36px; height: 36px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 8px;
	border: .5px solid var(--ark-line);
	background: var(--ark-surface);
	font-weight: 600; padding: 0 8px;
}
[data-theme="arctic"] .ark-pager__btns span.on {
	background: var(--ark-ink); color: var(--ark-page);
	border-color: var(--ark-ink);
}

/* =====================================================================
 * Layout helpers
 * ===================================================================== */

[data-theme="arctic"] .ark-main {
	max-width: 1392px;
	margin: 0 auto;
	padding: 24px 24px 40px; /* STK:63 / ROL:55 — extra bottom breathing */
	display: flex; flex-direction: column; gap: 16px;
}
[data-theme="arctic"] .ark-head {
	border-bottom: .5px solid var(--ark-line);
	background: var(--ark-surface);
}
[data-theme="arctic"] .ark-head__in {
	max-width: 1392px; margin: 0 auto;
	padding: 8px 24px;
	display: flex; flex-wrap: wrap;
	align-items: center; gap: 8px 20px;
	min-height: 64px;
}
[data-theme="arctic"] .ark-brand {
	display: flex; align-items: center; gap: 10px;
}
[data-theme="arctic"] .ark-brand__icon {
	width: 32px; height: 32px;
	border-radius: 9px;
	background: var(--ark-accent-bg);
	color: var(--ark-accent);
	display: inline-flex; align-items: center; justify-content: center;
}
[data-theme="arctic"] .ark-brand__text {
	display: flex; flex-direction: column; line-height: 1.25;
}
[data-theme="arctic"] .ark-brand__name {
	font-size: 15px; font-weight: 700;
}
[data-theme="arctic"] .ark-brand__sub {
	font-size: 12px; color: var(--ark-muted);
}
[data-theme="arctic"] .ark-head__side {
	display: flex; align-items: center; gap: 8px; margin-left: auto;
}

/* =====================================================================
 * Feather icon wrapper — use with inline SVG stroke-based icons.
 * ===================================================================== */

[data-theme="arctic"] .ark-feather {
	width: 16px; height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: 0 0 auto;
}
[data-theme="arctic"] .ark-feather--sm { width: 14px; height: 14px; stroke-width: 1.8; }
[data-theme="arctic"] .ark-feather--lg { width: 20px; height: 20px; }

/* =====================================================================
 * Lang switcher — pill, matches auth-service-mock .lang (lines 35-37).
 * Full component CSS lives in modules/elements/lang-switcher/style.css;
 * this is the baseline embeddable in a page without that module.
 * ===================================================================== */

[data-theme="arctic"] .ark-lang {
	display: inline-flex; gap: 2px; padding: 2px;
	border-radius: 10px; background: var(--ark-fill-1);
}
[data-theme="arctic"] .ark-lang button {
	min-width: 38px; height: 32px; padding: 0 8px;
	border: 0; border-radius: 8px;
	background: transparent;
	font: inherit; font-size: 12px; font-weight: 600;
	color: var(--ark-text-3);
	cursor: pointer;
}
[data-theme="arctic"] .ark-lang button[aria-pressed="true"] {
	background: var(--ark-surface);
	color: var(--ark-ink);
	box-shadow: 0 0 0 .5px var(--ark-line);
}

/* =====================================================================
 * Scrollbars — light, matches HoReCa UIMocks §6
 * ===================================================================== */

[data-theme="arctic"] * { scrollbar-width: thin; }
[data-theme="arctic"] *::-webkit-scrollbar { width: 10px; height: 10px; }
[data-theme="arctic"] *::-webkit-scrollbar-thumb {
	background: var(--ark-fill-3); border-radius: 10px;
}

/* =====================================================================
 * ADDITIONS 2026-10-30 — components ported from the reference mocks
 * (auth-service-mock.html + HoReCa UIMocks v1.2.1) that weren't in the
 * first pass but are visibly useful across webapps.
 * ===================================================================== */

/* --- Breadcrumb / back link ---------------------------------------- */
/* auth-service-mock .rp-back line 31 — inline "‹ Previous section". */
[data-theme="arctic"] .ark-back {
	display: inline-flex; align-items: center; gap: 4px;
	color: var(--ark-accent);
	font-size: 13px; font-weight: 600;
	text-decoration: none;
	padding: 6px 8px;
	border-radius: 8px;
}
[data-theme="arctic"] .ark-back:hover { background: var(--ark-fill-1); }

/* --- Toolbar strip under the header ("rp-bar-wrap" from the mock) --- */
[data-theme="arctic"] .ark-bar-wrap {
	border-bottom: .5px solid var(--ark-line);
	background: var(--ark-page);
}
[data-theme="arctic"] .ark-bar {
	max-width: 1392px; margin: 0 auto;
	padding: 12px 24px;
	display: flex; flex-wrap: wrap;
	align-items: center; gap: 10px 12px;
}

/* --- Sync status strip ("last synced at ...") ---------------------- */
[data-theme="arctic"] .ark-sync {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12px; color: var(--ark-muted);
	margin-left: auto;
}

/* --- Sync-dot (freshness indicator — 8-px green dot + 12-px muted
       timestamp label). Simpler drop-in alternative to .ark-sync, used
       next to a `${time} ago` label. */
[data-theme="arctic"] .ark-sync-dot {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12px; color: var(--ark-muted);
}
[data-theme="arctic"] .ark-sync-dot::before {
	content: '';
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--ark-success-dot);
	flex: 0 0 auto;
}

/* --- Search field (inline icon + placeholder) ---------------------- */
[data-theme="arctic"] .ark-search {
	min-width: 220px;
	min-height: 40px;
	padding: 0 10px;
	border-radius: 9px;
	border: .5px solid var(--ark-line-input);
	background: var(--ark-surface);
	color: var(--ark-muted-2);
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 13px;
}
[data-theme="arctic"] .ark-search:focus-within {
	border-color: var(--ark-accent);
	color: var(--ark-ink);
	box-shadow: 0 0 0 3px var(--ark-accent-bg);
}
[data-theme="arctic"] .ark-search > input {
	flex: 1 1 auto; min-width: 0;
	border: 0; background: transparent;
	font: inherit; color: inherit; outline: 0;
}

/* --- Toolbar buttons (small icon+label row above a table) ---------- */
[data-theme="arctic"] .ark-tools {
	display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
[data-theme="arctic"] .ark-tool {
	min-height: 36px;
	padding: 0 12px;
	display: inline-flex; align-items: center; gap: 6px;
	border-radius: 9px;
	border: .5px solid var(--ark-line);
	background: var(--ark-surface);
	color: var(--ark-ink);
	font: inherit; font-size: 13px; font-weight: 600;
	cursor: pointer;
}
[data-theme="arctic"] .ark-tool:hover { background: var(--ark-fill-1); }

/* --- Shortcut link tiles (grid of icon+name+sub tiles) ------------- */
[data-theme="arctic"] .ark-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}
[data-theme="arctic"] .ark-link {
	display: flex; gap: 12px; align-items: flex-start;
	padding: 14px 16px;
	border-radius: 14px;
	border: .5px solid var(--ark-line);
	background: var(--ark-surface);
	color: inherit; text-decoration: none;
}
[data-theme="arctic"] .ark-link:hover {
	box-shadow: 0 1px 6px rgba(11, 11, 11, .08);
}
[data-theme="arctic"] .ark-link__icon {
	width: 36px; height: 36px;
	border-radius: 10px;
	display: inline-flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
}
[data-theme="arctic"] .ark-link__name { font-weight: 700; }
[data-theme="arctic"] .ark-link__sub  { font-size: 12px; color: var(--ark-muted); }

/* --- Tabs (black pill when active) --------------------------------- */
/* auth-service-mock .tabs line 143 */
[data-theme="arctic"] .ark-tabs {
	display: flex; gap: 8px;
}
[data-theme="arctic"] .ark-tabs button {
	min-height: 36px;
	padding: 0 14px;
	border-radius: 9px;
	border: .5px solid var(--ark-line-input);
	background: var(--ark-surface);
	color: var(--ark-ink);
	font: inherit; font-size: 13px; font-weight: 600;
	cursor: pointer;
}
[data-theme="arctic"] .ark-tabs button[aria-pressed="true"] {
	background: var(--ark-ink);
	color: var(--ark-page);
	border-color: var(--ark-ink);
}

/* --- Details / disclosure primitive --------------------------------
 * `.ark-details` wraps a native <details> in a tinted inset; the inline
 * summary renders as an outlined secondary button (button radius, 36px)
 * with a rotating chevron. It flips to the ink paradigm when [open] so a
 * disclosed section carries the same emphasis as any arctic active
 * control. `.ark-details--inline` drops the outer bg/border for use
 * inside dense cells. */
[data-theme="arctic"] .ark-details {
	padding: 10px 12px;
	border-radius: var(--ark-radius-input);
	background: var(--ark-fill-1);
	border: .5px solid var(--ark-line);
}
[data-theme="arctic"] .ark-details > summary {
	list-style: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	min-height: 36px;
	box-sizing: border-box;
	border-radius: var(--ark-radius-button);
	background: var(--ark-surface);
	border: .5px solid var(--ark-line-input);
	color: var(--ark-text-2);
	font-size: 13px;
	font-weight: 600;
	user-select: none;
}
[data-theme="arctic"] .ark-details > summary::-webkit-details-marker { display: none; }
[data-theme="arctic"] .ark-details > summary::before {
	content: "\25B8"; /* ▸ */
	font-size: 10px;
	line-height: 1;
	color: var(--ark-muted);
	transition: transform .15s ease;
}
[data-theme="arctic"] .ark-details[open] > summary::before { transform: rotate(90deg); }
[data-theme="arctic"] .ark-details > summary:hover {
	color: var(--ark-ink);
	background: var(--ark-fill-2);
}
[data-theme="arctic"] .ark-details[open] > summary {
	background: var(--ark-ink);
	color: var(--ark-page);
	border-color: var(--ark-ink);
}
[data-theme="arctic"] .ark-details[open] > summary::before { color: var(--ark-page); }
[data-theme="arctic"] .ark-details > *:not(summary) { margin-top: 10px; }
/* Inline variant — drops the outer inset so the summary lives flush with
 * surrounding cell/row content (table cells, dense toolbars). */
[data-theme="arctic"] .ark-details.ark-details--inline {
	padding: 0;
	background: transparent;
	border: 0;
}

/* --- Account header card (avatar + name + link grid) --------------- */
[data-theme="arctic"] .ark-profile {
	display: flex; gap: 16px; align-items: stretch;
	flex-wrap: wrap;
}
[data-theme="arctic"] .ark-profile__card {
	display: flex; gap: 14px; align-items: center;
	padding: 16px 18px;
	border-radius: 14px;
	border: .5px solid var(--ark-line);
	background: var(--ark-surface);
	min-width: 320px;
	flex: 0 1 auto;
}
[data-theme="arctic"] .ark-profile__avatar {
	width: 52px; height: 52px;
	border-radius: 50%;
	background: var(--ark-accent-bg);
	color: var(--ark-accent);
	display: inline-flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
}
[data-theme="arctic"] .ark-profile__name {
	font-size: 18px; font-weight: 700;
}

/* --- Permission check row + grouped chips -------------------------- */
[data-theme="arctic"] .ark-check-row {
	display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
/* M13.i-r6 — hairline divider between distinct facet-group axes inside
 * long facet strips (Presets, Audit, Variables). Inserted by _lib.js
 * buildTable between facets whose `key` differs. */
[data-theme="arctic"] .ark-chip-group--sep {
	display: inline-block;
	width: 1px; align-self: stretch;
	min-height: 1em;
	margin: 0 4px;
	background: var(--ark-line-soft, var(--ark-line));
}
[data-theme="arctic"] .ark-chip-group { margin-top: 12px; }
[data-theme="arctic"] .ark-chip-group__head {
	display: flex; gap: 8px; align-items: baseline;
	margin-bottom: 6px;
	font-size: 13px;
}
[data-theme="arctic"] .ark-chip-group__head b { font-weight: 700; }
[data-theme="arctic"] .ark-chip-list {
	display: flex; flex-wrap: wrap; gap: 6px;
}

/* --- Table top bar (above table — page info + search) -------------- */
[data-theme="arctic"] .ark-tbl-top {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 10px;
	font-size: 13px; color: var(--ark-text-3);
	gap: 12px;
}

/* --- Firm / company header line ------------------------------------ */
[data-theme="arctic"] .ark-title-strip {
	display: flex; align-items: baseline; gap: 10px;
	margin: 10px 0 2px;
}
[data-theme="arctic"] .ark-title-strip__name { font-size: 15px; font-weight: 700; }
[data-theme="arctic"] .ark-title-strip__meta { font-size: 12px; color: var(--ark-muted); }

/* --- POS card ------------------------------------------------------- */
[data-theme="arctic"] .ark-stat-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
}
[data-theme="arctic"] .ark-stat-card {
	display: flex; flex-direction: column; gap: 8px;
	padding: 14px 16px;
	border-radius: 14px;
	border: .5px solid var(--ark-line);
	background: var(--ark-surface);
}
[data-theme="arctic"] .ark-stat-card__id   { font: 600 13px var(--ark-font-mono); }
[data-theme="arctic"] .ark-stat-card__name { font-size: 15px; font-weight: 700; }
[data-theme="arctic"] .ark-stat-card__meta { font-size: 12px; color: var(--ark-muted); line-height: 1.5; }
[data-theme="arctic"] .ark-stat-card__actions {
	display: flex; flex-wrap: wrap; gap: 8px;
	margin-top: auto; padding-top: 4px;
}

/* --- Product row cell (img + name + mpn) --------------------------- */
[data-theme="arctic"] .ark-media-row {
	display: flex; align-items: center; gap: 10px;
}
[data-theme="arctic"] .ark-media-row__img {
	width: 34px; height: 34px;
	border-radius: 8px;
	background: linear-gradient(135deg, var(--ark-fill-2), var(--ark-fill-3));
	flex: 0 0 auto;
}
[data-theme="arctic"] .ark-media-row__name { font-weight: 600; }
[data-theme="arctic"] .ark-media-row__mpn  { font: 12px var(--ark-font-mono); color: var(--ark-muted); }

/* --- Key/value inline tag (small inline "ip=…|ua=…") --------------- */
[data-theme="arctic"] .ark-kv {
	display: inline-flex; gap: 4px;
	margin: 0 8px 2px 0;
	font-size: 12px;
}
[data-theme="arctic"] .ark-kv__k { color: var(--ark-muted); }

/* --- Keys list (mono tag chips) ------------------------------------ */
[data-theme="arctic"] .ark-keys {
	display: flex; flex-wrap: wrap; gap: 4px;
	margin-bottom: 4px;
}
[data-theme="arctic"] .ark-key {
	font: 11px var(--ark-font-mono);
	padding: 1px 6px;
	border-radius: 5px;
	background: var(--ark-fill-1);
	color: var(--ark-text-3);
}

/* --- Truncated mono value ------------------------------------------ */
[data-theme="arctic"] .ark-val {
	font: 12px var(--ark-font-mono);
	color: var(--ark-text-2);
	max-width: 560px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	display: inline-block; vertical-align: middle;
}

/* --- Document link (accent-colored strong link) -------------------- */
[data-theme="arctic"] .ark-link-strong {
	color: var(--ark-accent);
	font-weight: 600;
	text-decoration: none;
}
[data-theme="arctic"] .ark-link-strong:hover { color: var(--ark-accent-hv); }

/* --- "more" accent inline link ------------------------------------- */
[data-theme="arctic"] .ark-more {
	color: var(--ark-accent);
	font-weight: 600;
	font-size: 12px;
	margin-left: 6px;
	cursor: pointer;
}

/* --- Colored quantities (stock delta) ------------------------------ */
/* `#0A7A0A` + `#A32C2C` are mock-specific (not in CONVENTIONS palette);
    keeping them literal preserves the stock-logger look verbatim. */
[data-theme="arctic"] .ark-delta--up   { color: #0A7A0A; font-weight: 700; }
[data-theme="arctic"] .ark-delta--down  { color: #A32C2C; font-weight: 700; }
[data-theme="arctic"] .ark-delta--zero { color: var(--ark-muted-2); }

/* --- JSON pre block (formatted JSON display) ----------------------- */
[data-theme="arctic"] .ark-json {
	margin: 6px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--ark-fill-1);
	font: 12px/1.5 var(--ark-font-mono);
	white-space: pre-wrap;
}

/* --- Field list block ---------------------------------------------- */
[data-theme="arctic"] .ark-fields {
	font-size: 12px; color: var(--ark-text-3);
	line-height: 1.6;
}
[data-theme="arctic"] .ark-fields b { font-weight: 600; color: var(--ark-ink); }

/* --- Card accents: __key (mono subtitle), __actions row ------------ */
[data-theme="arctic"] .ark-card__key {
	font: 12px var(--ark-font-mono);
	color: var(--ark-muted);
}
[data-theme="arctic"] .ark-card__actions {
	display: flex; flex-wrap: wrap; gap: 8px;
	margin-top: auto; padding-top: 4px;
}

/* --- Guide tooltip popover (floating help panel) ------------------- */
[data-theme="arctic"] .ark-guide {
	position: absolute;
	width: 380px;
	padding: 14px 16px;
	border-radius: 14px;
	border: .5px solid rgba(11, 11, 11, .16);
	background: var(--ark-surface);
	box-shadow: 0 16px 40px rgba(11, 11, 11, .16);
	font-size: 13px;
	color: var(--ark-text-2);
}
[data-theme="arctic"] .ark-guide__head {
	display: flex; justify-content: space-between;
	margin-bottom: 6px;
}

/* --- Action group inline ------------------------------------------- */
[data-theme="arctic"] .ark-acts {
	display: inline-flex; gap: 6px; white-space: nowrap;
}

/* --- Frame window-chrome wrapper (desktop screen preview) ---------- */
[data-theme="arctic"] .ark-frame {
	border-radius: 10px; overflow: hidden;
	box-shadow: 0 2px 18px rgba(0, 0, 0, .12);
	background: var(--ark-surface);
}
[data-theme="arctic"] .ark-frame__title {
	height: 32px;
	display: flex; align-items: center; gap: 8px;
	padding: 0 12px;
	font-size: 13px; color: var(--ark-text-2);
	background: var(--ark-fill-1);
	border-bottom: 1px solid var(--ark-line);
}

/* --- HoReCa flag chips (CONVENTIONS §2 explicit colors) ------------ */
/* Service: #863311 pe #F8E9E2 — ribbon-like */
[data-theme="arctic"] .ark-chip--service { background: #F8E9E2; color: #863311; }
/* Place: #065F49 pe #DCF2EA */
[data-theme="arctic"] .ark-chip--place   { background: #DCF2EA; color: #065F49; }
/* Person: #4A3AA7 pe #EBEAFE */
[data-theme="arctic"] .ark-chip--person  { background: #EBEAFE; color: #4A3AA7; }

/* --- Catchips (category filter chips, taller than default) --------- */
[data-theme="arctic"] .ark-catchips .ark-chip {
	height: 30px; padding: 0 10px; font-size: 13px; cursor: pointer;
}

/* --- Save-state strip (header right status line) ------------------- */
[data-theme="arctic"] .ark-status {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12px; color: var(--ark-muted);
}
[data-theme="arctic"] .ark-status--busy  { color: var(--ark-warning-ac); }
[data-theme="arctic"] .ark-status--err   { color: var(--ark-danger); }
[data-theme="arctic"] .ark-status--saved { color: var(--ark-success); }

/* =====================================================================
 * FORM CONTROLS 2026-10-30 — checkbox, radio, toggle, slider, textarea,
 * number spinner. All use the arctic palette; all accessible (keep the
 * native input in the DOM, visually hidden but focusable).
 * ===================================================================== */

/* --- Checkbox ------------------------------------------------------ */
[data-theme="arctic"] .ark-check {
	display: inline-flex; align-items: center; gap: 8px;
	cursor: pointer;
	font-size: 13px;
	user-select: none;
	position: relative;
}
[data-theme="arctic"] .ark-check input[type="checkbox"] {
	position: absolute; opacity: 0;
	width: 18px; height: 18px;
	margin: 0; cursor: pointer;
}
[data-theme="arctic"] .ark-check__box {
	width: 18px; height: 18px;
	border-radius: 4px;
	border: 1px solid var(--ark-line-input);
	background: var(--ark-surface);
	display: inline-flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
	transition: background .12s ease, border-color .12s ease;
	position: relative;
}
[data-theme="arctic"] .ark-check input:checked ~ .ark-check__box {
	background: var(--ark-ink);
	border-color: var(--ark-ink);
}
[data-theme="arctic"] .ark-check input:checked ~ .ark-check__box::after {
	content: '';
	width: 12px; height: 12px;
	background: no-repeat center/100% url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}
[data-theme="arctic"] .ark-check input:indeterminate ~ .ark-check__box {
	background: var(--ark-ink);
	border-color: var(--ark-ink);
}
[data-theme="arctic"] .ark-check input:indeterminate ~ .ark-check__box::after {
	content: ''; width: 10px; height: 2px; background: #fff; border-radius: 1px;
}
[data-theme="arctic"] .ark-check:hover .ark-check__box { border-color: var(--ark-accent); }
[data-theme="arctic"] .ark-check input:focus-visible ~ .ark-check__box {
	outline: 2px solid var(--ark-accent);
	outline-offset: 2px;
}
[data-theme="arctic"] .ark-check input:disabled ~ .ark-check__box {
	opacity: .5; cursor: not-allowed;
}
/* Accent-filled variant (uses accent instead of ink for checked bg) */
[data-theme="arctic"] .ark-check--accent input:checked ~ .ark-check__box {
	background: var(--ark-accent);
	border-color: var(--ark-accent);
}

/* --- Radio --------------------------------------------------------- */
[data-theme="arctic"] .ark-radio {
	display: inline-flex; align-items: center; gap: 8px;
	cursor: pointer;
	font-size: 13px;
	user-select: none;
	position: relative;
}
[data-theme="arctic"] .ark-radio input[type="radio"] {
	position: absolute; opacity: 0;
	width: 18px; height: 18px;
	margin: 0; cursor: pointer;
}
[data-theme="arctic"] .ark-radio__dot {
	width: 18px; height: 18px;
	border-radius: 50%;
	border: 1px solid var(--ark-line-input);
	background: var(--ark-surface);
	display: inline-flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
	transition: border-color .12s ease;
}
[data-theme="arctic"] .ark-radio input:checked ~ .ark-radio__dot {
	border-color: var(--ark-ink);
}
[data-theme="arctic"] .ark-radio input:checked ~ .ark-radio__dot::after {
	content: '';
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--ark-ink);
}
[data-theme="arctic"] .ark-radio:hover .ark-radio__dot { border-color: var(--ark-accent); }
[data-theme="arctic"] .ark-radio input:focus-visible ~ .ark-radio__dot {
	outline: 2px solid var(--ark-accent);
	outline-offset: 2px;
}
[data-theme="arctic"] .ark-radio input:disabled ~ .ark-radio__dot {
	opacity: .5; cursor: not-allowed;
}

/* --- Toggle switch ------------------------------------------------- */
[data-theme="arctic"] .ark-toggle {
	display: inline-flex; align-items: center; gap: 10px;
	cursor: pointer;
	font-size: 13px;
	user-select: none;
	position: relative;
}
[data-theme="arctic"] .ark-toggle input[type="checkbox"] {
	position: absolute; opacity: 0;
	width: 40px; height: 24px;
	margin: 0; cursor: pointer;
}
[data-theme="arctic"] .ark-toggle__track {
	width: 40px; height: 24px;
	border-radius: 999px;
	background: var(--ark-fill-3);
	border: .5px solid var(--ark-line);
	position: relative;
	flex: 0 0 auto;
	transition: background .18s ease, border-color .18s ease;
}
[data-theme="arctic"] .ark-toggle__thumb {
	position: absolute;
	top: 2px; left: 2px;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--ark-surface);
	box-shadow: 0 1px 2px rgba(11, 11, 11, .25);
	transition: transform .18s cubic-bezier(.4, 0, .2, 1);
}
[data-theme="arctic"] .ark-toggle input:checked ~ .ark-toggle__track {
	background: var(--ark-accent);
	border-color: var(--ark-accent);
}
[data-theme="arctic"] .ark-toggle input:checked ~ .ark-toggle__track .ark-toggle__thumb {
	transform: translateX(16px);
}
[data-theme="arctic"] .ark-toggle input:focus-visible ~ .ark-toggle__track {
	outline: 2px solid var(--ark-accent);
	outline-offset: 2px;
}
[data-theme="arctic"] .ark-toggle input:disabled ~ .ark-toggle__track {
	opacity: .5; cursor: not-allowed;
}
/* Danger variant — accents to danger (red) when ON */
[data-theme="arctic"] .ark-toggle--danger input:checked ~ .ark-toggle__track {
	background: var(--ark-danger);
	border-color: var(--ark-danger);
}
/* Size variant — smaller for inline-dense UIs */
[data-theme="arctic"] .ark-toggle--sm input[type="checkbox"],
[data-theme="arctic"] .ark-toggle--sm .ark-toggle__track { width: 32px; height: 18px; }
[data-theme="arctic"] .ark-toggle--sm .ark-toggle__thumb { width: 14px; height: 14px; top: 1px; left: 1px; }
[data-theme="arctic"] .ark-toggle--sm input:checked ~ .ark-toggle__track .ark-toggle__thumb {
	transform: translateX(14px);
}

/* --- Textarea ------------------------------------------------------ */
[data-theme="arctic"] .ark-textarea {
	display: block; width: 100%;
	min-height: 80px;
	padding: 10px 12px;
	border-radius: var(--ark-radius-input);
	border: .5px solid var(--ark-line-input);
	background: var(--ark-surface);
	color: var(--ark-ink);
	font: inherit; font-size: 13px; line-height: 1.45;
	outline: 0;
	resize: vertical;
}
[data-theme="arctic"] .ark-textarea::placeholder { color: var(--ark-muted-2); }
[data-theme="arctic"] .ark-textarea:focus {
	border-color: var(--ark-accent);
	box-shadow: 0 0 0 3px var(--ark-accent-bg);
}

/* --- Range slider -------------------------------------------------- */
[data-theme="arctic"] .ark-slider {
	-webkit-appearance: none; appearance: none;
	width: 100%; height: 6px;
	border-radius: 999px;
	background: var(--ark-fill-3);
	outline: 0;
	cursor: pointer;
}
[data-theme="arctic"] .ark-slider::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--ark-ink);
	border: 2px solid var(--ark-surface);
	box-shadow: 0 1px 3px rgba(11, 11, 11, .25);
	cursor: pointer;
	transition: transform .12s ease;
}
[data-theme="arctic"] .ark-slider::-webkit-slider-thumb:hover { transform: scale(1.1); }
[data-theme="arctic"] .ark-slider::-moz-range-thumb {
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--ark-ink);
	border: 2px solid var(--ark-surface);
	box-shadow: 0 1px 3px rgba(11, 11, 11, .25);
	cursor: pointer;
}
[data-theme="arctic"] .ark-slider:focus-visible {
	box-shadow: 0 0 0 3px var(--ark-accent-bg);
}
[data-theme="arctic"] .ark-slider--accent::-webkit-slider-thumb { background: var(--ark-accent); }
[data-theme="arctic"] .ark-slider--accent::-moz-range-thumb     { background: var(--ark-accent); }

/* --- Number spinner (input + +/- buttons flanking it) -------------- */
[data-theme="arctic"] .ark-number {
	display: inline-flex; align-items: stretch;
	border: .5px solid var(--ark-line-input);
	border-radius: var(--ark-radius-input);
	overflow: hidden;
	background: var(--ark-surface);
}
[data-theme="arctic"] .ark-number:focus-within {
	border-color: var(--ark-accent);
	box-shadow: 0 0 0 3px var(--ark-accent-bg);
}
[data-theme="arctic"] .ark-number input {
	border: 0; background: transparent;
	width: 72px; min-height: 36px;
	padding: 0 6px;
	text-align: center;
	font: inherit; font-size: 13px; font-weight: 600;
	color: var(--ark-ink);
	outline: 0;
	font-variant-numeric: tabular-nums;
	/* hide native spinners — we provide our own */
	-moz-appearance: textfield;
	appearance: textfield;
}
[data-theme="arctic"] .ark-number input::-webkit-outer-spin-button,
[data-theme="arctic"] .ark-number input::-webkit-inner-spin-button {
	-webkit-appearance: none; appearance: none; margin: 0;
}
[data-theme="arctic"] .ark-number button {
	min-width: 32px;
	padding: 0;
	border: 0;
	background: var(--ark-fill-1);
	color: var(--ark-text-2);
	font: inherit; font-size: 16px; font-weight: 600; line-height: 1;
	cursor: pointer;
}
[data-theme="arctic"] .ark-number button:hover { background: var(--ark-fill-2); color: var(--ark-ink); }
[data-theme="arctic"] .ark-number button:first-child { border-right: .5px solid var(--ark-line); }
[data-theme="arctic"] .ark-number button:last-child  { border-left:  .5px solid var(--ark-line); }
[data-theme="arctic"] .ark-number button:disabled { opacity: .4; cursor: not-allowed; }

/* --- Fieldset-style group label ------------------------------------ */
[data-theme="arctic"] .ark-fs {
	display: flex; flex-direction: column; gap: 6px;
}
[data-theme="arctic"] .ark-fs > label {
	font-size: 12px; font-weight: 700;
	letter-spacing: .04em; text-transform: uppercase;
	color: var(--ark-muted);
}

/* --- Switch group (vertical stack of toggles) ---------------------- */
[data-theme="arctic"] .ark-switch-group {
	display: flex; flex-direction: column; gap: 10px;
	padding: 12px 14px;
	border-radius: 12px;
	border: .5px solid var(--ark-line);
	background: var(--ark-surface);
}

/* =====================================================================
 * ADDITIONS 2026-10-30 (second sweep) — components mined from
 * roles-mock.html + stock-logger-mock.html + sgapps-studio UIMocks.
 * Focus: dialog shell, diff rows, source badges, system/rule lists,
 * category tree picker, link-styled buttons, callout color variants.
 * ===================================================================== */

/* --- Dialog / modal shell (roles-mock .dlg) ----------------------- */
[data-theme="arctic"] .ark-backdrop {
	position: fixed; inset: 0;
	background: rgba(11, 11, 11, .32);
	padding: 28px;
	display: flex; align-items: center; justify-content: center;
	z-index: 2147483500;
}

/* --- Overlay (full-viewport scrim at 80% ink, grid-centered). Lower
       z-index than .ark-backdrop; place-items:center auto-centers one
       child (dialog, spinner, confirmation card). */
[data-theme="arctic"] .ark-overlay {
	position: fixed; inset: 0;
	background: color-mix(in srgb, var(--ark-ink) 80%, transparent);
	z-index: 1000;
	display: grid; place-items: center;
}
[data-theme="arctic"] .ark-dialog {
	border-radius: 14px;
	background: var(--ark-surface);
	box-shadow: 0 16px 40px rgba(11, 11, 11, .2);
	overflow: hidden;
	max-width: 560px; width: 100%;
	display: flex; flex-direction: column;
	max-height: 90vh;
}
[data-theme="arctic"] .ark-dialog--lg { max-width: 820px; }
[data-theme="arctic"] .ark-dialog--sm { max-width: 400px; }
[data-theme="arctic"] .ark-dialog__head {
	padding: 16px 18px 4px;
	flex: 0 0 auto;
}
[data-theme="arctic"] .ark-dialog__title {
	font-size: 16px; font-weight: 700;
	color: var(--ark-ink);
}
[data-theme="arctic"] .ark-dialog__sub {
	font-size: 13px; color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-dialog__body {
	padding: 10px 18px 14px;
	display: flex; flex-direction: column; gap: 10px;
	font-size: 13px;
	overflow-y: auto;
	flex: 1 1 auto;
}
[data-theme="arctic"] .ark-dialog__foot {
	display: flex; justify-content: flex-end; gap: 8px;
	padding: 12px 18px;
	border-top: .5px solid var(--ark-line);
	background: var(--ark-page);
	flex: 0 0 auto;
}

/* --- Link-styled button (text-only, no border/background) --------- */
[data-theme="arctic"] .ark-link-btn {
	border: 0; background: transparent;
	color: var(--ark-accent);
	font: inherit; font-size: 12px; font-weight: 600;
	padding: 2px 4px;
	white-space: nowrap;
	cursor: pointer;
}
[data-theme="arctic"] .ark-link-btn:hover { color: var(--ark-accent-hv); }
[data-theme="arctic"] .ark-link-btn--red { color: var(--ark-danger); }
[data-theme="arctic"] .ark-link-btn--red:hover { color: #6E1F1F; }
[data-theme="arctic"] .ark-link-btn--muted { color: var(--ark-muted); }

/* --- System item list (allowed/denied bullet rows) ---------------- */
[data-theme="arctic"] .ark-mono-list {
	display: flex; flex-direction: column; gap: 2px;
}
[data-theme="arctic"] .ark-mono-item {
	display: flex; align-items: center; gap: 6px;
	padding: 3px 6px;
	border-radius: 8px;
	font: 12px var(--ark-font-mono);
	color: var(--ark-ink);
}
[data-theme="arctic"] .ark-mono-item:hover { background: var(--ark-fill-1); }
[data-theme="arctic"] .ark-mono-item__name {
	flex: 1; min-width: 0;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
[data-theme="arctic"] .ark-mono-item--denied .ark-mono-item__name {
	text-decoration: line-through;
	color: var(--ark-muted-2);
}

/* --- Source badges (compact origin indicators) -------------------- */
[data-theme="arctic"] .ark-badge-mini {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 16px; height: 16px;
	padding: 0 3px;
	border-radius: 4px;
	font: 700 10px system-ui, sans-serif;
}
[data-theme="arctic"] .ark-badge-mini--accent { background: var(--ark-accent-bg);  color: #1C4F8F; }
[data-theme="arctic"] .ark-badge-mini--success { background: var(--ark-success-bg); color: #1F6B2A; }
[data-theme="arctic"] .ark-badge-mini--danger { background: var(--ark-danger-bg);  color: var(--ark-danger); }
[data-theme="arctic"] .ark-badge-mini-legend {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 12px; color: var(--ark-muted);
}

/* --- Diff rows (code/config change display) ----------------------- */
[data-theme="arctic"] .ark-diff {
	display: flex; flex-direction: column; gap: 6px;
	font: 12px var(--ark-font-mono);
}
[data-theme="arctic"] .ark-diff-row {
	display: grid;
	/* 4-col variant: handle · kind-select · main body · action group.
	 * ROL:131 permission editor uses the kind-select slot. */
	grid-template-columns: 18px minmax(0, 118px) 1fr auto;
	gap: 8px; align-items: start;
	padding: 8px 10px;
	border-radius: 10px;
	border: .5px solid var(--ark-line);
	border-left: 3px solid transparent;
	background: var(--ark-surface);
	color: var(--ark-ink);
}
[data-theme="arctic"] .ark-diff-row--new     { border-left-color: var(--ark-success-dot); }
[data-theme="arctic"] .ark-diff-row--changed { border-left-color: #E3A21A; }
[data-theme="arctic"] .ark-diff-row--warn    { background: #FFFBEA; }
[data-theme="arctic"] .ark-diff-row--deny    { background: #FEF7F7; border-left-color: var(--ark-danger); }
[data-theme="arctic"] .ark-diff-row--comment { background: var(--ark-page); color: var(--ark-muted); }
[data-theme="arctic"] .ark-diff__add { color: var(--ark-success); }
[data-theme="arctic"] .ark-diff__del { color: var(--ark-danger); text-decoration: line-through; }
[data-theme="arctic"] .ark-diff__handle {
	color: var(--ark-muted-2);
	padding-top: 8px; text-align: center;
	cursor: grab;
	letter-spacing: -2px;
}

/* --- Callout color variants (CONVENTIONS §3 + roles-mock) --------- */
/* I shipped a base .ark-callout earlier (warning tone). Here are
   the amber/blue/red variants that mirror the mocks' palette. */
[data-theme="arctic"] .ark-callout--blue {
	background: var(--ark-accent-bg);
	color: var(--ark-accent-hv);
}
[data-theme="arctic"] .ark-callout--amber {
	background: var(--ark-warning-bg);
	color: var(--ark-warning);
}
[data-theme="arctic"] .ark-callout--red {
	background: var(--ark-danger-bg);
	color: var(--ark-danger);
}
[data-theme="arctic"] .ark-callout--success {
	background: var(--ark-success-bg);
	color: var(--ark-success);
}

/* --- Rule list (compact row picker, .rl* from roles-mock) --------- */
[data-theme="arctic"] .ark-item-list {
	display: flex; flex-direction: column; gap: 2px;
	max-height: 60vh;
	overflow: auto;
}
[data-theme="arctic"] .ark-item-list__group {
	margin: 12px 0 4px;
	font-size: 11px; font-weight: 700;
	letter-spacing: .06em; text-transform: uppercase;
	color: var(--ark-muted);
}
[data-theme="arctic"] .ark-item-list__item {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px 8px;
	padding: 8px 10px;
	border-radius: 10px;
	cursor: pointer;
	color: var(--ark-ink);
}
[data-theme="arctic"] .ark-item-list__item:hover { background: var(--ark-fill-1); }
[data-theme="arctic"] .ark-item-list__item.is-active {
	background: var(--ark-ink);
	color: var(--ark-page);
}
[data-theme="arctic"] .ark-item-list__item.is-active .ark-item-list__meta { color: var(--ark-fill-3); }
[data-theme="arctic"] .ark-item-list__name {
	font: 600 13px var(--ark-font-mono);
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
[data-theme="arctic"] .ark-item-list__src {
	display: inline-flex; gap: 3px;
	justify-self: end; align-self: center;
}
[data-theme="arctic"] .ark-item-list__meta {
	grid-column: 1 / -1;
	font-size: 12px; color: var(--ark-muted);
}
[data-theme="arctic"] .ark-item-list__item--nofile .ark-item-list__name {
	color: var(--ark-danger);
}

/* --- Rule header (icon + name + file list + actions) -------------- */
[data-theme="arctic"] .ark-detail-head {
	display: flex; align-items: flex-start; gap: 14px;
}
[data-theme="arctic"] .ark-detail-head__icon {
	width: 44px; height: 44px;
	border-radius: 12px;
	background: var(--ark-accent-bg);
	color: var(--ark-accent);
	display: inline-flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
}
[data-theme="arctic"] .ark-detail-head__name {
	font: 700 18px var(--ark-font-mono);
}
[data-theme="arctic"] .ark-detail-head__files {
	margin-top: 4px;
	display: flex; flex-direction: column; gap: 2px;
	font-size: 12px; color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-detail-head__actions {
	margin-left: auto;
	display: flex; gap: 8px; align-items: center;
}

/* --- Category tree picker (nested item list) ---------------------- */
[data-theme="arctic"] .ark-tree {
	display: flex; flex-direction: column; gap: 2px;
	max-height: 280px; overflow: auto;
	border: .5px solid var(--ark-line);
	border-radius: 10px;
	padding: 4px;
	background: var(--ark-surface);
}
[data-theme="arctic"] .ark-tree__group {
	font-size: 11px; font-weight: 700;
	letter-spacing: .06em; text-transform: uppercase;
	color: var(--ark-muted);
	padding: 8px 8px 2px;
}
[data-theme="arctic"] .ark-tree__item {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 1px 8px;
	padding: 6px 8px;
	border-radius: 8px;
	cursor: pointer;
}
[data-theme="arctic"] .ark-tree__item:hover { background: var(--ark-fill-1); }
[data-theme="arctic"] .ark-tree__item.is-active {
	background: var(--ark-accent-bg);
	color: var(--ark-accent);
}
[data-theme="arctic"] .ark-tree__name {
	font: 600 12px var(--ark-font-mono);
}
[data-theme="arctic"] .ark-tree__params {
	font: 11px var(--ark-font-mono);
	color: var(--ark-muted);
	justify-self: end;
}

/* --- Pchip extras (denied / dashed / with __name+__src breakdown) - */
[data-theme="arctic"] .ark-pchip--denied {
	opacity: .65;
}
[data-theme="arctic"] .ark-pchip--denied .ark-pchip__name {
	text-decoration: line-through;
}
[data-theme="arctic"] .ark-pchip--line {
	background: var(--ark-surface);
	border-style: dashed;
}
[data-theme="arctic"] .ark-pchip__name { font-weight: 700; }
[data-theme="arctic"] .ark-pchip__src {
	display: inline-flex; gap: 2px; margin-left: 4px;
}

/* --- Role chip (compact selectable role tag) ---------------------- */
[data-theme="arctic"] .ark-tag {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 4px 10px;
	border-radius: var(--ark-radius-chip);
	background: var(--ark-fill-1);
	color: var(--ark-text-3);
	font: 600 12px var(--ark-font-mono);
	cursor: pointer;
	border: .5px solid var(--ark-line);
}
[data-theme="arctic"] .ark-tag:hover { background: var(--ark-fill-2); }
[data-theme="arctic"] .ark-tag.is-active {
	background: var(--ark-ink);
	color: var(--ark-page);
	border-color: var(--ark-ink);
}

/* --- Layout wraps (sgapps-studio style) --------------------------- */
[data-theme="arctic"] .ark-wrap {
	padding: 24px 32px 80px;
}
[data-theme="arctic"] .ark-intro {
	max-width: 980px;
	color: var(--ark-text-2);
	margin: 0 0 18px;
}
[data-theme="arctic"] .ark-top-in {
	display: flex; flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	padding: 12px 32px;
}

/* --- Responsive visibility helpers -------------------------------- */
[data-theme="arctic"] .ark-only-desktop { display: initial; }
[data-theme="arctic"] .ark-only-mobile  { display: none; }
@media (max-width: 768px) {
	[data-theme="arctic"] .ark-only-desktop { display: none; }
	[data-theme="arctic"] .ark-only-mobile  { display: initial; }
}

/* --- Version badge (small text pill, "v1.4.191") ------------------ */
[data-theme="arctic"] .ark-ver {
	display: inline-flex; align-items: center;
	padding: 2px 6px;
	border-radius: 4px;
	background: var(--ark-fill-1);
	color: var(--ark-muted);
	font: 11px var(--ark-font-mono);
}

/* --- Editor row (compact single-line rule row with grab handle) --- */
[data-theme="arctic"] .ark-token-pill {
	min-height: 34px;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 0 10px;
	border-radius: 8px;
	border: .5px solid var(--ark-line-input);
	background: var(--ark-fill-1);
	font: 600 12px var(--ark-font-mono);
	color: var(--ark-ink);
	white-space: nowrap;
}
[data-theme="arctic"] .ark-token-pill--amber {
	background: var(--ark-warning-bg);
	color: var(--ark-warning);
	border-color: #F0D29A;
}
[data-theme="arctic"] .ark-token-pill--danger {
	background: var(--ark-danger-bg);
	color: var(--ark-danger);
	border-color: #F3C2C2;
}

/* --- Editor compact input (used in rule editor) ------------------- */
[data-theme="arctic"] .ark-mono-input {
	min-height: 34px;
	display: inline-flex; align-items: center;
	padding: 0 8px;
	border-radius: 8px;
	border: .5px solid var(--ark-line-input);
	background: var(--ark-surface);
	font: 12px var(--ark-font-mono);
	color: var(--ark-ink);
	min-width: 180px;
}
[data-theme="arctic"] .ark-mono-input--placeholder { color: var(--ark-muted-2); }
[data-theme="arctic"] .ark-mono-input--wide { width: 100%; }

/* --- Icon-only compact button (32px floor — ergonomic icon-only minimum) */
[data-theme="arctic"] .ark-ibtn {
	width: 32px; height: 32px;
	border-radius: 8px;
	border: .5px solid var(--ark-line);
	background: var(--ark-surface);
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--ark-text-3);
	font: inherit; font-size: 13px;
	cursor: pointer;
}
[data-theme="arctic"] .ark-ibtn:hover { background: var(--ark-fill-1); color: var(--ark-ink); }

/* --- Scrollable area wrapper (nice bg + inner padding) ------------ */
[data-theme="arctic"] .ark-scroll {
	overflow: auto;
	padding: 2px;
	border-radius: 8px;
	background: var(--ark-page);
}

/* --- Radio card (pickable tile with label + description) ---------- *
 * Pattern: <label class="ark-radio-card [is-active]">
 *            <input type="radio" name="…">
 *            <span class="ark-radio-card__label">Title</span>
 *            <span class="ark-radio-card__desc">One-line hint</span>
 *          </label>
 * Multiple cards side-by-side via flex-wrap on their container.         */
[data-theme="arctic"] .ark-radio-card {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 14px;
	min-width: 180px;
	border: .5px solid var(--ark-line);
	border-radius: 10px;
	background: var(--ark-surface);
	cursor: pointer;
	transition: border-color .12s ease, background .12s ease;
	position: relative;
	padding-left: 38px;
}
[data-theme="arctic"] .ark-radio-card:hover {
	border-color: var(--ark-accent);
	background: var(--ark-fill-1);
}
[data-theme="arctic"] .ark-radio-card.is-active {
	border-color: var(--ark-accent);
	background: var(--ark-accent-bg);
}
[data-theme="arctic"] .ark-radio-card > input[type="radio"] {
	position: absolute;
	left: 14px;
	top: 14px;
	accent-color: var(--ark-accent);
	width: 16px; height: 16px;
	margin: 0;
	cursor: pointer;
}
[data-theme="arctic"] .ark-radio-card__label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	line-height: 1.3;
	color: var(--ark-ink);
}
[data-theme="arctic"] .ark-radio-card__label > strong {
	font-weight: 600;
}
[data-theme="arctic"] .ark-radio-card__desc {
	font-size: 11.5px;
	line-height: 1.4;
	color: var(--ark-muted);
}
[data-theme="arctic"] .ark-radio-card.is-active .ark-radio-card__desc {
	color: var(--ark-text-2);
}


/* ============================================================
 * .ark-shell — webapp host class (M6.7.b.1, D28)
 *
 * Opt-in replacement for `.rr-bg-regular`. Any webapp root (<sgapps-
 * sgapps-bridge-manager>, <sgapps-pulsar>, future webapps) adds
 * BOTH `data-theme="arctic"` AND `.ark-shell` to:
 *   - raise the specificity of arctic rules over regal-royal's global
 *     `.rr-bg-regular button/input/select/textarea` cascade (lines
 *     1178, 1191, 1315 of addons/RegalRoyal/styles/less/regal-royal.
 *     less) so our form controls actually render the way we style
 *     them;
 *   - set the body font-size + line-height per CONVENTIONS §1
 *     (14 px base, 1.45 line-height, system-ui stack);
 *   - reset form controls to inherit font/color from the shell so
 *     Arial 11 px defaults don't leak back in.
 *
 * `.ark-shell` MUST sit on an element that also has
 * `data-theme="arctic"`. The combined `[data-theme="arctic"]
 * .ark-shell` scope keeps non-arctic apps unaffected.
 * ============================================================ */

[data-theme="arctic"].ark-shell,
[data-theme="arctic"] .ark-shell {
	font-family: var(--ark-font);
	font-size:   14px;
	line-height: 1.45;
	color:       var(--ark-ink);
	background:  var(--ark-page);
}

/* Form-control reset — the real reason .ark-shell exists.
 * Specificity (0,2,1) wins over regal-royal's (0,1,1) `.rr-bg-regular
 * button`. We only normalize font + color + box-sizing here; the
 * actual visual (bg, border, radius, padding) comes from `.ark-btn`,
 * `.ark-input`, etc. — webapps that still render bare `<input>` get
 * at least the arctic typography. */
/* `:where()` keeps specificity at 0,0,0 — webapp-class rules
 * (`.sgapps-pulsar-url`, `.ark-ab-btn`, etc.) at (0,1,0)
 * can override every property we touch here. Without `:where`,
 * the attribute+class selector would land at (0,2,1) and swallow
 * webapp borders / backgrounds. */
:where([data-theme="arctic"].ark-shell button,
       [data-theme="arctic"] .ark-shell button,
       [data-theme="arctic"].ark-shell input,
       [data-theme="arctic"] .ark-shell input,
       [data-theme="arctic"].ark-shell select,
       [data-theme="arctic"] .ark-shell select,
       [data-theme="arctic"].ark-shell textarea,
       [data-theme="arctic"] .ark-shell textarea) {
	font-family: inherit;
	font-size:   inherit;
	line-height: inherit;
	box-sizing:  border-box;
	/* Kill regal-royal's `.less-gradient` cascade on bare controls
	 * (`regal-royal.less:1336-1448`) so arctic classes can reassert
	 * their own borders. Any webapp class that sets `background-image`
	 * or `border-color` wins against this zero-specificity reset. */
	background-image: none;
	border-color:     transparent;
}

/* ============================================================
 * Lang / Seg / Tabs — explicit hover + aria-pressed overrides
 * (arctic-vs-mocks-delta.md Specific focus §1).
 * The regal-royal `button:hover` rule (`regal-royal.less:1373`)
 * re-paints a gradient at (0,1,1); we neutralise it with
 * attribute+class specificity (0,2,2) so arctic surfaces win.
 * ============================================================ */

[data-theme="arctic"] .ark-lang button:hover,
[data-theme="arctic"] .ark-seg  button:hover {
	background: transparent;
	background-image: none;
	color: var(--ark-ink);
}
[data-theme="arctic"] .ark-lang button[aria-pressed="true"]:hover,
[data-theme="arctic"] .ark-lang button[aria-pressed="true"]:active,
[data-theme="arctic"] .ark-seg  button[aria-pressed="true"]:hover,
[data-theme="arctic"] .ark-seg  button[aria-pressed="true"]:active {
	background: var(--ark-surface);
	background-image: none;
	color: var(--ark-ink);
	box-shadow: 0 0 0 .5px var(--ark-line);
}
/* .ark-tabs are standalone outlined buttons with an ink pill when pressed
 * (not a track like .ark-seg / .ark-lang), so hover follows .ark-btn /
 * .ark-btn--primary — the shared rule above flipped the active tab white
 * and dropped the idle tab's surface. */
[data-theme="arctic"] .ark-tabs button:hover {
	background: var(--ark-fill-1);
	background-image: none;
	color: var(--ark-ink);
}
[data-theme="arctic"] .ark-tabs button[aria-pressed="true"]:hover,
[data-theme="arctic"] .ark-tabs button[aria-pressed="true"]:active {
	background: var(--ark-text-2);
	background-image: none;
	color: var(--ark-page);
	border-color: var(--ark-text-2);
}

/* ============================================================
 * .ark-nav — top-level section nav primitive (NEW, 2026-11-01)
 *
 * 44 px pill container, white-on-fill-1 active. Source: FIS/Main.dc:30-39
 * section nav. Use for primary section tabs; `.ark-tabs` stays
 * for secondary black-pill tabs.
 * ============================================================ */

[data-theme="arctic"] .ark-nav {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 2px;
	padding: 2px;
	background: var(--ark-fill-1);
	border-radius: 12px;
}
[data-theme="arctic"] .ark-nav a,
[data-theme="arctic"] .ark-nav button {
	min-height: 44px;
	padding: 0 14px;
	display: inline-flex;
	align-items: center;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: var(--ark-text-3);
	border: 0;
	background: transparent;
	cursor: pointer;
}
[data-theme="arctic"] .ark-nav a[aria-current="page"],
[data-theme="arctic"] .ark-nav button[aria-pressed="true"] {
	background: var(--ark-surface);
	color: var(--ark-ink);
	box-shadow: 0 0 0 .5px var(--ark-line);
}
[data-theme="arctic"] .ark-nav a:hover:not([aria-current="page"]),
[data-theme="arctic"] .ark-nav button:hover:not([aria-pressed="true"]) {
	color: var(--ark-ink);
	background: transparent;
}

/* ============================================================
 * Size variants — large (44 px) buttons for header toolbars.
 * ============================================================ */

[data-theme="arctic"] .ark-btn--lg {
	min-height: 44px;
	padding: 0 14px;
	font-size: 13px;
}
[data-theme="arctic"] .ark-icon-btn--lg {
	width: 44px;
	height: 44px;
}
[data-theme="arctic"] .ark-seg--lg button {
	min-height: 44px;
	padding: 0 12px;
}

/* ============================================================
 * .ark-notes — footer narrative block.
 * Source: STK:166-168, ROL:149-151.
 * ============================================================ */

[data-theme="arctic"] .ark-notes {
	font-size: 13px;
	line-height: 1.55;
	color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-notes h2 {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--ark-ink);
	margin: 18px 0 6px;
	font-weight: 700;
}

/* ============================================================
 * .ark-main--split — split grid for sidebar + main layouts.
 * Source: ROL:55 (`grid-template-columns: 330px 1fr`).
 * ============================================================ */

[data-theme="arctic"] .ark-main--split {
	display: grid;
	grid-template-columns: 330px 1fr;
	gap: 16px;
	align-items: start;
}
[data-theme="arctic"] .ark-main--split--right {
	grid-template-columns: 1fr 360px;
}

/* ============================================================
 * .ark-caption — uppercase label above a sample/frame.
 * Source: STK:21 mock-caption.
 * ============================================================ */

[data-theme="arctic"] .ark-caption {
	font: 600 13px/1.4 var(--ark-font);
	color: var(--ark-text-3);
	text-transform: uppercase;
	letter-spacing: .06em;
}

/* ============================================================
 * .ark-toast + .ark-dot--pulse — dark toast + pulsing dot.
 * Source: HRC 02:49, HRC 18:21.
 * ============================================================ */

@keyframes ark-pulse {
	0%   { box-shadow: 0 0 0  0 rgba(12, 163, 12, .55); }
	70%  { box-shadow: 0 0 0 14px rgba(12, 163, 12,   0); }
	100% { box-shadow: 0 0 0  0 rgba(12, 163, 12,   0); }
}
[data-theme="arctic"] .ark-toast {
	position: absolute;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-radius: 12px;
	background: var(--ark-ink);
	color: var(--ark-page);
	font-size: 13px;
	box-shadow: 0 8px 24px rgba(11, 11, 11, .18);
	max-width: 760px;
}
[data-theme="arctic"] .ark-toast__dot {
	width: 7px; height: 7px;
	border-radius: 4px;
	flex: 0 0 auto;
}
/* Toast stack: several toasts go in one column with a gap, so they never
   overlap. Absolute in a corner of the nearest positioned ancestor by
   default (apps may switch it to position:fixed); --inline keeps it in
   the normal flow. */
[data-theme="arctic"] .ark-toast-stack {
	position: absolute; top: 14px; left: 14px; z-index: 20;
	display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
	max-width: calc(100% - 28px);
	pointer-events: none;
}
[data-theme="arctic"] .ark-toast-stack > .ark-toast {
	position: static;
	max-width: 100%;
	pointer-events: auto;
}
[data-theme="arctic"] .ark-toast-stack--top-right    { left: auto; right: 14px; align-items: flex-end; }
[data-theme="arctic"] .ark-toast-stack--bottom-left  { top: auto; bottom: 14px; }
[data-theme="arctic"] .ark-toast-stack--bottom-right { top: auto; left: auto; bottom: 14px; right: 14px; align-items: flex-end; }
[data-theme="arctic"] .ark-toast-stack--inline       { position: static; max-width: none; }
[data-theme="arctic"] .ark-dot--pulse {
	animation: ark-pulse 1.6s infinite;
}
@media (prefers-reduced-motion: reduce) {
	[data-theme="arctic"] .ark-dot--pulse { animation: none; }
}


/* ============================================================
 * .ark-theme-toggle — single-button 3-state theme cycler (M13.h)
 *
 * Compact 32×32 button that cycles auto → light → dark → auto
 * on each click. Icon updates to reflect the current state:
 * monitor (auto) / sun (light) / moon (dark). Lives in a
 * webapp's top-right slot, usually next to the language
 * switcher.
 * ============================================================ */

[data-theme="arctic"] .ark-theme-toggle {
	width: 32px;
	height: 32px;
	padding: 0;
	border: .5px solid var(--ark-line);
	border-radius: 8px;
	background: var(--ark-surface);
	color: var(--ark-text-2);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .12s ease, color .12s ease, border-color .12s ease;
	font-family: var(--ark-font);
}

[data-theme="arctic"] .ark-theme-toggle:hover {
	color: var(--ark-ink);
	background: var(--ark-fill-1);
	border-color: var(--ark-line-input);
}

[data-theme="arctic"] .ark-theme-toggle:focus-visible {
	outline: 2px solid var(--ark-accent);
	outline-offset: 1px;
}

[data-theme="arctic"] .ark-theme-toggle svg {
	display: block;
	flex: 0 0 auto;
}

/* Mode-aware visual cue — AUTO stays neutral, LIGHT/DARK get a
 * tint so the user can glance-identify an explicit override. */
[data-theme="arctic"] .ark-theme-toggle--light {
	color: var(--ark-warning-ac);
	border-color: var(--ark-warning-bg);
}
[data-theme="arctic"] .ark-theme-toggle--dark {
	color: var(--ark-accent);
	border-color: var(--ark-accent-bg);
}

/* ============================================================
 * .ark-webapp-topbar — top-right widget slot host
 *
 * Standard container that every webapp mounts in its top-right
 * for `[language-switcher, theme-toggle]`. The webapp's own
 * primary nav (tabs) sits to the left; this slot pushes to the
 * right via `margin-left: auto` when nested in a flex row.
 * ============================================================ */

[data-theme="arctic"] .ark-webapp-topbar {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	padding: 0 6px;
}

/* ============================================================
 * .ark-webapp-tabs — webapp shell tab strip (NEW, 2026-11-01)
 *
 * Promoted from .ark-ab-shell--tabs (AB) + .sgapps-pulsar-shell--tabs
 * (Pulsar) — identical geometry across both webapps (flex gap 4,
 * padding 8 10, bottom hairline, --ark-muted-bg-2 strip). Button is
 * promoted from .ark-ab-shell--tab + .sgapps-pulsar-shell--tab, with
 * the min-height bumped from 32 to 36 to meet the ergonomic
 * secondary-button floor.
 *
 * Use for primary webapp section tabs that sit above the body:
 *   <div class="ark-webapp-tabs">
 *     <button class="ark-webapp-tab is-active">Jobs</button>
 *     <button class="ark-webapp-tab">Agents</button>
 *     <span class="ark-webapp-tab-divider"></span>
 *     ...
 *   </div>
 * ============================================================ */

[data-theme="arctic"] .ark-webapp-tabs {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 8px 10px;
	border-bottom: .5px solid var(--ark-line);
	background: var(--ark-muted-bg-2, var(--ark-fill-1));
	flex: 0 0 auto;
	flex-wrap: wrap;
}
[data-theme="arctic"] .ark-webapp-tab {
	appearance: none;
	background: transparent;
	border: .5px solid transparent;
	border-radius: 8px;
	min-height: 36px;
	padding: 0 12px;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	color: var(--ark-text-2);
	cursor: pointer;
}
[data-theme="arctic"] .ark-webapp-tab:hover {
	color: var(--ark-ink);
	background: var(--ark-fill-1);
}
[data-theme="arctic"] .ark-webapp-tab.is-active,
[data-theme="arctic"] .ark-webapp-tab[aria-pressed="true"] {
	color: var(--ark-ink);
	background: var(--ark-surface);
	border-color: var(--ark-line);
	box-shadow: 0 1px 2px rgba(11, 11, 11, .04);
}
[data-theme="arctic"] .ark-webapp-tab-divider {
	flex: 0 0 auto;
	align-self: stretch;
	width: 1px;
	margin: 4px 6px;
	background: var(--ark-line);
}

/* ============================================================
 * .ark-sync-dot variants (NEW, 2026-11-01)
 *
 * Promoted from Pulsar's `.ark-sync-dot.is-live/.is-stale` scoped
 * variants. `.ark-sync-dot--live` adds a soft halo around the green
 * dot to signal an active heartbeat; `.ark-sync-dot--stale` repaints
 * both dot and text amber to signal degraded freshness.
 * ============================================================ */

[data-theme="arctic"] .ark-sync-dot--live::before {
	background: var(--ark-success-dot);
	box-shadow: 0 0 6px color-mix(in srgb, var(--ark-success-dot) 35%, transparent);
}
[data-theme="arctic"] .ark-sync-dot--stale {
	color: var(--ark-warning);
}
[data-theme="arctic"] .ark-sync-dot--stale::before {
	background: var(--ark-warning);
}

/* ============================================================
 * .ark-table-row--expand — drill-down expansion row (NEW, 2026-11-01)
 *
 * Promoted from AB's `.ark-ab-expand-row`. A table row whose body
 * holds a nested detail panel (device detail, invoice drill, agent
 * detail). The left-side accent rail visually attaches the expansion
 * to its parent row; the surface tint (fill-1) sets it apart from
 * siblings without competing with .is-selected / .is-* state classes.
 *
 * Use on <tr>, <sgapps-table-row>, or any row-level element inside a
 * table that lays out an expansion detail panel.
 * ============================================================ */

[data-theme="arctic"] .ark-table-row--expand {
	background: var(--ark-page);
	box-shadow: inset 3px 0 0 var(--ark-accent);
}

/* ============================================================
 * .ark-overlay--scoped / .ark-dialog--scoped (NEW, 2026-11-01)
 *
 * Promoted from Pulsar's `.sgapps-pulsar-overlay` + `.sgapps-pulsar-modal`
 * host-scoped overlay pattern. Unlike the default `.ark-overlay` /
 * `.ark-dialog` (position: fixed, covering the viewport), the scoped
 * variants are `position: absolute` + `inset: 0`, so the modal is
 * clipped to its nearest positioned ancestor — typically the webapp
 * host (`sgapps-pulsar`, `sgapps-bridge-manager`, …).
 *
 * This is how both pulsar and AB handle in-webapp dialogs without
 * leaking to document.body. The host element MUST set
 * `position: relative` for the scrim to clip correctly.
 * ============================================================ */

[data-theme="arctic"] .ark-overlay--scoped {
	position: absolute;
	inset: 0;
	/* Theme-neutral ink scrim at 45% so dark/light auto-swap. */
	background: color-mix(in srgb, var(--ark-ink) 45%, transparent);
	z-index: 1000;
	display: grid;
	place-items: center;
}
[data-theme="arctic"] .ark-dialog--scoped {
	background: var(--ark-surface);
	color: var(--ark-ink);
	padding: 18px 20px;
	border-radius: var(--ark-radius-panel);
	/* Same default as AB's overlay.js modal; without a width a long
	 * subtitle stretched the dialog to the 92% cap. */
	width: 640px;
	min-width: 420px;
	max-width: 92%;
	max-height: 92%;
	overflow: auto;
	border: .5px solid var(--ark-line);
	box-shadow: 0 8px 32px color-mix(in srgb, var(--ark-ink) 30%, transparent);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* =====================================================================
 * ADDITIONS 2026-11-01 — sgapps-studio UIMocks v0.2.5 (same family:
 * Entity Manager v1.2.1 canon). Report:
 * TODOs/proxy-pulsar/impl-plan/arctic-studio-gap-audit.md
 * Only primitives arctic did not have; tokens only; touch ≥36 / 44 px.
 * ===================================================================== */

@keyframes ark-spin  { to { transform: rotate(360deg); } }
@keyframes ark-shim  { 0% { background-position: -300px 0; } 100% { background-position: 300px 0; } }

/* --- Breadcrumb trail (studio .crumb) ------------------------------ */
[data-theme="arctic"] .ark-crumb {
	display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
	font-size: 13px; color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-crumb a {
	min-height: 36px; padding: 0 6px;
	display: inline-flex; align-items: center; gap: 5px;
	border-radius: 8px;
	color: var(--ark-text-3); text-decoration: none;
}
[data-theme="arctic"] .ark-crumb a:hover { color: var(--ark-ink); background: var(--ark-fill-1); }
[data-theme="arctic"] .ark-crumb__sep { color: var(--ark-muted-2); }
[data-theme="arctic"] .ark-crumb__cur { padding: 0 6px; color: var(--ark-ink); font-weight: 600; }

/* --- Loading: skeleton block + spinner (studio .sk / .spin) -------- */
[data-theme="arctic"] .ark-skel {
	display: block; height: 12px; border-radius: 8px;
	background: linear-gradient(90deg, var(--ark-fill-3) 0, var(--ark-fill-1) 50%, var(--ark-fill-3) 100%);
	background-size: 600px 100%;
	animation: ark-shim 1.4s infinite linear;
}
[data-theme="arctic"] .ark-skel--title { height: 18px; width: 40%; }
[data-theme="arctic"] .ark-skel--block { height: 72px; border-radius: 12px; }
[data-theme="arctic"] .ark-spin {
	display: inline-block; width: 16px; height: 16px; flex: none;
	border: 2px solid var(--ark-line);
	border-top-color: var(--ark-ink);
	border-radius: 50%;
	animation: ark-spin .9s linear infinite;
	vertical-align: -3px;
}
[data-theme="arctic"] .ark-spin--lg { width: 28px; height: 28px; border-width: 3px; }
@media (prefers-reduced-motion: reduce) {
	[data-theme="arctic"] .ark-skel, [data-theme="arctic"] .ark-spin { animation: none; }
}

/* --- Empty state (studio 16 .empty) -------------------------------- */
[data-theme="arctic"] .ark-empty {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 10px; text-align: center;
	padding: 28px 22px; min-height: 220px; box-sizing: border-box;
}
[data-theme="arctic"] .ark-empty__icon {
	width: 48px; height: 48px; border-radius: 50%;
	background: var(--ark-fill-1); color: var(--ark-text-3);
	display: flex; align-items: center; justify-content: center;
}
[data-theme="arctic"] .ark-empty__title { font-size: 15px; font-weight: 600; color: var(--ark-ink); }
[data-theme="arctic"] .ark-empty__hint  { max-width: 320px; font-size: 13px; line-height: 1.45; color: var(--ark-text-3); }

/* --- Timeline (studio 06 .tl — state history) ---------------------- */
[data-theme="arctic"] .ark-timeline { display: flex; flex-direction: column; }
[data-theme="arctic"] .ark-timeline__item {
	position: relative;
	display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px;
	padding-bottom: 12px;
}
[data-theme="arctic"] .ark-timeline__item::before {
	content: ''; position: absolute; left: 7px; top: 16px; bottom: 0;
	width: 1px; background: var(--ark-line);
}
[data-theme="arctic"] .ark-timeline__item:last-child::before { display: none; }
[data-theme="arctic"] .ark-timeline__dot {
	width: 9px; height: 9px; margin: 5px 0 0 3px; border-radius: 50%;
	background: var(--ark-muted-2);
}
[data-theme="arctic"] .ark-timeline__item--ok   .ark-timeline__dot { background: var(--ark-success-dot); }
[data-theme="arctic"] .ark-timeline__item--warn .ark-timeline__dot { background: var(--ark-warning-ac); }
[data-theme="arctic"] .ark-timeline__item--bad  .ark-timeline__dot { background: var(--ark-danger); }
[data-theme="arctic"] .ark-timeline__item--acc  .ark-timeline__dot { background: var(--ark-accent); }
[data-theme="arctic"] .ark-timeline__time { font: 12px var(--ark-font-mono); color: var(--ark-text-3); }
[data-theme="arctic"] .ark-timeline__body { font-size: 13px; color: var(--ark-text-2); }

/* --- Step list (studio 06 .stp / .rp — numbered steps with state) -- */
[data-theme="arctic"] .ark-steps {
	display: flex; flex-direction: column;
	border: .5px solid var(--ark-line); border-radius: 10px; overflow: hidden;
}
[data-theme="arctic"] .ark-step {
	display: grid; grid-template-columns: 26px minmax(0, 1fr) auto;
	gap: 4px 8px; align-items: center;
	padding: 8px 12px; min-height: 36px; box-sizing: border-box;
	border-top: .5px solid var(--ark-line-soft);
	font-size: 13px; color: var(--ark-ink);
}
[data-theme="arctic"] .ark-step:first-child { border-top: none; }
[data-theme="arctic"] .ark-step__n   { font: 12px var(--ark-font-mono); color: var(--ark-muted); }
[data-theme="arctic"] .ark-step__st  { font-size: 12px; font-weight: 600; color: var(--ark-text-3); white-space: nowrap; }
[data-theme="arctic"] .ark-step__sub { grid-column: 2 / -1; font-size: 12px; color: var(--ark-text-3); }
[data-theme="arctic"] .ark-step__err { grid-column: 2 / -1; font-size: 12px; color: var(--ark-danger); }
[data-theme="arctic"] .ark-step.is-ok  { background: color-mix(in srgb, var(--ark-success-bg) 55%, var(--ark-surface)); }
[data-theme="arctic"] .ark-step.is-ok  .ark-step__st { color: var(--ark-success); }
[data-theme="arctic"] .ark-step.is-run { background: var(--ark-accent-bg); }
[data-theme="arctic"] .ark-step.is-run .ark-step__st { color: var(--ark-accent); }
[data-theme="arctic"] .ark-step.is-bad { background: var(--ark-danger-bg); }
[data-theme="arctic"] .ark-step.is-bad .ark-step__st { color: var(--ark-danger); }

/* --- Stage chain (studio 05 .stg — draft → approval → final) ------- */
[data-theme="arctic"] .ark-stages { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
[data-theme="arctic"] .ark-stage {
	display: inline-flex; align-items: center; gap: 4px;
	height: 22px; padding: 0 7px; border-radius: var(--ark-radius-chip);
	font-size: 11px; font-weight: 600; white-space: nowrap;
	background: var(--ark-fill-3); color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-stage.is-done    { background: var(--ark-success-bg); color: var(--ark-success); }
[data-theme="arctic"] .ark-stage.is-current { background: var(--ark-accent-bg);  color: var(--ark-link-ink); }
[data-theme="arctic"] .ark-stages__sep { font-size: 11px; color: var(--ark-muted-2); }

/* --- Event / run log (studio .log — time · kind · text) ------------ */
[data-theme="arctic"] .ark-log {
	background: var(--ark-fill-1);
	border: .5px solid var(--ark-line); border-radius: 12px;
	font: 12px/1.5 var(--ark-font-mono);
	overflow: auto;
}
[data-theme="arctic"] .ark-log__row {
	display: grid; grid-template-columns: 62px 92px minmax(0, 1fr);
	gap: 10px; align-items: start;
	padding: 5px 12px;
	border-top: .5px solid var(--ark-line-soft);
}
[data-theme="arctic"] .ark-log__row:first-child { border-top: none; }
[data-theme="arctic"] .ark-log__t { color: var(--ark-muted); }
[data-theme="arctic"] .ark-log__k { font-weight: 600; white-space: nowrap; color: var(--ark-text-2); }
[data-theme="arctic"] .ark-log__k--sys  { color: var(--ark-muted); }
[data-theme="arctic"] .ark-log__k--say  { color: var(--ark-ink); }
[data-theme="arctic"] .ark-log__k--call { color: var(--ark-link-ink); }
[data-theme="arctic"] .ark-log__k--ok   { color: var(--ark-success); }
[data-theme="arctic"] .ark-log__k--wait { color: var(--ark-warning); }
[data-theme="arctic"] .ark-log__k--err  { color: var(--ark-danger); }
[data-theme="arctic"] .ark-log__x { color: var(--ark-text-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* --- Meter / quota bar (studio .meter, .fbar) ---------------------- */
[data-theme="arctic"] .ark-meter {
	display: flex; height: 10px; border-radius: 5px; overflow: hidden;
	background: var(--ark-fill-3);
}
[data-theme="arctic"] .ark-meter > span { display: block; height: 100%; background: var(--ark-accent); }
[data-theme="arctic"] .ark-meter--sm { height: 6px; border-radius: 3px; }
[data-theme="arctic"] .ark-meter > .is-ok,    [data-theme="arctic"] .ark-legend .is-ok    { background: var(--ark-success-dot); }
[data-theme="arctic"] .ark-meter > .is-warn,  [data-theme="arctic"] .ark-legend .is-warn  { background: var(--ark-warning-ac); }
[data-theme="arctic"] .ark-meter > .is-bad,   [data-theme="arctic"] .ark-legend .is-bad   { background: var(--ark-danger); }
[data-theme="arctic"] .ark-meter > .is-teal,  [data-theme="arctic"] .ark-legend .is-teal  { background: var(--ark-teal); }
[data-theme="arctic"] .ark-meter > .is-muted, [data-theme="arctic"] .ark-legend .is-muted { background: var(--ark-muted-2); }
[data-theme="arctic"] .ark-legend .is-acc { background: var(--ark-accent); }
[data-theme="arctic"] .ark-legend {
	display: flex; flex-wrap: wrap; gap: 6px 14px;
	font-size: 12px; color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-legend i {
	display: inline-block; width: 10px; height: 10px; border-radius: 3px;
	margin-right: 5px; vertical-align: -1px;
}

/* --- Keyboard key (studio .kbd) ------------------------------------ */
[data-theme="arctic"] .ark-kbd {
	display: inline-block; padding: 1px 5px; border-radius: 4px;
	background: var(--ark-fill-3); color: var(--ark-text-2);
	box-shadow: inset 0 -1px 0 var(--ark-line);
	font: 11px var(--ark-font-mono);
}

/* --- Menu / popover (studio 03 .umenu, 17 .cmpmenu) ---------------- */
[data-theme="arctic"] .ark-menu {
	min-width: 220px; box-sizing: border-box;
	display: flex; flex-direction: column; gap: 2px;
	padding: 6px;
	background: var(--ark-surface);
	border: .5px solid var(--ark-line); border-radius: 12px;
	box-shadow: 0 12px 32px var(--ark-shadow-pop);
}
[data-theme="arctic"] .ark-menu__label {
	padding: 6px 10px 2px;
	font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
	color: var(--ark-muted);
}
[data-theme="arctic"] .ark-menu__item {
	display: flex; align-items: center; gap: 8px;
	min-height: 36px; padding: 0 10px; box-sizing: border-box;
	border: 0; border-radius: 8px; background: transparent;
	font: inherit; font-size: 14px; color: var(--ark-ink);
	text-align: left; text-decoration: none; cursor: pointer;
}
[data-theme="arctic"] .ark-menu__item:hover { background: var(--ark-fill-1); }
[data-theme="arctic"] .ark-menu__item[aria-pressed="true"],
[data-theme="arctic"] .ark-menu__item.is-active { background: var(--ark-accent-bg); }
[data-theme="arctic"] .ark-menu__item--2l {
	flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
	padding-top: 8px; padding-bottom: 8px;
}
[data-theme="arctic"] .ark-menu__sub { font-size: 12px; color: var(--ark-text-3); }
[data-theme="arctic"] .ark-menu__sep { height: .5px; margin: 4px 0; background: var(--ark-line); }

/* --- Bottom sheet, mobile (studio .sheet + .grab) ------------------ */
[data-theme="arctic"] .ark-sheet-scrim {
	position: fixed; inset: 0; z-index: 40;
	background: var(--ark-scrim);
	display: flex; align-items: flex-end;
}
[data-theme="arctic"] .ark-sheet {
	width: 100%; max-height: 90%; overflow: auto; box-sizing: border-box;
	display: flex; flex-direction: column; gap: 12px;
	padding: 8px 16px 20px;
	background: var(--ark-surface); color: var(--ark-ink);
	border-radius: 16px 16px 0 0;
	box-shadow: 0 -8px 32px var(--ark-shadow-pop);
}
[data-theme="arctic"] .ark-sheet > * { flex-shrink: 0; }
[data-theme="arctic"] .ark-sheet__grab {
	width: 36px; height: 5px; border-radius: 3px;
	background: var(--ark-muted-2); align-self: center;
}

/* --- Input group: input + prefix / suffix / inline button (.inpw) -- */
[data-theme="arctic"] .ark-input-group {
	display: flex; align-items: center;
	min-height: 40px; box-sizing: border-box;
	border: .5px solid var(--ark-line-input); border-radius: var(--ark-radius-input);
	background: var(--ark-surface); overflow: hidden;
}
[data-theme="arctic"] .ark-input-group > input {
	flex: 1; min-width: 0; height: 40px; padding: 0 12px;
	border: 0; outline: 0; background: transparent;
	font: inherit; font-size: 14px; color: var(--ark-ink);
}
[data-theme="arctic"] .ark-input-group:focus-within {
	border-color: var(--ark-accent);
	box-shadow: 0 0 0 3px var(--ark-accent-bg);
}
[data-theme="arctic"] .ark-input-group__addon {
	padding: 0 12px; white-space: nowrap;
	font-size: 13px; color: var(--ark-muted);
}
[data-theme="arctic"] .ark-input-group__btn {
	width: 40px; height: 40px; flex: none; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 0; background: transparent; color: var(--ark-text-3); cursor: pointer;
}
[data-theme="arctic"] .ark-input-group__btn:hover { color: var(--ark-ink); background: var(--ark-fill-1); }

/* --- Approval / question card (studio .perm / .apv / .ask) --------- */
[data-theme="arctic"] .ark-approval {
	display: flex; flex-direction: column; gap: 8px;
	padding: 12px 14px; border-radius: 12px;
	border: 1px solid var(--ark-warning-ac);
	background: var(--ark-warning-bg); color: var(--ark-warning);
	font-size: 13px;
}
[data-theme="arctic"] .ark-approval--info {
	border-color: var(--ark-accent);
	background: var(--ark-accent-bg); color: var(--ark-link-ink);
}
[data-theme="arctic"] .ark-approval__title { font-size: 14px; font-weight: 600; color: var(--ark-ink); }
[data-theme="arctic"] .ark-approval code {
	display: block; padding: 4px 8px; border-radius: 6px;
	background: var(--ark-surface); color: var(--ark-ink);
	font: 12px var(--ark-font-mono); overflow-wrap: anywhere;
}
[data-theme="arctic"] .ark-approval__acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- Inline confirmation, no window.confirm (studio §3.11) --------- */
[data-theme="arctic"] .ark-confirm {
	display: flex; flex-direction: column; gap: 10px;
	padding: 12px 14px; border-radius: 12px;
	background: var(--ark-fill-1); color: var(--ark-ink);
	font-size: 13px;
}
[data-theme="arctic"] .ark-confirm--danger {
	background: var(--ark-danger-bg);
	box-shadow: inset 0 0 0 .5px var(--ark-danger-line);
}
[data-theme="arctic"] .ark-confirm__acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* --- Page band under the header (studio .danger-band) -------------- */
[data-theme="arctic"] .ark-band {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
	padding: 8px 20px;
	font-size: 13px; font-weight: 600;
	background: var(--ark-fill-1); color: var(--ark-ink);
	border-bottom: .5px solid var(--ark-line);
}
[data-theme="arctic"] .ark-band__text { flex: 1; min-width: 0; font-weight: 500; }
[data-theme="arctic"] .ark-band button {
	min-height: 36px; padding: 0 12px;
	border: 1px solid currentColor; border-radius: 8px;
	background: transparent; color: inherit;
	font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
[data-theme="arctic"] .ark-band--danger  { background: var(--ark-danger);     color: var(--ark-page); border-bottom-color: var(--ark-danger); }
[data-theme="arctic"] .ark-band--warning { background: var(--ark-warning-bg); color: var(--ark-warning); border-bottom-color: var(--ark-warn-line); }
[data-theme="arctic"] .ark-band--info    { background: var(--ark-accent-bg);  color: var(--ark-link-ink); }

/* --- Filled success button (studio .btn-ok — Accept / Approve) ----- */
[data-theme="arctic"] .ark-btn--success {
	border-color: var(--ark-success);
	background: var(--ark-success);
	color: var(--ark-page);
}
[data-theme="arctic"] .ark-btn--success:hover { background: var(--ark-success); filter: brightness(.9); }

/* --- Teal chip ("published", studio .chip-teal / .fs-publicat) ----- */
[data-theme="arctic"] .ark-chip--teal { background: var(--ark-teal-bg); color: var(--ark-teal); }

/* --- Header user chip (studio .st-user + .st-ava) ------------------ */
[data-theme="arctic"] .ark-user {
	min-height: 36px; box-sizing: border-box;
	display: inline-flex; align-items: center; gap: 7px;
	padding: 0 10px 0 6px;
	border: .5px solid var(--ark-line-input); border-radius: 9px;
	background: var(--ark-surface); color: var(--ark-ink);
	font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer;
}
[data-theme="arctic"] .ark-user:hover { background: var(--ark-fill-1); }
[data-theme="arctic"] .ark-user__ava {
	width: 24px; height: 24px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--ark-fill-3); color: var(--ark-text-2);
	font-size: 11px; font-weight: 700;
}

/* --- Media thumbnail (studio .thumb / .pb-thumb) ------------------- */
[data-theme="arctic"] .ark-thumb {
	position: relative; aspect-ratio: 16 / 10; overflow: hidden;
	border-radius: 8px;
	background: var(--ark-media-bg); color: var(--ark-on-media);
}
[data-theme="arctic"] .ark-thumb--v { aspect-ratio: 9 / 16; }
[data-theme="arctic"] .ark-thumb__play {
	position: absolute; left: 50%; top: 50%;
	width: 36px; height: 36px; margin: -18px 0 0 -18px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--ark-on-media); color: var(--ark-media-bg);
}
[data-theme="arctic"] .ark-thumb__dur {
	position: absolute; right: 6px; bottom: 6px;
	padding: 1px 5px; border-radius: 4px;
	background: color-mix(in srgb, var(--ark-media-bg) 75%, transparent);
	font: 11px var(--ark-font-mono); font-variant-numeric: tabular-nums;
}
[data-theme="arctic"] .ark-thumb__fmt {
	position: absolute; right: 6px; top: 6px;
	padding: 0 6px; height: 18px; border-radius: 4px;
	display: inline-flex; align-items: center;
	background: color-mix(in srgb, var(--ark-on-media) 20%, transparent);
	font-size: 10px; font-weight: 700;
}

/* --- Sparkline (studio .rp-spark — last N periods) ----------------- */
[data-theme="arctic"] .ark-spark { display: flex; align-items: flex-end; gap: 3px; height: 44px; }
[data-theme="arctic"] .ark-spark > i { display: block; width: 8px; border-radius: 2px; background: var(--ark-muted-3); }
[data-theme="arctic"] .ark-spark > i.is-cur { background: var(--ark-accent); }

/* --- Bar chart with average line (studio .rp-chart) ---------------- */
[data-theme="arctic"] .ark-chart {
	position: relative;
	display: flex; align-items: flex-end; gap: 6px;
	height: 200px; padding: 0 0 22px;
	border-bottom: .5px solid var(--ark-line);
}
[data-theme="arctic"] .ark-chart__col {
	position: relative; flex: 1 1 0; min-width: 0; height: 100%;
	display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
}
[data-theme="arctic"] .ark-chart__bar {
	width: 70%; max-width: 28px; border-radius: 4px 4px 0 0;
	background: var(--ark-accent);
}
[data-theme="arctic"] .ark-chart__bar.is-alt { background: var(--ark-muted-3); }
[data-theme="arctic"] .ark-chart__v { margin-bottom: 3px; font-size: 11px; font-weight: 700; white-space: nowrap; color: var(--ark-ink); }
[data-theme="arctic"] .ark-chart__x { position: absolute; bottom: -20px; font-size: 11px; white-space: nowrap; color: var(--ark-text-3); }
[data-theme="arctic"] .ark-chart__avg {
	position: absolute; left: 0; right: 0;
	border-top: 1px dashed var(--ark-text-3);
	pointer-events: none;
}
[data-theme="arctic"] .ark-chart__avg > span {
	position: absolute; right: 0; top: -18px; padding: 0 4px;
	background: var(--ark-surface); color: var(--ark-text-2); font-size: 11px;
}

/* --- "To check" list (studio .rp-check — warn / info / ok) --------- */
[data-theme="arctic"] .ark-checklist { display: flex; flex-direction: column; gap: 10px; }
[data-theme="arctic"] .ark-checklist__row {
	display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start;
	padding: 12px 14px; border-radius: 12px;
	background: var(--ark-fill-1);
}
[data-theme="arctic"] .ark-checklist__icon {
	width: 34px; height: 34px; border-radius: 9px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--ark-surface); color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-checklist__title  { font-size: 14px; font-weight: 600; color: var(--ark-ink); }
[data-theme="arctic"] .ark-checklist__detail { margin-top: 2px; font-size: 13px; color: var(--ark-text-3); }
[data-theme="arctic"] .ark-checklist__row--warn { background: var(--ark-warning-bg); }
[data-theme="arctic"] .ark-checklist__row--warn .ark-checklist__icon,
[data-theme="arctic"] .ark-checklist__row--warn .ark-checklist__title { color: var(--ark-warning); }
[data-theme="arctic"] .ark-checklist__row--info { background: var(--ark-accent-bg); }
[data-theme="arctic"] .ark-checklist__row--info .ark-checklist__icon  { color: var(--ark-accent); }
[data-theme="arctic"] .ark-checklist__row--info .ark-checklist__title { color: var(--ark-link-ink); }
[data-theme="arctic"] .ark-checklist__row--ok { background: var(--ark-success-bg); }
[data-theme="arctic"] .ark-checklist__row--ok .ark-checklist__icon,
[data-theme="arctic"] .ark-checklist__row--ok .ark-checklist__title { color: var(--ark-success); }

/* =====================================================================
 * ADDITIONS 2026-11-01 — promoted from sgapps-bridge-redesign.html
 * Generic patterns the AB mock carried as inline styles, local keyframes
 * or class names that were never defined (.ark-chip--sm, .ark-combobox,
 * --ark-on-accent). AB-specific layout (.ab-*, .mg-*) stays in the mock.
 * ===================================================================== */

/* --- Small chip (studio .chip-s) — dense rows, counters ------------- */
[data-theme="arctic"] .ark-chip--sm { height: 20px; padding: 0 6px; font-size: 11px; }

/* --- Stacked field: label above its control ------------------------- */
[data-theme="arctic"] .ark-field--stack { flex-direction: column; align-items: stretch; gap: 4px; }

/* --- Spinning feather icon (in-flight work next to a label) ---------- */
[data-theme="arctic"] .ark-feather--spin { animation: ark-spin 1.4s linear infinite; }

/* --- Segmented progress: one cell per page / chunk ------------------ */
@keyframes ark-fade { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
[data-theme="arctic"] .ark-segbar {
	display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px;
	height: 14px; border-radius: 4px; overflow: hidden;
}
[data-theme="arctic"] .ark-segbar > *       { background: var(--ark-fill-2); }
[data-theme="arctic"] .ark-segbar > .is-ok   { background: var(--ark-success-dot); }
[data-theme="arctic"] .ark-segbar > .is-warn { background: var(--ark-warning-ac); }
[data-theme="arctic"] .ark-segbar > .is-bad  { background: var(--ark-danger); }
[data-theme="arctic"] .ark-segbar > .is-run  { background: var(--ark-accent); animation: ark-fade 1s ease infinite; }
@media (prefers-reduced-motion: reduce) {
	[data-theme="arctic"] .ark-feather--spin, [data-theme="arctic"] .ark-segbar > .is-run { animation: none; }
}

/* --- Combobox: trigger + searchable, grouped popover ----------------- */
[data-theme="arctic"] .ark-combobox { position: relative; }
[data-theme="arctic"] .ark-combobox > .ark-field { display: flex; }   /* trigger spans the combobox, like the popover */
[data-theme="arctic"] .ark-combobox__trigger {
	display: flex; align-items: center; gap: 8px;
	min-height: 36px; box-sizing: border-box; cursor: pointer;
}
[data-theme="arctic"] .ark-combobox__popover {
	display: none;
	position: absolute; top: calc(100% + 8px); left: 0; z-index: 10;
	min-width: 100%; max-height: 360px; overflow-y: auto;
	background: var(--ark-surface);
	border: .5px solid var(--ark-line); border-radius: 10px;
	box-shadow: 0 10px 30px var(--ark-shadow-pop);
}
[data-theme="arctic"] .ark-combobox.is-open .ark-combobox__popover { display: block; }
[data-theme="arctic"] .ark-combobox__head {
	padding: 10px 12px;
	border-bottom: .5px solid var(--ark-line); background: var(--ark-fill-1);
}
[data-theme="arctic"] .ark-combobox__head .ark-search { width: 100%; box-sizing: border-box; }
[data-theme="arctic"] .ark-combobox__group {
	padding: 10px 12px 6px;
	font-size: 11px; font-weight: 600; letter-spacing: .03em; color: var(--ark-muted-2);
}
[data-theme="arctic"] .ark-combobox__popover .ark-item-list { margin: 0 6px; }
[data-theme="arctic"] .ark-combobox__popover .ark-item-list__item { padding: 6px 8px; }
[data-theme="arctic"] .ark-combobox__foot {
	padding: 8px 12px; border-top: .5px solid var(--ark-line);
	text-align: center; font-size: 11px;
}
[data-theme="arctic"] .ark-combobox__foot a { color: var(--ark-accent); }

/* =====================================================================
 * ADDITIONS 2026-11-01 — charts from the FiscalReceiptsSqlite mocks
 * (Main, Sales, Products, Usage, UsagePlan, HorecaBookings). Plain HTML +
 * CSS: the caller sets positions and sizes as inline percentages (bottom,
 * left, width, height). Marks wear --ark-series-* / --ark-heat-* /
 * --ark-tier-*; labels and values always stay in text tokens.
 * ===================================================================== */

/* --- Mark colors shared by plots, legends, tooltips, splits, hbars --- */
[data-theme="arctic"] :is(.ark-plot, .ark-legend, .ark-tip, .ark-split, .ark-hbars) .is-s1   { background: var(--ark-series-1); }
[data-theme="arctic"] :is(.ark-plot, .ark-legend, .ark-tip, .ark-split, .ark-hbars) .is-s2   { background: var(--ark-series-2); }
[data-theme="arctic"] :is(.ark-plot, .ark-legend, .ark-tip, .ark-split, .ark-hbars) .is-s3   { background: var(--ark-series-3); }
[data-theme="arctic"] :is(.ark-plot, .ark-legend, .ark-tip, .ark-split, .ark-hbars) .is-s4   { background: var(--ark-series-4); }
[data-theme="arctic"] :is(.ark-plot, .ark-legend, .ark-tip, .ark-split, .ark-hbars) .is-rest { background: var(--ark-series-rest); }
[data-theme="arctic"] :is(.ark-plot, .ark-legend, .ark-tip, .ark-split, .ark-hbars) .is-soft { background: var(--ark-series-soft); }
[data-theme="arctic"] :is(.ark-legend, .ark-split) .is-t1 { background: var(--ark-tier-1); color: var(--ark-on-tier-1); }
[data-theme="arctic"] :is(.ark-legend, .ark-split) .is-t2 { background: var(--ark-tier-2); color: var(--ark-on-tier-2); }
[data-theme="arctic"] :is(.ark-legend, .ark-split) .is-t3 { background: var(--ark-tier-3); color: var(--ark-on-tier-3); }
/* Legend key for a projected / estimated value: dashed outline, no fill. */
[data-theme="arctic"] .ark-legend .is-proj {
	box-sizing: border-box; background: transparent;
	border: 1.5px dashed var(--ark-series-1);
}

/* --- Plot: y grid + labels, columns, x labels (Main daily, Usage) --- */
[data-theme="arctic"] .ark-plot {
	--ark-plot-h: 200px;       /* plot height, without the x labels */
	--ark-plot-axis: 52px;     /* gutter for the y labels */
	--ark-plot-gap: 2px;       /* between columns */
	--ark-plot-bar: 64%;       /* bar width inside its column … */
	--ark-plot-bar-max: 18px;  /* … capped */
	position: relative; min-width: 0;
}
/* Figure head: title left, unit / source right; legend under it. */
[data-theme="arctic"] .ark-plot__head {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px;
}
[data-theme="arctic"] .ark-plot__title { font-size: 14px; font-weight: 700; color: var(--ark-ink); }
[data-theme="arctic"] .ark-plot__sub   { font-size: 12px; color: var(--ark-muted); }
[data-theme="arctic"] .ark-plot__head + .ark-legend { margin-top: 6px; }
[data-theme="arctic"] .ark-plot__area {
	position: relative; height: var(--ark-plot-h);
	margin-left: var(--ark-plot-axis);
}
[data-theme="arctic"] .ark-plot > * + .ark-plot__area { margin-top: 14px; }
/* Room for the top y label and the value label on a full-height bar. */
[data-theme="arctic"] .ark-plot > .ark-plot__area:first-child { margin-top: 20px; }
[data-theme="arctic"] .ark-plot__grid {
	position: absolute; left: 0; right: 0;
	border-top: 1px solid var(--ark-chart-grid);
}
[data-theme="arctic"] .ark-plot__grid.is-base { border-top-color: var(--ark-chart-base); }
[data-theme="arctic"] .ark-plot__grid > span {
	position: absolute; right: calc(100% + 8px); top: -9px;
	font-size: 11px; color: var(--ark-muted);
	font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* Reference value (e.g. last month's daily average): solid, labelled right. */
[data-theme="arctic"] .ark-plot__ref {
	position: absolute; left: 0; right: 0; pointer-events: none;
	border-top: 1.5px solid var(--ark-text-3);
}
[data-theme="arctic"] .ark-plot__ref > span {
	position: absolute; right: 0; bottom: 3px; padding: 0 4px;
	background: var(--ark-surface); color: var(--ark-text-3);
	font-size: 11px; white-space: nowrap;
}
/* Event on the x axis (e.g. "full counting since 21.10"): dashed vertical. */
[data-theme="arctic"] .ark-plot__mark {
	position: absolute; top: -6px; bottom: 0; pointer-events: none;
	border-left: 1.5px dashed var(--ark-text-3);
}
[data-theme="arctic"] .ark-plot__mark > span {
	position: absolute; left: 6px; top: 0; padding: 0 4px;
	background: var(--ark-surface); color: var(--ark-text-3);
	font-size: 11px; white-space: nowrap;
}
/* Range with no data yet (e.g. "counted since 21.10"): hatched, labelled. */
[data-theme="arctic"] .ark-plot__band {
	position: absolute; left: 0; top: 0; bottom: 0; box-sizing: border-box;
	display: flex; align-items: center; justify-content: center; padding: 0 8px;
	background: repeating-linear-gradient(135deg, var(--ark-fill-1) 0 6px, var(--ark-surface) 6px 12px);
}
[data-theme="arctic"] .ark-plot__band > span {
	padding: 2px 6px; border-radius: 6px;
	background: var(--ark-surface); color: var(--ark-text-3);
	font-size: 12px; text-align: center;
}
[data-theme="arctic"] .ark-plot__cols {
	position: absolute; inset: 0;
	display: flex; gap: var(--ark-plot-gap);
}
/* One column per x value. Children stack bottom-up in DOM order: the
   bars (<i>, the last one is the top segment), then the value label. */
[data-theme="arctic"] .ark-plot__col {
	position: relative; flex: 1 1 0; min-width: 0; height: 100%;
	box-sizing: border-box; margin: 0; padding: 0;
	display: flex; flex-direction: column-reverse; align-items: center; gap: 2px;
	border: 0; border-radius: 4px; background: transparent;
	font: inherit; color: inherit;
}
[data-theme="arctic"] button.ark-plot__col { cursor: pointer; }
[data-theme="arctic"] .ark-plot__col:focus-visible { outline: 2px solid var(--ark-accent); outline-offset: 1px; }
[data-theme="arctic"] .ark-plot__bar {
	flex: none; display: block; box-sizing: border-box;
	width: var(--ark-plot-bar); max-width: var(--ark-plot-bar-max);
	background: var(--ark-series-1);
}
[data-theme="arctic"] .ark-plot__bar:last-of-type { border-radius: 4px 4px 0 0; }
[data-theme="arctic"] .ark-plot__col:is(:hover, :focus-visible) > .ark-plot__bar:not(.is-proj) { filter: var(--ark-chart-hover); }
/* Estimate to the end of the period, behind the bar: put it first. */
[data-theme="arctic"] .ark-plot__bar.is-proj {
	position: absolute; bottom: 0;
	background: transparent;
	border: 1.5px dashed var(--ark-series-1); border-bottom: 0;
	border-radius: 4px 4px 0 0;
}
[data-theme="arctic"] .ark-plot__v {
	flex: none; margin-bottom: 2px;
	font-size: 11px; font-weight: 600; color: var(--ark-ink);
	font-variant-numeric: tabular-nums; white-space: nowrap;
}
[data-theme="arctic"] .ark-plot__none { flex: none; font-size: 11px; color: var(--ark-muted-3); }
/* Min–max span with a dot for the (weighted) mean — Products price/month. */
[data-theme="arctic"] .ark-plot__span {
	position: absolute; left: 50%; width: 6px; margin-left: -3px;
	border-radius: 3px; background: var(--ark-series-soft);
}
[data-theme="arctic"] .ark-plot__dot {
	position: absolute; left: 50%; width: 10px; height: 10px; margin: 0 0 -5px -5px;
	border-radius: 50%; background: var(--ark-text-3);
	box-shadow: 0 0 0 2px var(--ark-surface);
}
[data-theme="arctic"] .ark-plot__dot.is-cur { background: var(--ark-series-1); }
[data-theme="arctic"] .ark-plot__x {
	display: flex; gap: var(--ark-plot-gap);
	margin: 8px 0 0 var(--ark-plot-axis);
}
[data-theme="arctic"] .ark-plot__x > span {
	flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap;
	font-size: 11px; line-height: 1.3; color: var(--ark-muted);
	font-variant-numeric: tabular-nums;
}

/* --- Chart tooltip (hover / focus readout) --------------------------- */
[data-theme="arctic"] .ark-tip {
	position: absolute; top: 0; z-index: 2; transform: translateX(-50%);
	box-sizing: border-box; padding: 8px 12px; border-radius: 10px;
	background: var(--ark-surface); color: var(--ark-ink);
	border: .5px solid var(--ark-line-strong);
	box-shadow: 0 6px 20px var(--ark-shadow-pop);
	white-space: nowrap; pointer-events: none;
}
[data-theme="arctic"] .ark-tip[hidden] { display: none; }
[data-theme="arctic"] .ark-tip__title { font-size: 12px; color: var(--ark-muted); }
[data-theme="arctic"] .ark-tip__value { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
[data-theme="arctic"] .ark-tip__meta  { font-size: 12px; color: var(--ark-text-3); }
[data-theme="arctic"] .ark-tip__row {
	display: flex; align-items: center; gap: 8px;
	font-size: 13px; font-variant-numeric: tabular-nums;
}
[data-theme="arctic"] .ark-tip__row > i { flex: none; width: 8px; height: 8px; border-radius: 2px; }
[data-theme="arctic"] .ark-tip__row > span { color: var(--ark-text-3); }
[data-theme="arctic"] .ark-tip__row > strong { margin-left: auto; }

/* --- Heatmap: weekday × hour (Sales, HorecaBookings) ----------------- */
[data-theme="arctic"] .ark-heatmap { --ark-heat-cols: 11; overflow-x: auto; }
[data-theme="arctic"] .ark-heatmap__table { min-width: 520px; display: flex; flex-direction: column; gap: 3px; }
[data-theme="arctic"] .ark-heatmap__tr {
	display: grid; gap: 3px;
	grid-template-columns: 40px repeat(var(--ark-heat-cols), minmax(0, 1fr));
}
[data-theme="arctic"] .ark-heatmap__th {
	font-size: 11px; font-weight: 400; color: var(--ark-muted);
	text-align: center; font-variant-numeric: tabular-nums;
}
[data-theme="arctic"] .ark-heatmap__rh {
	display: flex; align-items: center;
	font-size: 12px; color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-heatmap__cell { height: 32px; border-radius: 6px; background: var(--ark-heat-0); }
[data-theme="arctic"] :is(.ark-heatmap, .ark-heatmap__legend) .is-h0 { background: var(--ark-heat-0); box-shadow: inset 0 0 0 .5px var(--ark-line); }
[data-theme="arctic"] :is(.ark-heatmap, .ark-heatmap__legend) .is-h1 { background: var(--ark-heat-1); }
[data-theme="arctic"] :is(.ark-heatmap, .ark-heatmap__legend) .is-h2 { background: var(--ark-heat-2); }
[data-theme="arctic"] :is(.ark-heatmap, .ark-heatmap__legend) .is-h3 { background: var(--ark-heat-3); }
[data-theme="arctic"] :is(.ark-heatmap, .ark-heatmap__legend) .is-h4 { background: var(--ark-heat-4); }
[data-theme="arctic"] :is(.ark-heatmap, .ark-heatmap__legend) .is-h5 { background: var(--ark-heat-5); }
[data-theme="arctic"] .ark-heatmap__legend {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
	margin-top: 14px; font-size: 12px; color: var(--ark-text-3);
}
[data-theme="arctic"] .ark-heatmap__legend > span { display: inline-flex; align-items: center; gap: 6px; }
[data-theme="arctic"] .ark-heatmap__legend i { width: 14px; height: 14px; border-radius: 4px; }

/* --- Split bar: shares of a whole (payment methods, ABC tiers) ------- */
[data-theme="arctic"] .ark-split {
	display: flex; gap: 2px; height: 24px;
	font-size: 12px; font-weight: 600;
}
[data-theme="arctic"] .ark-split > span {
	min-width: 0; display: flex; align-items: center; justify-content: center;
	background: var(--ark-series-1);
}
[data-theme="arctic"] .ark-split > span:first-child { border-radius: 6px 0 0 6px; }
[data-theme="arctic"] .ark-split > span:last-child  { border-radius: 0 6px 6px 0; }
[data-theme="arctic"] .ark-split > span:only-child  { border-radius: 6px; }
[data-theme="arctic"] .ark-split__head,
[data-theme="arctic"] .ark-split__foot {
	display: flex; justify-content: space-between; gap: 12px;
	font-variant-numeric: tabular-nums;
}
[data-theme="arctic"] .ark-split__head { margin-bottom: 6px; font-size: 13px; color: var(--ark-text-3); }
[data-theme="arctic"] .ark-split__head > :first-child { font-weight: 600; color: var(--ark-ink); }
[data-theme="arctic"] .ark-split__foot { margin-top: 6px; font-size: 12px; color: var(--ark-text-3); }

/* --- Ranked list with share bars (top products / POS) --------------- */
[data-theme="arctic"] .ark-bar-list { list-style: none; margin: 0; padding: 0; }
[data-theme="arctic"] .ark-bar-list__row {
	display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
	padding: 10px 0; border-top: .5px solid var(--ark-line-soft);
}
[data-theme="arctic"] .ark-bar-list__rank { font-size: 12px; color: var(--ark-muted); font-variant-numeric: tabular-nums; }
[data-theme="arctic"] .ark-bar-list__name { min-width: 0; display: flex; gap: 8px; align-items: baseline; }
[data-theme="arctic"] .ark-bar-list__code { flex: none; font: 12px var(--ark-font-mono); color: var(--ark-muted); }
[data-theme="arctic"] .ark-bar-list__label {
	min-width: 0; font-weight: 600;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[data-theme="arctic"] .ark-bar-list__track { height: 6px; margin-top: 6px; border-radius: 3px; background: var(--ark-accent-bg); }
[data-theme="arctic"] .ark-bar-list__track > i { display: block; height: 100%; border-radius: 3px; background: var(--ark-series-1); }
[data-theme="arctic"] .ark-bar-list__value { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
[data-theme="arctic"] .ark-bar-list__value > :first-child { font-weight: 600; }
[data-theme="arctic"] .ark-bar-list__sub { font-size: 12px; color: var(--ark-muted); }
[data-theme="arctic"] .ark-bar-list__row--rest .ark-bar-list__label { color: var(--ark-text-3); }

/* --- Horizontal stacked bars with an x axis (UsagePlan) -------------- */
[data-theme="arctic"] .ark-hbars {
	--ark-hbars-label: 170px;
	--ark-hbars-value: 110px;
	display: flex; flex-direction: column; gap: 4px;
}
[data-theme="arctic"] .ark-hbars__row,
[data-theme="arctic"] .ark-hbars__axis {
	display: grid; align-items: center; gap: 12px;
	grid-template-columns: var(--ark-hbars-label) minmax(0, 1fr) var(--ark-hbars-value);
	padding: 0 4px; box-sizing: border-box;
}
[data-theme="arctic"] .ark-hbars__row {
	width: 100%; min-height: 36px; margin: 0;
	border: 0; border-radius: 8px; background: transparent;
	font: inherit; font-size: 13px; color: var(--ark-ink); text-align: left;
}
[data-theme="arctic"] button.ark-hbars__row { cursor: pointer; }
[data-theme="arctic"] .ark-hbars__row:is(:hover, :focus-visible) { background: var(--ark-fill-1); }
[data-theme="arctic"] .ark-hbars__row:focus-visible { outline: 2px solid var(--ark-accent); outline-offset: 1px; }
[data-theme="arctic"] .ark-hbars__bar { display: flex; gap: 2px; height: 18px; }
[data-theme="arctic"] .ark-hbars__bar > i { flex: none; display: block; height: 100%; background: var(--ark-series-1); }
[data-theme="arctic"] .ark-hbars__bar > i:last-child { border-radius: 0 4px 4px 0; }
[data-theme="arctic"] .ark-hbars__value { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
[data-theme="arctic"] .ark-hbars__axis { margin-top: 2px; }
[data-theme="arctic"] .ark-hbars__readout {
	margin-top: 12px; padding: 10px 12px; border-radius: 10px;
	background: var(--ark-fill-1); color: var(--ark-text-2); font-size: 13px;
}
[data-theme="arctic"] .ark-hbars__axis > :nth-child(2) {
	display: flex; justify-content: space-between;
	font-size: 11px; color: var(--ark-muted); font-variant-numeric: tabular-nums;
}

/* --- Line sparkline with the current point (Main hero tile) ---------- */
[data-theme="arctic"] .ark-sparkline { display: block; overflow: visible; }
[data-theme="arctic"] .ark-sparkline__base { stroke: var(--ark-chart-grid); stroke-width: 1; }
[data-theme="arctic"] .ark-sparkline__line {
	fill: none; stroke: var(--ark-chart-trend); stroke-width: 2;
	stroke-linejoin: round; stroke-linecap: round;
}
[data-theme="arctic"] .ark-sparkline__dot { fill: var(--ark-series-1); stroke: var(--ark-surface); stroke-width: 2; }
[data-theme="arctic"] .ark-sparkline__x {
	display: flex; justify-content: space-between; margin-top: 2px;
	font-size: 11px; color: var(--ark-muted);
}
