:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #14213d; background: #f3f6fb; }
* { box-sizing: border-box; }
body { margin: 0; }
.shell { width: min(1200px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 28px; }
.hero { color: white; background: linear-gradient(120deg, #07265b, #1459a1 72%, #2786cb); border-radius: 24px; padding: clamp(28px, 6vw, 56px); box-shadow: 0 18px 40px #07366a33; }
.eyebrow { font-size: .75rem; letter-spacing: .12em; font-weight: 800; opacity: .75; margin: 0 0 12px; }
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: .94; margin: 0; letter-spacing: -.06em; }
.intro { font-size: 1.1rem; margin: 18px 0 0; opacity: .9; }
.content-toolbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 4px; }
.status { display: flex; align-items: center; gap: 9px; font-size: .9rem; color: #526173; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #20a169; }.dot.failed { background: #dc3d42; }
.view-switch { flex: 0 0 auto; display: flex; gap: 3px; padding: 3px; border: 1px solid #dce5ef; border-radius: 11px; background: #e9eef5; }
.view-button { appearance: none; min-height: 34px; display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 8px; padding: 7px 11px; color: #5b6c7e; background: transparent; font: inherit; font-size: .78rem; font-weight: 750; cursor: pointer; transition: color .16s ease, background .16s ease, box-shadow .16s ease; }
.view-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.view-button.active { color: #0c4c95; background: #fff; box-shadow: 0 1px 5px #2438591a; }
.view-button:hover:not(.active) { color: #244c75; background: #ffffff80; }
.view-button:focus-visible { outline: 3px solid #2786cb55; outline-offset: 2px; }
.regions { display: grid; gap: 36px; }
.region { background: white; border-radius: 20px; padding: 25px; box-shadow: 0 5px 22px #2438590d; }
.region-title { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 19px; }.region-title h2 { margin: 0; font-size: 1.3rem; }.region-title span { font-size: .82rem; background: #eaf2ff; color: #1762ad; padding: 6px 10px; border-radius: 8px; font-weight: 700; }
.retailers { display: grid; gap: 18px; }
.retailer { min-width: 0; padding: 16px; border: 1px solid #e3eaf3; border-radius: 16px; background: #f8fbff; }.retailer > h2 { font-size: .95rem; margin: 0 0 12px; color: #44617c; }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr)); gap: 16px; align-items: stretch; }
.compact-list-head { display: none; }
.offer-card, .empty { border: 1px solid #e3eaf3; border-radius: 18px; overflow: hidden; background: #fff; }.offer-card { min-width: 0; display: flex; flex-direction: column; box-shadow: 0 3px 12px #2438590c; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }.offer-card:hover { border-color: #b9d4ed; box-shadow: 0 12px 28px #2438591a; transform: translateY(-3px); }
.offer-media { position: relative; min-height: 214px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #f8fbff 15%, #eaf2ff); border-bottom: 1px solid #edf2f7; }.offer-media img { position: relative; z-index: 1; width: 100%; height: 214px; padding: 15px 20px 12px; object-fit: contain; background: #fff; }.offer-media.image-missing img { display: none; }.image-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #89a9c8; line-height: .9; text-transform: uppercase; letter-spacing: .08em; }.offer-media.has-image .image-fallback { display: none; }.offer-media.has-image.image-missing .image-fallback { display: flex; }.image-fallback span { font-size: .72rem; font-weight: 700; }.image-fallback strong { font-size: 1.35rem; letter-spacing: -.02em; color: #5f8bb5; }
.offer-card.future-offer { background: #f7f8fa; border-color: #e0e4e8; }.future-offer .offer-media img { opacity: .76; filter: saturate(.68); }.future-offer .merchant, .future-offer .tracked-product, .future-offer .offer-copy h3, .future-offer .prices strong { color: #617283; }.future-offer .description, .future-offer .prices span, .future-offer .validity { color: #788591; }
.media-label { position: absolute; z-index: 2; top: 12px; left: 12px; margin: 0; box-shadow: 0 2px 8px #14213d1f; }
.offer-copy { padding: 18px; flex: 1; display: flex; flex-direction: column; }.card-kicker { min-height: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }.merchant { min-width: 0; font-size: .72rem; text-transform: uppercase; font-weight: 850; letter-spacing: .07em; color: #4878a4; margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.tracked-product { font-size: .76rem; font-weight: 800; color: #0c4c95; margin: 7px 0 5px; }.offer-copy h3 { min-height: 2.34em; font-size: 1.08rem; line-height: 1.17; margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }.description { min-height: 2.7em; font-size: .84rem; line-height: 1.35; color: #65758a; margin: 8px 0 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }.offer-meta { margin-top: auto; padding-top: 14px; border-top: 1px solid #edf1f5; }.detail { flex: 0 0 auto; border-radius: 999px; background: #eaf2ff; color: #1762ad; font-size: .68rem; font-weight: 800; padding: 4px 7px; }.prices { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 12px; align-items: end; }.main-price, .unit-price { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 7px; }.prices span { width: 100%; margin-bottom: 2px; color: #6f7f90; font-size: .65rem; line-height: 1.2; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }.main-price strong { font-size: clamp(1.8rem, 3vw, 2.12rem); line-height: 1; letter-spacing: -.055em; color: #0c4c95; }.main-price s { font-size: .82rem; color: #8694a5; }.unit-price { align-content: end; padding-left: 12px; border-left: 1px solid #dfe8f1; }.unit-price strong { max-width: 100%; font-size: 1.05rem; line-height: 1.08; letter-spacing: -.025em; color: #1762ad; overflow-wrap: anywhere; }.unit-price.unavailable strong { font-size: .78rem; letter-spacing: 0; color: #718094; }.validity { min-height: 2.7em; margin: 14px 0 0; padding-top: 11px; border-top: 1px solid #edf1f5; font-size: .78rem; color: #344d65; line-height: 1.35; }.future-label { display: inline-block; padding: 4px 7px; border-radius: 999px; background: #e3e7eb; color: #657482; font-size: .65rem; font-weight: 800; line-height: 1.2; text-transform: uppercase; letter-spacing: .04em; }
.empty { min-height: 167px; padding: 17px; display: flex; flex-direction: column; justify-content: center; gap: 6px; color: #60758a; font-size: .82rem; }.empty strong { color: #425b73; }.error { background: #fff3f3; border: 1px solid #ffd6d6; color: #8d2525; padding: 20px; border-radius: 14px; }
footer { font-size: .77rem; color: #6c7b8b; padding: 28px 4px 0; }

/* Compact list view */
.compact-view { gap: 24px; }
.compact-view .region { padding-bottom: 20px; }
.compact-view .retailers { gap: 12px; }
.compact-view .retailer { padding: 0; overflow: hidden; }
.compact-view .retailer > h2 { margin: 0; padding: 13px 15px 10px; }
.compact-view .compact-list-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(9rem, 22%); gap: 18px; padding: 7px 15px; border-top: 1px solid #e3eaf3; border-bottom: 1px solid #dce5ee; color: #718094; background: #eff5fb; font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.compact-view .offer-grid { display: block; }
.compact-view .offer-card { display: block; border: 0; border-radius: 0; border-bottom: 1px solid #e6edf4; box-shadow: none; }
.compact-view .offer-card:last-child { border-bottom: 0; }
.compact-view .offer-card:hover { border-color: #e6edf4; background: #f5f9fe; box-shadow: none; transform: none; }
.compact-view .offer-media, .compact-view .card-kicker, .compact-view .tracked-product, .compact-view .description, .compact-view .main-price, .compact-view .validity { display: none; }
.compact-view .offer-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(9rem, 22%); gap: 18px; align-items: center; padding: 0 15px; }
.compact-view .offer-heading { min-width: 0; padding: 10px 0; }
.compact-view .offer-copy h3 { min-height: 0; margin: 0; font-size: .88rem; line-height: 1.25; -webkit-line-clamp: 1; white-space: nowrap; text-overflow: ellipsis; }
.compact-view .offer-meta, .compact-view .prices { display: contents; }
.compact-view .unit-price { min-width: 0; display: block; padding: 10px 0; border: 0; }
.compact-view .unit-price span { display: none; }
.compact-view .unit-price strong { display: block; color: #0c4c95; font-size: .88rem; line-height: 1.2; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-view .unit-price.unavailable strong { font-size: .75rem; }

@media (max-width: 560px) { .shell { width: min(100% - 20px, 1200px); padding-top: 10px; }.hero { border-radius: 16px; }.content-toolbar { min-height: 0; align-items: stretch; flex-direction: column; gap: 10px; padding: 14px 2px; }.status { min-height: 24px; }.view-switch { align-self: flex-start; }.region { padding: 17px; border-radius: 16px; }.retailer { padding: 12px; }.offer-grid { grid-template-columns: 1fr; }.offer-media, .offer-media img { height: 230px; }.offer-media { min-height: 230px; }.offer-copy { padding: 17px; }.main-price strong { font-size: 2.15rem; }.unit-price strong { font-size: 1.12rem; }.compact-view .region { padding: 14px; }.compact-view .compact-list-head, .compact-view .offer-copy { grid-template-columns: minmax(0, 1fr) 7.4rem; gap: 12px; }.compact-view .offer-copy { padding: 0 12px; }.compact-view .compact-list-head { padding-inline: 12px; }.compact-view .offer-copy h3 { font-size: .84rem; }.compact-view .unit-price strong { font-size: .82rem; } }

@media (prefers-reduced-motion: reduce) { .view-button, .offer-card { transition: none; } }

/* Primary page navigation */
[hidden] { display: none !important; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.page-switch { flex: 0 0 auto; display: flex; gap: 5px; padding: 5px; border: 1px solid #ffffff33; border-radius: 13px; background: #061f4a80; backdrop-filter: blur(8px); }
.page-button { appearance: none; min-height: 42px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 9px; padding: 9px 13px; color: #dbeaff; background: transparent; font: inherit; font-size: .84rem; font-weight: 800; cursor: pointer; transition: color .16s ease, background .16s ease; }
.page-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.page-button.active { color: #0b427e; background: #fff; box-shadow: 0 3px 12px #0016333d; }
.page-button:hover:not(.active) { background: #ffffff14; }
.page-button:focus-visible, .tracking-option:focus-visible, .range-switch button:focus-visible { outline: 3px solid #83c6ff; outline-offset: 2px; }

/* Price history overview */
.tracking-page { padding-top: 28px; }
.tracking-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; padding: 28px 30px; border-radius: 20px 20px 0 0; color: #fff; background: linear-gradient(120deg, #102b4f, #174d83); }
.section-kicker { margin: 0 0 7px; color: #9ec9f1; font-size: .69rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.tracking-heading h2 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.45rem); letter-spacing: -.045em; }
.tracking-heading p:last-child { max-width: 620px; margin: 8px 0 0; color: #d2e2f2; font-size: .9rem; line-height: 1.45; }
.tracking-switch { flex: 0 0 auto; display: flex; gap: 4px; padding: 4px; border: 1px solid #ffffff2b; border-radius: 11px; background: #071e3d70; }
.tracking-option { appearance: none; border: 0; border-radius: 8px; padding: 9px 12px; color: #d6e7f7; background: transparent; font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.tracking-option span { display: block; margin-top: 2px; color: #9fb8d0; font-size: .65rem; font-weight: 700; }
.tracking-option.active { color: #0c4c95; background: #fff; }
.tracking-option.active span { color: #5680a8; }
.tracking-toolbar { min-height: 75px; display: flex; align-items: center; justify-content: flex-end; gap: 20px; padding: 13px 20px; border: 1px solid #e0e8f1; border-top: 0; border-radius: 0 0 20px 20px; background: #fff; box-shadow: 0 7px 24px #2438590b; }
.range-switch { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.range-switch button { appearance: none; min-height: 36px; border: 1px solid #b9cce0; border-radius: 8px; padding: 7px 10px; color: #40566e; background: #fff; font: inherit; font-size: .74rem; font-weight: 800; cursor: pointer; transition: color .15s ease, background .15s ease, border-color .15s ease; }
.range-switch button:hover { border-color: #6ba6d8; color: #0c4c95; }
.range-switch button.active { border-color: #0c65bd; color: #fff; background: #0c65bd; }
.history-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr)); gap: 22px; padding-top: 24px; }
.history-grid[aria-busy="true"] { opacity: .58; }
.history-card { min-width: 0; overflow: hidden; border: 1px solid #dfe7ef; border-radius: 19px; background: #fff; box-shadow: 0 5px 22px #2438590d; }
.history-card-title { min-height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 21px; border-bottom: 1px solid #edf1f5; }
.history-card-title p { margin: 0 0 5px; color: #668097; font-size: .64rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.history-card-title h3 { max-width: 30rem; margin: 0; color: #1c3047; font-size: 1.05rem; line-height: 1.23; letter-spacing: -.02em; }
.latest-price { flex: 0 0 auto; display: grid; justify-items: end; }
.latest-price span { color: #75889b; font-size: .63rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.latest-price strong { color: #f05a1a; font-size: 1.3rem; line-height: 1.1; letter-spacing: -.04em; }
.latest-price small { max-width: 10rem; overflow: hidden; color: #63768a; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.chart-wrap { position: relative; width: 100%; padding: 8px 12px 0; touch-action: pan-y; }
.price-chart { display: block; width: 100%; height: auto; overflow: visible; outline: none; cursor: crosshair; }
.price-chart:focus-visible { border-radius: 8px; outline: 3px solid #2786cb55; outline-offset: -3px; }
.chart-grid line { stroke: #c7d5e2; stroke-width: 1; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; }
.chart-grid text, .chart-axis text { fill: #728294; font-size: 11px; font-weight: 700; }
.chart-axis .chart-unit { fill: #52677c; font-size: 10px; font-weight: 850; }
.chart-area { fill: #ff6a2012; }
.chart-line { fill: none; stroke: #ff5b13; stroke-width: 2.15; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-latest, .chart-focus circle { fill: #ff5b13; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-focus { opacity: 0; transition: opacity .1s ease; }
.chart-focus.visible { opacity: 1; }
.chart-focus line { stroke: #40566e; stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.chart-tooltip { position: absolute; z-index: 3; width: max-content; max-width: min(250px, 75%); display: grid; gap: 2px; padding: 9px 11px; border-radius: 8px; color: #fff; background: #f45b18; box-shadow: 0 8px 22px #6e2a1238; transform: translate(-50%, calc(-100% - 9px)); pointer-events: none; }
.chart-tooltip.align-right { transform: translate(-100%, calc(-100% - 9px)); }
.chart-tooltip strong { font-size: .92rem; }
.chart-tooltip span { font-size: .76rem; font-weight: 750; }
.chart-tooltip small { overflow: hidden; font-size: .65rem; line-height: 1.25; opacity: .9; text-overflow: ellipsis; white-space: nowrap; }
.history-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #edf1f5; background: #fbfcfe; }
.history-stat { min-width: 0; display: grid; gap: 2px; padding: 13px 15px 15px; border-right: 1px solid #e6edf4; }
.history-stat:last-child { border-right: 0; }
.history-stat span { color: #718396; font-size: .63rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.history-stat strong { color: #20354b; font-size: .94rem; letter-spacing: -.025em; }
.history-stat small { overflow: hidden; color: #718094; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.history-empty-state { min-height: 285px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 28px; color: #6b7d90; text-align: center; }
.history-empty-state::before { content: ''; width: 42px; height: 42px; border: 2px dashed #aabfd2; border-radius: 50%; }
.history-empty-state strong { color: #40566e; }
.history-empty-state span { max-width: 28rem; font-size: .78rem; line-height: 1.45; }

@media (max-width: 780px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .page-switch { align-self: stretch; }
  .page-button { flex: 1; justify-content: center; }
  .tracking-heading { align-items: stretch; flex-direction: column; padding: 22px; }
  .tracking-switch { align-self: flex-start; }
  .tracking-toolbar { align-items: stretch; flex-direction: column; }
  .range-switch { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .tracking-page { padding-top: 14px; }
  .tracking-heading { border-radius: 16px 16px 0 0; }
  .tracking-switch { width: 100%; }
  .tracking-option { flex: 1; }
  .tracking-toolbar { border-radius: 0 0 16px 16px; padding: 14px; }
  .range-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .range-switch button:last-child { grid-column: 1 / -1; }
  .history-grid { gap: 15px; padding-top: 15px; }
  .history-card-title { align-items: flex-start; gap: 12px; padding: 16px; }
  .history-card-title h3 { font-size: .94rem; }
  .latest-price strong { font-size: 1.25rem; }
  .latest-price small { max-width: 7rem; }
  .chart-wrap { padding-inline: 3px; }
  .chart-grid text { font-size: 10px; }
  .history-stat { padding: 11px 9px 13px; }
  .history-stat strong { font-size: .91rem; }
  .history-stat small { font-size: .57rem; }
}

@media (prefers-reduced-motion: reduce) { .page-button, .range-switch button, .chart-focus { transition: none; } }
