:root {
  color-scheme: dark;
  --page: #151919;
  --surface: #1d2322;
  --surface-raised: #222928;
  --text: #f3f4ee;
  --muted: #a7b1ad;
  --quiet: #77837e;
  --border: #3d4843;
  --border-strong: #59645e;
  --accent: #62d7b5;
  --accent-soft: rgba(98, 215, 181, 0.13);
  --series-1: #66dcb9;
  --series-2: #9bbdff;
  --series-3: #f1bd70;
  --trend-up: #f07d72;
  --trend-down: #52d59a;
  --grid: rgba(211, 224, 215, 0.12);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f0f3ef;
  --surface: #ffffff;
  --surface-raised: #f7f9f6;
  --text: #17221e;
  --muted: #596761;
  --quiet: #78857e;
  --border: #d5ddd7;
  --border-strong: #a8b5ac;
  --accent: #087e62;
  --accent-soft: rgba(8, 126, 98, 0.1);
  --series-1: #087e62;
  --series-2: #416fc1;
  --series-3: #9a620c;
  --trend-up: #b43e35;
  --trend-down: #087e62;
  --grid: rgba(31, 54, 44, 0.13);
  --shadow: 0 18px 50px rgba(32, 57, 44, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(ellipse at 88% 0%, rgba(53, 107, 87, 0.12), transparent 33rem),
    var(--page);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  transition: background-color 180ms ease, color 180ms ease;
}

button,
a {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--page);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(1320px, calc(100% - 72px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.brand,
.topbar-tools,
.theme-indicator,
.language-switch,
.eyebrow,
.section-heading,
.chart-heading,
.metric-row,
.site-footer,
.footer-brand {
  display: flex;
  align-items: center;
}

.brand {
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(98, 215, 181, 0.35);
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-mark path {
  fill: currentColor;
}

.brand-name,
.footer-brand {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.brand-name {
  font-size: 12px;
  letter-spacing: -0.02em;
}

.topbar-tools {
  gap: 26px;
}

.theme-indicator {
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.theme-orbit {
  position: relative;
  width: 17px;
  height: 17px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

.theme-orbit::after {
  position: absolute;
  top: -2px;
  right: -3px;
  width: 13px;
  height: 17px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.language-switch {
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.language-button {
  min-width: 39px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.language-button:hover {
  color: var(--text);
}

.language-button.is-selected {
  background: var(--accent-soft);
  color: var(--accent);
}

.hero {
  display: flex;
  min-height: 292px;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  padding: 58px 0 47px;
}

.hero-copy {
  max-width: 735px;
}

.eyebrow,
.section-kicker,
.chart-index {
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  gap: 9px;
  margin: 0 0 17px;
}

.eyebrow-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 17px;
  font-size: clamp(38px, 5vw, 63px);
  font-weight: 720;
  letter-spacing: -0.065em;
  line-height: 1.02;
}

h1 span {
  color: var(--muted);
  font-weight: 520;
}

.hero-description {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.hero-aside {
  display: grid;
  width: 220px;
  flex: 0 0 auto;
  gap: 5px;
  margin-bottom: 4px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
}

.hero-aside-label {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-aside strong {
  font-size: 14px;
  font-weight: 700;
}

.hero-aside-rule {
  width: 25px;
  height: 2px;
  margin: 5px 0 2px;
  background: var(--accent);
}

.hero-aside > span:last-child {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.current-section {
  padding-top: 4px;
}

.section-heading {
  justify-content: space-between;
  gap: 20px;
}

.section-kicker {
  margin-bottom: 5px;
  font-size: 9px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 23px;
  font-weight: 690;
  letter-spacing: -0.045em;
}

.section-aside {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin-top: 20px;
}

.price-card,
.loading-card {
  min-height: 240px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(150deg, var(--surface-raised), var(--surface) 55%);
  box-shadow: var(--shadow);
}

.price-card {
  position: relative;
  overflow: hidden;
  padding: 23px 24px 19px;
}

.price-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--card-accent, var(--accent));
  content: "";
  opacity: 0.78;
}

.price-card[data-tariff="TUR.1"] {
  --card-accent: var(--series-1);
}

.price-card[data-tariff="TUR.2"] {
  --card-accent: var(--series-2);
}

.price-card[data-tariff="TUR.3"] {
  --card-accent: var(--series-3);
}

.card-topline,
.card-heading,
.card-source,
.metric-block,
.card-note {
  display: flex;
}

.card-topline {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}

.card-heading {
  align-items: center;
  gap: 10px;
}

.tariff-index {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--card-accent) 40%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--card-accent) 10%, transparent);
  color: var(--card-accent);
  font-size: 9px;
  font-weight: 800;
}

.card-heading h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.consumption-band {
  margin: -9px 0 15px 41px;
  color: var(--muted);
  font-size: 10px;
}

.effective-date {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.effective-date strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
}

.metric-block {
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.metric-content {
  min-width: 0;
}

.metric-block + .metric-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.metric-label {
  display: block;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 11px;
}

.metric-value {
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.2;
  white-space: nowrap;
}

.metric-change {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 630;
  line-height: 1.35;
}

.metric-change[data-direction="up"],
.chart-tooltip-change[data-direction="up"] {
  color: var(--trend-up);
}

.metric-change[data-direction="down"],
.chart-tooltip-change[data-direction="down"] {
  color: var(--trend-down);
}

.metric-change[data-direction="unchanged"],
.metric-change[data-direction="first"],
.chart-tooltip-change[data-direction="unchanged"],
.chart-tooltip-change[data-direction="first"] {
  color: var(--muted);
}

.metric-unit {
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0;
}

.card-source {
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 15px;
  color: var(--card-accent);
  font-size: 11px;
  font-weight: 680;
  text-decoration: none;
}

.card-source:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.external-arrow {
  font-size: 13px;
  line-height: 1;
}

.card-note {
  margin: 11px 0 0;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.loading-card {
  min-height: 240px;
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-raised) 50%, var(--surface) 70%);
}

.history-section {
  margin-top: 77px;
}

.history-heading {
  margin-bottom: 20px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.chart-panel {
  min-width: 0;
  padding: 20px 20px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.chart-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chart-index {
  margin-bottom: 5px;
  color: var(--quiet);
  font-size: 8px;
}

.chart-index span {
  color: var(--accent);
}

.chart-heading h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.unit-pill {
  align-self: center;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 29px;
  margin: 4px 0 0 54px;
}

.legend-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 650;
}

.legend-button:hover,
.legend-button[aria-pressed="true"] {
  border-color: var(--border);
  background: var(--surface-raised);
  color: var(--text);
}

.legend-button[aria-pressed="false"] {
  opacity: 0.52;
}

.legend-swatch {
  width: 14px;
  height: 3px;
  border-radius: 5px;
  background: var(--series-color);
}

.price-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  margin-top: 4px;
}

.price-chart .grid-line {
  stroke: var(--grid);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.price-chart .axis-line {
  stroke: var(--border-strong);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.price-chart .axis-label,
.price-chart .axis-title {
  fill: var(--muted);
  font-family: inherit;
  font-size: 11px;
}

.price-chart .axis-title {
  fill: var(--quiet);
  font-size: 10px;
  font-weight: 600;
}

.price-chart .series-line {
  fill: none;
  stroke: var(--series-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.price-chart .series-point {
  fill: var(--surface);
  stroke: var(--series-color);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.price-chart .series-hit-target {
  fill: transparent;
  stroke: transparent;
  cursor: crosshair;
  pointer-events: all;
}

.price-chart .series-hit-target:focus-visible {
  fill: var(--series-color);
  fill-opacity: 0.16;
  stroke: var(--series-color);
  stroke-opacity: 0.75;
  stroke-width: 1.5;
  outline: none;
}

.price-chart .chart-crosshair {
  pointer-events: none;
}

.price-chart .chart-crosshair-line {
  stroke: var(--muted);
  stroke-dasharray: 4 4;
  stroke-opacity: 0.76;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.price-chart .chart-crosshair-point {
  fill: var(--surface);
  stroke: var(--series-color);
  stroke-width: 2.25;
  vector-effect: non-scaling-stroke;
}

.chart-tooltip {
  position: fixed;
  z-index: 20;
  display: grid;
  gap: 3px;
  width: max-content;
  max-width: min(320px, calc(100vw - 16px));
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip-heading {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
}

.chart-tooltip-list {
  display: grid;
  gap: 6px;
}

.chart-tooltip-row {
  display: grid;
  gap: 1px;
  padding-left: 8px;
  border-left: 2px solid var(--series-color);
}

.chart-tooltip-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.chart-tooltip-tariff {
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
}

.chart-tooltip-value {
  font-size: 13px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chart-tooltip-change {
  color: var(--muted);
  font-size: 9px;
  font-weight: 620;
}

.chart-footnote {
  margin: 0 0 2px 55px;
  color: var(--quiet);
  font-size: 10px;
}

.chart-interaction-hint {
  margin: 10px 0 0;
  color: var(--quiet);
  font-size: 10px;
}

.history-note {
  display: flex;
  align-items: start;
  gap: 10px;
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.note-icon {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
}

.site-footer {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 7px 20px;
  margin-top: 66px;
  padding: 19px 0 27px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
}

.site-footer p {
  flex-basis: 100%;
  margin: 0;
}

.footer-brand {
  gap: 2px;
  color: var(--text);
  font-size: 11px;
}

.footer-separator {
  padding: 0 7px;
  color: var(--quiet);
  font-weight: 400;
}

.footer-disclaimer {
  color: var(--quiet);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 44px, 760px);
  }

  .hero {
    min-height: 0;
    align-items: start;
    padding: 48px 0 38px;
  }

  .hero-aside {
    width: 185px;
    margin-top: 43px;
  }

  .price-grid {
    gap: 11px;
  }

  .price-card {
    padding-right: 17px;
    padding-left: 17px;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .chart-panel {
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: calc(100% - 32px);
  }

  .topbar {
    min-height: 70px;
  }

  .topbar-tools {
    gap: 12px;
  }

  .theme-indicator {
    gap: 0;
  }

  .theme-indicator [data-i18n="systemTheme"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .hero {
    display: block;
    padding: 42px 0 31px;
  }

  h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .hero-description {
    font-size: 14px;
  }

  .hero-aside {
    display: flex;
    width: auto;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 10px 12px;
  }

  .hero-aside-label,
  .hero-aside-rule,
  .hero-aside > span:last-child {
    display: none;
  }

  .hero-aside strong {
    font-size: 12px;
  }

  .hero-aside::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
  }

  .section-heading {
    align-items: end;
  }

  .section-heading h2 {
    font-size: 21px;
  }

  .section-aside {
    max-width: 122px;
    font-size: 10px;
    text-align: right;
  }

  .price-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
  }

  .price-card {
    min-height: 0;
    padding: 17px 17px 14px;
  }

  .card-topline {
    margin-bottom: 13px;
  }

  .consumption-band {
    margin-bottom: 12px;
  }

  .metric-value {
    font-size: 23px;
  }

  .history-section {
    margin-top: 54px;
  }

  .history-heading {
    margin-bottom: 15px;
  }

  .chart-grid {
    gap: 12px;
  }

  .chart-panel {
    padding: 16px 12px 12px;
  }

  .legend {
    margin-left: 37px;
  }

  .price-chart .axis-label {
    font-size: 10px;
  }

  .chart-footnote {
    margin-left: 38px;
    font-size: 9px;
  }

  .history-note {
    font-size: 10px;
  }

  .site-footer {
    align-items: start;
    margin-top: 47px;
  }
}
