/* =====================================================================
   Iryteo.pl — strona publiczna
   Motyw: zieleń. Jeden plik, bez zależności, bez buildu.
   ===================================================================== */

:root {
    /* Zieleń przewodnia — wyprowadzona z logo Iryteo (--g-500 to kolor znaku). */
    --g-950: #0a2a10;
    --g-900: #103d18;
    --g-800: #175423;
    --g-700: #1f7a2c;
    --g-600: #2c9c33;
    --g-500: #3db63d;
    --g-400: #66c962;
    --g-300: #97dd93;
    --g-100: #d9f4d6;
    --g-50:  #f0faee;

    /* Grafit z wordmarku „TEO”. */
    --ink:      #2b2f2b;
    --ink-soft: #556054;
    --ink-mute: #84907f;
    --line:     #e1e9de;
    --bg:       #ffffff;
    --bg-soft:  #f6faf4;

    /* Skala irytacji — od zadowolonego do maksymalnie zirytowanego. */
    --iryt-1: #3db63d;
    --iryt-2: #8bd12a;
    --iryt-3: #f0d213;
    --iryt-4: #f08a13;
    --iryt-5: #e02020;

    --warn: #b8600c;
    --err:  #d32b1e;

    --radius:    14px;
    --radius-sm: 9px;
    --shadow:    0 1px 2px rgba(6, 37, 26, .06), 0 8px 24px rgba(6, 37, 26, .06);
    --shadow-lg: 0 2px 6px rgba(6, 37, 26, .08), 0 24px 48px rgba(6, 37, 26, .12);

    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

a { color: var(--g-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--g-600); }

:focus-visible {
    outline: 3px solid var(--g-500);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--g-700); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2.5rem); }

/* ------------------------------------------------------------- header */

.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}

.header-inner { display: flex; align-items: center; gap: 1.75rem; height: 68px; }

.brand { display: flex; align-items: center; flex: 0 0 auto; }

.site-nav { display: flex; gap: 1.4rem; margin-left: auto; font-size: .95rem; font-weight: 550; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--g-700); }

.header-cta { flex: 0 0 auto; }

@media (max-width: 780px) {
    .site-nav { display: none; }
    .header-cta { margin-left: auto; }
}

/* ------------------------------------------------------------ buttons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .72rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font: inherit; font-weight: 600; font-size: .98rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { border-color: var(--g-300); color: var(--ink); }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(180deg, var(--g-600), var(--g-700));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 1px 2px rgba(6,37,26,.18), 0 6px 18px rgba(15,122,69,.28);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--g-500), var(--g-600)); color: #fff; }

.btn-ghost { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.6); color: #fff; }

.btn-sm { padding: .48rem .9rem; font-size: .9rem; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.05rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* --------------------------------------------------------------- hero */

.hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(120% 130% at 15% 0%, var(--g-800) 0%, var(--g-950) 62%);
    color: #fff;
    padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-glow {
    position: absolute; inset: auto -10% -55% 55%;
    width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
    background: radial-gradient(circle, rgba(34,179,100,.42), transparent 62%);
    filter: blur(10px);
    pointer-events: none;
}

.hero-inner { position: relative; }
.hero h1 { max-width: 17ch; }

.eyebrow {
    display: inline-block;
    font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: var(--g-300);
    margin: 0 0 1rem;
}

.hero-sub { max-width: 62ch; font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: rgba(255,255,255,.84); }

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 2.75rem; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin: 0; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.14); }
.hero-stats div { margin: 0; }
.hero-stats dt { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.6); }
.hero-stats dd { margin: .15rem 0 0; font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------- sections */

.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-center { text-align: center; }

.section-dark {
    background: radial-gradient(110% 120% at 80% 0%, var(--g-800), var(--g-950) 70%);
    color: #fff;
}

.section-head { max-width: 62ch; margin-bottom: 2.25rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }
.section-head-light p { color: rgba(255,255,255,.78); }

.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 3rem 0 2.5rem; }
.page-head p { color: var(--ink-soft); margin: 0; }

.h-sub { display: flex; align-items: baseline; gap: .6rem; font-size: 1.4rem; }
.count { font-size: .95rem; font-weight: 600; color: var(--g-700); background: var(--g-50); border-radius: 999px; padding: .1rem .6rem; }
.lead { color: var(--ink-soft); max-width: 62ch; }

/* ------------------------------------------------------- karta ankiety */

.vote-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.vote-form { display: flex; gap: .85rem; align-items: flex-end; flex-wrap: wrap; }
.vote-form .combo { flex: 1 1 320px; }
.vote-closed { margin: 0; color: var(--ink-soft); }

.vote-status { margin: 1rem 0 0; font-size: .95rem; color: var(--ink-soft); min-height: 1.5em; }
.vote-status.is-ok  { color: var(--g-700); font-weight: 600; }
.vote-status.is-err { color: var(--err); font-weight: 600; }

/* combobox */
.combo { position: relative; }
.combo label { display: block; font-size: .87rem; font-weight: 650; margin-bottom: .35rem; color: var(--ink-soft); }

.combo-input,
.field input, .field select, .field textarea {
    width: 100%;
    padding: .78rem .95rem;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .12s ease, box-shadow .12s ease;
}
.combo-input:focus,
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--g-500);
    box-shadow: 0 0 0 3px var(--g-100);
}

.combo-list {
    position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
    max-height: 290px; overflow-y: auto;
    margin: 0; padding: .35rem;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}
.combo-list li {
    display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
    padding: .55rem .7rem;
    border-radius: 7px;
    cursor: pointer;
}
.combo-list li:hover, .combo-list li.is-active { background: var(--g-50); }
.combo-list li[aria-disabled="true"] { color: var(--ink-mute); cursor: default; }
.combo-list li[aria-disabled="true"]:hover { background: transparent; }
.combo-list .opt-region { font-size: .82rem; color: var(--ink-mute); }

/* ---------------------------------------------------- mapa + ranking */

.poll-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .poll-grid { grid-template-columns: 1fr; } }

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.panel-head { padding: 1.15rem 1.35rem .9rem; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; }
.panel-head p { margin: .15rem 0 0; font-size: .88rem; color: var(--ink-mute); }

.map { height: 460px; background: var(--g-50); }
.map-legend { display: flex; align-items: center; gap: 1.1rem; margin: 0; padding: .7rem 1.35rem; font-size: .85rem; color: var(--ink-soft); border-top: 1px solid var(--line); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; }
.dot-candidate { background: var(--g-500); }
.dot-accepted  { background: var(--g-900); }

/* ranking */
.ranking { list-style: none; margin: 0; padding: .5rem; max-height: 520px; overflow-y: auto; counter-reset: none; }
.ranking-full { max-height: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.ranking-hint { margin: 0 0 .5rem; padding: 0 .35rem; font-size: .86rem; color: var(--ink-mute); }
.ranking-hint strong { color: var(--g-700); }

.ranking-item {
    display: grid;
    grid-template-columns: 2rem 1fr auto auto;
    gap: .85rem;
    align-items: center;
    padding: .65rem .85rem;
    border-radius: var(--radius-sm);
}
.ranking-item + .ranking-item { border-top: 1px solid var(--line); border-radius: 0; }
.ranking-item.is-accepted { background: var(--g-50); }
.ranking-item.is-mine { background: var(--g-50); box-shadow: inset 3px 0 0 var(--g-600); }

/* przycisk głosowania przy pozycji rankingu */
.rank-vote {
    justify-self: end;
    padding: .34rem .78rem;
    border: 1.5px solid var(--g-300);
    border-radius: 999px;
    background: #fff;
    color: var(--g-700);
    font: inherit; font-size: .82rem; font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.rank-vote:hover { background: var(--g-600); border-color: var(--g-600); color: #fff; }
.rank-vote:active { transform: translateY(1px); }
.rank-vote[disabled] { opacity: .5; cursor: progress; }

.rank-vote.is-mine {
    background: var(--g-700);
    border-color: var(--g-700);
    color: #fff;
    cursor: default;
}
.rank-vote.is-mine:hover { background: var(--g-700); border-color: var(--g-700); }
.rank-vote.is-mine::before { content: "✓"; margin-right: .3rem; }

@media (max-width: 420px) {
    .ranking-item { grid-template-columns: 1.6rem 1fr auto; gap: .5rem .6rem; }
    /* Na telefonie przycisk dostaje własny wiersz i większe pole dotyku. */
    .rank-vote { grid-column: 2 / -1; justify-self: start; margin-top: .4rem; padding: .5rem 1.1rem; }
}

.rank-pos { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-mute); text-align: right; }
.ranking-item:nth-child(1) .rank-pos { color: var(--g-600); font-size: 1.1rem; }

.rank-body { min-width: 0; }
.rank-name { display: block; font-weight: 650; }
.rank-name a { color: inherit; text-decoration: none; }
.rank-name a:hover { color: var(--g-700); }
.rank-region { display: block; font-size: .8rem; color: var(--ink-mute); }

.rank-bar { display: block; height: 5px; margin-top: .4rem; background: var(--g-50); border-radius: 999px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--g-400), var(--g-600)); border-radius: 999px; transition: width .4s ease; }

.rank-votes { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--g-700); }
.ranking-empty { padding: 1.5rem; color: var(--ink-mute); text-align: center; }

.pill {
    display: inline-block;
    font-size: .72rem; font-weight: 700; letter-spacing: .02em;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: var(--g-50);
    color: var(--g-700);
    border: 1px solid var(--g-100);
    vertical-align: 1px;
}
.pill-ok { background: var(--g-700); color: #fff; border-color: transparent; }

/* --------------------------------------------------------- karty miast */

.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }

.city-card {
    display: flex; flex-direction: column; gap: .3rem;
    padding: 1.35rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.city-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--g-300); color: var(--ink); }

.city-card-region { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.city-card-name { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.city-card-tagline { color: var(--ink-soft); font-size: .93rem; }
.city-card-meta { font-size: .85rem; color: var(--ink-mute); margin-top: .35rem; }
.city-card-go { margin-top: .75rem; font-weight: 650; font-size: .9rem; color: var(--g-700); }

/* karta miasta demonstracyjnego — wyraźnie odróżniona od realnych */
.city-card-demo { border-style: dashed; border-color: var(--g-300); background: var(--g-50); }
.city-card-demo .city-card-region { color: #8a6100; font-weight: 700; }

.empty-box {
    padding: 2rem;
    border: 1.5px dashed var(--g-300);
    border-radius: var(--radius);
    background: var(--g-50);
    color: var(--ink-soft);
}
.empty-box p:last-child { margin: 0; }

/* --------------------------------------------------------------- kroki */

.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding-top: .5rem; }
.steps h3 { margin: .9rem 0 .35rem; }
.steps p { color: var(--ink-soft); font-size: .96rem; margin: 0; }

.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--g-50);
    border: 1.5px solid var(--g-300);
    color: var(--g-700);
    font-weight: 800;
}

/* ---------------------------------------------------------- społecznik */

.level-demo {
    max-width: 560px;
    padding: 1.35rem 1.5rem;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: var(--radius);
    margin-bottom: 2.5rem;
}
.level-demo-head { display: flex; align-items: center; gap: .9rem; margin-bottom: .9rem; }
.level-demo-head strong { display: block; font-size: 1.15rem; }
.level-demo-head span { font-size: .88rem; color: rgba(255,255,255,.72); }
.level-demo-note { margin: .8rem 0 0; font-size: .82rem; color: rgba(255,255,255,.55); }

.level-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; flex: 0 0 42px;
    border-radius: 12px;
    font-weight: 800;
    background: linear-gradient(160deg, var(--g-400), var(--g-700));
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.level-badge-1 { background: linear-gradient(160deg, #9db6a9, #63796d); }
.level-badge-5 { background: linear-gradient(160deg, #5fd6a0, #0d4a33); }
.level-badge-6 { background: linear-gradient(160deg, #ffd76e, #c98a12); }

.progress { height: 10px; background: rgba(255,255,255,.16); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--g-400), var(--g-300)); }

.level-list { list-style: none; margin: 0 0 2.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .9rem; }
.level-list li {
    display: grid;
    grid-template-columns: 42px 1fr;
    grid-template-areas: "badge name" "badge min" "perk perk";
    gap: .15rem .85rem;
    align-items: center;
    padding: .9rem 1rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-sm);
}
.level-list .level-badge { grid-area: badge; }
.level-list strong { grid-area: name; }
.level-min  { grid-area: min; font-size: .82rem; color: rgba(255,255,255,.6); }
.level-perk { grid-area: perk; margin-top: .5rem; font-size: .85rem; color: rgba(255,255,255,.72); }

.reward-table { max-width: 560px; }
.reward-table h3 { margin-bottom: .8rem; }
.reward-table ul { list-style: none; margin: 0; padding: 0; }
.reward-table li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: .95rem; }
.reward-table b { color: var(--g-300); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------- formularze */

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .89rem; font-weight: 650; margin-bottom: .35rem; color: var(--ink-soft); }
.field .hint { font-weight: 400; color: var(--ink-mute); font-size: .85rem; }
.field textarea { resize: vertical; }

.suggest-form {
    padding: 1.75rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.form-status { margin: 1rem 0 0; font-weight: 600; min-height: 1.5em; }
.form-status.is-ok  { color: var(--g-700); }
.form-status.is-err { color: var(--err); }
.form-note { margin: .8rem 0 0; font-size: .82rem; color: var(--ink-mute); }

/* honeypot — ukryty przed ludźmi, widoczny dla botów */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------- profil miasta */

.city-hero {
    background: radial-gradient(110% 130% at 10% 0%, var(--g-800), var(--g-950) 70%);
    color: #fff;
    padding: clamp(2.75rem, 6vw, 4.5rem) 0;
}
.city-hero h1 { margin-bottom: .35rem; }
.city-tagline { color: rgba(255,255,255,.8); font-size: 1.1rem; max-width: 60ch; }
.city-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.city-hero .pill { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.2); }
.city-hero .pill-ok { background: var(--g-500); border-color: transparent; }

.city-cta { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.14); }
.city-cta p { color: rgba(255,255,255,.82); }

.tabs { display: flex; gap: .35rem; border-bottom: 2px solid var(--line); margin-bottom: 2rem; }
.tab {
    padding: .7rem 1.15rem;
    font-weight: 650;
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.tab:hover { color: var(--g-700); }
.tab.is-active { color: var(--g-700); border-bottom-color: var(--g-600); }

.feed-placeholder {
    padding: 3rem 2rem;
    text-align: center;
    border: 1.5px dashed var(--g-300);
    border-radius: var(--radius);
    background: var(--g-50);
}
.feed-placeholder h2 { font-size: 1.4rem; }
.feed-placeholder p { color: var(--ink-soft); max-width: 55ch; margin-inline: auto; }
.feed-soon { font-size: .85rem; color: var(--ink-mute); }

/* ------------------------------------------------- feed irytacji */

.section-tight { padding-block: clamp(1.75rem, 3.5vw, 2.75rem); }

.demo-banner {
    background: repeating-linear-gradient(135deg, var(--g-50), var(--g-50) 14px, #e6f6e2 14px, #e6f6e2 28px);
    border-bottom: 1px solid var(--g-300);
    padding: .8rem 0;
    font-size: .92rem;
    color: var(--g-800);
}
.demo-banner strong { color: var(--g-700); }

.pill-demo { background: #fff3cd; color: #7a5600; border-color: #f2dd9a; }

.feed-toolbar {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}
.feed-toolbar .tabs { margin-bottom: 0; flex: 1 1 auto; }

.tab-count {
    display: inline-block;
    min-width: 1.4em;
    padding: 0 .4em;
    margin-left: .3rem;
    border-radius: 999px;
    background: var(--g-50);
    color: var(--g-700);
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
}
.tab.is-active .tab-count { background: var(--g-600); color: #fff; }

.sorter { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--ink-mute); padding-bottom: .55rem; }
.sorter a { color: var(--ink-soft); text-decoration: none; }
.sorter a:hover { color: var(--g-700); }
.sorter a.is-active { color: var(--g-700); font-weight: 700; }

.feed { display: grid; gap: 1.25rem; max-width: 760px; }

.post {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.35rem 1.5rem 1.1rem;
}

.post-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }

.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; flex: 0 0 42px;
    border-radius: 50%;
    background: linear-gradient(160deg, var(--g-400), var(--g-700));
    color: #fff;
    font-size: .88rem; font-weight: 700; letter-spacing: .02em;
}
.avatar-sm { width: 32px; height: 32px; flex-basis: 32px; font-size: .75rem; }

.post-who { min-width: 0; flex: 1 1 auto; }
.post-author { display: block; font-weight: 650; font-size: .97rem; }
.post-meta { display: block; font-size: .82rem; color: var(--ink-mute); }

.lvl {
    display: inline-block;
    margin-left: .35rem;
    padding: .05rem .45rem;
    border-radius: 999px;
    background: var(--g-50);
    border: 1px solid var(--g-100);
    color: var(--g-700);
    font-size: .7rem; font-weight: 700;
    vertical-align: 1px;
}

.status-tag {
    flex: 0 0 auto;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .74rem; font-weight: 700;
}
.st-reported { background: #fdece8; color: #b03a20; }
.st-progress { background: #fff4dc; color: #8a5a06; }
.st-claimed  { background: #e8f0ff; color: #2a4d9b; }
.st-fixed    { background: var(--g-600); color: #fff; }

.post-title { font-size: 1.18rem; margin: 0 0 .45rem; }
.post-body { color: var(--ink-soft); margin: 0 0 .9rem; }

.post-photo {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    margin-bottom: .9rem;
}

.post-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; font-size: .76rem; }
.post-tags span { padding: .18rem .55rem; border-radius: 6px; background: var(--bg-soft); color: var(--ink-mute); }
.post-tags .cat { background: var(--g-50); color: var(--g-700); font-weight: 650; }
.post-tags .fixed-at { background: var(--g-50); color: var(--g-700); }

.post-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
}
.irytki { display: inline-flex; align-items: center; gap: .5rem; }

/* klikalna irytka — ten sam układ co wersja statyczna, plus reakcja na najechanie */
.irytki-btn {
    border: 1.5px solid transparent;
    border-radius: 999px;
    background: none;
    padding: .25rem .8rem .25rem .3rem;
    font: inherit;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
}
.irytki-btn:hover { background: var(--g-50); border-color: var(--g-300); }
.irytki-btn.is-voted { background: var(--g-50); border-color: var(--g-500); }
.irytki-btn.is-voted .irytki-count { color: var(--g-700); }
.irytki-btn[disabled] { opacity: .6; cursor: progress; }

.comment-form { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.comment-form textarea {
    width: 100%; padding: .7rem .9rem; margin-bottom: .6rem;
    font: inherit; color: var(--ink);
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    resize: vertical;
}
.comment-form textarea:focus { outline: none; border-color: var(--g-500); box-shadow: 0 0 0 3px var(--g-100); }

.comment-login {
    margin-top: 1.1rem; padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: .92rem; color: var(--ink-soft);
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.irytki img { display: block; }
.irytki-count { font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.irytki-label { font-size: .85rem; color: var(--ink-mute); }
.post-comments-count { font-size: .85rem; color: var(--ink-mute); }

.comments { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); display: grid; gap: .85rem; }
.comment { display: flex; gap: .65rem; }
.comment p { margin: .15rem 0 0; font-size: .92rem; color: var(--ink-soft); }
.comment-author { font-size: .88rem; font-weight: 650; }
.comment-time { margin-left: .4rem; font-weight: 400; font-size: .78rem; color: var(--ink-mute); }

.comment.is-official { background: var(--g-50); border-radius: var(--radius-sm); padding: .7rem .8rem; }
.comment.is-official .avatar { background: linear-gradient(160deg, #6f7f9c, #2f3f5c); }
.official-tag {
    display: inline-block;
    margin-left: .35rem;
    padding: .05rem .45rem;
    border-radius: 999px;
    background: #2f3f5c;
    color: #fff;
    font-size: .68rem; font-weight: 700;
}

.feed-note {
    max-width: 760px;
    margin: 1.5rem 0 0;
    font-size: .85rem;
    color: var(--ink-mute);
}

/* ------------------------------------------- konto mieszkańca w nagłówku */

.header-account { display: flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 650; color: var(--ink-soft); text-decoration: none; }
.header-account:hover { color: var(--g-700); }
.header-level {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 8px;
    background: linear-gradient(160deg, var(--g-400), var(--g-700));
    color: #fff; font-size: .8rem; font-weight: 800;
}
.header-login { font-size: .93rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.header-login:hover { color: var(--g-700); }

/* ------------------------------------------------------ panel mieszkańca */

.account-head { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.account-level { display: flex; align-items: center; gap: 1rem; }
.account-level h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.account-meta { margin: .2rem 0 0; color: var(--ink-soft); font-size: .95rem; }
.account-actions { display: flex; gap: .5rem; margin-left: auto; flex-wrap: wrap; }

.pill-warn { background: #fff4dc; color: #8a5a06; border-color: #f0d9a0; }

.account-progress { margin-bottom: 1.75rem; max-width: 640px; }
.progress-light { background: var(--g-100); }
.progress-light i { background: linear-gradient(90deg, var(--g-500), var(--g-700)); }
.account-progress p { margin: .5rem 0 0; font-size: .9rem; color: var(--ink-soft); }

.account-list { display: grid; gap: .7rem; }
.account-item {
    display: flex; align-items: center; gap: .9rem;
    padding: .9rem 1.1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.account-item-body { flex: 1 1 auto; min-width: 0; }
.account-item-title { font-weight: 650; color: var(--ink); text-decoration: none; }
.account-item-title:hover { color: var(--g-700); text-decoration: underline; }
.account-item-meta { margin: .15rem 0 0; font-size: .84rem; color: var(--ink-mute); }
.account-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; flex: 0 0 auto; }
.account-item-votes { font-size: .82rem; color: var(--ink-mute); }
.account-item .tag { font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; }
.account-item .st-reported { background: #fdece8; color: #b03a20; }
.account-item .st-progress { background: #fff4dc; color: #8a5a06; }
.account-item .st-claimed  { background: #e8f0ff; color: #2a4d9b; }
.account-item .st-fixed    { background: var(--g-600); color: #fff; }

.card-plain { margin-top: 2rem; max-width: 640px; }
.points-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.points-list li { display: flex; align-items: baseline; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.points-list b { margin-left: auto; color: var(--g-700); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------- formularz zgłoszenia */

.terms-check { display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 1.1rem; font-size: .9rem; color: var(--ink-soft); }
.terms-check input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--g-600); flex: 0 0 auto; }

.geo-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.geo-status { font-size: .88rem; color: var(--ink-mute); }
.geo-status.is-ok { color: var(--g-700); font-weight: 650; }
.geo-status.is-err { color: var(--err); }

.field input[type=file] {
    width: 100%; padding: .6rem;
    border: 1.5px dashed var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    font: inherit; font-size: .92rem;
}

/* --------------------------------------- profil nieodebrany przez urząd */

.claim-banner {
    background: #fff8e6;
    border-bottom: 1px solid #f0d9a0;
    padding: .8rem 0;
    font-size: .92rem;
    color: #6b4708;
}
.claim-banner strong { color: #5a3c06; }
.claim-banner a { color: var(--g-700); font-weight: 650; white-space: nowrap; }

/* ------------------------------------------------------ strona dla miast */

.hero-cities h1 { max-width: 20ch; }

.offer-card {
    padding: 1.35rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.offer-card h3 { margin-bottom: .4rem; }
.offer-card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* wybór trybu wniosku: profil istnieje / jeszcze nas nie ma */
.mode-choice { border: 0; margin: 0 0 1.35rem; padding: 0; }
.mode-choice legend {
    padding: 0;
    font-size: .89rem; font-weight: 650;
    color: var(--ink-soft);
    margin-bottom: .55rem;
}

.mode-option {
    display: flex; align-items: flex-start; gap: .7rem;
    padding: .85rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}
.mode-option + .mode-option { margin-top: .5rem; }
.mode-option:hover { border-color: var(--g-300); }
.mode-option input { margin-top: .25rem; width: 18px; height: 18px; accent-color: var(--g-600); flex: 0 0 auto; }
.mode-option strong { display: block; font-size: .97rem; }
.mode-option em { display: block; font-style: normal; font-size: .87rem; color: var(--ink-mute); margin-top: .1rem; }
.mode-option:has(input:checked) { border-color: var(--g-500); background: var(--g-50); }

/* ------------------------------------------------- udostępnianie */

.share { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.share-label { font-size: .85rem; font-weight: 650; color: var(--ink-soft); margin-right: .2rem; }

.share-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .38rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-soft);
    font: inherit; font-size: .84rem; font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.share-btn svg { flex: 0 0 auto; }
.share-btn:hover { color: #fff; border-color: transparent; }

.share-fb:hover     { background: #1877f2; }
.share-wa:hover     { background: #25d366; }
.share-x:hover      { background: #14171a; }
.share-mail:hover   { background: var(--ink-soft); }
.share-native:hover,
.share-copy:hover   { background: var(--g-600); }

.share-copy.is-done { background: var(--g-600); border-color: transparent; color: #fff; }

.share-done { font-size: .82rem; font-weight: 650; color: var(--g-700); }

/* wersja w feedzie — same ikony, dosunięte do prawej */
.share-compact { margin-left: auto; gap: .3rem; }
.share-compact .share-btn { padding: .34rem; border-radius: 50%; }
.share-compact .share-btn span:empty { display: none; }
.share-compact .share-done { display: none; }

.post-foot { flex-wrap: wrap; }
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--g-700); text-decoration: underline; }
a.post-comments-count { color: var(--ink-mute); text-decoration: none; }
a.post-comments-count:hover { color: var(--g-700); text-decoration: underline; }

/* ------------------------------------------- pojedyncza irytacja */

.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.1rem; font-size: .85rem; color: var(--ink-mute); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--g-700); text-decoration: underline; }

.post-single { padding: 1.75rem; }
.post-title-single { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .7rem; }
.post-single .post-body { font-size: 1.03rem; }
.post-single .share { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.post-tags a.geo { text-decoration: none; }
.post-tags a.geo:hover { background: var(--g-50); color: var(--g-700); }
.comments-head { font-size: 1rem; margin: 0 0 .25rem; }

@media (max-width: 560px) {
    .post-single { padding: 1.2rem 1rem; }
    .share-compact { margin-left: 0; width: 100%; padding-top: .6rem; }
}

@media (max-width: 560px) {
    .post { padding: 1.1rem 1rem .9rem; }
    .post-head { flex-wrap: wrap; }
    .status-tag { order: 3; }
}

/* ------------------------------------------------------------- proza */

.prose h2 { margin-top: 2rem; font-size: 1.35rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose code { background: var(--bg-soft); padding: .12rem .35rem; border-radius: 4px; font-size: .9em; }

.table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute); }

.notice { padding: 1rem 1.15rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; }
.notice-warn { background: #fff6e8; border: 1px solid #f0d29a; color: #6b4708; }

/* ------------------------------------------------------------ komunikaty */

.flash-stack { margin-top: 1rem; }
.flash {
    padding: .8rem 1.1rem;
    border-radius: var(--radius-sm);
    margin-bottom: .7rem;
    font-weight: 600;
    font-size: .95rem;
}
.flash-ok  { background: var(--g-50); color: var(--g-800); border: 1px solid var(--g-100); }
.flash-err { background: #fdecea; color: var(--err); border: 1px solid #f5c6c2; }

/* --------------------------------------------------------------- stopka */

.site-footer { background: var(--g-950); color: rgba(255,255,255,.7); padding: 3rem 0 2rem; margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand p { max-width: 42ch; margin-top: .9rem; font-size: .94rem; }
.footer-brand img { filter: brightness(0) invert(1); opacity: .9; }

.footer-nav { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.footer-nav a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .94rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }

.footer-copy { grid-column: 1 / -1; margin: 1.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: rgba(255,255,255,.5); }
.footer-legal { display: block; margin-top: .3rem; font-size: .8rem; color: rgba(255,255,255,.38); }

/* ------------------------------------------------------------- cookies */

.cookie-bar {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60;
    max-width: 620px; margin-inline: auto;
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: .9rem 1.1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
/* Musi być PO .cookie-bar: `display: flex` z reguły autora bije wbudowane
   [hidden] { display: none } przeglądarki, więc atrybut hidden trzeba obsłużyć ręcznie. */
.cookie-bar[hidden] { display: none; }

.cookie-bar p { margin: 0; flex: 1 1 240px; font-size: .87rem; color: var(--ink-soft); }
.cookie-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ------------------------------------------------------------- leaflet */

.leaflet-container { font: inherit; }
.leaflet-popup-content { margin: .8rem 1rem; }
.map-pop-name { font-weight: 700; font-size: 1rem; }
.map-pop-meta { color: var(--ink-mute); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
