:root {
  --ink: #18181e;
  --muted: #565762;
  --bg: #f4f4f7;
  --line: #e0e0e7;
  --lime: #e4233b;
  --green: #b51f35;
  --red: #d71932;
  --red-deep: #b41027;
  --night: #17171c;
  --paper: #fff;
}
.km-icon { width: 19px; height: 19px; flex: 0 0 19px; vertical-align: middle; }
body { background: var(--bg); color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #f8465c; outline-offset: 3px; }
.header { background: var(--night); border-color: #35353d; padding-inline: clamp(16px, 3.5vw, 60px); }
.header .brand-light, .header nav a.active, .header nav a:hover { color: #ff6677; }
.header nav a { color: #dedee6; gap: 6px; }
.header nav a .km-icon { width: 15px; height: 15px; flex-basis: 15px; }
.site-install, .primary { background: var(--red); color: #fff; }
.site-install:hover, .primary:hover { background: var(--red-deep); color: #fff; }
.market {
  background: radial-gradient(ellipse at 95% 0%, #471c27 0, transparent 55%), var(--night);
  color: #fff;
  padding: clamp(26px, 4vw, 52px) 0 32px;
  border-bottom: 4px solid var(--red);
}
.market-inner { max-width: 1400px; margin: auto; padding-inline: clamp(16px, 4vw, 48px); }
.market-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.market-kicker { display: flex; align-items: center; gap: 8px; font-weight: 750; color: #ffa4af; margin: 0 0 9px; }
.market-heading h1, .market-heading h2 { font: 850 clamp(31px, 5.5vw, 68px)/.98 system-ui, sans-serif; letter-spacing: -.055em; margin: 0 0 12px; color: #fff; }
.market-heading p:last-child { color: #d2d2dd; margin: 0; }
.market-map { display: inline-flex; align-items: center; gap: 9px; background: #cf172e; border-radius: 12px; padding: 12px 15px; font-weight: 780; white-space: nowrap; color: #fff; }
.market-map:hover { background: #e4243b; }
.market-cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.market-card {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  border: 1px solid #474752; border-radius: 15px; background: #ffffff0c; color: white;
  min-width: 0; padding: clamp(10px, 2vw, 18px);
  transition: background .2s, border-color .2s, transform .2s;
}
.market-card:hover, .market-card[aria-current] { background: #5b2632; border-color: #e66375; }
.market-card:hover { transform: translateY(-3px); }
.market-label { display: flex; align-items: center; gap: 7px; color: #e2dce2; font-size: 13px; line-height: 1.2; }
.market-label .km-icon { color: #ff8795; }
.market-card strong { font-size: clamp(22px, 3.8vw, 40px); font-variant-numeric: tabular-nums; letter-spacing: -.055em; line-height: 1.15; margin: 8px 0 3px; white-space: nowrap; }
.market-card strong small { font-size: 12px; letter-spacing: 0; color: #d2ced7; }
.market-delta { font-weight: 700; font-size: 12px; color: #dbdbe4; }
.market-delta.up { color: #ff9aab; }
.market-delta.down { color: #83e7c2; }
.market-delta small { color: #d2d2dd; font-weight: 500; }
.market-chart { padding: 14px clamp(10px, 2vw, 22px); background: #202027; border: 1px solid #3e3e48; border-radius: 16px; margin-bottom: 10px; }
.market-chart.showing .trend-svg { animation: chart-in .35s ease-out both; }
.market-chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.market-chart-head h3 { font-size: clamp(16px, 2.3vw, 22px); margin: 0; }
.market-chart-head > span, .market-source, .market-empty { color: #ceced8; }
.market-chart-head > span, .market-source { font-size: 12px; }
.market-source { margin: 10px 0 0; }
.trend-svg { width: 100%; max-height: 245px; display: block; overflow: visible; margin: 8px 0 4px; }
.trend-svg text { fill: #e0dce4; font: 13px system-ui, sans-serif; }
.trend-gridline { stroke: #575563; opacity: .55; vector-effect: non-scaling-stroke; }
.trend-svg circle { transition: r .15s; }
.trend-svg circle:hover { r: 7; }
.trend-totals { display: flex; flex-wrap: wrap; gap: 6px 15px; font-size: 13px; color: #e0dce4; }
.trend-totals b { color: #fff; }
.trend-table { margin-top: 12px; }
.trend-table summary { cursor: pointer; width: fit-content; color: #ffb1bc; margin-bottom: 8px; }
.trend-table .table-wrap { color: #16161b; }
@keyframes chart-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.workspace { background: #e7e7eb; }
.map-embedded .workspace { height: min(76vh, 760px); min-height: 460px; }
.sidebar { background: #fff; }
.sidebar .intro h2 { font: 850 clamp(27px, 3vw, 44px)/1 system-ui, sans-serif; letter-spacing: -.055em; margin: 4px 0 10px; }
.sidebar .intro h1 span, .sidebar .intro h2 span { color: var(--red-deep); }
.searchbox, .filter-row select { border-color: #e1dee3; background: #f7f6f8; }
.fuel-tabs button, .route-toggle, .secondary, .summary-fuel { background: #f3edf0; color: #581c28; }
.fuel-tabs .selected, .mobile-nav button:first-child { background: var(--red); color: white; }
.station-row:hover, .row-selected { background: #fff1f3; }
.map-controls button:hover { background: #ffe7eb; color: #a11026; }
.map-summary { color: #fff; background: #23232c; }
.map-summary b, .map-summary b span, .map-summary b.green { color: #fff; }
.map-summary small { color: #e0dce3; }
.map-summary .summary-icon, .map-label .pill { color: #9a1528; background: #ffdde3; }
.price-pin { background: #202029; color: #fff; }
.price-pin.best, .price-pin.chosen { background: #bd142c; color: #fff; }
.price-pin.best span, .price-pin.chosen span { color: #fff; }
.cluster-pin { background: #241e26; color: #fff; border-color: #ea4c60; }
.cluster-pin small { color: #ffdce1; }
.portal-hero, .news-hero { background: radial-gradient(ellipse at 92% 0%, #671f31, transparent 65%), var(--night); color: #fff; }
.portal-hero p, .news-hero p { color: #e7e2e7; }
.tool-card > span { background: #fce5ea; color: #a8132a; }
.tool-card:hover, .news-card:hover, .page-card:hover { border-color: #d3475a; }
.page-card, .calculator, .portal-copy, .news-card { box-shadow: 0 7px 22px #2112200a; }
.calc-results > div, .article-cta { background: #fcedf0; }
.calc-grid input:not([type=checkbox]), .calc-grid select { border-color: #cac5cc; }
.article-byline, .news-card-body small { color: #56505a; }
.share-row a { border-color: #dc8d9c; }
.breadcrumb a, .article a:not(.primary), .portal-copy > a:not(.primary), .page-card > a, .fuel-links a { color: #a21328; }
.stats-grid .page-card strong { color: #a51229; font-variant-numeric: tabular-nums; }
.live-dot, .source-dot { background: #df2f47; }
.footer.km-footer {
  display: block; background: #17171c; color: #fff; text-align: left;
  padding: 36px clamp(17px, 5vw, 70px) max(26px, env(safe-area-inset-bottom));
}
.km-footer-grid { max-width: 1350px; margin: auto; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.km-footer h2 { margin: 0 0 12px; font-size: 16px; color: #fff; }
.km-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.km-footer a { color: #eee9ef; }
.km-footer a:hover { color: #ff9baa; text-decoration: underline; }
.km-footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 15px; max-width: 1350px; margin: 22px auto 0; padding-top: 16px; border-top: 1px solid #464650; }
.sign-tools { display: grid; gap: 10px; margin: 18px 0; }
.sign-tools label { display: grid; gap: 5px; font-weight: 750; }
.sign-tools input, .sign-tools select { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid #bcbcc6; background: white; color: #16161b; font-size: 16px; }
.sign-group { content-visibility: auto; contain-intrinsic-size: auto 900px; margin-block: 25px; }
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%,155px), 1fr)); gap: 10px; }
.sign-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px; min-width: 0; transition: border-color .18s; }
.sign-card:hover { border-color: #db4156; }
.sign-card a { display: grid; place-items: center; height: 98px; margin-bottom: 8px; background: #f5f5f8; border-radius: 8px; }
.sign-card img { display: block; width: 100%; height: 86px; object-fit: contain; padding: 6px; }
.sign-card h3 { margin: 4px 0; font-size: 13px; overflow-wrap: anywhere; }
.sign-card small { color: #991a2b; font-weight: 800; }
.sign-card p { margin: 4px 0; font-size: 12px; color: #5a555d; }
@media (max-width: 1060px) {
  .header nav a .km-icon { display: none; }
}
@media (max-width: 740px) {
  .header { padding-inline: 13px; }
  .header nav a { font-size: 12px !important; }
  .header nav a[data-mobile] .km-icon { display: block; }
  .market { padding-block: 22px 16px; }
  .market-heading { flex-direction: column; align-items: flex-start; margin-bottom: 14px; }
  .market-kicker { font-size: 12px; margin-bottom: 6px; }
  .market-map { min-height: 42px; }
  .market-cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .market-card { min-height: 86px; }
  .trend-svg { height: 145px; }
  .trend-svg text { font-size: 18px; }
  .map-embedded .workspace { height: 88dvh; min-height: 355px; }
  .mobile-nav { background: #17171c; }
  .mobile-nav a, .mobile-nav button { background: #33333e; }
  .sidebar .intro h2 { font-size: 29px; }
  .km-footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sign-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .market-card, .market-chart .trend-svg, .sign-card { transition: none; animation: none !important; }
  .market-card:hover { transform: none; }
}
.price-pin { border-color: #575561; }
.price-pin:after { border-color: inherit; }
.price-pin span { color: #dedce4; }
.price-pin.best, .price-pin.chosen { border-color: #d71932; }
.map-legend i { background: #d71932; }
.map-legend i:nth-of-type(2) { background: #23232c; border-color: #555461; }
.map-label, .map-view { color: #24242b; }
.load-more, .pagination [aria-current], .fuel-links a, .code-wrap, .editor-toolbar button { background: #fce9ed; color: #97152a; }
.site-install { display: inline-flex; align-items: center; gap: 6px; }
.tool-card { transition: transform .2s, border-color .2s; }
.tool-card:hover { transform: translateY(-3px); }
@media (max-width: 740px) {
  .site-install { display: none; }
  .mobile-nav a, .mobile-nav button { display: flex; justify-content: center; gap: 4px; }
  .mobile-nav .km-icon { width: 15px; height: 15px; flex-basis: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .tool-card { transition: none; }
  .tool-card:hover { transform: none; }
}
.market-plot { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,23%); align-items: center; gap: 15px; }
.trend-metrics { display: grid; gap: 8px; }
.trend-metrics > div { display: grid; gap: 3px; padding: 12px; background: #2a2933; border-radius: 9px; }
.trend-metrics span { color: #ded9e2; font-size: 12px; }
.trend-metrics strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.oil-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit,minmax(min(100%,370px),1fr)); }
.oil-quote .trend-svg text { fill: #34323b; font-size: 18px; }
.oil-quote .trend-gridline { stroke: #b6b0bb; }
.oil-quote h2 { margin: 0 0 8px; }
@media (max-width: 740px) {
  .market-plot { grid-template-columns: 1fr; gap: 0; }
  .trend-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 10px; }
}
.sign-tools { grid-template-columns: 2fr 1fr; }
.sign-image-error a { display: inline; height: auto; padding: 0; margin: 0; color: #9c182c; background: none; }
@media (max-width: 560px) {
  .sign-tools { grid-template-columns: 1fr; }
}
.app.dark { --ink: #f3ecf0; --line: #42343b; --muted: #ddd3d9; }
.app.dark .sidebar, .app.dark .source { background: #211e24; }
.app.dark .station-row:hover, .app.dark .row-selected { background: #3a222c; }
.app.dark .intro h2, .app.dark .station-price b { color: #f6e9ef; }
.app.dark .intro h1 span, .app.dark .intro h2 span { color: #ff8595; }
.route-toggle .push-right { margin-inline-start: auto; }
@media (prefers-reduced-motion: no-preference) {
  .market-map .km-icon:last-child { transition: transform .2s; }
  .market-map:hover .km-icon:last-child { transform: translateX(3px); }
}
.station-compare-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.station-compare-heading h2 { margin: 0 0 5px; }
.station-compare-heading p { margin: 0; color: var(--muted); }
.station-compare-heading .primary { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.station-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.station-kpi h3 { display: flex; gap: 6px; align-items: center; }
.station-kpi-price { font: 800 clamp(23px, 4vw, 39px)/1 system-ui,sans-serif; letter-spacing: -.04em; color: var(--red-deep); }
.station-kpi-price small { font-size: 12px; letter-spacing: 0; }
.station-kpi p { margin: 8px 0 0; }
.station-gap { padding: 6px 8px; border-radius: 8px; font-weight: 750; font-size: 12px; }
.station-kpi .station-gap.up { color: #9b142a; background: #ffe8ed; }
.station-kpi .station-gap.down { color: #075d42; background: #e4f6ec; }
.station-kpi .station-gap.flat { background: #eeeef2; }
@media (max-width: 740px) {
  .station-compare-heading { flex-wrap: wrap; }
  .station-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .station-kpi { padding: 12px; }
}
main.content > h1:first-child:not(.market-title) {
  border-left: 5px solid var(--red);
  padding-left: clamp(13px, 2vw, 22px);
}
.seo-prices th[scope=col] { background: #25242c; color: #fff; }
.seo-prices tbody tr:hover { background: #fff1f4; }
.seo-prices td strong { color: #9e1729; font-variant-numeric: tabular-nums; }
.news-card img { transition: filter .25s; }
.news-card:hover img { filter: brightness(1.09); }
@media (prefers-reduced-motion: reduce) {
  .news-card img { transition: none; }
}
