:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-dark: #0b1220;
    --text: #0f172a;
    --text-soft: #475569;
    --text-light: #e2e8f0;
    --border: #dbe4ee;
    --accent: #0ea5e9;
    --accent-dark: #0284c7;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 28%),
        linear-gradient(180deg, #eef6ff 0%, #f8fbff 40%, #ffffff 100%);
    line-height: 1.6;
}

a {
    color: var(--accent-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

main {
    display: block;
}

.container {
    width: min(calc(100% - 2rem), var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(219, 228, 238, 0.7);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo-image-link {
    line-height: 0;
}

.logo-image {
    display: block;
    height: 46px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.main-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    color: var(--text-soft);
    font-weight: 600;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
    background: rgba(14, 165, 233, 0.12);
    text-decoration: none;
}

.hero,
.subpage-hero {
    padding: 3.5rem 0 1.25rem;
}

.hero-inner,
.subpage-hero .container {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.84));
    color: var(--text-light);
    border-radius: 30px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7dd3fc;
}

.hero h1,
.subpage-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.1;
}

.lead {
    margin: 1rem 0 0;
    max-width: 760px;
    font-size: 1.05rem;
    color: rgba(226, 232, 240, 0.95);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
}

.cards-section {
    padding: 1.5rem 0 2rem;
}

.cards-section h2,
.info-box h2,
.history-block-header h2 {
    margin: 0 0 0.6rem;
    font-size: 1.8rem;
}

.section-intro,
.history-block-header p,
.info-box p {
    margin: 0;
    color: var(--text-soft);
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
    margin-top: 3.75rem;
}

.price-card {
    display: flex;
    flex-direction: column;
    padding: 1.4rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(219, 228, 238, 0.85);
    box-shadow: var(--shadow);
    min-height: 100%;
}

.card-primary {
    position: relative;
    transform: translateY(-14px) scale(1.035);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    border-color: rgba(14, 165, 233, 0.24);
    z-index: 2;
}

.card-primary .card-date-inline {
    font-size: 1.75rem;
}

.card-primary .fuel-item h4 {
    font-size: 1.22rem;
}

.card-primary .price-big {
    font-size: 1.8rem;
}

.card-primary .card-label {
  font-size: 1.5rem;
}

.card-secondary {
    opacity: 0.96;
}

.price-card-header h3 {
    margin: 0.25rem 0;
    font-size: 1.5rem;
}

.card-label {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.11);
    color: var(--accent-dark);
    font-size: 0.85rem;
    font-weight: 700;
}

.card-subtitle {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.card-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.card-date-inline {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text);
    text-align: right;
}

.card-main-note {
    margin: 0.15rem 0 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-soft);
}

.fuel-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.25rem;
}

.fuel-item {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.fuel-item-top {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.75rem;
}

.fuel-item h4 {
    margin: 0;
    font-size: 1.05rem;
}

.cn-tag {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.price-pairs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0;
}

.price-pairs div {
    padding: 0.7rem 0.8rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border);
}

.price-pairs dt {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.price-pairs dd {
  margin: 0.3rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
}

.price-big {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.price-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    font-size: 0.86rem;
    color: var(--text-soft);
    align-items: flex-end;
}

.price-card-footer-inner {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.card-bottom-note {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-soft);
}

.card-bottom-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.82rem;
    color: var(--text-soft);
}

.empty-state,
.notice {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    background: rgba(248, 250, 252, 0.9);
    color: var(--text-soft);
}

.notice-error {
    border-style: solid;
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(254, 242, 242, 0.9);
    color: #991b1b;
}

.ad-section,
.info-grid,
.history-section {
    padding-bottom: 2rem;
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    padding: 1rem;
    border-radius: 22px;
    background: repeating-linear-gradient(
        45deg,
        rgba(148, 163, 184, 0.1),
        rgba(148, 163, 184, 0.1) 12px,
        rgba(203, 213, 225, 0.18) 12px,
        rgba(203, 213, 225, 0.18) 24px
    );
    border: 1px dashed rgba(100, 116, 139, 0.45);
    color: var(--text-soft);
    text-align: center;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 1.25rem;
}

.info-box,
.history-block {
    padding: 1.5rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(219, 228, 238, 0.85);
    box-shadow: var(--shadow);
}

.ad-rectangle-inner {
    min-height: 280px;
}

.history-section {
    display: grid;
    gap: 1.25rem;
}

.history-block-header {
    margin-bottom: 1rem;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.history-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: #fff;
}

.history-table th,
.history-table td {
    padding: 0.95rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.history-table th {
    background: #eef6ff;
    font-size: 0.92rem;
    color: var(--text);
}

.history-table tbody tr:hover {
    background: #f8fbff;
}

.site-footer {
    margin-top: 1rem;
    padding: 2rem 0 2.5rem;
    background: var(--surface-dark);
    color: var(--text-light);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-content p {
    margin: 0.45rem 0 0;
    color: rgba(226, 232, 240, 0.82);
}

.footer-meta {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    color: rgba(226, 232, 240, 0.82);
}

.history-block-header-with-link {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.history-more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent-dark);
    font-weight: 700;
    white-space: nowrap;
}

.history-more-link:hover {
    text-decoration: none;
    background: rgba(14, 165, 233, 0.18);
}

.chart-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--border);
    padding: 1rem;
}

.simple-chart {
    width: 100%;
    min-width: 760px;
    height: auto;
    display: block;
}

.chart-grid-line {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.chart-axis-line {
    stroke: #94a3b8;
    stroke-width: 1.2;
}

.chart-line-svg {
    fill: none !important;
    stroke: #0284c7;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-point {
    fill: #0ea5e9;
    stroke: #ffffff;
    stroke-width: 2;
}

.chart-axis-label {
    font-size: 12px;
    fill: #64748b;
    font-weight: 600;
}

.weekly-changes-box {
    margin-top: 1.4rem;
    margin-bottom: 2.3rem;
}

.weekly-changes-title {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.weekly-changes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.weekly-change-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #dbe4ee;
    font-size: 0.92rem;
    line-height: 1.2;
    white-space: nowrap;
}

.weekly-change-name {
    font-weight: 700;
    color: var(--text-soft);
}

.weekly-change-value {
    font-weight: 800;
}

.change-up {
    border-color: rgba(220, 38, 38, 0.22);
    background: rgba(254, 242, 242, 0.85);
}

.change-up .weekly-change-value {
    color: #b91c1c;
}

.change-down {
    border-color: rgba(5, 150, 105, 0.22);
    background: rgba(236, 253, 245, 0.9);
}

.change-down .weekly-change-value {
    color: #047857;
}

.change-flat,
.change-neutral {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(248, 250, 252, 0.95);
}

.change-flat .weekly-change-value,
.change-neutral .weekly-change-value {
    color: #475569;
}

.fuel-item-top-with-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-direction: row;
    margin-bottom: 0.95rem;
}

.fuel-item-top-with-badge h4 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.2;
    text-align: left;
    flex: 1 1 auto;
}

.fuel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.45rem;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
}

.fuel-badge-95 {
    background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
}

.fuel-badge-98 {
    background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
}

.fuel-badge-on {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
}

.weekly-change-badge {
    min-width: 34px;
    height: 34px;
    font-size: 0.92rem;
    border-radius: 8px;
    box-shadow: none;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-soft);
}

.chart-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.chart-legend-dot-95 {
    background: #16a34a;
}

.chart-legend-dot-98 {
    background: #2563eb;
}

.chart-legend-dot-on {
    background: #1f2937;
}

.chart-wrapper-compact {
    padding: 0.55rem 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
}

.simple-chart-compact {
    height: 260px;
    min-width: 760px;
    max-height: none;
}

.chart-wrapper-compact .chart-legend {
    margin-bottom: 0.4rem;
}

.footer-meta a {
    color: rgba(226, 232, 240, 0.95);
}

.footer-meta a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .chart-legend {
        flex-direction: column;
        gap: 0.55rem;
    }
}

@media (max-width: 640px) {
    .weekly-changes-list {
        flex-direction: column;
    }

    .weekly-change-pill {
        width: 100%;
        white-space: normal;
    }

    .fuel-badge {
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .weekly-change-badge {
        min-width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

@media (max-width: 980px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .card-primary {
        transform: none;
        order: -1;
    }

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

@media (max-width: 640px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
	
	.logo-image {
		height: 38px;
	}

    .hero,
    .subpage-hero {
        padding-top: 1.5rem;
    }

    .hero-inner,
    .subpage-hero .container,
    .price-card,
    .info-box,
    .history-block {
        padding: 1.2rem;
        border-radius: 20px;
    }

    .price-pairs {
        grid-template-columns: 1fr;
    }

    .price-card-footer,
    .footer-content {
        flex-direction: column;
    }

    .cards-section h2,
    .info-box h2,
    .history-block-header h2 {
        font-size: 1.45rem;
    }

	.card-head-row {
	    flex-direction: column;
	    align-items: flex-start;
	}
	
	.card-date-inline {
	    text-align: left;
	}
	
	.history-block-header-with-link {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-more-link {
        width: 100%;
    }

    .simple-chart {
		min-width: 700px;
	}
	
	.fuel-item-top-with-badge {
		align-items: center;
	}

	.fuel-item-top-with-badge h4 {
		font-size: 1rem;
	}
}


