/* debrid.pl - jasny styl "narzedziowy": biel / grafit, akcent turkus, liczby w foncie mono. */

:root {
    --bg: #f6f7f8;
    --surface: #ffffff;
    --surface-alt: #eef1f3;
    --ink: #1c2127;
    --ink-soft: #4b5563;
    --muted: #6b7280;
    --line: #dde2e6;
    --accent: #0f766e;
    --accent-strong: #0b5e57;
    --accent-soft: #e0f2ef;
    --warm: #b45309;
    --warm-soft: #fef3e2;
    --radius: 10px;
    --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}

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

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

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

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-size: .92rem; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.r { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Naglowek */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.logo-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; font-family: var(--mono); }
.logo-text span { color: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 6px 12px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--surface-alt); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); }

/* Hero + kalkulator */
.hero { padding: 40px 0 32px; background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.eyebrow { font-family: var(--mono); font-size: .8rem; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .8em; }
.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 720px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

.calc { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 24px; }
.calc-form .field { margin-bottom: 20px; border: 0; padding: 0; }
.calc-form .field:last-of-type { margin-bottom: 0; }
.calc-form label, .calc-form legend { font-weight: 600; display: block; margin-bottom: 8px; padding: 0; }

.gb-row { display: flex; align-items: center; gap: 16px; }
.gb-row input[type="range"] { flex: 1; accent-color: var(--accent); min-width: 0; }
.gb-input { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-weight: 600; }
.gb-input input { width: 90px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; text-align: right; background: var(--bg); }
.gb-input input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.segmented { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented label { margin: 0; font-weight: 500; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 8px 6px; text-align: center; cursor: pointer; font-size: .9rem; border-left: 1px solid var(--line); }
.segmented label:first-child span { border-left: 0; }
.segmented input:checked + span { background: var(--accent); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent-strong); outline-offset: -2px; }

.checks .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; margin-bottom: 10px; }
.check input { margin-top: 5px; accent-color: var(--accent); }
.check small { display: block; color: var(--muted); font-weight: 400; font-size: .85rem; }

.best { border-color: var(--accent); box-shadow: inset 0 4px 0 var(--accent); display: flex; flex-direction: column; }
.best-kicker { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 0; }
.best-name { font-size: 1.8rem; font-weight: 700; margin: 4px 0 0; }
.best-label { color: var(--ink-soft); margin-bottom: 16px; }
.best-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 20px; }
.best-stats div { background: var(--surface-alt); border-radius: 8px; padding: 10px; }
.best-stats dt { font-size: .78rem; color: var(--muted); }
.best-stats dd { margin: 0; font-weight: 600; font-size: 1rem; }
.best .btn { margin-top: auto; }

.btn { display: inline-block; padding: 11px 18px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; text-align: center; border: 0; cursor: pointer; font: inherit; }
.btn:hover { background: var(--accent-strong); color: #fff; }

/* Sekcje */
.section { padding: 40px 0; }
.section-tight { padding: 24px 0; border-bottom: 1px solid var(--line); }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.page-head { padding: 32px 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.crumbs { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.cards-3 p { margin: 0; color: var(--ink-soft); }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.price-grid .panel { padding: 16px; }

/* Tabele */
.table-scroll { position: relative; overflow-x: auto;border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th.r, .table td.r { text-align: right; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-alt); }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table tr.is-best td { background: var(--accent-soft); }
.table-compact th, .table-compact td { padding: 7px 4px; font-size: .88rem; }
.table-compact thead th { background: transparent; }

.tag { display: inline-block; font-family: var(--mono); font-size: .72rem; padding: 1px 7px; border-radius: 5px; background: var(--surface-alt); color: var(--ink-soft); margin-right: 4px; vertical-align: 1px; }
.tag-time { background: var(--accent-soft); color: var(--accent-strong); }
.tag-hh { background: var(--warm-soft); color: var(--warm); }

/* Listy */
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: .85rem; padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink-soft); }
.chips li a { text-decoration: none; font-weight: 600; }
.ticks { padding-left: 1.2em; }
.ticks li { margin-bottom: .4em; }
.steps { padding-left: 1.3em; margin: 0; }
.steps li { margin-bottom: .6em; }
.note { background: var(--warm-soft); border-left: 3px solid var(--warm); padding: 12px 14px; border-radius: 6px; }

.service-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.service-head h2 { margin-bottom: .3em; }
.service-tp { font-family: var(--mono); font-size: .8rem; color: var(--muted); }

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.faq { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: .6em 0 0; color: var(--ink-soft); }

/* Stopka */
.footer { padding: 32px 0; border-top: 1px solid var(--line); background: var(--surface); font-size: .92rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 1em; }
.footer-nav a { color: var(--ink-soft); }

@media (max-width: 860px) {
    .calc, .split { grid-template-columns: 1fr; }
    .cards-3, .price-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .topbar-inner { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 10px; padding-bottom: 8px; }
    .nav { margin-left: -12px; }
    .segmented { grid-template-columns: repeat(2, 1fr); }
    .segmented label:nth-child(3) span { border-left: 0; }
    .segmented label:nth-child(n+3) span { border-top: 1px solid var(--line); }
    .best-stats { grid-template-columns: 1fr 1fr 1fr; }
    .best-stats dd { font-size: .88rem; }
    .gb-row { flex-wrap: wrap; }
    .gb-row input[type="range"] { flex-basis: 100%; }
    /* Tabela wynikow: bez kolumn "#" i "Miesiecznie" - miesci sie bez przewijania. */
    #calc-table th:nth-child(1), #calc-table td:nth-child(1),
    #calc-table th:nth-child(5), #calc-table td:nth-child(5) { display: none; }
    .table th, .table td { padding: 10px 8px; }
}
