/*
====================================================
NÉV: GázMost országoldal-stílus
PROJEKT: GázMost Labs
TÍPUS: CSS
VERZIÓ: v0.10.0
UTOLSÓ FRISSÍTÉS: 2026-10-20

LEÍRÁS:
Az önálló országoldalak elrendezése, előrenderelt grafikonjai és animációi.
Színkód: kék = töltöttség és befelé áramló gáz, narancs = kifelé áramló gáz
és átlag alatti eltérés, rózsaszín = az oldal saját országa.

FEJLESZTŐ:
Balázs Bakos
NextSheet
https://www.nextsheet.hu

CHANGELOG:
v0.10.0 - 2026-10-20
- Első változat.
====================================================
*/

.cp-body {
  --cp-blue: #4da3ff;
  --cp-blue-soft: #9ccbff;
  --cp-orange: #ffa552;
  --cp-own: var(--pink, #ff4e9a);
  --cp-card: #10131b;
  --cp-line: #262b37;
  --cp-track: #191d26;
  --cp-text2: #c9cfda;
  --cp-muted: #a3abba;
}

.cp-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-right: auto; margin-left: 12px; }
.cp-nav a { padding: 10px 12px; border-radius: 8px; color: var(--cp-muted); text-decoration: none; font-size: 14px; }
.cp-nav a:hover, .cp-nav a[aria-current="page"] { color: var(--text); background: var(--cp-track); }

.cp-main { width: min(1120px, 100%); padding: 0 clamp(16px, 3vw, 32px) 56px; }
.cp-crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; font-size: 14px; color: var(--cp-muted); }
.cp-crumbs a { color: var(--cp-blue); text-decoration: none; }
.cp-crumbs a:hover { text-decoration: underline; }

.cp-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 32px; align-items: start; padding: 26px 0 36px; }
.cp-hero h1 { margin: 0 0 10px; font-size: clamp(34px, 5vw, 52px); line-height: 1.05; letter-spacing: -.02em; }
.cp-date { margin: 0 0 16px; color: var(--cp-muted); font: 13px ui-monospace, Consolas, monospace; }
.cp-lead { margin: 0; color: var(--cp-text2); font-size: 18px; line-height: 1.6; }
.cp-lead strong { color: var(--text); }

.cp-card { background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 16px; padding: 22px; }
.cp-gauge { display: flex; flex-direction: column; gap: 18px; }
.cp-gauge-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.cp-gauge-top > strong { font-size: 72px; line-height: .9; letter-spacing: -.03em; }
.cp-gauge-top > strong small { font-size: 36px; color: var(--cp-muted); }
.cp-badge { padding: 4px 10px; border-radius: 999px; font: 13px ui-monospace, Consolas, monospace; background: rgba(77, 163, 255, .14); color: var(--cp-blue); }
.cp-badge.is-low { background: rgba(255, 165, 82, .14); color: var(--cp-orange); }

.cp-meter { position: relative; padding: 26px 0; }
.cp-meter-track { height: 16px; border-radius: 8px; background: var(--cp-track); overflow: hidden; }
.cp-meter-fill { width: var(--w); height: 100%; border-radius: 8px; background: var(--cp-own); transform-origin: left; animation: cp-grow-x 1.2s cubic-bezier(.2, .7, .2, 1) both; }
.cp-marker { position: absolute; left: var(--x); top: 20px; bottom: 20px; width: 2px; background: var(--text); font-style: normal; }
.cp-marker span { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 12px ui-monospace, Consolas, monospace; }
.cp-marker.is-avg span { bottom: calc(100% + 2px); }
.cp-marker.is-eu { background: var(--cp-blue); top: 24px; }
.cp-marker.is-eu span { top: calc(100% + 2px); color: var(--cp-blue); }
.cp-gauge-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding-top: 14px; border-top: 1px solid var(--cp-line); }
.cp-gauge-foot dt { font-size: 12px; color: var(--cp-muted); }
.cp-gauge-foot dd { margin: 2px 0 0; font: 600 16px ui-monospace, Consolas, monospace; }

.cp-section { padding: 36px 0; border-top: 1px solid var(--cp-line); }
.cp-section h2 { margin: 0 0 14px; font-size: clamp(24px, 3vw, 30px); letter-spacing: -.01em; }
.cp-text { max-width: 760px; margin: 0 0 18px; color: var(--cp-text2); font-size: 16px; line-height: 1.6; }
.cp-text strong { color: var(--text); }
.cp-note { margin: 12px 0 0; color: var(--cp-muted); font-size: 13px; line-height: 1.5; }
.cp-note a, .cp-more { color: var(--cp-blue); }
.cp-more { display: inline-block; margin-top: 4px; font-weight: 600; text-decoration: none; }

.cp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; }
.cp-fact { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--cp-line); border-radius: 14px; background: var(--cp-card); animation: cp-rise .5s ease-out both; animation-delay: calc(var(--i) * 80ms); }
.cp-fact strong { font-size: 30px; line-height: 1.05; letter-spacing: -.02em; }
.cp-fact span { color: var(--cp-text2); font-size: 15px; line-height: 1.5; }
.cp-fact span strong { font-size: inherit; color: var(--text); }
.cp-fact small { color: #8c95a7; font-size: 12px; line-height: 1.45; }

.cp-bars-card { padding-top: 34px; }
.cp-bars { position: relative; height: 240px; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; align-items: end; border-bottom: 1px solid #3a4252; }
.cp-bar { position: relative; height: var(--h); border-radius: 4px 4px 0 0; background: #3a4252; transform-origin: bottom; animation: cp-grow-y .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 45ms); }
.cp-bar span { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); font: 11px ui-monospace, Consolas, monospace; color: var(--cp-muted); }
.cp-bar.is-current { background: var(--cp-own); }
.cp-bar.is-current span { color: var(--cp-own); font-weight: 700; }
.cp-avg-line { position: absolute; left: 0; right: 0; bottom: var(--h); border-top: 2px dashed var(--text); z-index: 1; pointer-events: none; }
.cp-avg-line span { position: absolute; left: 0; bottom: 4px; padding: 0 4px; background: var(--cp-card); font: 12px ui-monospace, Consolas, monospace; }
.cp-bar-labels { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; padding-top: 8px; text-align: center; font: 12px ui-monospace, Consolas, monospace; color: #8c95a7; }
.cp-bar-labels .is-current { color: var(--cp-own); font-weight: 700; }
@media (max-width: 620px) { .cp-bar span { display: none; } .cp-bar-labels { font-size: 9px; } }

.cp-data { margin-top: 12px; color: var(--cp-muted); font-size: 14px; }
.cp-data summary { cursor: pointer; }
.cp-data table { max-width: 360px; margin-top: 8px; }
.cp-data th, .cp-data td { padding: 6px 10px; border-bottom: 1px solid var(--cp-line); text-align: left; font-weight: 400; }
.cp-data td { font-family: ui-monospace, Consolas, monospace; color: var(--text); }

.cp-season { display: block; width: 100%; height: auto; font: 12px ui-monospace, Consolas, monospace; }
.cp-grid line { stroke: var(--cp-line); }
.cp-grid text, .cp-months text { fill: #8c95a7; }
.cp-line-avg, .cp-line-last, .cp-line-current { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.cp-line-avg { stroke: var(--text); stroke-width: 2; stroke-dasharray: 6 6; opacity: .8; }
.cp-line-last { stroke: #687084; stroke-width: 2; }
.cp-line-current { stroke: var(--cp-own); stroke-width: 4; stroke-dasharray: 100; animation: cp-draw 2.2s cubic-bezier(.3, .1, .2, 1) both; }
.cp-dot { fill: var(--cp-own); animation: cp-fade .3s ease-out 2.1s both; }
.cp-dot-pulse { fill: none; stroke: var(--cp-own); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: cp-pulse 1.8s ease-out 2.2s infinite; opacity: 0; }
.cp-legend { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 10px; color: var(--cp-muted); font-size: 13px; }
.cp-legend span { display: inline-flex; align-items: center; gap: 8px; }
.cp-legend i { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--cp-own); }
.cp-legend i.is-last { border-top: 2px solid #687084; }
.cp-legend i.is-avg { border-top: 2px dashed var(--text); }

.cp-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; align-items: start; }
.cp-flows, .cp-compare { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.cp-flow, .cp-compare li { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.cp-flow-name { font-weight: 600; }
.cp-flow-track { height: 14px; border-radius: 3px; background: var(--cp-track); overflow: hidden; }
.cp-flow-track span { display: block; width: var(--w); height: 100%; border-radius: 3px; background: var(--cp-blue); transform-origin: left; animation: cp-grow-x .8s ease-out both; animation-delay: calc(var(--i) * 70ms); }
.cp-flow.is-out .cp-flow-track span { background: var(--cp-orange); }
.cp-flow-value { min-width: 108px; text-align: right; font: 14px ui-monospace, Consolas, monospace; color: var(--cp-blue); }
.cp-flow.is-out .cp-flow-value { color: var(--cp-orange); }
.cp-flow-value small { display: block; color: var(--cp-muted); font-size: 11px; }
.cp-compare { max-width: 760px; }
.cp-compare a { color: var(--cp-blue); text-decoration: none; }
.cp-compare a:hover { text-decoration: underline; }
.cp-compare li .cp-flow-track span { background: #3a4252; }
.cp-compare li.is-own .cp-flow-track span { background: var(--cp-own); }
.cp-num { min-width: 64px; text-align: right; font: 14px ui-monospace, Consolas, monospace; }
@media (max-width: 520px) { .cp-flow, .cp-compare li { grid-template-columns: 96px minmax(0, 1fr) auto; } .cp-flow-value { min-width: 88px; } }

.cp-faq details { margin-bottom: 10px; padding: 16px 18px; border: 1px solid var(--cp-line); border-radius: 12px; background: var(--cp-card); }
.cp-faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.cp-faq p { margin: 10px 0 0; color: var(--cp-text2); line-height: 1.6; }

.cp-directory { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-directory a { padding: 10px 14px; border: 1px solid var(--cp-line); border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14px; }
.cp-directory a:hover { border-color: var(--cp-blue); }
.cp-directory a span { color: var(--cp-muted); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

@media (max-width: 640px) {
  .cp-body .site-header { flex-wrap: wrap; row-gap: 6px; }
  .cp-body .header-meta { display: none; }
  .cp-nav { order: 3; width: 100%; margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cp-nav a { flex: 0 0 auto; padding: 10px; }
  .cp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cp-fact { padding: 14px; }
  .cp-fact strong { font-size: 26px; }
  .cp-fact span { font-size: 14px; }
  .cp-gauge-top > strong { font-size: 60px; }
  .cp-lead { font-size: 17px; }
}

@keyframes cp-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cp-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes cp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cp-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes cp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cp-pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .cp-body *, .cp-body *::before, .cp-body *::after { animation: none !important; }
  .cp-line-current { stroke-dasharray: none; }
}
