/* ICISY visual system. Presentation only: identity, ranking and delivery stay unchanged. */
:root {
  color-scheme: dark;
  --bg: #071421;
  --panel: #102438;
  --line: #344e67;
  --text: #f4f9fd;
  --muted: #b0c3d4;
  --accent: #80f2cd;
  --accent2: #a5c9ff;
  --ui-surface: #102438;
  --ui-raised: #163149;
  --ui-input: #091c2c;
  --ui-focus: #a5c9ff;
  --ui-shadow: 0 16px 48px rgb(0 8 18 / 22%);
  --ui-radius: 24px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

:root[data-icisy-theme="admin"],
:root[data-icisy-theme="light"] {
  color-scheme: light;
  --bg: #f1f6f6;
  --panel: #ffffff;
  --line: #c9dada;
  --text: #163038;
  --muted: #4c6872;
  --accent: #096c58;
  --accent2: #235e9c;
  --ui-surface: #ffffff;
  --ui-raised: #eaf4f1;
  --ui-input: #ffffff;
  --ui-focus: #086956;
  --ui-shadow: 0 10px 32px rgb(21 56 57 / 6%);
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  background: radial-gradient(ellipse at 12% 0, #163b4c 0, transparent 42%),
    radial-gradient(ellipse at 100% 22%, #103d3b 0, transparent 40%), var(--bg);
}
/* Native hidden must win over component grid/flex declarations on every page. */
[hidden] { display: none !important; }
[data-icisy-theme="admin"] body,
[data-icisy-theme="light"] body {
  background: radial-gradient(ellipse at 0 0, #dcf0e9, transparent 50%), var(--bg);
}
body :is(h1, h2, h3) { text-wrap: balance; }
body :is(h1, h2) { letter-spacing: -.035em; }
body :is(p, small, label, strong) { overflow-wrap: break-word; }
body :is(button, input, select, textarea) { font-family: inherit; }
body :is(button, .primary-link, .button-link, .ghost, .offline-retry) {
  min-height: 44px;
  border-radius: 12px;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
body :is(button, summary, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}
body :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  min-width: 0;
  border-radius: 12px;
  font-size: 16px; /* Avoid automatic iOS zoom when focusing a field. */
}
body :is(input, select):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { min-height: 46px; }
body :is(button, input, select, textarea):disabled { cursor: not-allowed; }
body :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--accent); }
body :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
/* Native menus must follow the chosen theme too, not only the closed selector. */
[data-icisy-theme] body select, body select option, body select optgroup { background-color: var(--ui-input); color: var(--text); }
[data-icisy-theme="light"] body select { color-scheme: light; }
[data-icisy-theme="dark"] body select { color-scheme: dark; }
[data-icisy-theme="light"] body .result-price-filter .price-filter-feedback { color: var(--muted); }
[data-icisy-theme="light"] body .result-price-filter .price-filter-feedback[data-error="true"] { color: #9f2536; }
body .eyebrow { color: var(--accent); letter-spacing: .12em; }

/* Shared public header and footer; do not change hidden/permission states. */
body > .nav {
  max-width: 1280px;
  min-height: 90px;
  gap: 18px;
  padding: 20px 28px;
  border-bottom: 1px solid rgb(176 195 212 / 15%);
}
body > .nav > nav { gap: 6px; }
body > .nav > nav a { padding: 10px 12px; border-radius: 10px; color: var(--muted); }
body > .nav > nav a:hover { background: var(--ui-raised); color: var(--text); }
body .site-brand-copy strong,
body .account-brand strong { color: var(--text); font-size: 24px; letter-spacing: .035em; }
body .site-brand-copy small,
body .account-brand small { color: var(--muted); font-size: 12px; }
body .nav .ghost {
  border: 1px solid var(--line);
  background: var(--ui-raised);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}
body .nav .ghost:hover { border-color: var(--accent); }
body .site-footer {
  margin-top: 48px;
  padding: 40px 24px;
  border-color: var(--line);
  background: rgb(5 17 29 / 36%);
  color: var(--muted);
}
body .site-footer-title,
body .site-footer-legal a { color: var(--muted); }
body .site-social-link {
  width: 44px; height: 44px;
  border-color: var(--line);
  background: var(--ui-surface);
  color: var(--text);
}

/* Home and comparison: one clear search surface, readable gradients. */
body .hero {
  max-width: 1280px;
  margin: 56px auto 32px;
  gap: 40px;
  padding: 0 28px;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .8fr);
}
body .hero h1 {
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.08;
  letter-spacing: -.045em;
  margin: 16px 0;
}
body .hero-summary { font-size: 18px; line-height: 1.6; color: var(--muted); }
body .hero-kicker { color: var(--accent); font-size: 11px; }
body .searchbox {
  padding: 22px;
  border: 1px solid #507c85;
  border-radius: var(--ui-radius);
  background: linear-gradient(140deg, #19374a, #102b37 80%);
  box-shadow: var(--ui-shadow), 0 0 0 5px rgb(128 242 205 / 4%);
}
body .searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(128 242 205 / 18%), var(--ui-shadow); }
body .query-label { margin-bottom: 12px; font-size: 13px; color: var(--text); }
body .searchbox textarea {
  padding: 16px;
  min-height: 110px;
  max-height: none;
  border: 1px solid #496378;
  border-radius: 14px;
  background: var(--ui-input);
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
}
body .searchbox textarea::placeholder { color: #b0c3d4; opacity: 1; }
body .searchbox .example-queries { margin: 14px 0; color: var(--text); gap: 8px; }
body .searchbox .example-chip {
  min-height: 36px;
  border: 1px solid #80b4a8;
  border-radius: 999px;
  background: #c5f5e4;
  color: #103d33;
  font-size: 12px;
  font-weight: 750;
  box-shadow: none;
}
body .searchbox .example-chip:hover { background: #e2fff4; }
body .searchbox .primary-search-controls { gap: 10px; grid-template-columns: 1fr; }
body .searchbox .primary-search-controls :is(input, select) {
  border: 1px solid #496378;
  background: var(--ui-input);
  color: var(--text);
}
body .searchbox #maxPrice,
body .searchbox #paymentPreference { font-size: 16px; }
body .searchbox .primary-search-controls #searchBtn {
  min-height: 48px;
  background: var(--accent);
  color: #072b23;
  font-size: 16px;
  box-shadow: none;
}
body .search-hint { color: var(--muted); opacity: 1; }
body .trust { color: var(--muted); font-size: 12px; line-height: 1.7; }
body .home-window {
  padding: 26px;
  border-radius: var(--ui-radius);
  border-color: var(--line);
  background: linear-gradient(145deg, #173348, #102438);
  box-shadow: var(--ui-shadow);
}
body .home-window h2 { font-size: 25px; line-height: 1.2; }
body .home-window p { font-size: 14px; color: var(--muted); }
body .business-window { background: linear-gradient(135deg, #15433e, #102c36); }
body :is(.results-section, .steps) { max-width: 1280px; padding-inline: 28px; margin-block: 64px; }
body :is(.section-head h2, .steps h2) { font-size: clamp(28px, 3vw, 38px); margin-block: 8px 20px; }
body .results { gap: 22px; }
body .results .comparison-group {
  border-radius: var(--ui-radius);
  background: linear-gradient(145deg, #16374b, #102438 55%, #133d39);
  border-color: #46677d;
  box-shadow: var(--ui-shadow);
}
body .comparison-group-head { padding: 24px; background: rgb(13 32 49 / 42%); }
body .comparison-group-head strong { font-size: 21px; line-height: 1.4; }
body .comparison-group-head :is(span, .comparison-summary) { color: var(--muted); }
body .results .offer-row { padding: 22px 24px; background: rgb(12 34 49 / 34%); border-color: var(--line); }
body .results .offer-row:hover { background: rgb(31 66 76 / 55%); }
body .offer-row :is(small, em) { color: var(--muted); line-height: 1.5; }
body .offer-row b { font-size: 16px; }
body :is(.offer-link, .smart-watch-store-link) { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
body .recommendation-grid { background: rgb(4 22 34 / 32%); }
body .result-controls { border-color: var(--line); border-radius: 18px; background: var(--ui-raised); }
body .result-controls-title { min-height: 52px; }
/* Result filters and native menus share the page palette, including open options. */
body #resultControls :is(input, select, option, optgroup) {
  background-color: var(--ui-raised); color: var(--text); border-color: var(--line);
  color-scheme: inherit;
}
body #resultControls .result-controls-title { color: var(--text); }
body #resultControls .result-controls-title span { color: var(--muted); }
body #resultControls .source-health { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
body #resultControls .source-other-disclosure > summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12px; }
body .grid article { background: var(--ui-surface); border-color: var(--line); padding: 26px; border-radius: var(--ui-radius); }

/* Account, watches, preferences and notifications use the same card family. */
body .account-shell { max-width: 1180px; margin-top: 36px; padding-inline: 28px; }
body :is(.account-card, .legal-card, .contact-card, .hero-panel, .benefit) {
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: linear-gradient(145deg, #122c40, #102438);
  box-shadow: var(--ui-shadow);
}
body .account-entry { max-width: 740px; }
body .account-entry-intro { margin-bottom: 28px; }
body .account-entry-intro h1 { line-height: 1.13; font-size: clamp(32px, 4vw, 48px); }
body .account-entry-intro > p:last-child { color: var(--muted); }
body .account-entry-card { padding: 12px; }
body .account-entry-option > summary { min-height: 80px; padding: 18px; }
body .account-entry-option[open] > summary { background: #163d3b; }
body .account-entry-option > summary small { color: var(--muted); font-size: 12px; }
body .entry-content { padding: 6px 18px 22px; }
body :is(.account-muted, .passkey-note, .smart-watch-helper, .smart-watch-usage) { color: var(--muted); }
body .account-card label { font-size: 14px; }
body .account-card :is(input, select):not([type="checkbox"]):not([type="radio"]) {
  background: var(--ui-input); color: var(--text); border-color: var(--line);
}
body .account-card button.secondary { border-color: var(--line); background: var(--ui-raised); color: var(--text); }
html body .account-primary-nav { padding: 6px; gap: 6px; background: var(--ui-input); border: 1px solid var(--line); border-radius: 18px; }
html body .account-primary-nav button { border-color: transparent; background: transparent; color: var(--muted); }
html body .account-primary-nav button.active { background: #c5f5e4; color: #103d33; box-shadow: none; }
html body .account-home-action { border-color: var(--line); background: var(--ui-input); border-radius: 18px; }
html body .account-home-action span { color: var(--muted); font-size: 13px; }
body .alert-center-head { gap: 24px; }
body .alert-center-tabs { border-color: var(--line); background: var(--ui-input); }
body .account-card .alert-center-tab.active { background: #214d43; color: #d4ffef; }
body .smart-watch-card { padding: 22px; border-color: var(--line); border-radius: 20px; background: var(--ui-input); }
body .smart-watch-card:hover { background: #102b3d; }
body .smart-watch-summary-meta { color: var(--muted); line-height: 1.6; }
body .smart-watch-best-offer { padding: 14px; border-color: #437a70; background: #123b35; }
body .smart-watch-target-reached { border-color: var(--accent); }
body .watch-create-form[data-smart-watch="1"] { border-color: #437a70; border-radius: 18px; background: #103032; }
body .account-search-return { box-shadow: none; border-color: #578b7e; background: linear-gradient(120deg, #214d43, #123c3c); }

/* Business, contact, legal and first-party email return. */
body :is(.page-hero, .page-section) { max-width: 1280px; padding-inline: 28px; }
body .page-hero { gap: 40px; padding-block: 56px; }
body .page-hero h1 { font-size: clamp(38px, 4.6vw, 64px); line-height: 1.12; }
body .lead { color: var(--muted); font-size: 18px; }
body .page-section { padding-block: 48px; }
body .benefit p { color: var(--muted); }
body .contact-shell { padding-top: 48px; }
body .contact-shell h1 { line-height: 1.12; }
body .field :is(input, select, textarea) { background: var(--ui-input); color: var(--text); border-color: var(--line); }
body .legal-card { padding: clamp(24px, 4vw, 44px); }
body .legal-card h1 { line-height: 1.15; }
body .legal-card p { max-width: 75ch; }
body .offline-retry { display: inline-flex; align-items: center; padding: 12px 18px; background: var(--accent); color: #072b23; font-weight: 800; }
[data-icisy-theme="light"] .alert-shell { background: transparent; min-height: calc(100vh - 90px); }
[data-icisy-theme="light"] .alert-card { border-color: var(--line); box-shadow: var(--ui-shadow); }
[data-icisy-theme="light"] .site-footer { background: #eaf4f1; }

/* User-selected appearance. Keep component status and permission states intact. */
body .appearance-toggle { margin-left: 0; flex: 0 0 auto; }
/* One line initially; script grows with text and caps very long descriptions. */
body .searchbox #query { height: 50px; min-height: 50px; max-height: none; padding: 12px 14px; font-size: 16px; line-height: 24px; resize: none; overflow-y: hidden; }
body .searchbox #query::placeholder { color: var(--muted); opacity: .9; }
[data-icisy-app="standalone"] body > .nav { min-height: 56px; padding-block: 10px; }
[data-icisy-app="standalone"] .nav > :is(.site-brand, .account-brand, .brand),
[data-icisy-app="standalone"] .site-footer-title { display: none; }
[data-icisy-app="standalone"] body > .account-nav { display: flex; flex-wrap: wrap; }
[data-icisy-app="standalone"] body > .account-nav .account-search-return { width: auto; flex: 1 1 180px; min-width: 0; }
[data-icisy-app="standalone"] body .hero { margin-top: 20px; }
[data-icisy-app="standalone"] body .account-shell { margin-top: 20px; }
[data-icisy-theme="light"] body :is(h1,h2,h3,h4,strong,label,summary) { color: var(--text); }
[data-icisy-theme="light"] body a { color: var(--accent); }
[data-icisy-theme="light"] body :is(.searchbox,.home-window,.account-card,.legal-card,.contact-card,.hero-panel,.benefit) {
  background: linear-gradient(140deg, #ffffff, #eff8f4); border-color: var(--line);
}
[data-icisy-theme="light"] body .searchbox { box-shadow: var(--ui-shadow), 0 0 0 5px rgb(9 108 88 / 3%); }
[data-icisy-theme="light"] body .results-section .result-controls { background: linear-gradient(120deg,#e1f4e9,#f5fbf8); }
[data-icisy-theme="light"] body :is(.result-controls-title span,.result-price-filter,.result-price-fields label,.request-ref) { color: var(--muted); }
[data-icisy-theme="light"] body .result-price-fields input { background: var(--ui-input); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body .result-price-fields button { background: var(--ui-raised); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body .result-price-fields button[type="submit"] { background: var(--accent); color: #fff; }
[data-icisy-theme="light"] body :is(.quick-summary article,.source-chip,.discovery-note,.empty-state,.loading-card) { background: linear-gradient(140deg,#ffffff,#edf8f4); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body :is(.source-chip.bad,.error-state) { border-color: #d895a1; color: #a02b3e; }
[data-icisy-theme="light"] body :is(.empty-state-icon,.tag,.compare-note) { background: var(--ui-raised); color: var(--accent); }
[data-icisy-theme="light"] body .empty-actions button { background: var(--accent); color: #fff; }
[data-icisy-theme="light"] body .empty-actions button.secondary { background: var(--ui-raised); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body .business-window { background: linear-gradient(135deg,#e1f4e9,#f5fbf8); }
[data-icisy-theme="light"] body :is(.agent-head,.agent-flow,.window-link,.window-kicker,.example-queries > span) { color: var(--accent); }
[data-icisy-theme="light"] body :is(.searchbox textarea,.primary-search-controls input,.primary-search-controls select) { border-color: var(--line); }
[data-icisy-theme="light"] body .searchbox textarea::placeholder { color: var(--muted); }
[data-icisy-theme="light"] body :is(.primary-link,.offline-retry,.contact-actions button,.offer-link,.smart-watch-store-link),
[data-icisy-theme="light"] body .searchbox #searchBtn { background: var(--accent); color: #ffffff; }
[data-icisy-theme="light"] body :is(.primary-link,.offer-link,.smart-watch-store-link) strong { color: inherit; }
[data-icisy-theme="light"] body .comparison-group { background: linear-gradient(140deg,#ffffff,#edf8f4); border-color: var(--line); }
[data-icisy-theme="light"] body :is(.comparison-group-head,.recommendation-grid,.comparison-insight,.offer-row,.product-details) { background: rgb(219 241 232 / 45%); border-color: var(--line); }
[data-icisy-theme="light"] body .offer-row:hover { background: #e7f5ef; }
[data-icisy-theme="light"] body .product-details summary:hover { background: #dcefe5; }
[data-icisy-theme="light"] body .product-details :is(dt,p,summary small) { color: var(--muted); }
[data-icisy-theme="light"] body .product-details dd { color: var(--text); }
[data-icisy-theme="light"] body .product-details dl div { border-color: var(--line); }
[data-icisy-theme="light"] body .product-media.is-missing { background: var(--ui-raised); border-color: var(--line); }
[data-icisy-theme="light"] body .product-media.is-missing span { color: var(--muted); }
[data-icisy-theme="light"] body :is(.recommendation-card,.comparison-proof,.product-history-trigger,.payment-price-option,.price-history,.saved-search-home-bar,.saved-search-card,.saved-search-dialog,.passkey-item,.legal-meta,.benefit span,.impact-card,.install-guide) { background: var(--ui-raised); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body :is(.why,.offer-action-note,.offer-freshness,.comparison-summary,.contact-status,.secondary-contact,.privacy-check,.hero-panel li,.clarity p,.business-cta p,.legal-card p,.legal-card li,.legal-meta span,.impact-card p,.saved-search-meta,.saved-search-status,.passkey-note) { color: var(--muted); }
/* Every merchant uses these shared verified financing rows; no dark islands in light mode. */
body .financing-options-list > span { background: var(--ui-raised); color: var(--text); border-color: var(--line); overflow-wrap: anywhere; }
body .financing-proof { background: var(--ui-raised); color: var(--text); border-color: var(--line); }
body .financing-terms { border-color: var(--line); }
body .financing-options-list > small { color: var(--muted); }
body .source-health { display: block; }
.source-results-disclosure { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--ui-surface); }
.source-results-disclosure summary { cursor: pointer; color: var(--text); font-weight: 700; }
.source-results-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.source-other-disclosure { margin-top: 12px; font-size: 12px; }
[data-icisy-theme="light"] body :is(.comparison-group-head strong,.offer-store strong,.offer-row b,.payment-price-option strong,.impact-card strong,.saved-search-card-query) { color: var(--text); }
[data-icisy-theme="light"] body :is(.offer-badges span,.comparison-insight,.score,.brand-filter-bar) { color: #14503f; background: #def1e7; border-color: #97c8b5; }
[data-icisy-theme="light"] body :is(.account-entry-option[open] > summary,.account-profile-nav,.account-primary-nav,.alert-center-tabs,.alert-channel-card,.alert-column,.watch-create-product,.watch-create-form[data-smart-watch="1"],.smart-watch-card,.smart-watch-details,.app-notification-card,.app-notification-empty,.app-notification-media.is-missing,.watch-duplicate-popup) { background: var(--ui-raised); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body :is(.account-home-action:hover,.smart-watch-card:hover) { background: #e2f2e9; }
[data-icisy-theme="light"] body :is(.account-home-action strong,.check > span,.smart-watch-details > summary,.app-notification-head strong,.preference-block summary,.app-notification-state) { color: var(--text); }
[data-icisy-theme="light"] body :is(.account-card button:not(.federated-icon),.passkey-login,.app-notification-open) { background: var(--accent); color: #fff; }
[data-icisy-theme="light"] body :is(.account-card button.secondary,.member-head button.secondary,.account-primary-nav button,.account-profile-nav button,.account-card .account-home-action,.account-card .alert-center-tab,.watch-duplicate-popup-close) { background: var(--ui-input); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body :is(.account-primary-nav button.active,.account-profile-nav button.active,.account-card .alert-center-tab.active) { background: #ceeadd; color: #103d33; }
[data-icisy-theme="light"] body .account-search-return { background: linear-gradient(120deg,#d7eee2,#ecf8f1); color: #14503f; border-color: #97c8b5; }
[data-icisy-theme="light"] body :is(.account-search-return small,.entry-chevron,.entry-icon) { color: var(--accent); }
[data-icisy-theme="light"] body .app-notification-card[data-read="false"] .app-notification-state { background: #ceeadd; color: #14503f; border-color: #97c8b5; }
[data-icisy-theme="light"] body .app-notification-status { background: #def3e7; color: #14503f; border-color: #97c8b5; }
[data-icisy-theme="light"] body .channel-state { background: var(--ui-raised); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body .channel-state :is(span,small) { color: var(--muted); }
[data-icisy-theme="light"] body .channel-state strong[data-state="active"] { color: #14503f; }
[data-icisy-theme="light"] body .channel-state strong[data-state="paused"] { color: #765016; }
[data-icisy-theme="light"] body .channel-state strong[data-state="off"] { color: #a02b3e; }
[data-icisy-theme="light"] body .preference-block summary::after { color: var(--accent); }
[data-icisy-theme="light"] body .saved-preference-state { background: var(--ui-raised); color: var(--muted); border-color: var(--line); }
[data-icisy-theme="light"] body .app-notification-status.error { background: #ffedf0; color: #a02b3e; border-color: #d895a1; }
[data-icisy-theme="light"] body .legal-warning { background: #fff3da; color: #765016 !important; border-color: #d8bd87; }
[data-icisy-theme="light"] body :is(.smart-watch-best-offer,.smart-watch-goal-banner,.smart-watch-create-helper,.account-status,.consent-save-status) { background: #def3e7; color: #14503f; border-color: #97c8b5; }
[data-icisy-theme="light"] body :is(.smart-watch-goal-copy strong,.smart-watch-goal-copy small,.smart-watch-check-state.is-fresh,.preference-status[data-state="ok"],.contact-status.success) { color: #14503f; }
[data-icisy-theme="light"] body .smart-watch-card.smart-watch-target-reached { background: linear-gradient(145deg,#d7f4e4,#f5fff9); border-color: #35876c; box-shadow: inset 4px 0 0 #35876c,var(--ui-shadow); }
[data-icisy-theme="light"] body :is(.smart-watch-check-state.is-due,.legal-warning) { color: #765016; }
[data-icisy-theme="light"] body :is(.smart-watch-check-state.is-overdue,.preference-status[data-state="error"],.contact-status.error,.app-notification-status.error,.passkey-status.error) { color: #a02b3e; }
[data-icisy-theme="light"] body :is(.account-status.error,.consent-save-status.error) { background: #ffedf0; color: #a02b3e; border-color: #d895a1; }
[data-icisy-theme="light"] body .smart-watch-expiry { color: #14503f !important; }
[data-icisy-theme="light"] body .alert-tab-count { background: #d5eade; color: #14503f !important; }
[data-icisy-theme="light"] body :is(.app-notification-copy,.app-notification-meta,.saved-search-count,.saved-search-empty,.preference-status,.preference-block summary small,.smart-watch-card > .account-muted,.field,.contact-shell header p) { color: var(--muted); }
[data-icisy-theme="light"] body :is(.product-price-history-panel,.product-history-context,.product-history-metric,.product-history-event,.product-history-store,.product-history-chart-card,.product-history-chart-wrap) { background: var(--ui-surface); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body :is(.product-history-context-explanation,.product-history-note,.product-history-chart-caption,.product-history-store-name,.product-history-axis-label,.product-history-scale-labels,.product-history-metric span) { color: var(--muted); fill: var(--muted); }
[data-icisy-theme="light"] body .product-history-grid { stroke: #c9dada; }
[data-icisy-theme="light"] body :is(.product-history-table,.product-history-table th) { background: var(--ui-surface); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body .product-history-table :is(td,small) { color: var(--muted); border-color: var(--line); }
[data-icisy-theme="light"] body :is(.product-history-current-label) { fill: #765016; }
[data-icisy-theme="light"] body .product-history-chart-empty { background: var(--ui-raised); border-color: var(--line); }
[data-icisy-theme="light"] body .product-history-chart-empty p { color: var(--muted); }
[data-icisy-theme="light"] body :is(.product-history-windows,.product-history-range,.product-history-context-confidence,.product-history-empty-state) { background: var(--ui-raised); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body :is(.product-history-head span,.product-history-context-explanation,.product-history-context-evidence,.product-history-current span,.product-history-scale-labels span,.product-history-scale-caption,.product-history-note,.product-history-empty,.product-history-loading,.product-history-section-title > span,.product-history-event small,.product-history-event span) { color: var(--muted); }
[data-icisy-theme="light"] body :is(.product-history-head small,.product-history-context-head small,.product-history-section-title small) { color: var(--accent); }
[data-icisy-theme="light"] body .product-history-event-change.down .product-history-event-direction { background: #def3e7; color: #14503f; }
[data-icisy-theme="light"] body .product-history-event-change.up .product-history-event-direction { background: #fff3da; color: #765016; }
[data-icisy-theme="light"] body :is(.product-history-windows button,.product-history-stores button,.product-history-close,.product-history-series-toggle) { background: var(--ui-raised); color: var(--text); border-color: var(--line); }
[data-icisy-theme="light"] body .product-history-windows button.active { background: var(--accent); color: #fff; }
[data-icisy-theme="dark"] body :is(.alert-shell) { background: transparent; }
[data-icisy-theme="dark"] body :is(.alert-card,.alert-price) { background: var(--ui-surface); color: var(--text); border-color: var(--line); }
[data-icisy-theme="dark"] body .alert-card :is(h1,h2,strong) { color: var(--text); }
[data-icisy-theme="dark"] body .alert-card p { color: var(--muted); }
[data-icisy-theme="light"] body .alert-primary { background: var(--accent); color: #fff; }
[data-icisy-theme="dark"] body .alert-primary { background: var(--accent); color: #072b23; }
[data-icisy-theme="dark"] body :is(.alert-muted,.alert-merchant,.alert-price span,.alert-price small) { color: var(--muted); }
[data-icisy-theme="dark"] body .alert-secondary { color: var(--accent); }

/* Administration: light, mint accents and comfortable operational density. */
[data-icisy-theme="admin"] .shell { max-width: 1520px; padding: 32px 32px 48px; }
[data-icisy-theme="admin"] :is(h1, h2) { color: var(--text); }
[data-icisy-theme="admin"] .topbar { align-items: center; margin-bottom: 24px; }
[data-icisy-theme="admin"] .topbar h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; }
[data-icisy-theme="admin"] .topbar .eyebrow { display: flex; align-items: center; gap: 8px; }
[data-icisy-theme="admin"] .topbar .eyebrow::before { content: ""; width: 28px; height: 28px; border-radius: 8px; background: #071421 url('/app-icon-192.svg') center / cover no-repeat; }
[data-icisy-theme="admin"] :is(.muted, .source-meta, .metric span, .metric small) { color: var(--muted); }
[data-icisy-theme="admin"] :is(.primary, .admin-nav a.active, .scheduler-tab.active) { background: #125e50; color: #fff; }
[data-icisy-theme="admin"] .secondary { background: #dfefe9; color: #174d40; }
[data-icisy-theme="admin"] .ghost { border-color: var(--line); color: var(--text); background: #fff; }
[data-icisy-theme="admin"] button:not(:disabled):hover { box-shadow: 0 3px 12px rgb(21 56 57 / 12%); }
[data-icisy-theme="admin"] .admin-nav {
  padding: 7px; gap: 4px; border-color: var(--line); border-radius: 16px;
  background: rgb(255 255 255 / 96%); box-shadow: var(--ui-shadow);
}
[data-icisy-theme="admin"] .admin-nav a { min-height: 42px; font-size: 13px; padding: 10px 14px; }
[data-icisy-theme="admin"] :is(.metric, .panel, .login-card, .approval-guide) { border-color: var(--line); border-radius: 20px; box-shadow: var(--ui-shadow); }
[data-icisy-theme="admin"] .metric { position: relative; padding: 24px; border-top: 3px solid #409d85; }
[data-icisy-theme="admin"] .metric strong { color: #164b43; font-size: 32px; font-variant-numeric: tabular-nums; }
[data-icisy-theme="admin"] .panel { padding: 24px; }
[data-icisy-theme="admin"] .workspace-grid > .panel { min-width: 0; }
[data-icisy-theme="admin"] .panel-head > div { min-width: 0; }
[data-icisy-theme="admin"] .import-form > label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; font-weight: 750; }
[data-icisy-theme="admin"] .import-form :is(input, select) { width: 100%; max-width: 100%; border: 1px solid var(--line); padding: 10px; background: var(--ui-input); color: var(--text); }
[data-icisy-theme="admin"] .panel-head h2 { font-size: 22px; line-height: 1.3; }
[data-icisy-theme="admin"] .panel-head .muted { font-size: 14px; }
[data-icisy-theme="admin"] .table-wrap { border-color: var(--line); border-radius: 14px; overscroll-behavior-inline: contain; }
[data-icisy-theme="admin"] table th { background: #eaf4f1; color: #375e58; font-size: 11px; padding: 15px 14px; }
[data-icisy-theme="admin"] table td { padding: 15px 14px; font-size: 13px; line-height: 1.5; }
[data-icisy-theme="admin"] table tbody tr:hover { background: #f1faf6; }
[data-icisy-theme="admin"] .source-error-row { background: #fff4f4; }
[data-icisy-theme="admin"] :is(.merchant-toolbar, .catalog-toolbar, .approval-toolbar, .opportunity-toolbar) label { color: #46646b; font-size: 11px; letter-spacing: .035em; }
[data-icisy-theme="admin"] :is(.merchant-toolbar, .catalog-toolbar, .approval-toolbar, .form-grid, .window-control) :is(input, select) { border-color: var(--line); color: var(--text); }
[data-icisy-theme="admin"] :is(.scheduler-tabs, .project-view-tabs, .catalog-section-tabs) { padding: 6px; background: #e7f1ee; border: 1px solid var(--line); border-radius: 16px; }
[data-icisy-theme="admin"] .catalog-section-tab { color: #42665e; }
[data-icisy-theme="admin"] .catalog-section-tab:hover { background: #d4e9e0; color: #173e32; }
[data-icisy-theme="admin"] .catalog-section-tab.active { background: #125e50; color: #fff; box-shadow: none; }
[data-icisy-theme="admin"] .intelligence-metric { background: #fff; border-color: var(--line); padding: 18px; border-radius: 16px; }
[data-icisy-theme="admin"] .intelligence-metric strong { color: #096c58; }
[data-icisy-theme="admin"] .approval-row { padding: 20px; border-color: var(--line); border-radius: 18px; box-shadow: var(--ui-shadow); }
[data-icisy-theme="admin"] .approval-product strong { font-size: 15px; line-height: 1.5; }
[data-icisy-theme="admin"] .approval-price strong { font-size: 19px; font-variant-numeric: tabular-nums; }
[data-icisy-theme="admin"] .approval-actions :is(button, .button-link) { min-height: 40px; font-size: 12px; }
[data-icisy-theme="admin"] .login-card { padding: 36px; }
[data-icisy-theme="admin"] .brand-mark {
  width: 56px; height: 56px; background: #071421 url('/app-icon-192.svg') center / cover no-repeat;
  color: transparent; border-radius: 16px;
}
[data-icisy-theme="admin"] .status { border: 1px solid #bad5d4; background: #e5f2f0; color: #255a50; }
[data-icisy-theme="admin"] .status.error-state { border-color: #e7b8b8; background: #ffeded; color: #922c2c; }
[data-icisy-theme="admin"] footer { color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; }

@media (max-width: 1100px) {
  body > .nav { flex-wrap: wrap; gap: 12px; }
  body > .nav > nav { margin-left: 0; }
  body .hero { gap: 24px; grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr); }
  body .home-window { padding: 22px; }
}
@media (max-width: 850px) {
  body > .nav > nav { display: none; }
  body .hero { display: block; margin-top: 32px; padding-top: 12px; }
  body .hero h1 { max-width: 720px; font-size: clamp(36px, 7vw, 54px); }
  body .desktop-paths { display: none; }
  body .account-shell { margin-top: 28px; }
  body .account-nav { justify-content: flex-start; }
  body .account-brand { order: -1; flex: 1 1 auto; }
  body .account-search-return { margin-left: auto; }
}
@media (max-width: 600px) {
  body > .nav { min-height: 80px; padding: 16px; gap: 10px; }
  body .site-brand { flex: 1 1 180px; }
  body .site-brand-copy small, body .account-brand small { font-size: 11px; white-space: normal; max-width: 180px; }
  body .site-brand-copy strong, body .account-brand strong { font-size: 22px; }
  body :is(.hero, .results-section, .steps, .account-shell, .page-hero, .page-section, .contact-shell) { padding-inline: 16px; }
  body .hero h1 { font-size: 36px; }
  body .hero-summary { font-size: 16px; }
  body .searchbox { padding: 16px; border-radius: 20px; }
  body .searchbox textarea { min-height: 120px; font-size: 16px; }
  body .searchbox .example-chip { min-height: 40px; padding: 8px 12px; }
  body .results-section { margin-block: 44px; }
  body .comparison-group-head, body .results .offer-row { padding: 18px; }
  body .account-card { padding: 20px; border-radius: 20px; }
  body .account-entry-card { padding: 8px; }
  body .account-entry-option > summary { padding: 14px 10px; }
  body .entry-content { padding-inline: 10px; }
  body .account-search-return { padding: 10px 12px; }
  body .account-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  body .account-nav .site-brand { grid-column: 1; grid-row: 1; }
  body .account-nav #installBtn { grid-column: 2; grid-row: 1; margin: 0; padding-inline: 10px; font-size: 12px; }
  body .account-nav .account-search-return { grid-column: 1 / -1; margin: 0; }
  body .smart-watch-card { padding: 16px; }
  body .smart-watch-best-offer { align-items: stretch; }
  [data-icisy-theme="admin"] .shell { padding: 20px 14px 36px; }
  [data-icisy-theme="admin"] .panel { padding: 16px; border-radius: 16px; }
  [data-icisy-theme="admin"] .metric { padding: 16px; }
  [data-icisy-theme="admin"] .metric strong { font-size: 26px; }
  [data-icisy-theme="admin"] .approval-row { padding: 16px; }
  [data-icisy-theme="admin"] .admin-nav a { padding: 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body :is(button, summary, a, input, select, textarea, .smart-watch-card) { transition: none; }
}
@media (forced-colors: active) {
  body :is(.account-card, .panel, .metric, .comparison-group, .searchbox) { border: 1px solid CanvasText; }
  body :is(button, a):focus-visible { outline-color: Highlight; }
}

/* 36HN: decisión compacta, con condiciones accesibles bajo demanda. */
/* 36HO: cinco opciones del producto, una sola barra y paneles por tienda. */
body .comparison-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--ui-surface);
}
body .comparison-actions :is(.watch-link, .product-history-trigger, .comparison-action) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ui-raised);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}
body .comparison-actions .watch-link { background: var(--accent); color: var(--bg); border-color: var(--accent); }
body .comparison-heading-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
body .comparison-heading-labels > small { margin: 0; }
body .comparison-group-head .comparison-best-store { display: inline-flex; padding: 6px 10px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent); color: var(--bg); font-size: 12px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
body .comparison-group-head .comparison-head-price-block { flex: 0 1 320px; min-width: 0; text-align: right; }
body .comparison-featured-price { margin-bottom: 8px; }
body .comparison-featured-price > small { color: var(--muted); font-size: 11px; letter-spacing: .3px; margin-bottom: 4px; }
body .comparison-group-head .comparison-featured-price > b { display: block; color: var(--accent); font-size: clamp(28px, 4vw, 38px); font-weight: 900; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
body .comparison-featured-price > em { display: block; color: var(--text); font-size: 12px; font-style: normal; margin-top: 6px; overflow-wrap: anywhere; }
body .comparison-group-head .comparison-head-price-block .offer-row.compact-offer { display: block; padding: 0; border: 0; box-shadow: none; background: transparent; margin-top: 10px; }
body .comparison-head-price-block .offer-decision { padding: 0; border: 0; }
body .comparison-head-price-block .offer-link { text-align: left; }
body .comparison-head-price-block .offer-link strong { font-size: 13px; line-height: 1.3; }
body .comparison-group-head .comparison-head-price-block .offer-link :is(small, strong, .offer-link-arrow) { color: var(--bg); }
body .comparison-head-price-block .offer-action-note { text-align: left; }
body .comparison-actions :is(button, a):hover { border-color: var(--accent); }
body .comparison-actions button[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
body .comparison-action-panel { padding: 16px 22px; background: var(--ui-surface); border-bottom: 1px solid var(--line); max-height: min(65vh, 600px); overflow-y: auto; }
body .comparison-action-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
body .comparison-panel-close { background: var(--ui-raised); color: var(--text); border: 1px solid var(--line); padding: 8px 12px; }
body .comparison-store-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
body .comparison-store-panel { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--ui-raised); }
body .comparison-store-title { display: block; padding: 12px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text); }
body .comparison-store-panel .offer-disclosure-body > :is(small, b, em) { display: block; }
body .comparison-store-panel .offer-disclosure-body > small { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
body .comparison-store-panel .offer-disclosure-body > b { color: var(--text); font-size: 16px; line-height: 1.4; }
body .comparison-store-panel .offer-disclosure-body > em { color: var(--muted); font-size: 12px; font-style: normal; line-height: 1.5; margin-top: 4px; }
body .comparison-store-panels > .recommendation-grid { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); padding: 0; border: 0; background: transparent; }
body .comparison-action-panel.product-details :is(dl, p) { padding-inline: 0; }
@media (max-width: 850px) {
  body .comparison-group-head .comparison-head-price-block { margin-top: 14px; text-align: left; }
  body .comparison-actions { padding: 12px 16px; gap: 6px; }
  body .comparison-actions > :is(button, a) { flex: 1 1 140px; }
  body .comparison-store-panels { grid-template-columns: minmax(0, 1fr); }
  body .comparison-action-panel { padding: 14px 16px; }
}
body .results .offer-row.compact-offer {
  grid-template-columns: minmax(0, 1.2fr) minmax(150px, .8fr) minmax(190px, 1fr);
  gap: 12px 20px;
  padding: 16px 22px;
  align-items: center;
}
body .compact-offer > * { min-width: 0; }
body .compact-offer .offer-store { grid-column: auto; }
body .compact-offer .offer-store strong { font-size: 16px; }
body .compact-offer .offer-stock { margin: 3px 0 0; font-size: 11px; }
body .compact-offer .offer-badges { gap: 4px; margin-top: 6px; }
body .compact-offer .offer-badges span { padding: 3px 6px; font-size: 8px; letter-spacing: .25px; }
body .compact-offer .offer-price-value {
  display: block;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
body .compact-offer.is-best-price { box-shadow: inset 3px 0 0 var(--accent); }
body .compact-offer.is-best-price .offer-price-value { color: var(--accent); }
body .compact-offer .offer-price-condition { color: var(--accent); font-weight: 800; }
body .compact-offer .offer-decision { border: 0; padding: 0; grid-column: auto; }
body .compact-offer .offer-link { min-height: 44px; padding: 8px 12px; }
body .compact-offer .offer-link small { color: inherit; }
body .comparison-insight small { color: var(--accent); }
body .offer-disclosures { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
body .offer-disclosure { flex: 1 1 230px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--ui-surface); }
body :is(.offer-disclosure, .recommendation-disclosure) > summary {
  cursor: pointer;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 750;
  color: var(--text);
  min-height: 44px;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
body .offer-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
body .offer-disclosure-body { padding: 12px; overflow-wrap: anywhere; }
body .offer-disclosure-body > small:not(:first-child) { margin-top: 12px; }
body .offer-disclosure-body .price-history { margin-top: 12px; }
body .recommendation-disclosure { border-bottom: 1px solid var(--line); background: var(--ui-surface); }
body .recommendation-disclosure > summary { padding-inline: 22px; color: var(--muted); }
body .recommendation-disclosure .recommendation-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); padding-top: 0; border: 0; background: transparent; }
@media (max-width: 850px) {
  body .results .offer-row.compact-offer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 16px; }
  body .compact-offer .offer-price { text-align: right; }
  body .compact-offer .offer-decision { grid-column: 1 / -1; }
  body .offer-disclosure { flex-basis: 100%; }
  body .recommendation-disclosure > summary { padding-inline: 16px; }
}

/* Watch details and delivery history follow the chosen theme, not legacy dark fills. */
body #watchSection {
  --watch-warning: #ffe3a3;
  --watch-negative: #ffb4b4;
}
[data-icisy-theme="light"] body #watchSection {
  --watch-warning: #765016;
  --watch-negative: #a02b3e;
}
body #watchSection :is(.smart-watch-rule-info, .smart-watch-tool-group) {
  background: var(--ui-surface);
  color: var(--text);
  border-color: var(--line);
}
body #watchSection .alert-event {
  background: var(--ui-raised);
  color: var(--text);
  border-color: var(--line);
}
body #watchSection .smart-watch-details { border-color: var(--line); }
body #watchSection :is(.smart-watch-tool-label, .smart-watch-details > summary) { color: var(--text); }
body #watchSection .smart-watch-details > summary:hover { color: var(--accent); }
body #watchSection :is(.watch-meta, .smart-watch-detail-meta, .history-filter) { color: var(--muted); }
body #watchSection :is(select, option, optgroup) {
  background-color: var(--ui-input);
  color: var(--text);
  border-color: var(--line);
  color-scheme: inherit;
}
body #watchSection :is(.watch-state, .delivery-state) {
  background: var(--ui-input);
  color: var(--muted);
  border-color: var(--line);
}
body #watchSection :is(.watch-state[data-state="active"], .delivery-state[data-state="sent"]) { color: var(--accent); }
body #watchSection :is(.watch-state[data-state="paused"], .delivery-state[data-state="pending"]) { color: var(--watch-warning); }
body #watchSection .delivery-state[data-state="failed"] { color: var(--watch-negative); }
