/* =====================================================================
   BELREUS – Toestelnieuws & Prijsarchief (/toestelnieuws/, toestelpagina, provider-smartphonepagina, homepage).
   Componenten uit includes/device-news.php. Prefix tn-. Geen inline CSS (CSP).
   ===================================================================== */
:root {
    --tn-line: #e4e9f2; --tn-muted: #55637b; --tn-down: #166534; --tn-up: #9a3412; --tn-soft: #f6f8fc;
}
.tn-eyebrow { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font: 700 .75rem var(--font-heading); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.tn-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.tn-head h2, .tn-h2 { margin: 0; font-family: var(--font-heading); font-size: clamp(1.35rem, 1.15rem + .6vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.tn-h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-family: var(--font-heading); font-size: 1.125rem; font-weight: 800; color: var(--navy); }
.tn-sub, .tn-box-sub { margin: 6px 0 0; max-width: 70ch; font-size: .9375rem; color: var(--tn-muted); }
.tn-box-sub { margin: -4px 0 12px; font-size: .875rem; }
.tn-head .link-more { flex: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tn-note { margin: 12px 0 0; font-size: .8125rem; line-height: 1.5; color: var(--tn-muted); }
.tn-empty { margin: 4px 0 0; padding: 14px 16px; border: 1px dashed var(--tn-line); border-radius: 12px; font-size: .9375rem; color: var(--tn-muted); background: var(--tn-soft); }

/* Hero */
.tn-hero { margin-top: 8px; padding: clamp(24px, 4vw, 48px); border-radius: 24px; background: radial-gradient(120% 140% at 100% 0%, #e7efff 0%, #f6f9ff 45%, #fff 100%); border: 1px solid var(--tn-line); }
.tn-hero h1 { margin: 0; font-family: var(--font-heading); font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); font-weight: 800; letter-spacing: -.03em; color: var(--navy); }
.tn-lead { margin: 10px 0 22px; max-width: 60ch; font-size: clamp(1rem, .95rem + .3vw, 1.2rem); color: var(--tn-muted); }
.tn-search { position: relative; display: flex; gap: 10px; max-width: 760px; }
.tn-search-ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #7a879c; display: flex; }
.tn-search input { flex: 1; min-width: 0; height: 56px; padding: 0 16px 0 48px; border: 1px solid #cfd9ea; border-radius: 14px; font-size: 1rem; background: #fff; box-shadow: 0 8px 24px -16px rgba(11, 31, 66, .35); }
.tn-search input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.tn-search .btn { height: 56px; padding: 0 24px; border-radius: 14px; }
.tn-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 20px 0 0; padding: 0; list-style: none; font-size: .9375rem; color: var(--tn-muted); }
.tn-stats strong { font: 800 1.15rem var(--font-heading); color: var(--navy); font-variant-numeric: tabular-nums; }

/* Onderwerpen */
.tn-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tn-topics a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--tn-line); border-radius: 999px; background: #fff; font-size: .875rem; font-weight: 600; color: var(--navy); }
.tn-topics a:hover, .tn-topics a[aria-current] { border-color: #bcd0f5; background: #eef4ff; text-decoration: none; }
.tn-topics a span { padding: 1px 7px; border-radius: 999px; background: var(--tn-soft); font-size: .75rem; color: var(--tn-muted); font-variant-numeric: tabular-nums; }

/* Kaders */
.tn-box { min-width: 0; padding: 20px; border: 1px solid var(--tn-line); border-radius: 18px; background: #fff; }
.tn-box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 800; color: var(--navy); }
.tn-box h3 .icon, .tn-h3 .icon { color: var(--blue); flex: none; }
.tn-two { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }

/* Prijswijzigingen */
.tn-chg-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.tn-chg-list--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tn-chg { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--tn-line); border-left: 4px solid var(--tn-line); border-radius: 12px; background: #fff; }
.tn-chg.is-down { border-left-color: var(--tn-down); }
.tn-chg.is-up { border-left-color: var(--tn-up); }
.tn-chg-name { font-weight: 700; color: var(--navy); min-width: 0; overflow-wrap: anywhere; }
.tn-chg-prices { justify-self: end; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--navy); }
.tn-chg-prices s { color: #8090a8; }
.tn-chg-diff { font-size: .875rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tn-chg.is-down .tn-chg-diff { color: var(--tn-down); }
.tn-chg.is-up .tn-chg-diff { color: var(--tn-up); }
.tn-chg-meta { grid-column: 1 / -1; font-size: .78rem; color: var(--tn-muted); }
.tn-chg-diff + .tn-chg-meta { margin-top: 2px; }

/* Nieuwsregels */
.tn-news-list { display: grid; gap: 0; margin: 0 0 10px; padding: 0; list-style: none; }
.tn-news-list--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; margin-top: 14px; }
.tn-news { padding: 12px 0; border-bottom: 1px solid var(--tn-line); min-width: 0; }
.tn-news:last-child { border-bottom: 0; }
.tn-news-list--wide .tn-news:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.tn-news-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.tn-news .nw-type, .tn-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; line-height: 1.5; background: #eef2f8; color: #34425a; }
.tn-news .nw-type--gerucht { background: #fff3e0; color: #8a4b00; }
.tn-news .nw-type--verwacht { background: #f1ecff; color: #4b2aa8; }
.tn-news .nw-type--officieel { background: #e8f7ee; color: #14663a; }
.tn-news .nw-type--origineel, .tn-news .nw-type--analyse { background: #e7efff; color: #1546b3; }
.tn-chip { background: #fff; border: 1px solid #d6e2f6; color: var(--blue); }
.tn-news-title { display: block; font-family: var(--font-heading); font-weight: 700; line-height: 1.35; color: var(--navy); overflow-wrap: anywhere; }
.tn-news-title:hover { color: var(--blue); }
.tn-news-meta { display: block; margin-top: 4px; font-size: .78rem; color: var(--tn-muted); }
.tn-news-cards { margin-top: 4px; }

/* Software-feiten */
.tn-facts { display: grid; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.tn-fact { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--tn-soft); min-width: 0; }
.tn-fact-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tn-muted); }
.tn-fact-value { font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.tn-fact-meta { font-size: .76rem; color: var(--tn-muted); overflow-wrap: anywhere; }
.tn-status { display: inline-block; padding: 0 7px; border-radius: 999px; font-weight: 700; background: #e8f7ee; color: #14663a; }
.tn-status--onbekend, .tn-status--onbevestigd { background: #eef2f8; color: #34425a; }
.tn-status--verwacht { background: #f1ecff; color: #4b2aa8; }
.tn-status--gerucht { background: #fff3e0; color: #8a4b00; }
.tn-status--uitgerold { background: #e7efff; color: #1546b3; }

/* Status van een toestel */
.tn-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.tn-badge { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #eef2f8; color: #34425a; }
.tn-badge--actueel { background: #e8f7ee; color: #14663a; }
.tn-badge--refurbished { background: #e7efff; color: #1546b3; }
.tn-badge--archief { background: #fff3e0; color: #8a4b00; }
.tn-badge--eol { background: #fde8e8; color: #9b1c1c; }
.tn-mini { padding: 0 6px; border-radius: 6px; font-size: .7rem; font-weight: 700; background: #fff3e0; color: #8a4b00; }

/* Toestelpagina en providerpagina */
.tn-device-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.tn-provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.tn-table-wrap { margin-top: 12px; max-height: 220px; overflow: auto; border: 1px solid var(--tn-line); border-radius: 10px; }
.tn-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.tn-table th, .tn-table td { padding: 8px 12px; border-bottom: 1px solid var(--tn-line); text-align: left; }
.tn-table thead th { position: sticky; top: 0; background: var(--tn-soft); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tn-muted); }
.tn-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tn-table tbody tr:last-child td { border-bottom: 0; }
.tn-svg { display: block; width: 100%; height: auto; margin-top: 8px; }
.tn-device .tn-chg { grid-template-columns: minmax(0, 1fr); }
.tn-device .tn-chg-prices { justify-self: start; }
.tn-device .tn-chg-name { display: none; }

/* Toestelkaarten */
.tn-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.tn-dgrid--one { grid-template-columns: minmax(0, 420px); margin-bottom: 18px; }
.tn-dcard { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--tn-line); border-radius: 16px; background: #fff; color: var(--navy); transition: border-color .15s, box-shadow .15s; }
.tn-dcard:hover { border-color: #cfdcf2; box-shadow: 0 10px 28px -14px rgba(11, 31, 66, .2); text-decoration: none; }
.tn-dcard-media { flex: none; display: flex; align-items: center; justify-content: center; width: 64px; height: 76px; border-radius: 10px; background: linear-gradient(180deg, #f7f9fd, #eef3fb); overflow: hidden; }
.tn-dcard-media img, .tn-dcard-media svg { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.tn-dcard-body { display: flex; flex-direction: column; min-width: 0; }
.tn-dcard-brand { font-size: .75rem; font-weight: 600; color: var(--blue); }
.tn-dcard-body strong { font-family: var(--font-heading); line-height: 1.25; overflow-wrap: anywhere; }
.tn-dcard .tn-badges { margin-top: 6px; }
.tn-dcard .tn-badge { font-size: .68rem; padding: 2px 8px; }

/* Archief per merk */
.tn-archive .tn-h3 { margin-top: 22px; }
.tn-brandlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.tn-brand { padding: 16px; border: 1px solid var(--tn-line); border-radius: 16px; background: #fff; min-width: 0; }
.tn-brand h4 { display: flex; justify-content: space-between; margin: 0 0 8px; font-family: var(--font-heading); font-size: 1rem; color: var(--navy); }
.tn-brand h4 span { font-size: .8rem; color: var(--tn-muted); font-weight: 600; }
.tn-brand ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .9rem; }
.tn-brand li { overflow-wrap: anywhere; }

/* Filters */
.tn-filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) auto auto; gap: 10px; align-items: end; margin-bottom: 22px; padding: 16px; border: 1px solid var(--tn-line); border-radius: 16px; background: var(--tn-soft); }
.tn-filters label { display: grid; gap: 4px; min-width: 0; font-size: .78rem; font-weight: 700; color: var(--tn-muted); }
.tn-filters select { width: 100%; min-width: 0; height: 42px; padding: 0 10px; border: 1px solid #cfd9ea; border-radius: 10px; background: #fff; font-size: .875rem; color: var(--navy); }
.tn-filters .btn { height: 42px; }
.tn-results .tn-h2 { margin: 18px 0 8px; font-size: 1.25rem; }

/* Methode */
.tn-method { padding: 22px; border-radius: 18px; background: var(--tn-soft); border: 1px solid var(--tn-line); }
.tn-method ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: .9375rem; color: #34425a; }

/* Homepage-tegels */
.tn-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tn-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px; border: 1px solid var(--tn-line); border-radius: 18px; background: #fff; color: var(--navy); transition: border-color .15s, box-shadow .15s; }
.tn-tile:hover { border-color: #cfdcf2; box-shadow: 0 12px 30px -16px rgba(11, 31, 66, .22); text-decoration: none; }
.tn-tile-label { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.tn-tile-title { font-family: var(--font-heading); font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tn-tile-meta { margin-top: auto; font-size: .78rem; color: var(--tn-muted); }

@media (max-width: 1199px) {
    .tn-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tn-device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tn-device-grid .tn-box--news { grid-column: 1 / -1; }
}
@media (max-width: 1023px) {
    .tn-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tn-two, .tn-chg-list--wide, .tn-news-list--wide { grid-template-columns: minmax(0, 1fr); }
    .tn-news-list--wide .tn-news:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--tn-line); }
}
@media (max-width: 767px) {
    .tn-head { display: block; margin-bottom: 14px; }
    .tn-head .link-more { margin-top: 8px; }
    .tn-device-grid, .tn-provider-grid { grid-template-columns: minmax(0, 1fr); }
    .tn-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tn-search { flex-direction: column; }
    .tn-search input { flex: none; width: 100%; }
    .tn-search-ico { top: 28px; }
    .tn-search .btn { width: 100%; }
    .tn-box { padding: 16px; }
}
@media (max-width: 480px) {
    .tn-tiles { grid-template-columns: minmax(0, 1fr); }
    .tn-filters { grid-template-columns: minmax(0, 1fr); }
    .tn-chg { grid-template-columns: minmax(0, 1fr); }
    .tn-chg-prices { justify-self: start; }
}

/* Archiefcontext op de artikelpagina (dn_news_context) */
.tn-context { margin: 18px 0; padding: 16px 18px; border: 1px solid #f1d9b5; border-left: 4px solid #d97706; border-radius: 12px; background: #fffaf2; color: #3b2a12; }
.tn-context p { margin: 0 0 8px; font-size: .9375rem; line-height: 1.55; }
.tn-context-h { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #8a4b00; }
.tn-context-links a { font-weight: 600; }
.tn-context-sub { margin-top: 10px !important; font-size: .78rem !important; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tn-muted); }
.tn-context .tn-news-list { margin: 0; }
