/* amplifi-ci components: the parts the artboards do not draw, in their language. See DESIGN.md. Values are tokens only. */

/* Buttons. Element-qualified so Tailwind's preflight ([type=submit] { background: transparent }), which loads later, cannot win. */
:is(a, button, input, label, span).ci-btn, .ci-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 2.5rem; padding: 0 1rem; border-radius: var(--radius);
  border: 1px solid hsl(var(--input)); background: transparent; color: hsl(var(--foreground)); font: inherit; font-size: 14px; font-weight: 600;
  line-height: 1; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background-color .12s, border-color .12s; }
.ci-btn:hover { background: hsl(var(--hover)); }
.ci-btn:disabled, .ci-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
:is(a, button, input).ci-btn--primary, .ci-btn--primary { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
:is(a, button, input).ci-btn--primary:hover, .ci-btn--primary:hover { background: hsl(var(--primary-hover)); border-color: hsl(var(--primary-hover)); }
:is(a, button).ci-btn--ghost, .ci-btn--ghost { border-color: transparent; }
:is(a, button, input).ci-btn--danger, .ci-btn--danger { background: hsl(var(--destructive)); border-color: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
:is(a, button, input).ci-btn--danger:hover, .ci-btn--danger:hover { background: hsl(var(--destructive)); filter: brightness(1.08); }
/* Modifiers carry the same element qualifier as the base rule, or the base padding wins and squeezes an icon to 0. */
.ci-btn--sm, :is(a, button, input, label, span).ci-btn--sm { height: 2rem; padding: 0 .75rem; font-size: 13px; }
.ci-btn--lg, :is(a, button, input, label, span).ci-btn--lg { height: 3rem; padding: 0 1.25rem; font-size: 15px; }
.ci-btn--icon, :is(a, button, input, label, span).ci-btn--icon { width: 2.5rem; padding: 0; border-radius: 999px; }
.ci-btn--icon.ci-btn--sm, :is(a, button, input, label, span).ci-btn--icon.ci-btn--sm { width: 2rem; }
.ci-btn .ci-icon { width: 1.05rem; height: 1.05rem; }
.ci-btn > svg { flex: none; }
.ci-btn.is-loading { pointer-events: none; }

/* Forms */
.ci-form-grid { display: grid; gap: 1rem; }
@media (min-width: 768px) { .ci-form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.ci-field { display: flex; flex-direction: column; gap: .375rem; min-width: 0; }
.ci-field-label { font-size: 13px; font-weight: 600; color: hsl(var(--foreground)); }
.ci-field-label .req { color: hsl(var(--primary-text)); margin-left: .125rem; }
.ci-field-help { font-size: 12px; color: hsl(var(--muted-foreground)); }
.ci-field-error { display: flex; align-items: center; gap: .375rem; font-size: 12px; font-weight: 600; color: hsl(var(--destructive)); }
input.ci-input, select.ci-select, textarea.ci-textarea, .ci-input, .ci-select, .ci-textarea { box-sizing: border-box; width: 100%; min-height: 2.5rem; padding: .5rem .875rem; border-radius: var(--radius); border: 1px solid hsl(var(--input));
  background: hsl(var(--background)); color: hsl(var(--foreground)); font: inherit; font-size: 14px; line-height: 1.4; }
.ci-input::placeholder, .ci-textarea::placeholder { color: hsl(var(--muted-foreground)); }
input.ci-input:focus, select.ci-select:focus, textarea.ci-textarea:focus { outline: 2px solid hsl(var(--ring)); outline-offset: 1px; }
input.ci-input[aria-invalid="true"], select.ci-select[aria-invalid="true"], textarea.ci-textarea[aria-invalid="true"] { border-color: hsl(var(--destructive)); }
.ci-input:disabled, .ci-select:disabled, .ci-textarea:disabled { opacity: .5; cursor: not-allowed; }
.ci-textarea { min-height: 6rem; resize: vertical; }
.ci-select { appearance: none; padding-right: 2.25rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 1rem center, right .7rem center; background-size: .3rem .3rem, .3rem .3rem; background-repeat: no-repeat; }
.ci-input[type="date"]::-webkit-calendar-picker-indicator { opacity: .8; cursor: pointer; }
input.ci-check, input.ci-radio, .ci-check, .ci-radio { appearance: none; width: 1.125rem; height: 1.125rem; flex: none; margin: 0; border: 1px solid hsl(var(--input)); background: hsl(var(--background));
  border-radius: 4px; display: inline-grid; place-content: center; cursor: pointer; vertical-align: middle; }
.ci-radio { border-radius: 999px; }
input.ci-check:checked, input.ci-radio:checked { background: hsl(var(--primary)); border-color: hsl(var(--primary-text)); }
.ci-check:checked::after { content: ""; width: .55rem; height: .3rem; border: 2px solid hsl(var(--primary-foreground)); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.ci-radio:checked::after { content: ""; width: .45rem; height: .45rem; border-radius: 999px; background: hsl(var(--primary-foreground)); }
.ci-check:focus-visible, .ci-radio:focus-visible, .ci-switch:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.ci-check-row { display: inline-flex; align-items: center; gap: .5rem; font-size: 14px; cursor: pointer; }
.ci-switch { appearance: none; position: relative; width: 2.25rem; height: 1.25rem; flex: none; margin: 0; border-radius: 999px; background: hsl(var(--muted));
  border: 1px solid hsl(var(--input)); cursor: pointer; transition: background-color .15s; }
.ci-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: .875rem; height: .875rem; border-radius: 999px; background: hsl(var(--foreground)); transition: transform .15s; }
.ci-switch:checked { background: hsl(var(--primary)); border-color: hsl(var(--primary-text)); }
.ci-switch:checked::after { transform: translateX(1rem); background: hsl(var(--primary-foreground)); }

/* Tables */
.ci-table-wrap { position: relative; overflow-x: auto; border-radius: var(--radius-panel); background: hsl(var(--card)); border: 1px solid hsl(var(--card-border)); }
.ci-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ci-table th { text-align: left; font-size: 13px; font-weight: 600; color: hsl(var(--muted-foreground)); padding: .875rem 1rem; border-bottom: 1px solid hsl(var(--border)); white-space: nowrap; }
.ci-table td { padding: .875rem 1rem; height: 3.25rem; border-bottom: 1px solid hsl(var(--border)); vertical-align: middle; }
.ci-table tbody tr:last-child td { border-bottom: 0; }
.ci-table tbody tr:hover { background: hsl(var(--hover)); }
.ci-table tbody tr.is-selected { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); box-shadow: inset 3px 0 0 hsl(var(--primary-text)); }
.ci-table .num, .ci-table th.num { text-align: right; font-family: var(--font-num); white-space: nowrap; }
.ci-table .primary { font-weight: 500; }
/* Inline-edit helpers inside a cell (a results slot, a hidden saving note) take no room until used, so every
   cell centres on the same line. */
.ci-table td .htmx-indicator:not(.htmx-request), .ci-table td .update-results:empty { display: none; }
.ci-table td > div:only-child, .ci-table td > form:only-child { margin: 0; }
.ci-table--compact td { height: 2.5rem; padding-top: .5rem; padding-bottom: .5rem; }
.ci-sort { display: inline-flex; align-items: center; gap: .25rem; color: inherit; text-decoration: none; }
.ci-sort:hover { color: hsl(var(--foreground)); }
.ci-sort::after { content: ""; width: .35rem; height: .35rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .35; }
.ci-sort[aria-sort="ascending"]::after { transform: rotate(-135deg); opacity: 1; margin-top: .2rem; }
.ci-sort[aria-sort="descending"]::after { opacity: 1; margin-top: -.2rem; }
.ci-pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem; font-size: 13px; color: hsl(var(--muted-foreground)); }
.ci-pager-pages { display: flex; gap: .375rem; }
.ci-pager a, .ci-pager span.is-current { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 .5rem; border-radius: 999px;
  border: 1px solid hsl(var(--input)); color: hsl(var(--foreground)); text-decoration: none; font-family: var(--font-num); font-weight: 600; }
.ci-pager a:hover { background: hsl(var(--hover)); }
.ci-pager span.is-current { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }

/* Navigation */
.ci-tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid hsl(var(--border)); overflow-x: auto; }
.ci-tab { display: inline-flex; align-items: center; gap: .375rem; padding: .75rem 0; margin-bottom: -1px; border-bottom: 2px solid transparent; color: hsl(var(--muted-foreground));
  font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ci-tab:hover { color: hsl(var(--foreground)); }
.ci-tab[aria-current="page"], .ci-tab.is-active { color: hsl(var(--foreground)); border-bottom-color: hsl(var(--primary-text)); }
.ci-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; font-size: 13px; color: hsl(var(--muted-foreground)); }
.ci-crumbs a { color: inherit; text-decoration: none; }
.ci-crumbs a:hover { color: hsl(var(--foreground)); text-decoration: underline; }
.ci-crumbs .sep { width: .35rem; height: .35rem; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6; }
.ci-crumbs [aria-current="page"] { color: hsl(var(--foreground)); }
.ci-chip-filter { display: inline-flex; align-items: center; gap: .375rem; height: 2rem; padding: 0 .875rem; border-radius: 999px; border: 1px solid hsl(var(--primary-text));
  background: transparent; color: hsl(var(--primary-text)); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ci-chip-filter:hover { background: hsl(var(--hover)); }
button.ci-chip-filter[aria-pressed="true"], .ci-chip-filter[aria-pressed="true"], .ci-chip-filter.is-active { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.ci-search { position: relative; display: flex; align-items: center; min-width: 0; }
.ci-search .ci-icon { position: absolute; left: .875rem; color: hsl(var(--muted-foreground)); pointer-events: none; }
.ci-search input { width: 100%; height: 2.5rem; padding: 0 1rem 0 2.5rem; border-radius: 999px; border: 1px solid hsl(var(--input)); background: hsl(var(--background));
  color: hsl(var(--foreground)); font: inherit; font-size: 14px; }
.ci-search input::placeholder { color: hsl(var(--muted-foreground)); }
.ci-search input:focus { outline: 2px solid hsl(var(--ring)); outline-offset: 1px; }

/* Overlays */
:root { --shadow-pop: 0 12px 32px rgba(18, 18, 30, .16); }
:is(.dark, [data-theme="dark"]) { --shadow-pop: 0 12px 32px rgba(0, 0, 0, .6); }
.ci-overlay { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, .5); }
.ci-modal { width: min(100%, 32rem); max-height: calc(100dvh - 2rem); overflow-y: auto; border-radius: var(--radius-panel); background: hsl(var(--popover)); color: hsl(var(--popover-foreground));
  border: 1px solid hsl(var(--card-border)); box-shadow: var(--shadow-pop); }
.ci-modal-head, .ci-modal-body, .ci-modal-foot { padding: 1.25rem 1.5rem; }
.ci-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid hsl(var(--border)); }
.ci-modal-head h2 { margin: 0; font-size: 1.125rem; }
.ci-modal-foot { display: flex; justify-content: flex-end; gap: .5rem; border-top: 1px solid hsl(var(--border)); }
.ci-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 81; width: min(100%, 26rem); overflow-y: auto; background: hsl(var(--popover)); color: hsl(var(--popover-foreground));
  border-left: 1px solid hsl(var(--card-border)); box-shadow: var(--shadow-pop); }
.ci-menu { min-width: 12rem; padding: .375rem; border-radius: var(--radius); background: hsl(var(--popover)); color: hsl(var(--popover-foreground));
  border: 1px solid hsl(var(--card-border)); box-shadow: var(--shadow-pop); }
.ci-menu-item { display: flex; width: 100%; align-items: center; gap: .5rem; padding: .5rem .75rem; border-radius: calc(var(--radius) - 4px); border: 0; background: transparent;
  color: inherit; font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.ci-menu-item:hover, .ci-menu-item:focus-visible { background: hsl(var(--hover)); }
.ci-menu-item.is-danger { color: hsl(var(--destructive)); }
.ci-menu-sep { height: 1px; margin: .375rem 0; background: hsl(var(--border)); }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + .5rem); transform: translateX(-50%); z-index: 90;
  padding: .375rem .625rem; border-radius: 8px; background: hsl(var(--tip)); color: hsl(var(--tip-foreground)); border: 1px solid hsl(var(--tip-border));
  font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap; pointer-events: none; }
:root { --tip: 240 25% 9%; --tip-foreground: 0 0% 100%; --tip-border: 240 25% 9%; }
:is(.dark, [data-theme="dark"]) { --tip: 240 24% 16%; --tip-foreground: 0 0% 100%; --tip-border: 241 82% 74%; }
.ci-toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 95; display: flex; flex-direction: column; gap: .5rem; width: min(calc(100% - 2rem), 24rem); }
.ci-toast { display: flex; align-items: flex-start; gap: .75rem; padding: .875rem 1rem; border-radius: var(--radius-card); background: hsl(var(--popover));
  color: hsl(var(--popover-foreground)); border: 1px solid hsl(var(--card-border)); box-shadow: var(--shadow-pop); font-size: 14px; }
.ci-toast-mark { width: .875rem; height: .875rem; margin-top: .2rem; flex: none; background: hsl(var(--success));
  border-radius: 62% 38% 56% 44% / 42% 60% 40% 58%; }
.ci-toast.is-error .ci-toast-mark { background: hsl(var(--destructive)); }
.ci-toast.is-warning .ci-toast-mark { background: hsl(var(--warning)); }
.ci-toast.is-info .ci-toast-mark { background: hsl(var(--info)); }
.ci-toast strong { display: block; font-weight: 600; }

/* Page layouts */
.ci-page { display: flex; flex-direction: column; gap: 1.5rem; max-width: 80rem; margin: 0 auto; }
.ci-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; }
.ci-page-head .ci-crumbs { flex-basis: 100%; }
.ci-page-title { margin: 0; font-size: 1.5rem; line-height: 1.2; }
.ci-page-title:not(.ci-display) { font-weight: 600; line-height: 1.25; }
.ci-page-desc { margin: .25rem 0 0; font-size: 14px; color: hsl(var(--muted-foreground)); max-width: 46rem; }
.ci-page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ci-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.ci-toolbar .ci-search { flex: 1 1 16rem; max-width: 24rem; }
.ci-toolbar-count { margin-left: auto; font-size: 13px; color: hsl(var(--muted-foreground)); }
.ci-card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.ci-card { padding: 1.25rem; border-radius: var(--radius-card); background: hsl(var(--card)); border: 1px solid hsl(var(--card-border)); }
.ci-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; padding: 1.25rem 1.5rem; border-radius: var(--radius-panel);
  background: hsl(var(--card)); border: 1px solid hsl(var(--card-border)); }
.ci-tile { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; flex: none; border-radius: 8px; background: hsl(var(--card-inset));
  color: hsl(var(--primary-text)); font-size: 1.25rem; font-weight: 600; }
.ci-summary-name { margin: 0; font-size: 1.375rem; font-weight: 600; line-height: 1.25; }
.ci-facts { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin: 0; flex-basis: 100%; }
.ci-facts div { min-width: 7rem; }
.ci-facts dt { font-size: 12px; font-weight: 600; color: hsl(var(--muted-foreground)); }
.ci-facts dd { margin: .125rem 0 0; font-size: 14px; font-weight: 500; }
.ci-detail { display: grid; gap: 1.5rem; }
@media (min-width: 1100px) { .ci-detail { grid-template-columns: minmax(0, 1fr) 20rem; } }
.ci-side { display: flex; flex-direction: column; gap: 1rem; }
.ci-form { display: flex; flex-direction: column; gap: 1.5rem; max-width: 44rem; }
.ci-form-section { padding: 1.5rem; border-radius: var(--radius-panel); background: hsl(var(--card)); border: 1px solid hsl(var(--card-border)); }
.ci-form-section > h2 { margin: 0 0 1rem; font-size: 1.125rem; }
.ci-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.ci-form-actions.is-sticky { position: sticky; bottom: 0; z-index: 5; padding: .75rem 0; background: hsl(var(--background)); border-top: 1px solid hsl(var(--border)); }
.ci-settings { display: grid; gap: 1.5rem; }
@media (min-width: 1000px) { .ci-settings { grid-template-columns: 13rem minmax(0, 44rem); } }
.ci-settings-nav { display: flex; flex-direction: column; gap: .125rem; }
.ci-settings-nav a { padding: .5rem .75rem; border-radius: var(--radius); color: hsl(var(--muted-foreground)); font-size: 14px; font-weight: 500; text-decoration: none; }
.ci-settings-nav a:hover { background: hsl(var(--hover)); color: hsl(var(--foreground)); }
.ci-settings-nav a[aria-current="page"] { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }

/* States */
.ci-empty-mark { width: 3rem; height: 2.75rem; background: hsl(var(--primary)); border-radius: 62% 38% 56% 44% / 42% 60% 40% 58%; }
.ci-empty-title { margin: .25rem 0 0; font-size: 15px; font-weight: 600; color: hsl(var(--foreground)); }
@keyframes ci-shimmer { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.ci-skeleton { display: block; height: .875rem; border-radius: 999px; background: hsl(var(--muted)); animation: ci-shimmer 1.6s ease-in-out infinite; }
.ci-skeleton.is-block { height: 4rem; border-radius: var(--radius-card); }
.ci-stat-tile { display: flex; flex-direction: column; justify-content: center; }

/* Charts (DESIGN.md Section 3, "Stat tiles and charts"). amplifi_ci::charts writes the markup; js/charts.js adds the
   crosshair, the readout and the player cursor. Marks are 2px lines, a 10% wash under an area, 24px columns at most with a
   4px rounded end and a 2px surface gap, 8px dots with a 2px surface ring, hairline gridlines. Text is never the series colour. */
.ci-chart { --ci-chart-h: 13.75rem; container-type: inline-size; display: flex; flex-direction: column; gap: .75rem; min-width: 0; margin: 0; }
.ci-chart--sm { --ci-chart-h: 9rem; }
.ci-s1 { --s: var(--chart-1); } .ci-s2 { --s: var(--chart-2); } .ci-s3 { --s: var(--chart-3); } .ci-s4 { --s: var(--chart-4); } .ci-s5 { --s: var(--chart-5); }
.ci-chart-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; padding: 0; list-style: none; font-size: 12px; font-weight: 500; color: hsl(var(--muted-foreground)); }
.ci-chart-legend li { display: inline-flex; align-items: center; gap: .375rem; }
.ci-chart-legend b { font-weight: 700; color: hsl(var(--foreground)); }
.ci-chart-key { display: inline-block; flex: none; width: .875rem; height: 2px; border-radius: 1px; background: hsl(var(--s, var(--muted-foreground))); }
.ci-chart-key.is-rect, .ci-chart-key.is-band { width: .625rem; height: .625rem; border-radius: 2px; }
.ci-chart-key.is-band { background: hsl(var(--chart-track)); }
.ci-chart-key.is-compare { height: 0; background: none; border-top: 2px dashed hsl(var(--muted-foreground)); }
.ci-chart-key.is-marker { width: .5rem; height: .5rem; border-radius: 999px; background: hsl(var(--foreground)); }
.ci-chart-body { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .625rem; }
.ci-chart-chapters { grid-column: 2; position: relative; height: 1.25rem; font-size: 12px; font-weight: 500; color: hsl(var(--muted-foreground)); }
.ci-chart-chapters span { position: absolute; top: 0; box-sizing: border-box; padding: 0 .375rem 0 .25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-chart-y { grid-column: 1; position: relative; height: var(--ci-chart-h); font-family: var(--font-num); font-size: 12px; line-height: 1; color: hsl(var(--muted-foreground)); text-align: right; }
.ci-chart-y i { display: block; height: 0; overflow: hidden; visibility: hidden; font-style: normal; white-space: nowrap; }
.ci-chart-y span { position: absolute; right: 0; transform: translateY(50%); white-space: nowrap; }
.ci-chart-plot { grid-column: 2; position: relative; height: var(--ci-chart-h); touch-action: pan-y; }
.ci-chart-plot:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 4px; border-radius: 4px; }
.ci-chart-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ci-chart-grid line, .ci-chart-divider { stroke: hsl(var(--border)); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ci-chart-line { fill: none; stroke: hsl(var(--s)); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ci-chart-line.is-compare { stroke: hsl(var(--muted-foreground)); stroke-dasharray: 5 4; }
.ci-chart-area { fill: hsl(var(--s) / .1); stroke: none; }
.ci-chart-band { fill: hsl(var(--chart-track)); stroke: none; }
.ci-chart-dot, .ci-chart-marker { position: absolute; width: 8px; height: 8px; border-radius: 999px; transform: translate(-50%, 50%); box-shadow: 0 0 0 2px hsl(var(--card)); pointer-events: none; }
.ci-chart-dot { background: hsl(var(--s)); }
.ci-chart-marker { bottom: 0; background: hsl(var(--foreground)); }
.ci-chart-cross, .ci-chart-cursor { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.ci-chart-cross { width: 1px; background: hsl(var(--muted-foreground)); }
.ci-chart-cursor { width: 2px; margin-left: -1px; background: hsl(var(--foreground)); }
[data-ci-player] .ci-chart-plot { cursor: pointer; }
.ci-chart-col { position: absolute; bottom: 0; display: flex; flex-direction: column-reverse; transform: translateX(-50%); transition: opacity .12s; }
.ci-chart-seg { display: block; box-sizing: border-box; flex: none; background: hsl(var(--s)); }
.ci-chart-seg + .ci-chart-seg { border-bottom: 2px solid hsl(var(--card)); }
.ci-chart-seg:last-child { border-radius: 4px 4px 0 0; }
.ci-chart-plot.is-hovering .ci-chart-col:not(.is-hover) { opacity: .45; }
.ci-chart-x { grid-column: 2; position: relative; height: 1rem; margin-top: .5rem; font-family: var(--font-num); font-size: 12px; line-height: 1; color: hsl(var(--muted-foreground)); }
.ci-chart-x span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.ci-chart-x span.is-start { transform: none; }
.ci-chart-x span.is-end { transform: translateX(-100%); }
@container (max-width: 32rem) { .ci-chart-x span.is-minor { display: none; } }
.ci-chart-tip { position: absolute; top: 0; z-index: 5; min-width: 8rem; padding: .5rem .625rem; border-radius: 8px; background: hsl(var(--tip)); color: hsl(var(--tip-foreground));
  border: 1px solid hsl(var(--tip-border)); font-size: 12px; line-height: 1.4; white-space: nowrap; pointer-events: none; }
.ci-chart-tip-head { margin-bottom: .125rem; font-weight: 500; }
.ci-chart-tip-row { display: flex; align-items: center; gap: .375rem; }
.ci-chart-tip-row b { font-family: var(--font-num); font-weight: 700; }
.ci-chart-note { margin: 0; font-size: 12px; color: hsl(var(--muted-foreground)); }
.ci-chart-data > summary { width: fit-content; font-size: 12px; font-weight: 600; color: hsl(var(--primary-text)); cursor: pointer; }
.ci-chart-data .ci-table-wrap { max-height: 20rem; margin-top: .5rem; overflow: auto; }
.ci-share { display: flex; gap: 2px; height: 8px; overflow: hidden; border-radius: 999px; background: hsl(var(--chart-track)); }
.ci-share > span { display: block; flex: 0 1 0; min-width: 2px; background: hsl(var(--s)); }
.ci-spark { display: inline-block; width: 6rem; height: 1.75rem; overflow: visible; vertical-align: middle; }
.ci-spark path { fill: none; stroke: var(--spark, hsl(var(--chart-1))); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ci-spark-dot { fill: var(--spark, hsl(var(--chart-1))); stroke: hsl(var(--card)); stroke-width: 2; }
@media (forced-colors: active) {
  .ci-chart-line, .ci-spark path { stroke: CanvasText; }
  .ci-chart-seg, .ci-share > span, .ci-chart-dot, .ci-chart-key { background: CanvasText; forced-color-adjust: none; }
}

@media (max-width: 767px) {
  .ci-page-head { align-items: flex-start; }
  .ci-summary, .ci-form-section { padding: 1rem 1.25rem; }
  .ci-toolbar .ci-search { max-width: none; }
  .ci-toolbar-count { margin-left: 0; }
}
