@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 800; font-display: swap; src: url(/fonts/inter-latin-800-normal.woff2) format("woff2"); }

:root {
    --magenta: #D30D84;
    --plum: #A91E85;
    --purple: #5C1781;
    --ink: #1D1324;
    --muted: #6B6474;
    --line: #EDE6F0;
    --bg: #FBF8FC;
    --card: #FFFFFF;
    --green: #127A3A;
    --grad: linear-gradient(110deg, var(--magenta) 0%, var(--plum) 48%, var(--purple) 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.45;
}
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
a { color: var(--purple); }

/* Header */
.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--grad);
    padding: 40px 0 34px;
}
.wordmark {
    position: relative;
    display: inline-block;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: clamp(30px, 7vw, 54px);
    letter-spacing: -0.02em;
    line-height: 1;
}
.wordmark span { opacity: 0.85; }
.tagline { position: relative; margin: 10px 0 0; font-size: clamp(15px, 2.4vw, 18px); max-width: 560px; opacity: 0.95; }
.bubbles i {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.bubbles i:nth-child(1) { width: 180px; height: 180px; right: -40px; top: -60px; }
.bubbles i:nth-child(2) { width: 70px; height: 70px; right: 170px; top: 30px; }
.bubbles i:nth-child(3) { width: 34px; height: 34px; right: 120px; bottom: 18px; }
.bubbles i:nth-child(4) { width: 110px; height: 110px; right: 18%; bottom: -60px; }
.bubbles i:nth-child(5) { width: 18px; height: 18px; right: 260px; top: 24px; }

.notify { position: relative; margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
#notify-btn {
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    cursor: pointer;
}
#notify-btn:hover { background: rgba(255, 255, 255, 0.28); }
#notify-btn:disabled { opacity: 0.7; cursor: default; }
#notify-note { font-size: 13px; opacity: 0.9; max-width: 520px; }
.hero { padding-bottom: 40px; }

/* Filters */
.filters {
    margin: -18px 0 0;
    position: relative;
    background: var(--card);
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(92, 23, 129, 0.12);
    padding: 14px 16px 6px;
}
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.filter-label { padding-top: 8px; align-self: flex-start; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); min-width: 64px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.chip {
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
}
.chip:hover { border-color: var(--plum); }
.chip.active { background: var(--grad); border-color: transparent; color: #fff; }
.chip small { font-weight: 400; opacity: 0.75; }
.chip.more { border-style: dashed; color: var(--plum); }
.sort { align-self: flex-start; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sort select { font: inherit; font-size: 14px; padding: 5px 8px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
@media (max-width: 640px) {
    .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .chips::-webkit-scrollbar { display: none; }
    /* Category and brand show at most 10 + "Visa alla": wrap them, so "Visa alla" is never off-screen. */
    #categories, #brands, #techs, .chips.expanded { flex-wrap: wrap; overflow-x: visible; }
    #categories .chip, #brands .chip { font-size: 13px; padding: 5px 10px; }
    .filter-label { min-width: 0; width: 100%; }
    .sort { width: 100%; }
}

.page-h1 { margin: 22px 0 0; font-size: clamp(20px, 3.4vw, 26px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.page-intro { margin: 6px 0 0; max-width: 720px; font-size: 15px; color: var(--muted); }
.count { color: var(--muted); font-size: 14px; margin: 6px 0 10px; }

/* Deals */
.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 40px; }
.deal {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    position: relative;
    min-width: 0;
}
.deal-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: rotate(-6deg);
    box-shadow: 0 6px 14px rgba(211, 13, 132, 0.28);
}
.deal-badge .pct { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.deal-badge small { font-size: 11px; font-weight: 600; margin-top: 3px; opacity: 0.95; white-space: nowrap; font-variant-numeric: tabular-nums; }
.deal-badge.small-long small { font-size: 10px; letter-spacing: -0.02em; }
.deal-badge.none { display: none; }
/* Only kronor (no percentage): a smaller figure so "−1 500 kr" fits the bubble. */
.deal-badge.kr .pct { font-size: 15px; }
.deal-badge.kr.long .pct { font-size: 13px; letter-spacing: -0.03em; }
.deal-body { flex: 1; }
/* Product image (from Prisjakt/Amazon): a small square at the top left; the name wraps beside it. */
.deal-img {
    float: left;
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin: 0 12px 6px 0;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.deal-img[hidden] { display: none; }
.deal-history, .deal-text, .deal-meta { clear: left; }
/* Room for the round discount badge – only on the top rows, next to it. */
.deal-cat, .deal-name, .deal-price { padding-right: 86px; }
.deal-badge.none + .deal-body :is(.deal-cat, .deal-name, .deal-price) { padding-right: 0; }
.deal-cat { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--plum); text-transform: uppercase; letter-spacing: 0.05em; }
.deal-name { margin: 0 0 8px; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.deal-price { margin: 0; font-size: 15px; }
.deal-price b { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.deal-history { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.deal-history:empty, .deal-text:empty { display: none; }
.deal-text { margin: 10px 0 0; font-size: 14px; }
.deal-meta { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.deal-meta .ends { color: var(--magenta); font-weight: 600; white-space: nowrap; }
.deal-cta {
    margin-top: 14px;
    display: block;
    text-align: center;
    padding: 11px 14px;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.deal-cta:hover { background: var(--purple); }
.empty { text-align: center; color: var(--muted); padding: 40px 0 60px; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: #fff; padding: 24px 0 36px; font-size: 13px; color: var(--muted); }
.footer p { margin: 0 0 8px; max-width: 760px; }
.nowrap { white-space: nowrap; }

/* Report a deal (subtle flag on each card) */
.deal-report {
    position: absolute;
    right: 10px;
    bottom: 70px; /* on the same line as "Publicerad …", above the button */
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #B6AEBF;
    cursor: pointer;
}
.deal-meta { padding-right: 30px; }
.deal-report:hover, .deal-report:focus-visible { color: var(--magenta); background: #FDF0F7; outline: none; }
#report-dialog {
    border: 0;
    border-radius: 18px;
    padding: 0;
    width: min(420px, calc(100vw - 32px));
    box-shadow: 0 20px 60px rgba(29, 19, 36, 0.3);
    color: var(--ink);
}
#report-dialog::backdrop { background: rgba(29, 19, 36, 0.45); }
#report-form { padding: 20px; }
#report-form h2 { margin: 0 0 4px; font-size: 18px; }
.report-name { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
#report-form fieldset { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
#report-form label { font-size: 15px; display: flex; gap: 8px; align-items: center; cursor: pointer; }
#report-form input[type=radio] { accent-color: var(--plum); width: 18px; height: 18px; }
#report-form textarea {
    width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; resize: vertical;
}
.report-msg { min-height: 1em; margin: 8px 0; font-size: 14px; color: var(--muted); }
.report-msg.err { color: var(--magenta); }
.report-actions { display: flex; justify-content: flex-end; gap: 8px; }
.report-actions button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 10px; cursor: pointer; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.report-actions .report-send { background: var(--ink); border-color: var(--ink); color: #fff; }
.footer .company { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* "★ Favorit i repris" – the price has been this low before, but it's still a good deal. */
.deal-fav {
    display: inline-block;
    margin: 0 0 6px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #FFD43B;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: help;
}
.deal-fav[hidden] { display: none; }

/* Free text search, and own watch words for the notifications */
.search { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search input {
    flex: 1; min-width: 200px; font: inherit; font-size: 15px; padding: 8px 12px;
    border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.search input:focus { outline: none; border-color: var(--plum); }
.watch { position: relative; margin-top: 14px; max-width: 520px; font-size: 14px; }
.watch[hidden] { display: none; }
.watch > label:first-child { display: block; font-weight: 600; margin-bottom: 6px; }
.watch-row { display: flex; gap: 8px; }
.watch-row input {
    flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 8px 12px; border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.95); color: var(--ink);
}
.watch-row button {
    font: inherit; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 10px;
    border: 0; background: #fff; color: var(--purple); cursor: pointer;
}
.watch-all { margin-top: 8px; padding: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; opacity: 0.95; }
#watch-note { margin: 6px 0 0; font-size: 13px; opacity: 0.95; min-height: 1em; }

.watch-help { margin: 0 0 8px; font-size: 13px; opacity: 0.92; }
.watch-help[hidden] { display: none; }
.watch-all[hidden] { display: none; }

/* Links to every category and brand page (for visitors and search engines) */
.browse { margin: 0 0 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.browse h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.browse-links { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.browse-links a { color: var(--ink); text-decoration: none; }
.browse-links a:hover { color: var(--plum); text-decoration: underline; }
.browse-links a[aria-current] { color: var(--plum); font-weight: 600; }
.browse-links small { color: var(--muted); }

/* "Visa: Kort | Lista" */
.view-toggle { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px; background: #fff; }
.view-toggle button { font: inherit; font-size: 14px; font-weight: 600; padding: 5px 14px; border: 0; border-radius: 999px; background: none; color: var(--ink); cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--grad); color: #fff; }
.view-toggle button:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }
.view-note { font-size: 13px; color: var(--muted); }
.view-note[hidden], .sort[hidden] { display: none; }

/* List view: one card per category – purple header, column headings, size bands, zebra rows. */
.deals.as-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.list-group { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 6px 22px rgba(92, 23, 129, 0.08); padding-bottom: 8px; }
.list-h { margin: 0; padding: 12px 20px; background: linear-gradient(110deg, var(--plum) 0%, var(--purple) 100%); color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.list-h small { font-size: 15px; font-weight: 600; opacity: 0.85; margin-left: 2px; }
.list-cols, .row { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px; gap: 4px 16px; align-items: center; }
.sized .list-cols, .sized .row { grid-template-columns: 52px minmax(0, 1fr) auto 150px; }
.list-cols { padding: 10px 24px 6px; font-size: 14px; font-weight: 800; color: var(--purple); }
.list-cols .c-price { text-align: right; }
.list-cols .c-disc { text-align: center; }
.list-sub { margin: 6px 12px 2px; padding: 6px 12px; border-radius: 10px; background: linear-gradient(90deg, #ECE3F5, #DCCDEE); color: var(--purple); font-size: 16px; font-weight: 800; letter-spacing: -0.01em; text-transform: none; }
.rows { list-style: none; margin: 0; padding: 0 12px; }
.row { padding: 7px 12px; border-radius: 8px; font-size: 15px; }
/* Every other row slightly grey, so the eye can follow a row from the name to the price. */
.row:nth-child(even) { background: #F4EFF6; }
.row-size { font-weight: 800; font-variant-numeric: tabular-nums; }
.row-main { min-width: 0; overflow-wrap: anywhere; }
.row-name { color: var(--ink); text-decoration: none; font-weight: 600; }
.row-name:hover { color: var(--plum); text-decoration: underline; }
.row-cat { color: var(--muted); font-size: 13px; }
.row-fav { color: #8A6A00; font-size: 12px; font-weight: 800; white-space: nowrap; }
.row-ends { color: var(--magenta); font-size: 13px; font-weight: 600; white-space: nowrap; }
.row-price { text-align: right; white-space: nowrap; font-weight: 800; font-variant-numeric: tabular-nums; }
.row-disc-cell { text-align: center; }
.row-disc { display: inline-block; min-width: 76px; text-align: center; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(110deg, var(--magenta), var(--plum)); padding: 3px 10px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .list-h { padding: 10px 14px; font-size: 18px; }
    .list-cols { display: none; }
    .rows { padding: 0 6px; }
    .list-sub { margin: 8px 6px 2px; }
    /* Phone: name on its own line, price and discount below it; the size is in the band above. */
    .row, .sized .row { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 10px; }
    .row-main { grid-column: 1 / -1; }
    .row-size { display: none; }
    .row-price { text-align: left; }
    .row-disc-cell { text-align: right; }
    .view-row .filter-label { width: auto; }
}

/* "✕ Rensa filter" – shown when something is filtered */
.clear { margin-left: auto; font: inherit; font-size: 14px; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--magenta); background: #fff; color: var(--magenta); cursor: pointer; white-space: nowrap; }
.clear:hover { background: #FDF0F7; }
.clear[hidden] { display: none; }
@media (max-width: 640px) { .clear { margin-left: 0; } }

/* Discount and sort as menus side by side */
.select-row { gap: 8px 20px; }
.select-row .sort { align-self: center; color: var(--ink); }
.select-row .sort .filter-label { padding-top: 0; min-width: 64px; }
.select-row select { min-width: 150px; }

/* Phones: less space before the deals */
@media (max-width: 640px) {
    .hero { padding: 22px 0 30px; }
    .tagline { margin-top: 6px; font-size: 14px; }
    .notify { margin-top: 10px; }
    .watch { margin-top: 10px; }
    .watch-help { display: none; }
    .filters { padding: 10px 12px 4px; }
    .filter-row { gap: 6px 8px; margin-bottom: 6px; }
    /* Label to the left of the chips instead of on its own line */
    .filter-label, .filter-label[for] { width: auto; min-width: 58px; font-size: 11px; padding-top: 7px; }
    .view-note { display: none; }
    .select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .select-row .sort { display: grid; gap: 2px; width: auto; }
    .select-row .sort .filter-label { padding-top: 0; min-width: 0; }
    .select-row select { min-width: 0; width: 100%; }
    .page-h1 { margin-top: 14px; font-size: 19px; }
}

#tech-row[hidden] { display: none; }

/* ---------- Articles: tips, round-ups and guides (src/articles.js) ---------- */

/* "Rabatter | Guider & tips" at the top of the header */
.site-nav { position: relative; display: flex; gap: 4px; margin: -18px 0 16px; font-size: 14px; font-weight: 600; }
.site-nav a { color: #fff; text-decoration: none; padding: 5px 12px; border-radius: 999px; opacity: 0.85; }
.site-nav a:hover { opacity: 1; background: rgba(255, 255, 255, 0.14); }
.site-nav a[aria-current] { opacity: 1; background: rgba(255, 255, 255, 0.2); }
@media (max-width: 640px) { .site-nav { margin: -8px 0 10px; font-size: 13px; } }

/* A tips card in the feed: a deal card with a quiet tint and no badge */
.deal.tip { background: linear-gradient(160deg, #FFF 55%, #F6EEFA 100%); border-color: #E3D3EE; }
.deal.tip .deal-cat, .deal.tip .deal-name, .deal.tip .deal-price { padding-right: 0; }
.deal.tip .deal-cat::before { content: "💡 "; }
.deal.tip .tip-title { color: var(--ink); text-decoration: none; }
.deal.tip .tip-title:hover { color: var(--plum); text-decoration: underline; }
.deal.tip .deal-cta { background: #fff; color: var(--purple); border: 1.5px solid var(--purple); }
.deal.tip .deal-cta:hover { background: var(--purple); color: #fff; }
.deal.tip .deal-meta { padding-right: 0; }

/* Round-ups pinned above the deals on a category page, and "Läs också" on the start page */
.read-strip { grid-column: 1 / -1; }
.article-mini {
    display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 16px; text-decoration: none; color: var(--ink);
    background: #fff; border: 1.5px solid #E3D3EE; box-shadow: 0 4px 16px rgba(92, 23, 129, 0.06);
}
.article-mini:hover { border-color: var(--plum); }
.guide-type { font-size: 12px; font-weight: 600; color: var(--plum); text-transform: uppercase; letter-spacing: 0.05em; }
.guide-title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.guide-intro { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.guide-date { font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 4px; }
.read-strip { padding: 14px 16px 16px; border-radius: 18px; background: #F4EFF6; }
.read-strip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.read-strip-head h2 { margin: 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.read-strip-all { font-size: 14px; font-weight: 600; color: var(--purple); text-decoration: none; white-space: nowrap; }
.read-strip-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.read-strip .article-mini { border-color: transparent; box-shadow: none; }

/* A deal in an article that has run out */
.deal.ended { opacity: 0.72; }
.deal.ended .deal-price b { font-size: 22px; color: var(--muted); }
.deal.ended .deal-cta { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.ended-note { color: var(--magenta); font-weight: 600; }

/* The article pages */
.article-main { padding-bottom: 40px; }
.crumbs { margin: 22px 0 0; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.article { max-width: 760px; }
.article-type { margin: 18px 0 4px; font-size: 13px; font-weight: 600; color: var(--plum); text-transform: uppercase; letter-spacing: 0.06em; }
.article-type a { color: inherit; }
.article-title { margin: 0; font-size: clamp(26px, 5vw, 40px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; }
.article-intro { margin: 12px 0 0; font-size: clamp(17px, 2.4vw, 20px); line-height: 1.45; }
.article-meta { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.article-expired { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: #FDF0F7; color: var(--magenta); font-weight: 600; }
.article-body { margin-top: 22px; font-size: 17px; line-height: 1.6; }
.article-body h2 { margin: 32px 0 8px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.article-body h3 { margin: 24px 0 6px; font-size: 19px; font-weight: 800; }
.article-body p, .article-body ul, .article-body ol { margin: 0 0 14px; }
.article-body li { margin: 4px 0; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.article-body .callout { margin: 18px 0; padding: 14px 16px; border-radius: 14px; background: #F4EFF6; border-left: 5px solid var(--plum); font-size: 16px; }
.article-body .callout p:last-child { margin-bottom: 0; }
/* Deals in an article: compact rows (src/articles.js dealRow) */
.article-deals { display: flex; flex-direction: column; margin: 14px 0 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; font-size: 15px; line-height: 1.35; }
.mini-deal { display: grid; grid-template-columns: 56px 86px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 14px; }
.mini-deal + .mini-deal { border-top: 1px solid var(--line); }
.mini-imgbox { width: 56px; height: 56px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mini-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mini-img[hidden] { display: none; }
.mini-badge { justify-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 6px; border-radius: 10px; background: var(--magenta); color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.15; text-align: center; }
.mini-pct { font-weight: 800; font-size: 15px; }
.mini-kr { font-weight: 600; font-size: 11px; opacity: 0.92; }
.mini-badge.none { visibility: hidden; }
.mini-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-name { color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
a.mini-name:hover { color: var(--plum); text-decoration: underline; }
.mini-fav { color: #E0A400; }
.mini-sub { color: var(--muted); font-size: 13px; }
.mini-price { font-weight: 800; font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini-cta { padding: 7px 12px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.mini-cta:hover { background: var(--purple); }
.mini-deal.ended { opacity: 0.6; }
.mini-deal.ended .mini-badge { background: var(--muted); }
.mini-deal.ended .mini-price { text-decoration: line-through; font-weight: 600; }
.mini-deal.ended .mini-cta { background: #fff; color: var(--ink); border: 1px solid var(--line); }
@media (max-width: 560px) {
    .mini-deal { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "img main price" "badge main cta"; gap: 4px 10px; padding: 10px 12px; }
    .mini-imgbox { grid-area: img; width: 64px; height: 56px; }
    .mini-badge { grid-area: badge; align-self: start; padding: 3px 4px; }
    .mini-kr { font-size: 10px; }
    .mini-pct { font-size: 14px; }
    .mini-main { grid-area: main; }
    .mini-price { grid-area: price; justify-self: end; font-size: 16px; }
    .mini-cta { grid-area: cta; justify-self: end; padding: 5px 10px; font-size: 13px; }
}
.embed-empty { padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px dashed var(--line); color: var(--muted); font-size: 15px; }
.article-more { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.more-btn { display: inline-block; padding: 11px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; }
.more-btn:hover { background: var(--purple); }
.more-btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.article-related { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.article-related h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 16px; }
.guide-card {
    display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; background: var(--card);
    border: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.guide-card:hover { border-color: var(--plum); box-shadow: 0 6px 20px rgba(92, 23, 129, 0.1); }
.browse h2 a { color: inherit; text-decoration: none; }
/* Article pages: a smaller header without the watch-word form */
.hero.compact { padding: 32px 0 26px; }
.hero.compact .wordmark { font-size: clamp(26px, 5vw, 40px); }
.hero.compact .tagline, .hero.compact .watch, .hero.compact #notify-note { display: none; }
.hero.compact .notify { margin-top: 12px; }
@media (max-width: 640px) { .hero.compact { padding: 18px 0 18px; } }
/* Tables in articles (| a | b |) – scroll sideways on small screens */
.article-table { margin: 14px 0 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.article-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; }
.article-table th, .article-table td { padding: 9px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.article-table thead th { border-top: 0; background: #F4EFF6; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.article-table tbody tr:first-child td { border-top: 0; }
.article-table td:first-child { font-weight: 600; }
@media (max-width: 560px) { .article-table table { font-size: 14px; } .article-table th, .article-table td { padding: 8px 10px; } }

/* Round-ups/guides for the chosen category: a slim row above the deals (app.js renderCatGuides) */
.cat-guides { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border-radius: 14px; background: #F4EFF6; border: 1px solid #E3D3EE; }
.cat-guides-label { font-size: 13px; font-weight: 700; color: var(--plum); margin-right: 2px; }
.cat-guide { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; padding: 7px 12px; border-radius: 10px; background: #fff; border: 1px solid #E3D3EE; color: var(--ink); text-decoration: none; font-size: 15px; }
.cat-guide:hover { border-color: var(--plum); }
.cat-guide .guide-type { font-size: 11px; }
.cat-guide-title { font-weight: 700; }
.cat-guide-go { color: var(--plum); font-weight: 700; }
@media (max-width: 560px) { .cat-guide { width: 100%; } }

/* Product images open large on click (zoom.js) */
.deal-img, .mini-img { cursor: zoom-in; }
.zoom { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px;
    background: rgba(20, 12, 28, 0.82); cursor: zoom-out; animation: zoom-in .15s ease-out; }
.zoom img { max-width: min(92vw, 820px); max-height: 86vh; object-fit: contain; background: #fff; border-radius: 16px; padding: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); }
.zoom-close { position: absolute; top: 14px; right: 16px; width: 42px; height: 42px; border: 0; border-radius: 50%;
    background: #fff; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; }
@keyframes zoom-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .zoom { animation: none; } }
