/* Market watch on the Ealyx design system: `ealyx/tokens.css` and `ealyx/ealyx-ui.css` are copied as delivered from
   agentic-design-system (skill/ealyx-brand/assets, 8fea320) and the icons from its Lucide base set (`icons/`). What
   follows only arranges those components for this app; every value is a token. */

.contents { display: contents; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Side menu: no logo or lockup until the tool has an official name, only its functional name. */
.brand-tile { width: 32px; height: 32px; flex: none; border-radius: var(--ealyx-radius-sm); background: var(--ealyx-color-ui-sidebar-accent); color: var(--ealyx-color-ui-primary); display: inline-flex; align-items: center; justify-content: center; }
.brand-name { display: grid; font-weight: 700; color: var(--ealyx-color-ui-foreground); white-space: nowrap; }
.brand-name small { font-weight: 400; font-size: var(--ealyx-typography-ui-body-sm-font-size); color: var(--ealyx-color-ui-muted-foreground); }
.e-shell[data-collapsed] .brand-name { display: none; }
.nav-button { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; }
.nav-button:focus-visible { outline: var(--ealyx-size-focus-width) solid var(--ealyx-color-ui-ring); outline-offset: calc(-1 * var(--ealyx-size-focus-width)); }
.e-user { min-width: 0; }
.e-user > div { min-width: 0; }
.e-user small { display: block; overflow: hidden; text-overflow: ellipsis; }

/* Page blocks */
.block + .block { margin-top: var(--ealyx-space-2xl); }
.block > .e-alert + .e-alert { margin-top: var(--ealyx-space-sm); }
.alerts { display: grid; gap: var(--ealyx-space-sm); margin-bottom: var(--ealyx-space-xl); }
.alerts .e-alert > .e-icon { margin-top: 2px; }
.alert-list { margin: 2px 0 0; padding-left: var(--ealyx-space-lg); color: var(--ealyx-color-ui-muted-foreground); }
.e-grid--4.block-stats { margin-bottom: var(--ealyx-space-2xl); }
.header-actions { display: flex; gap: var(--ealyx-space-sm); flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: var(--ealyx-space-xs); margin-bottom: var(--ealyx-space-lg); color: var(--ealyx-color-ui-muted-foreground); }
.back .e-icon { width: var(--ealyx-size-icon-sm); height: var(--ealyx-size-icon-sm); }
.title-row { display: flex; align-items: center; gap: var(--ealyx-space-md); flex-wrap: wrap; }

/* Tables: inline row actions, cells with several lines */
.row-actions { display: flex; justify-content: flex-end; gap: var(--ealyx-space-xs); }
.row-actions form { display: contents; }
/* «Equipos» and «Productos»: the same buttons a row, each in its own narrow cell so they line up down the table. */
.e-table td.row-action { width: 1%; padding-inline: 0 var(--ealyx-space-xs); text-align: right; }
.e-table td.row-action:last-child { padding-inline-end: var(--ealyx-space-md); }
/* The «Gestionar» panel: one action a row, what it does on the left and its button on the right; «Dar de baja» apart. */
.manage-list { margin: 0; padding: 0; list-style: none; display: grid; }
.manage-action { display: flex; align-items: center; justify-content: space-between; gap: var(--ealyx-space-lg); padding-block: var(--ealyx-space-md); border-bottom: 1px solid var(--ealyx-color-ui-border); }
.manage-action:last-child { border-bottom: 0; }
.manage-action > :last-child { flex: none; }
.manage-action p { margin: 2px 0 0; font-size: var(--ealyx-typography-ui-body-sm-font-size); color: var(--ealyx-color-ui-muted-foreground); }
.manage-action__title { margin: 0; font-size: var(--ealyx-typography-ui-body-font-size); font-weight: 600; color: var(--ealyx-color-ui-foreground); }
.manage-action--apart { margin-top: var(--ealyx-space-lg); border-top: 1px solid var(--ealyx-color-ui-border); }
.manage-action:has(+ .manage-action--apart) { border-bottom: 0; }
.manage-action--apart:first-child { margin-top: 0; border-top: 0; }
.e-table td.stacked { white-space: normal; vertical-align: top; padding-block: var(--ealyx-space-md); height: auto; }
.e-table td.stacked > div + div { margin-top: 2px; }
.e-table tr.paused td:not(:last-child) { color: var(--ealyx-color-ui-muted-foreground); }
.e-table code { font-family: var(--ealyx-font-family-mono); font-size: var(--ealyx-typography-ui-body-sm-font-size); }
.figure { font-weight: 700; color: var(--ealyx-color-ui-foreground); font-variant-numeric: tabular-nums; }
.money { font-variant-numeric: tabular-nums; }
.small { font-size: var(--ealyx-typography-ui-body-sm-font-size); }
.max { font-weight: 600; color: var(--ealyx-color-ui-primary); font-variant-numeric: tabular-nums; }
.e-table th.round-head { white-space: normal; vertical-align: bottom; padding-block: var(--ealyx-space-sm); height: auto; }
.round-head a { color: var(--ealyx-color-ui-foreground); text-transform: none; letter-spacing: 0; font-size: var(--ealyx-typography-ui-body-font-size); font-weight: 600; }
.round-head span { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Forms in sheets and cards */
.form-stack { display: grid; gap: var(--ealyx-space-form-field); }
.e-input--select { appearance: auto; }
.choices { display: flex; flex-wrap: wrap; gap: var(--ealyx-space-sm); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice:has(input:checked) .e-chip { background: var(--ealyx-color-ui-primary); color: var(--ealyx-color-ui-primary-foreground); border-color: transparent; font-weight: 700; }
.choice:has(input:focus-visible) .e-chip { outline: var(--ealyx-size-focus-width) solid var(--ealyx-color-ui-ring); outline-offset: var(--ealyx-size-focus-offset); }
.times { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ealyx-space-form-column); }
.e-sheet__body .e-form-section + .e-form-section { margin-top: var(--ealyx-space-form-field); }
.formula { margin: var(--ealyx-space-xs) 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 2px var(--ealyx-space-xl); color: var(--ealyx-color-ui-foreground-body); }
.formula dt { font-weight: 600; color: var(--ealyx-color-ui-foreground); }
.formula dd { margin: 0; }
.formula dd::before { content: "→ "; color: var(--ealyx-color-ui-primary); }
.two-columns .e-form-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (min-width: 720px) { .two-columns .e-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.badges { display: inline-flex; gap: var(--ealyx-space-xs); }
.token { display: block; margin-top: var(--ealyx-space-sm); padding: var(--ealyx-space-sm) var(--ealyx-space-md); border-radius: var(--ealyx-radius-sm); background: var(--ealyx-color-ui-card); color: var(--ealyx-color-ui-foreground); font-family: var(--ealyx-font-family-mono); word-break: break-all; user-select: all; }
.connect .e-card__body { display: grid; gap: var(--ealyx-space-lg); }
.connect-way { display: grid; gap: var(--ealyx-space-sm); justify-items: start; }
.connect-way p, .connect .e-card__body > p { margin: 0; }
.connect-way .token { margin-top: 0; width: 100%; }
.connect-status { margin: 0; display: flex; align-items: center; gap: var(--ealyx-space-sm); }
.connect-way .pair-code { width: auto; font-size: var(--ealyx-typography-ui-h1-font-size); font-weight: 700; letter-spacing: var(--ealyx-typography-ui-label-letter-spacing); }
.first-install { margin: 0; padding-left: var(--ealyx-space-lg); display: grid; gap: var(--ealyx-space-xs); font-size: var(--ealyx-typography-ui-body-sm-font-size); color: var(--ealyx-color-ui-foreground-body); }
.stretches { display: grid; gap: var(--ealyx-space-lg); }
.stretch { display: grid; gap: var(--ealyx-space-sm); padding-bottom: var(--ealyx-space-lg); border-bottom: 1px solid var(--ealyx-color-ui-border); }
[data-other-owner][hidden] { display: none; }
.parameter-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }

/* Sign in: a centred card on the canvas */
.sign-in { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: var(--ealyx-space-xl); background: var(--ealyx-color-ui-sidebar); }
.sign-in .e-card { width: min(420px, 100%); }
.sign-in .e-card__body { display: grid; gap: var(--ealyx-space-lg); }
.contents-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
@media (max-width: 600px) { .formula { grid-template-columns: 1fr; } .formula dd { margin-bottom: var(--ealyx-space-xs); } }

/* Rounds in progress: the bar, what is happening now, and the notice at the top of every page */
.progress { display: flex; width: 100%; height: 8px; border-radius: var(--ealyx-radius-pill); background: var(--ealyx-color-ui-muted); overflow: hidden; }
.progress > span { display: block; height: 100%; transition: width .4s ease; }
.progress__done { background: var(--ealyx-color-status-success); }
.progress__failed { background: var(--ealyx-color-status-error); }
.progress__cancelled { background: var(--ealyx-color-ui-muted-foreground); }
.progress__running { background: var(--ealyx-color-status-live); animation: e-live 1.6s ease-in-out infinite; }
.progress--sm { width: 72px; height: 4px; }
.done-cell { display: inline-flex; align-items: center; gap: var(--ealyx-space-sm); }
.run { margin-bottom: var(--ealyx-space-lg); }
.run .e-card__body { display: grid; gap: var(--ealyx-space-md); }
.run__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--ealyx-space-md); color: var(--ealyx-color-ui-foreground); }
.run__head .figure { white-space: nowrap; }
.run__now { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--ealyx-space-xs); }
.run__now li { display: flex; gap: var(--ealyx-space-sm); align-items: flex-start; }
.run__now .e-icon { flex: none; margin-top: 2px; width: var(--ealyx-size-icon-sm); height: var(--ealyx-size-icon-sm); }
.live-notice { flex: none; display: inline-flex; align-items: center; gap: var(--ealyx-space-sm); min-width: 0; padding: 2px var(--ealyx-space-md); border-radius: var(--ealyx-radius-pill); background: var(--ealyx-color-ui-primary-container-high); color: var(--ealyx-color-ui-primary); font-weight: 600; font-size: var(--ealyx-typography-ui-body-sm-font-size); text-decoration: none; }
.live-notice[hidden] { display: none; }
.live-notice__dot { width: 6px; height: 6px; flex: none; border-radius: var(--ealyx-radius-circle); background: var(--ealyx-color-status-live); animation: e-live 1.6s ease-in-out infinite; }
.live-notice__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }
.live-notice__bar { width: 48px; height: 4px; flex: none; border-radius: var(--ealyx-radius-pill); background: var(--ealyx-color-ui-muted); overflow: hidden; }
.live-notice__bar span { display: block; height: 100%; width: 0; background: var(--ealyx-color-ui-primary); transition: width .4s ease; }
@media (max-width: 600px) { .live-notice__bar { display: none; } .live-notice__text { max-width: 16ch; } }
@media (prefers-reduced-motion: reduce) { .progress__running, .live-notice__dot { animation: none; } .progress > span, .live-notice__bar span { transition: none; } }

/* Where a search's figures come from */
.source { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--ealyx-space-lg); margin-bottom: var(--ealyx-space-2xl); align-items: start; }
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: var(--ealyx-space-sm) var(--ealyx-space-xl); color: var(--ealyx-color-ui-foreground-body); }
.facts dt { font-weight: 600; color: var(--ealyx-color-ui-foreground); }
.facts dd { margin: 0; }
.source .e-card__body > p { margin: var(--ealyx-space-md) 0 0; }
@media (max-width: 600px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: var(--ealyx-space-sm); } }
.glossary { margin: 0 0 var(--ealyx-space-sm); }
/* The competitors' columns: after the marketplaces, set apart by a line and named as such. */
.e-table .competitor--first { border-left: 1px solid var(--ealyx-color-ui-border); }
.column-kind { display: block; font-size: var(--ealyx-typography-ui-label-font-size); letter-spacing: var(--ealyx-typography-ui-label-letter-spacing); text-transform: uppercase; color: var(--ealyx-color-ui-primary); }

/* «Por ronda» / «Por producto»: the same prices seen two ways */
.view-switch { margin-bottom: var(--ealyx-space-lg); }
/* Links, not tabs: the page they are on is marked as the design system marks a selected tab. */
.view-switch .e-tab[aria-current="page"] { background: var(--ealyx-color-ui-card); color: var(--ealyx-color-ui-foreground); box-shadow: var(--ealyx-shadow-sm); }
