/* Tarifkatalog: one small stylesheet, system fonts, no framework. Mobile first. */

:root {
    --ink: #13202f;
    --muted: #536273;
    --line: #dfe5ec;
    --bg: #f5f7fa;
    --card: #ffffff;
    --brand: #0a5bd3;
    --brand-dark: #0846a6;
    --brand-soft: #e8f0fd;
    --focus: #f2a900;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(19, 32, 47, .06), 0 4px 16px rgba(19, 32, 47, .05);
    color-scheme: light;
}

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

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

body {
    margin: 0;
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

a { color: var(--brand-dark); text-underline-offset: .15em; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: .2em 0 .3em; }
h2 { font-size: 1.35rem; margin: 2rem 0 .8rem; }
h3 { font-size: 1.1rem; margin: 0; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header and footer */

.site-header { background: var(--card); border-top: 4px solid var(--brand); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 60px; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .4em; border-radius: 3px; background: var(--brand); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 6px 0; display: inline-block; }
.nav a:hover { color: var(--brand); text-decoration: underline; }
/* Phones: logo and language menu on the first row, navigation below. Wider: navigation before the language menu. */
.header-row nav { flex-basis: 100%; order: 3; }
.lang { margin-left: auto; }
@media (min-width: 760px) {
    .header-row nav { flex-basis: auto; order: 2; margin-left: auto; }
    .lang { order: 3; margin-left: 0; }
}

/* Language menu: a details element, so it works without JavaScript. Flags are desaturated to sit quietly in the palette. */
.lang { position: relative; font-size: .88rem; }
.lang summary {
    display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 5px 10px; list-style: none; cursor: pointer;
    border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--muted); font-weight: 600; letter-spacing: .03em;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after {
    content: ""; width: .38em; height: .38em; margin: 0 1px 3px 2px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s;
}
.lang[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.lang summary:hover, .lang[open] summary { border-color: #c3ccd6; color: var(--ink); }
.lang-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px; margin: 0; padding: 6px; list-style: none;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 2px 4px rgba(19, 32, 47, .06), 0 12px 32px rgba(19, 32, 47, .12);
}
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.lang-menu a:hover { background: var(--bg); color: var(--ink); }
.lang-menu a[aria-current] { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.flag {
    flex: none; width: 21px; height: 14px; object-fit: cover; border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(19, 32, 47, .14); filter: saturate(.4) contrast(.92) brightness(1.04);
}
.lang-menu a:hover .flag, .lang-menu a[aria-current] .flag, .lang summary:hover .flag { filter: saturate(.65) contrast(.95); }

.site-footer { margin-top: 64px; background: var(--ink); color: #c9d3de; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer .logo { color: #fff; }
.footer-grid { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 40px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.footer-grid li { margin-bottom: 6px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 3fr 2fr; } }

/* Breadcrumbs and intro */

.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 14px auto 0; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 .5em; }
.crumbs a { color: var(--muted); }

.intro { margin: 8px 0 18px; }
.lead { font-size: 1.08rem; color: var(--muted); margin: 0; }
.lead strong { color: var(--ink); }
.stand { display: block; font-size: .9rem; margin-top: 4px; }

/* Segment chips */

.segments ul { display: flex; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0 0 4px; overflow-x: auto; scrollbar-width: thin; }
.segments a {
    display: inline-block; white-space: nowrap; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--card); color: var(--ink); text-decoration: none; font-size: .92rem;
}
.segments a:hover { border-color: var(--brand); }
.segments a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (min-width: 900px) { .segments ul { flex-wrap: wrap; overflow: visible; } }

/* Buttons */

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px;
    border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--brand-dark); color: #fff; }
.button-secondary { background: var(--ink); }
.button-wide { width: 100%; }

/* Comparison: filter panel on the left, results in the middle */

.compare { display: grid; gap: 16px; align-items: start; }
@media (min-width: 960px) { .compare { grid-template-columns: 272px minmax(0, 1fr); gap: 24px; } }

.filter-panel {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 4px 16px 16px;
}
@media (min-width: 960px) {
    .filter-panel { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; }
    /* Here the head only holds the reset link. */
    .filter-head:not(:has(.reset)) { display: none; }
}
.filter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 12px 0 4px; }
.filter-head .reset { font-size: .85rem; margin-left: auto; }
.filter-close { display: none; }

.filter-group { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 12px 0 14px; min-width: 0; }
.filter-head + .filter-group { border-top: 0; }
.filter-group legend { padding: 0; margin-bottom: 8px; font-size: .9rem; font-weight: 700; float: left; width: 100%; }
.filter-group legend + * { clear: both; }

/* Choice chips: the real radio or checkbox stays in the page for keyboards and screen readers, only visually hidden. */
.choices { display: grid; gap: 6px; }
.choices-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-wide { grid-column: 1 / -1; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
    display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 4px 6px; text-align: center;
    border: 1px solid #c9d2dd; border-radius: 8px; background: #fff; font-size: .86rem; font-weight: 600; color: var(--ink);
    transition: background-color .12s, border-color .12s;
}
.choices-stack .choice span { justify-content: flex-start; padding-left: 12px; }
.choice:hover span { border-color: var(--brand); }
.choice input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); box-shadow: inset 0 0 0 1px var(--brand); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.check { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); flex: none; }

.filter-submit { margin-top: 8px; }
.filter-submit .when-live { display: none; }

/* Results bar: count, sort order and, on phones, the filter button */

.results-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow);
}
.results-count { margin: 0; font-size: 1rem; font-weight: 600; color: var(--muted); margin-right: auto; }
.results-count strong { color: var(--ink); font-size: 1.15rem; }
.sort { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.sort select {
    font: inherit; font-size: .95rem; font-weight: 600; color: var(--ink); padding: 7px 10px; min-height: 38px;
    border: 1px solid #c3ccd6; border-radius: 8px; background: #fff;
}
.filter-toggle { display: none; }
.results-note { font-size: .85rem; color: var(--muted); margin: 10px 2px 12px; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
/* Offer cards pick their layout from the list's width, not the window's: next to the filter panel the list is narrower than the window suggests. */
.results { container: results / inline-size; }
.empty { background: var(--card); padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); }
live-results[aria-busy="true"] .results { opacity: .5; transition: opacity .15s .1s; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 6px; }
.pagination ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pagination a {
    display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-weight: 600; text-decoration: none;
}
.pagination a:hover { border-color: var(--brand); }
.pagination a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* With live-results.js on a phone, the panel opens from the filter button. Without it, the panel stays above the list. */
live-results:defined .filter-submit .when-static { display: none; }
live-results:defined .filter-submit .when-live { display: inline; }
@media (min-width: 960px) { live-results:defined .filter-submit { display: none; } }
@media (max-width: 959px) {
    live-results:defined .filter-toggle {
        display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 12px; order: -1;
        border: 1px solid var(--brand); border-radius: 8px; background: var(--brand-soft); color: var(--brand-dark); font: inherit; font-weight: 700; cursor: pointer;
    }
    live-results:defined .filter-panel:not(.is-open) { display: none; }
    live-results:defined .filter-close {
        display: grid; place-items: center; width: 40px; height: 40px; margin: 0 -8px 0 auto; align-self: center;
        border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer;
    }
    live-results:defined .filter-head { align-items: center; }
    live-results:defined .filter-panel.is-open {
        position: fixed; inset: 0; z-index: 30; border-radius: 0; overflow-y: auto; padding-bottom: 24px;
    }
    .results-count { flex-basis: 100%; order: 2; }
}
.count-badge {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: var(--brand); color: #fff; font-size: .75rem; font-weight: 800;
}

/* Offer card: logo, features, price */

.offer {
    position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; background: var(--card);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.offer:hover { border-color: #b9c7d8; }
/* Wide list: dense rows make the data points comparable while retaining a clear action area. */
@container results (min-width: 720px) { .offer { grid-template-columns: 56px minmax(0, 1fr) 280px; gap: 0 18px; padding: 10px 18px; align-items: center; } }
.offer-best { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.offer-best:hover { border-color: var(--brand); }
.offer-badge {
    position: absolute; top: -11px; left: 16px; margin: 0; padding: 2px 10px; border-radius: 999px;
    background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .02em;
}

.offer-brand { display: grid; place-items: center; align-self: center; }
.offer-logo {
    display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px;
    background: hsl(var(--hue, 215) 70% 95%); color: hsl(var(--hue, 215) 55% 30%);
    border: 1px solid hsl(var(--hue, 215) 45% 86%); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em;
}
/* Provider logos: a brand without a logo keeps the letters above. */
.offer-logo-img {
    width: 56px; height: 56px; padding: 8px; object-fit: contain; background: #fff;
    border: 1px solid var(--line); border-radius: 12px;
}
.brand-head { display: flex; align-items: center; gap: 14px; }
.brand-head h1 { margin: 0; }
.provider-logo { flex: none; width: 56px; height: 56px; padding: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.brand-cell { display: flex; align-items: center; gap: 10px; }
.brand-icon { flex: none; width: 24px; height: 24px; object-fit: contain; vertical-align: middle; margin-right: 8px; }
.brand-cell .brand-icon { margin-right: 0; }
.brand-letters {
    display: inline-grid; place-items: center; font-size: .62rem; font-weight: 800; letter-spacing: .02em;
    background: hsl(var(--hue, 215) 70% 95%); color: hsl(var(--hue, 215) 55% 30%); border: 1px solid hsl(var(--hue, 215) 45% 86%); border-radius: 6px;
}
.provider-logo.brand-letters { font-size: 1.05rem; border-radius: 12px; }
/* Network icons sit before the network name, in chips, facts, tables and links. */
.net-icon { flex: none; width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; margin-right: 6px; }
.segments .net-icon { width: 16px; height: 16px; vertical-align: -3px; }
.net-list { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.net { display: inline-flex; align-items: center; white-space: nowrap; }
.choice span .net-icon { margin-right: 6px; }
.offer-rank {
    margin: 0 0 0 auto; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px;
    font-size: .72rem; font-weight: 700; color: var(--muted); white-space: nowrap;
}

.offer-main { display: grid; gap: 5px; align-content: start; min-width: 0; }
.offer-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.offer-provider { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.offer h3 { font-size: 1.08rem; }
.offer h3 a { color: var(--ink); text-decoration: none; }
.offer h3 a:hover { color: var(--brand-dark); text-decoration: underline; }

.offer-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: 0; }
.offer-facts .fact-data { grid-column: 1 / -1; }
@container results (min-width: 720px) {
    /* Speed and network get just what their longest values need; data volumes like "25 GB / 4 weeks, then unlimited top-ups" take the rest. */
    .offer-facts { grid-template-columns: minmax(9rem, 1fr) minmax(0, 7.5rem) minmax(0, 9.5rem); gap: 0 14px; }
    .offer-facts .fact-data { grid-column: auto; }
}
.offer-facts dt { font-size: .75rem; color: var(--muted); }
.offer-facts dd { margin: 0; font-weight: 600; font-size: .93rem; line-height: 1.3; }
.offer-facts .fact-data dd { font-size: 1.05rem; font-weight: 800; line-height: 1.2; color: var(--brand-dark); }
.offer-facts dd.unknown { font-weight: 400; color: var(--muted); }

.offer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; font-size: .86rem; }
.offer-term { margin: 0; font-weight: 600; color: var(--muted); }

.ticks { display: grid; grid-template-columns: 44px max-content; gap: 5px; margin: 0; }
.tick {
    display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border: 1px solid #b9dec9; border-radius: 999px;
    background: #f3fbf6; color: #176c43; font-size: .78rem; font-weight: 700;
}
.tick::before {
    content: ""; width: 5px; height: 9px; margin: 0 2px 2px 1px; flex: none;
    border-right: 2px solid #1a8754; border-bottom: 2px solid #1a8754; transform: rotate(45deg);
}
.tick-5g { grid-column: 1; }
.tick-allnet { grid-column: 2; }
@container results (min-width: 720px) {
    .offer-meta { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(0, 7.5rem) minmax(0, 9.5rem); gap: 0 14px; }
    .offer-term { grid-column: 1; }
    .ticks { grid-column: 2 / 4; justify-self: center; column-gap: 12px; }
}

/* The detail page still lists included features as chips. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chips li { font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }

.offer-price { grid-column: 1 / -1; display: grid; gap: 4px; align-content: start; border-top: 1px solid var(--line); padding-top: 12px; }
@container results (min-width: 720px) {
    .offer-price {
        grid-column: auto; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; align-self: stretch;
        border: 0; border-radius: 10px; padding: 8px 10px; background: #f7faff; text-align: right;
    }
    .price-block { min-width: 0; }
}
.price-label { margin: 0; font-size: .72rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.price { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.price-unit { font-size: .85rem; font-weight: 600; color: var(--muted); }
.price-detail { margin: 3px 0 0; font-size: .78rem; line-height: 1.3; color: var(--muted); }
.price-actions { display: grid; gap: 2px; align-content: start; }
.price-actions .button { min-height: 40px; padding: 7px 13px; font-size: .9rem; white-space: nowrap; }
.external-icon { flex: none; }
.link-details { text-align: center; font-size: .85rem; padding: 4px; }
/* Narrow list: price and button sit side by side below the features to keep the cards short. */
@container results (max-width: 719.98px) {
    .offer-price { grid-template-columns: 1fr auto; align-items: center; gap: 20px; }
}

/* Detail page */

.detail { display: grid; gap: 20px; margin-top: 8px; }
.detail-head .lead { margin-top: 4px; }
/* Phones: heading, price box, details. Desktop: price box in a sticky right column. */
@media (min-width: 900px) {
    .detail { grid-template-columns: 1fr 320px; grid-template-areas: "head price" "main price"; align-items: start; column-gap: 32px; }
    .detail-head { grid-area: head; }
    .detail-main { grid-area: main; }
    .detail-price { grid-area: price; }
}
.subtitle { margin: 0 0 12px; font-weight: 600; color: var(--muted); }
.detail-price {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
    display: grid; gap: 6px;
}
@media (min-width: 900px) { .detail-price { position: sticky; top: 16px; } }
.detail-price .chips { margin-bottom: 8px; }

.facts { display: grid; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts > div { display: grid; grid-template-columns: minmax(130px, 40%) 1fr; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.table-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; font-size: .82rem; color: var(--muted); background: var(--bg); }
tbody th { font-weight: 600; }

.notice { background: #fff4d6; border: 1px solid #f1d384; padding: 12px 16px; border-radius: var(--radius); }
.small { font-size: .88rem; color: var(--muted); }

/* FAQ */

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.faq details p { margin: 0 0 14px; color: var(--muted); }

/* Text pages */

.prose { max-width: 760px; }
.operator { font-style: normal; margin: 0 0 1em; }
.prose p, .prose li { color: #2a3846; }
