/* Pörssisähkö — wide desktop + modern */

/* Inter — self-hosted (hiç external font request yok, CDN bağımlılığı yok) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/inter-regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/inter-semibold.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/inter-bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/inter-extrabold.ttf') format('truetype');
}

:root {
  --bg:        #f6f7f9;
  --bg-alt:    #ffffff;
  --card:      #ffffff;
  --card-2:    #fafbfc;
  --ink:       #0f172a;
  --ink-soft:  #334155;
  --ink-muted: #64748b;
  --muted:     #94a3b8;
  --border:    #e2e8f0;
  --border-strong: #cbd5e1;

  --accent:       #f59e0b;
  --accent-dark:  #d97706;
  --accent-light: #fbbf24;
  --accent-bg:    #fef3c7;
  --accent-glow:  rgba(245, 158, 11, 0.15);

  --green:      #10b981;
  --green-dark: #059669;
  --green-bg:   #d1fae5;
  --red:        #ef4444;
  --red-dark:   #dc2626;
  --red-bg:     #fee2e2;
  --blue:       #3b82f6;
  --blue-bg:    #dbeafe;
  --yellow:     #f59e0b;
  --yellow-bg:  #fef3c7;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --max-w:     1200px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg:        #0b1120;
  --bg-alt:    #0f172a;
  --card:      #0f172a;
  --card-2:    #1e293b;
  --ink:       #f1f5f9;
  --ink-soft:  #cbd5e1;
  --ink-muted: #94a3b8;
  --muted:     #64748b;
  --border:    #1e293b;
  --border-strong: #334155;
  --accent-bg:    rgba(245, 158, 11, 0.15);
  --accent-glow:  rgba(245, 158, 11, 0.25);
  --green-bg:     rgba(16, 185, 129, 0.15);
  --red-bg:       rgba(239, 68, 68, 0.15);
  --blue-bg:      rgba(59, 130, 246, 0.15);
  --yellow-bg:    rgba(245, 158, 11, 0.15);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  overflow-x: hidden;
  max-width: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  letter-spacing: -0.003em;
  transition: background 0.3s, color 0.3s;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% -10%, var(--accent-glow), transparent 50%),
    radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.08), transparent 40%);
  pointer-events: none;
}

a { color: var(--accent-dark); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[data-theme="dark"] a { color: var(--accent-light); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 999; }

/* === HEADER — glass + wide === */
.site-header {
  background: color-mix(in srgb, var(--bg-alt) 85%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}
.logo {
  font-weight: 800;
  color: var(--ink);
  font-size: 19px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo:hover { color: var(--ink); text-decoration: none; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
  margin-left: auto;
  margin-right: 8px;
  align-items: center;
  border-radius: 10px;
  transition: var(--transition);
}
.nav-toggle-label:hover { background: var(--card-2); }
.nav-toggle-label span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.2s;
}
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.main-nav {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  flex-direction: column;
  display: none;
  z-index: 50;
  padding: 8px;
}
.nav-toggle:checked ~ .main-nav { display: flex; }
.main-nav a {
  padding: 12px 16px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}
.main-nav a:hover { color: var(--ink); background: var(--card-2); text-decoration: none; }

.theme-toggle {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); background: var(--accent-bg); transform: scale(1.05); }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="dark"]  .theme-icon-light { display: none; }

/* === MAIN === */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.breadcrumb a { color: var(--ink-muted); font-weight: 500; }

/* === TAB BAR === */
.tab-bar {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  gap: 2px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 18px;
}
.tab-bar .tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
}
.tab-bar a.tab:hover { color: var(--ink); background: var(--card-2); text-decoration: none; }
.tab-bar .tab.active {
  background: var(--ink);
  color: var(--bg-alt);
  box-shadow: var(--shadow-sm);
  cursor: default;
}

/* === HERO ROW — main hero + side stats === */
.hero-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.price-hero {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 8%, var(--card)) 0%,
    var(--card) 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px 32px;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.price-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow), transparent 60%);
  pointer-events: none;
}
.price-hero > * { position: relative; }

.price-hero .time {
  font-size: 12px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 100px;
}
.price-hero .time::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.price-hero .big {
  font-size: clamp(64px, 14vw, 132px);
  font-weight: 800;
  line-height: 0.95;
  color: var(--ink);
  letter-spacing: -0.04em;
  margin: 14px 0 6px;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.price-hero .big .unit {
  font-size: 0.28em;
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: -0.01em;
  -webkit-text-fill-color: var(--ink-muted);
  margin-left: 4px;
}
.price-hero .label {
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  display: inline-block;
  margin-top: 8px;
  border: 1px solid transparent;
}
.label.very-cheap, .label.cheap { background: var(--green-bg); color: var(--green-dark); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.label.normal { background: var(--yellow-bg); color: var(--yellow); border-color: color-mix(in srgb, var(--yellow) 30%, transparent); }
.label.expensive, .label.very-expensive { background: var(--red-bg); color: var(--red-dark); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.label.negative { background: var(--blue-bg); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 30%, transparent); }

.price-hero .advice {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Side stats (desktop right column) */
.side-stats {
  display: grid;
  gap: 12px;
}
.side-stats .stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}
.side-stats .stat:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.side-stats .stat .info .k {
  font-size: 12px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 4px;
}
.side-stats .stat .info .m {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 500;
}
.side-stats .stat .v {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.side-stats .stat.good { border-left: 4px solid var(--green); }
.side-stats .stat.good .v { color: var(--green-dark); }
.side-stats .stat.bad { border-left: 4px solid var(--red); }
.side-stats .stat.bad .v { color: var(--red-dark); }

/* === Week context (7-gün bağlam satırı) === */
.week-context {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: var(--shadow-xs);
}
.week-context.cheaper {
  background: linear-gradient(135deg, var(--green-bg), transparent 70%), var(--card);
  border-color: color-mix(in srgb, var(--green) 25%, var(--border));
}
.week-context.pricier {
  background: linear-gradient(135deg, var(--red-bg), transparent 70%), var(--card);
  border-color: color-mix(in srgb, var(--red) 25%, var(--border));
}
.week-context .wc-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-2);
  border-radius: 10px;
}
.week-context .wc-text {
  color: var(--ink-soft);
  flex: 1;
  min-width: 0;
}
.week-context .wc-text strong {
  color: var(--ink);
  font-weight: 700;
}

/* === CHART === */
.chart-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}
.chart-wrap .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.chart-wrap h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
/* =============================================
   MODERN CHART — Y-axis left, X-axis below,
   bars CSS-var anchored, precise alignment
   ============================================= */
.chart-frame {
  display: grid;
  grid-template-columns: 54px 1fr;   /* Y-axis width | plot area */
  grid-template-rows: 260px 6px auto;  /* plot height | spacer | x-axis */
  column-gap: 10px;
  row-gap: 0;
  position: relative;
}
@media (max-width: 540px) {
  .chart-frame {
    grid-template-columns: 44px 1fr;
    grid-template-rows: 200px 6px auto;
    column-gap: 8px;
  }
}

/* Y-axis — left column */
.chart-frame .y-axis {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid var(--border);
}
.chart-frame .y-tick {
  position: absolute;
  right: 6px;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
  line-height: 1;
  padding: 1px 0;
}
.chart-frame .y-tick.zero { color: var(--ink); font-weight: 700; }
@media (max-width: 540px) {
  .chart-frame .y-tick { font-size: 11px; right: 4px; }
}

/* Plot area: gridlines + bars */
.chart-frame .plot {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  overflow: visible;
}
.chart-frame .gridlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.chart-frame .gridline {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--border);
  transform: translateY(-0.5px);
}
.chart-frame .gridline.zero {
  background: var(--border-strong);
  height: 2px;
  transform: translateY(-1px);
  z-index: 2;
}

/* Bars row — absolute overlay on plot */
.chart-frame .bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  gap: 4px;
  z-index: 3;
}
.chart-frame .bars > .bar {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  cursor: pointer;
}
.chart-frame .bars > .bar-fill,
.chart-frame .bars .bar .bar-fill {
  position: absolute;
  left: 0; right: 0;
  top: var(--top, 0%);
  bottom: var(--bot, 0%);
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
  border-radius: 3px 3px 1px 1px;
  min-height: 2px;
  transition: filter 0.15s;
}
.chart-frame .bar.negative .bar-fill {
  background: linear-gradient(180deg, var(--blue) 0%, #1e40af 100%);
  border-radius: 1px 1px 3px 3px;
}
.chart-frame .bar.very-cheap .bar-fill,
.chart-frame .bar.cheap .bar-fill {
  background: linear-gradient(180deg, #34d399 0%, var(--green) 100%);
}
.chart-frame .bar.expensive .bar-fill,
.chart-frame .bar.very-expensive .bar-fill {
  background: linear-gradient(180deg, #f87171 0%, var(--red) 100%);
}
/* NYT bar — rengi değişmez (cheap/normal/expensive korunur), sadece outline + badge */
.chart-frame .bar.is-now .bar-fill {
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--green), 0 0 20px rgba(16, 185, 129, 0.35);
  z-index: 4;
}

.chart-frame .bar:hover .bar-fill { filter: brightness(1.08) saturate(1.15); }
.chart-frame .bar:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
  z-index: 5;
}
.chart-frame .bar.selected .bar-fill {
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent);
  filter: brightness(1.08);
  z-index: 4;
}

/* NYT rozeti — bar'ın üstünde (pozitif ise top'un hemen üstü, negatif ise bot'un hemen altı) */
.chart-frame .bar .now-badge {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--top, 0%) - 26px);
  background: var(--green);
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
  z-index: 6;
  pointer-events: none;
}
.chart-frame .bar .now-badge::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--green);
}
.chart-frame .bar.negative.is-now .now-badge {
  top: auto;
  bottom: calc(var(--bot, 0%) - 26px);
}
.chart-frame .bar.negative.is-now .now-badge::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--green);
}

/* Day divider (48h view) */
.chart-frame .day-divider {
  width: 2px;
  flex-shrink: 0;
  align-self: stretch;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 3px;
  z-index: 3;
}

/* X-axis */
.chart-frame .x-axis-spacer {
  grid-column: 2;
  grid-row: 2;
}
.chart-frame .x-axis {
  grid-column: 1 / -1;
  grid-row: 3;
  padding-top: 10px;
  padding-left: calc(54px + 10px);  /* Y ekseni width + gap */
  padding-right: 0;
  display: flex;
  gap: 4px;                 /* bars ile aynı gap → hizalama */
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
  line-height: 1;
  min-height: 70px;     /* rotated labels için yeterli yükseklik */
  align-items: flex-start;
}
.chart-frame.quarter .x-axis { gap: 1px; }
@media (max-width: 540px) {
  .chart-frame.quarter .x-axis { gap: 0; }
}
/* Varttisähkö: her saat grubu için hafif zebra arkaplan + dikey ince ayırıcılar */
.chart-frame.quarter .plot {
  background-image:
    /* Alternating hour background */
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100% / 24),
      color-mix(in srgb, var(--ink-muted) 6%, transparent) calc(100% / 24),
      color-mix(in srgb, var(--ink-muted) 6%, transparent) calc(100% / 12)
    ),
    /* Saat sınırı dikey çizgiler (her 1/24) */
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100% / 24 - 1px),
      var(--border) calc(100% / 24 - 1px),
      var(--border) calc(100% / 24)
    );
}
[data-theme="dark"] .chart-frame.quarter .plot {
  background-image:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100% / 24),
      rgba(255,255,255,0.03) calc(100% / 24),
      rgba(255,255,255,0.03) calc(100% / 12)
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100% / 24 - 1px),
      var(--border) calc(100% / 24 - 1px),
      var(--border) calc(100% / 24)
    );
}
/* Saat etiketi üstünde soft bracket yerine hafif üst-kenar = dikey çizgi uzantısı */
.chart-frame.quarter .x-axis > span {
  border-top: none;
}
.chart-frame.quarter .x-axis > span::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 6px;
  background: var(--border-strong);
}
.chart-frame .x-axis > span {
  flex: 1 1 0;
  min-width: 0;
  height: 60px;
  position: relative;
}
.chart-frame .x-axis > span > i {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  white-space: nowrap;
  font-style: normal;
  line-height: 1;
}
@media (max-width: 540px) {
  .chart-frame .x-axis {
    padding-left: calc(44px + 8px);
    font-size: 10px;
    min-height: 64px;
  }
  .chart-frame .x-axis > span { height: 54px; }
}

/* 48h view — 48 etiket çok sıkışık: her 2'de birini göster */
.chart-frame.two-days .x-axis > span { font-size: 10px; }
@media (max-width: 900px) {
  .chart-frame.two-days .x-axis > span:nth-child(odd) { visibility: hidden; }
}
@media (max-width: 540px) {
  .chart-frame.two-days .x-axis > span { visibility: hidden; }
  .chart-frame.two-days .x-axis > span:nth-child(4n+1) { visibility: visible; }
}

/* Quarter view — 96 bar, dar gap */
.chart-frame.quarter .bars { gap: 1px; }
@media (max-width: 540px) {
  .chart-frame.quarter .bars { gap: 0; }
}

/* 15-min detail list — compact two-column grid */
.quarter-list {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.quarter-list h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.quarter-list .ql-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.quarter-list .ql-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  gap: 10px;
  transition: background 0.15s;
}
.quarter-list .ql-row:hover { background: var(--card-2); }
.quarter-list .ql-row.hour-start {
  background: var(--card-2);
  font-weight: 700;
}
.quarter-list .ql-row.now {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  padding-left: 11px;
  font-weight: 700;
}
.quarter-list .ql-row.negative {
  color: var(--blue);
}
.quarter-list .ql-row .ql-time {
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.quarter-list .ql-row.hour-start .ql-time,
.quarter-list .ql-row.now .ql-time {
  color: var(--ink);
}
.quarter-list .ql-row .ql-price {
  font-weight: 700;
  color: var(--ink);
}
.quarter-list .ql-row.negative .ql-price { color: var(--blue); }
@media (max-width: 540px) {
  .quarter-list .ql-grid {
    grid-template-columns: 1fr;
  }
  .quarter-list .ql-row { border-right: none; }
}

/* Legacy residual — used by /og.php (server-rendered PNG) only */
.chart-res-label {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chart-legend {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--ink-muted);
  justify-content: center;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  margin-top: 18px;
  flex-wrap: wrap;
  font-weight: 500;
}
.chart-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}

/* === COLUMN GRID (desktop 3-col content) === */
.col-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.col-grid.two { grid-template-columns: 1fr; }
.col-grid.three { grid-template-columns: 1fr; }

/* === BLOCK === */
.block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.block h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.block h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}
.block p { margin: 0 0 12px; color: var(--ink-soft); }
.block p:last-child { margin-bottom: 0; }
.block ul, .block ol { color: var(--ink-soft); padding-left: 22px; }
.block li { margin-bottom: 6px; }

.snippet {
  background: linear-gradient(135deg, var(--accent-bg), transparent);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}
.snippet strong { color: var(--ink); font-weight: 700; }

/* === DEVICE MINI === */
.device-mini {
  background: linear-gradient(135deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-xs);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.device-mini h2 { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.device-mini .price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.device-mini .price-row .item {
  padding: 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
}
.device-mini .price-row .item.best {
  background: linear-gradient(135deg, var(--green-bg), transparent);
  border-color: color-mix(in srgb, var(--green) 30%, var(--border));
  color: var(--green-dark);
}
.device-mini .price-row .k { font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.device-mini .price-row .v { font-size: 24px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.device-mini .price-row .item.best .v { color: var(--green-dark); }
.device-mini .saving {
  background: linear-gradient(135deg, var(--accent-bg), transparent);
  padding: 12px 16px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  color: var(--accent-dark);
  margin-top: auto;
  font-size: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* === CTA === */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--ink);
  color: var(--bg-alt);
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  min-height: 46px;
  transition: var(--transition);
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-sm);
}
.cta:hover { background: var(--accent-dark); color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.cta.full { display: flex; width: 100%; }
.cta.primary { background: var(--accent); color: #fff; }
.cta.primary:hover { background: var(--accent-dark); }

/* Calendar/reminder button — distinct style */
.cta.calendar {
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--border-strong);
  font-weight: 600;
}
.cta.calendar:hover {
  background: var(--accent-bg);
  color: var(--accent-dark);
  border-color: var(--accent);
}
.cta.calendar .icon { font-size: 18px; }

/* Reminder card — prominent */
.reminder-card {
  background: linear-gradient(135deg, var(--accent-bg) 0%, var(--card) 60%);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.reminder-card::before {
  content: "⏰";
  position: absolute;
  top: -20px;
  right: -10px;
  font-size: 140px;
  opacity: 0.06;
  pointer-events: none;
}
.reminder-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.reminder-card .r-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--card);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.reminder-card .r-body { flex: 1; min-width: 0; position: relative; }
.reminder-card .r-body h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.reminder-card .r-body p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.reminder-card .r-body .time-big {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.reminder-card .cta { flex-shrink: 0; position: relative; }
@media (max-width: 540px) {
  .reminder-card { flex-direction: column; align-items: stretch; text-align: left; }
  .reminder-card .cta { width: 100%; }
}

/* Inline reminder button in table rows */
.ics-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: var(--accent-dark);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  transition: var(--transition);
}
.ics-btn:hover {
  background: var(--accent-bg);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-decoration: none;
}

/* === CALC FORM === */
.calc-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.calc-form label {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}
.calc-form input[type="number"] {
  width: 100%;
  font-size: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  margin-top: 8px;
  font-family: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: var(--transition);
}
.calc-form input[type="number"]:focus { outline: 3px solid var(--accent-glow); border-color: var(--accent); }
.calc-form button {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: var(--bg-alt);
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  transition: var(--transition);
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}
.calc-form button:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.calc-result {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.calc-result .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.calc-result .row:last-child { border-bottom: none; }
.calc-result .row.best {
  background: linear-gradient(135deg, var(--green-bg), transparent);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 6px -12px;
  border: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
}
.calc-result .k { font-weight: 600; color: var(--ink); font-size: 14px; }
.calc-result .k .sub { font-size: 12px; color: var(--ink-muted); display: block; font-weight: 500; margin-top: 2px; }
.calc-result .v { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-result .row.best .v { color: var(--green-dark); }
.calc-result .saving {
  background: linear-gradient(135deg, var(--accent-bg), transparent);
  color: var(--accent-dark);
  padding: 16px;
  border-radius: 12px;
  margin-top: 16px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

/* === CHIPS === */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  background: var(--card-2);
  color: var(--ink-soft);
  padding: 10px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.chips a:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); text-decoration: none; }

/* === TOMORROW === */
.tomorrow-preview {
  background: linear-gradient(135deg, var(--accent-bg) 0%, transparent 60%), var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.tomorrow-preview::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.tomorrow-preview h2 { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.tomorrow-preview .cta { margin-top: auto; align-self: flex-start; }

/* === TABLES === */
.block table { width: 100%; border-collapse: collapse; margin-top: 12px; font-variant-numeric: tabular-nums; }
.block thead tr { border-bottom: 2px solid var(--border); }
.block th { padding: 12px 10px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); font-weight: 700; }
.block tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
.block tbody tr:hover { background: var(--card-2); }
.block td { padding: 14px 10px; color: var(--ink-soft); font-size: 15px; }

/* Responsive table wrapper (auto-applied by JS) */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
  border-radius: 8px;
}
.table-scroll > table { margin-top: 0; }
.table-scroll.scrollable {
  background:
    linear-gradient(90deg, var(--card) 0%, transparent 10px),
    linear-gradient(90deg, transparent calc(100% - 10px), var(--card) 100%),
    radial-gradient(ellipse at left, rgba(0,0,0,0.1), transparent 50%) left,
    radial-gradient(ellipse at right, rgba(0,0,0,0.1), transparent 50%) right;
  background-size: 20px 100%, 20px 100%, 14px 100%, 14px 100%;
  background-repeat: no-repeat;
  background-attachment: local, local, scroll, scroll;
}
@media (max-width: 640px) {
  .block table { font-size: 14px; }
  .block th { font-size: 11px; padding: 10px 8px; }
  .block td { font-size: 14px; padding: 12px 8px; }
  .block th:first-child, .block td:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; }
  .block tbody tr:hover td:first-child { background: var(--card-2); }
  .block thead th:first-child { background: var(--card); }
}

/* Mobil: padding/spacing sadeleştir */
@media (max-width: 540px) {
  .block { padding: 18px 16px; margin-bottom: 12px; border-radius: 12px; }
  .block h2 { font-size: 18px; }
  .hero-row { gap: 14px; }
  main { padding: 18px 14px 40px; }
  .site-header { padding: 12px 16px; }
  .breadcrumb { font-size: 13px; margin: 0 0 10px; }
  .tab-bar { padding: 3px; }
  .tab-bar .tab { padding: 7px 14px; font-size: 14px; }
}

/* === FOOTER === */
.site-footer {
  margin-top: 48px;
  padding: 40px 24px 48px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}
.site-footer .inner { max-width: var(--max-w); margin: 0 auto; }
.site-footer a { color: var(--ink-muted); margin: 0 10px; font-weight: 500; }
.site-footer a:hover { color: var(--ink); }
.site-footer .f-links { margin-bottom: 14px; }
.updated {
  display: inline-block;
  background: var(--card-2);
  color: var(--ink-soft);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 8px;
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* === RESPONSIVE === */

/* Tablet 640+ */
@media (min-width: 640px) {
  main { padding: 28px 24px 80px; }
  .price-hero { padding: 44px 32px 36px; }
  .block { padding: 28px 30px; }
  .chart { height: 260px; }

  .nav-toggle-label { display: none; }
  .main-nav {
    display: flex;
    position: static;
    flex-direction: row;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 2px;
  }
  .main-nav a {
    padding: 8px 12px;
    font-size: 13px;
    border: none;
    border-radius: 8px;
    min-height: 36px;
    color: var(--ink-muted);
    font-weight: 600;
  }
}

/* Desktop 960+: hero ROW split left/right, col-grid activates */
@media (min-width: 960px) {
  .hero-row {
    grid-template-columns: 2fr 1fr;
  }
  .col-grid.two { grid-template-columns: 1fr 1fr; }
  .col-grid.three { grid-template-columns: 1fr 1fr 1fr; }

  .main-nav a { padding: 8px 14px; font-size: 14px; }
  .chart { height: 300px; }
  .price-hero { padding: 52px 36px 40px; }
  .price-hero .big { font-size: clamp(72px, 8vw, 128px); }
}

/* XL 1100+ */
@media (min-width: 1100px) {
  main { padding: 36px 24px 100px; }
  .block { padding: 32px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .chart .bar:hover { transform: none; }
}

::selection { background: var(--accent); color: #fff; }

/* ===== UX v2: hero actions, countdown, chart detail, NYT label ===== */

/* Hero action buttons — modern, subtle depth */
.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.hero-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Primary — solid CTA, "main action" feel */
.hero-btn.primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border-color: var(--accent-dark);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.15) inset,
    0 1px 2px rgba(146, 64, 14, 0.15),
    0 4px 12px -2px color-mix(in srgb, var(--accent) 35%, transparent);
}
.hero-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.18) inset,
    0 2px 4px rgba(146, 64, 14, 0.18),
    0 8px 20px -4px color-mix(in srgb, var(--accent) 50%, transparent);
  color: #fff;
  text-decoration: none;
}
.hero-btn.primary:active {
  transform: translateY(0);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.1) inset,
    0 1px 2px rgba(146, 64, 14, 0.2);
}

/* Ghost — secondary, "outline" feel */
.hero-btn.ghost {
  background: var(--card);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.hero-btn.ghost:hover {
  background: var(--card);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.06),
    0 6px 16px -4px color-mix(in srgb, var(--accent) 20%, transparent);
  text-decoration: none;
}
.hero-btn.ghost:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* SVG icon — boyut + akıcı çizgi */
.hero-btn .btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 2;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .hero-actions { gap: 8px; }
  .hero-btn {
    padding: 12px 18px;
    font-size: 14px;
  }
}

/* Cheap countdown banner */
.cheap-countdown {
  margin: 18px 0;
  padding: 14px 18px;
  background: color-mix(in srgb, var(--green) 8%, var(--card));
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--border));
  border-left: 4px solid var(--green);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.cheap-countdown .cc-icon { font-size: 22px; flex-shrink: 0; }
.cheap-countdown .cc-text { flex: 1; }
.cheap-countdown .countdown2 {
  font-variant-numeric: tabular-nums;
  color: var(--green-dark);
}
[data-theme="dark"] .cheap-countdown .countdown2 { color: #6ee7b7; }

/* Chart detail panel (bar'a tıklayınca güncellenir) */
.chart-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-wrap: wrap;
}
.chart-detail .cd-main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.chart-detail .cd-time { font-weight: 700; font-size: 14px; }
.chart-detail .cd-price {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.chart-detail .cd-unit { font-size: 13px; font-weight: 500; color: var(--ink-muted); }
.chart-detail .cd-hint { font-size: 12px; color: var(--ink-muted); }
.chart-detail.selected .cd-hint { display: none; }

/* Page title — statik H1, hero üstünde */
.page-title {
  position: relative;
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 800;
  line-height: 1.25;
  margin: 6px 0 20px;
  padding: 18px 22px 18px 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 10%, var(--card)) 0%,
      var(--card) 55%,
      color-mix(in srgb, var(--accent) 5%, var(--card)) 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.page-title::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  pointer-events: none;
}
.page-title .page-subtitle {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--ink-muted);
  max-width: 72ch;
  position: relative;
}
@media (max-width: 540px) {
  .page-title .page-subtitle { font-size: 13px; margin-top: 4px; }
}
[data-theme="dark"] .page-title {
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 14%, var(--card)) 0%,
      var(--card) 60%,
      color-mix(in srgb, var(--accent) 8%, var(--card)) 100%);
}
@media (max-width: 540px) {
  .page-title {
    font-size: 22px;
    padding: 14px 16px 14px 18px;
    border-radius: 12px;
    margin: 4px 0 14px;
  }
  .page-title::before { width: 90px; height: 90px; top: -30px; right: -30px; }
}

/* Chart head + toggle buttons */
.chart-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.chart-head-row h2 { margin: 0; font-size: 20px; font-weight: 700; }
.chart-table-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
}

.chart-toggle {
  display: inline-flex;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  gap: 2px;
  margin-bottom: 14px;
  max-width: 100%;
  flex-wrap: nowrap;
}
.chart-toggle .ct-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}
@media (max-width: 480px) {
  .chart-toggle { display: flex; width: 100%; }
  .chart-toggle .ct-btn { flex: 1 1 0; padding: 8px 10px; font-size: 12px; }
}
.chart-toggle .ct-btn:hover { color: var(--ink); }
.chart-toggle .ct-btn.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.chart-view.hidden { display: none; }

/* Laskurit hub sayfası — calc kartlar */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.calc-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.calc-card::before {
  content: "";
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  pointer-events: none;
}
.calc-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
}
.calc-card .cc-icon {
  font-size: 32px;
  margin-bottom: 10px;
  line-height: 1;
}
.calc-card h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
}
.calc-card .cc-meta {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ink-muted);
  position: relative;
}
.calc-card .cc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.calc-card .cc-row .cc-k {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 500;
}
.calc-card .cc-row .cc-v {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.calc-card .cc-row.best .cc-v { color: var(--green-dark); }
[data-theme="dark"] .calc-card .cc-row.best .cc-v { color: #6ee7b7; }
.calc-card .cc-cta {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  position: relative;
}

/* Region grid (/sahkon-hinta) */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.region-card {
  display: block;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
.region-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.region-card .rc-name {
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.region-card .rc-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 4px;
  gap: 8px;
}
.region-card .rc-pop { font-variant-numeric: tabular-nums; }
.region-card .rc-fee { font-weight: 600; color: var(--accent-dark); }
.region-card .rc-operator {
  font-size: 12px;
  color: var(--ink-muted);
  font-style: italic;
}

/* Mini aylık grafikler (/keskihinta) */
.mini-months {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.mini-month {
  display: block;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
.mini-month:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.mini-month .mm-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  gap: 8px;
}
.mini-month .mm-title strong { font-size: 14px; }
.mini-month .mm-title span {
  font-variant-numeric: tabular-nums;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 13px;
}
.mini-month .mm-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 60px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.mini-month .mm-bar {
  flex: 1;
  min-width: 0;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  min-height: 4px;
}
.mini-month .mm-bar.cheap { background: linear-gradient(180deg, #34d399, var(--green)); }
.mini-month .mm-bar.expensive { background: linear-gradient(180deg, #f87171, var(--red)); }
.mini-month .mm-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* 48h (tänään + huomenna) view */
.two-days-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding-left: 44px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-align: center;
}
.two-days-labels .td-label {
  background: var(--card-2);
  padding: 4px 8px;
  border-radius: 6px;
}
/* Tomorrow bar soft tint in 48h view */
.chart-frame .bars > .bar.tomorrow .bar-fill { opacity: 0.9; }

/* ===== Hour accordion — 15-min fiyatların temiz görünümü ===== */
.hour-accordion {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.hour-accordion .ha-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.hour-accordion .ha-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}
.hour-accordion .ha-intro {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}
.hour-accordion .ha-toggle-all {
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: var(--transition);
}
.hour-accordion .ha-toggle-all:hover { border-color: var(--accent); background: var(--accent-bg); }

.hour-accordion .ha-list {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}

.ha-hour { border-bottom: 1px solid var(--border); }
.ha-hour:last-child { border-bottom: none; }

.ha-hour > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 120px auto 1fr auto 20px;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
  user-select: none;
}
.ha-hour > summary::-webkit-details-marker { display: none; }
.ha-hour > summary::marker { content: ""; }
.ha-hour > summary:hover { background: var(--card-2); }

.ha-hour .hh-time {
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ha-hour .hh-now {
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.5px;
  justify-self: start;
}
.ha-hour .hh-label {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  justify-self: end;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
}
.ha-hour .hh-label.very-cheap,
.ha-hour .hh-label.cheap {
  background: var(--green-bg);
  color: var(--green-dark);
}
.ha-hour .hh-label.normal {
  background: var(--accent-bg);
  color: var(--accent-dark);
}
.ha-hour .hh-label.expensive,
.ha-hour .hh-label.very-expensive {
  background: var(--red-bg);
  color: var(--red-dark);
}
.ha-hour .hh-label.negative {
  background: color-mix(in srgb, var(--blue) 18%, var(--card));
  color: var(--blue);
}

.ha-hour .hh-price {
  font-weight: 800;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  justify-self: end;
  white-space: nowrap;
}
.ha-hour .hh-price small {
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-muted);
  margin-left: 2px;
}
.ha-hour .hh-chevron {
  color: var(--ink-muted);
  font-size: 20px;
  font-weight: 400;
  transition: transform 0.2s;
  justify-self: center;
  line-height: 1;
}
.ha-hour[open] > summary .hh-chevron { transform: rotate(90deg); color: var(--accent); }
.ha-hour.is-now > summary { background: color-mix(in srgb, var(--green) 6%, var(--card)); }
.ha-hour.is-now > summary:hover { background: color-mix(in srgb, var(--green) 10%, var(--card)); }

.ha-hour .hh-quarters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 16px 14px;
  background: var(--card-2);
  border-top: 1px solid var(--border);
}
.ha-hour .hh-q {
  padding: 10px 8px;
  text-align: center;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  transition: var(--transition);
}
.ha-hour .hh-q.is-now {
  border-color: var(--green);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 25%, transparent);
}
.ha-hour .hh-q .hhq-time {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 600;
}
.ha-hour .hh-q .hhq-price {
  font-weight: 700;
  font-size: 14px;
}
.ha-hour .hh-q.very-cheap,
.ha-hour .hh-q.cheap { background: var(--green-bg); border-color: color-mix(in srgb, var(--green) 25%, var(--border)); }
.ha-hour .hh-q.expensive,
.ha-hour .hh-q.very-expensive { background: var(--red-bg); border-color: color-mix(in srgb, var(--red) 25%, var(--border)); }
.ha-hour .hh-q.negative { background: color-mix(in srgb, var(--blue) 12%, var(--card)); border-color: color-mix(in srgb, var(--blue) 30%, var(--border)); color: var(--blue); }

/* Mobil: sütun sayısını daralt */
@media (max-width: 640px) {
  .ha-hour > summary {
    grid-template-columns: auto 1fr auto 16px;
    gap: 8px;
    padding: 12px 14px;
  }
  .ha-hour .hh-time { font-size: 13px; }
  .ha-hour .hh-now { grid-column: 1; }
  .ha-hour .hh-label { display: none; }
  .ha-hour .hh-price { font-size: 15px; }
  .ha-hour .hh-quarters { padding: 10px; grid-template-columns: repeat(2, 1fr); }
}

/* === Käyttöneuvoja: en halvin ardışık jakso === */
.usage-planner {
  background: linear-gradient(135deg, var(--green-bg), transparent 70%), var(--card);
  border: 1px solid color-mix(in srgb, var(--green) 22%, var(--border));
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.usage-planner .up-head { margin-bottom: 16px; }
.usage-planner h2 {
  margin: 0 0 6px 0;
  font-size: 20px;
  color: var(--ink);
}
.usage-planner .up-intro {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}
.usage-planner .up-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.usage-planner .up-btn {
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--ink-soft);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.usage-planner .up-btn:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green-dark);
}
.usage-planner .up-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--green) 35%, transparent);
}
.usage-planner .up-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.usage-planner .up-result {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.usage-planner .up-time {
  font-size: 17px;
  margin-bottom: 14px;
  color: var(--ink);
}
.usage-planner .up-time .up-when {
  color: var(--ink-muted);
  font-size: 14px;
  margin-right: 6px;
  text-transform: capitalize;
}
.usage-planner .up-time .up-slot {
  font-weight: 800;
  color: var(--green-dark);
}
.usage-planner .up-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.usage-planner .up-stat {
  background: var(--card-2, color-mix(in srgb, var(--ink) 3%, var(--card)));
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
}
.usage-planner .up-stat-k {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}
.usage-planner .up-stat-v {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.usage-planner .up-stat-v span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
}
.usage-planner .up-savings {
  background: linear-gradient(135deg, var(--green-bg), transparent 80%), var(--card-2, var(--card));
}
.usage-planner .up-hint {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .usage-planner { padding: 18px; }
  .usage-planner h2 { font-size: 17px; line-height: 1.35; }
  .usage-planner .up-intro { font-size: 13px; }
  .usage-planner .up-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .usage-planner .up-btn {
    padding: 10px 0;
    font-size: 13px;
  }
  .usage-planner .up-time { font-size: 16px; }
  .usage-planner .up-stats { grid-template-columns: 1fr; }
  .usage-planner .up-stat { padding: 12px 14px; }
  .usage-planner .up-stat-v { font-size: 16px; }
}

/* === FAQ accordion (rich snippet visible content) === */
.faq-block { /* h2 zaten .block'tan miras */ }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: border-color 0.15s ease;
}
.faq-item:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.faq-item[open] {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.faq-item > summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 44px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-muted);
  transition: transform 0.2s ease, color 0.15s;
  line-height: 1;
}
.faq-item[open] > summary::after {
  content: "−";
  color: var(--accent-dark);
}
.faq-item > p {
  margin: 0;
  padding: 0 18px 16px 18px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}
.faq-item > p strong { color: var(--ink); }

@media (max-width: 640px) {
  .faq-item > summary { font-size: 14.5px; padding: 13px 16px; padding-right: 40px; }
  .faq-item > p { font-size: 14px; padding: 0 16px 14px 16px; }
}

/* === Aluekohtaisen kontentin tyylit === */
.region-context p.snippet {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
}
.region-distinctive {
  background: linear-gradient(135deg, var(--accent-bg, color-mix(in srgb, var(--accent) 8%, var(--card))), transparent 80%), var(--card);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}
.region-distinctive h2 {
  color: var(--accent-dark);
}
.region-tip {
  background: linear-gradient(135deg, var(--green-bg), transparent 75%), var(--card);
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
}
.region-tip h2 {
  color: var(--green-dark);
  font-size: 18px;
}
.region-tip p {
  font-size: 15px;
  line-height: 1.6;
}

/* === Intro section (listing page'leri için) === */
.intro-section {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, var(--card)), transparent 75%), var(--card);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 22px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.intro-section p { margin: 0 0 10px 0; }
.intro-section p:last-child { margin-bottom: 0; }
.intro-section strong { color: var(--ink); }

@media (max-width: 640px) {
  .intro-section { padding: 16px 18px; font-size: 15px; }
}

/* === Month table (milloin-halvinta vuodenaikataulu) === */
.month-table {
  overflow-x: auto;
  margin: 12px 0;
}
.month-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.month-table th {
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 25%, var(--border));
}
.month-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
  line-height: 1.5;
}
.month-table tr:last-child td { border-bottom: none; }

@media (max-width: 640px) {
  .month-table { font-size: 13px; }
  .month-table th, .month-table td { padding: 10px 8px; }
}
