/* Oba!promo — "azul-noite": a calm night-blue shop window. The products sit on white tiles
   (their photos are shot on white), the price is the one bright thing on a card (mint),
   the discount is salmon. Dark is the site's look; a light theme is a choice in the footer. */

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #121826;
  --card: #1b2234;
  --soft: #232b40;
  --line: #2c3550;
  --text: #e8ecf4;
  --ink: #f4f6fb;               /* headings */
  --muted: #9aa4bc;
  --price: #4ade9b;             /* mint: the price, the main button */
  --desconto: #ff7a6b;          /* salmon: discounts, the old price's strike */
  --conferido: #7ee0b0;         /* the 365-day badge */
  --btn-bg: #4ade9b;
  --btn-fg: #0d1f17;
  --tile: #ffffff;              /* behind product photos */
  --badge-bg: color-mix(in srgb, #4ade9b 14%, transparent);
  --badge-ink: var(--conferido);
  --blue: #8fb0ff;              /* focus ring */
  --green: var(--price);
  /* old names, still used by the admin pages */
  --orange: var(--price); --orange-dark: var(--price); --yellow: var(--price); --pink: var(--desconto);
  --risco: var(--desconto);
  --radius: 14px;
  --shadow: none;
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --f: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fa; --card: #ffffff; --soft: #eef1f6; --line: #e1e5ee;
  --text: #1b2234; --ink: #121826; --muted: #5b6478;
  --price: #0f8a55; --desconto: #e0533f; --conferido: #0f8a55;
  --btn-bg: #121826; --btn-fg: #ffffff;
  --badge-bg: color-mix(in srgb, #0f8a55 10%, transparent); --blue: #2851d8;
  --shadow-hover: 0 10px 30px rgba(18, 24, 38, .12);
}

/* cross-document page transitions (Chrome/Edge/Safari 18+; ignored elsewhere) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--f); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
h1, h2, h3 { text-wrap: balance; color: var(--ink); }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--card); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}
/* display type: Bricolage a little narrow and tight */
.hero h1, .section-head h1, .block-head h2, .logo, .prices strong, .item-prices strong, .cc-deal,
.ticket-deal, .ticket-title, .offer-info h1, .empty-big, .history h2, .howto h2, .cc-name,
.admin-head h1, .panel h1, .panel h2, .prose h1, .prose h2, .kpi strong, .pub-clicks strong {
  font-family: var(--f); font-stretch: 85%; letter-spacing: -.01em;
}

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 16px; height: 62px; }
.logo { text-decoration: none; font-weight: 800; font-size: 26px; line-height: 1; white-space: nowrap; }
.logo.small { font-size: 22px; }
.logo-oba { color: var(--price); }
.logo-promo { color: var(--ink); }
.search { flex: 1; max-width: 520px; margin-left: auto; position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px 0 40px;
  font: inherit; background: var(--card); color: var(--text); outline: none; transition: border-color .15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--price); }
.tabs-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-row::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  text-decoration: none; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  border-radius: 2px; background: var(--price); }

/* ---------- headings / blocks ---------- */
.hero { padding: 40px 0 8px; }
.hero h1 { font-weight: 800; font-size: clamp(34px, 7vw, 60px); line-height: 1; margin: 0 0 14px; max-width: 14ch; }
.hero p { margin: 0; color: var(--muted); max-width: 52ch; font-size: 16px; }
.section-head { padding: 28px 0 4px; }
.section-head h1 { font-weight: 800; font-size: clamp(30px, 5vw, 44px); line-height: 1.05; margin: 0 0 8px; }
.section-head p { margin: 0; color: var(--muted); }
.block { margin: 40px 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { font-weight: 700; font-size: 24px; line-height: 1.1; margin: 0; }
.block-head a { color: var(--muted); font-weight: 600; white-space: nowrap; text-decoration: none; }
.block-head a:hover { color: var(--ink); }
.crumbs { display: flex; gap: 8px; align-items: center; margin: 16px 0; font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 16px 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding: 2px; }
.chip-filter {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  text-decoration: none; background: var(--card); border: 1px solid var(--line); font-weight: 600; white-space: nowrap;
}
.chip-filter[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sort { display: flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.sort a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 9px; min-height: 34px; display: inline-flex; align-items: center; }
.sort a[aria-current="true"] { background: var(--soft); color: var(--ink); }

/* ---------- grids / rails ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.grid-lists { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .grid-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid-lists { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(84%, 340px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 -16px; padding: 4px 16px 14px; scroll-padding: 0 16px; scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.rail > * { scroll-snap-align: start; }
.rail-cards { grid-auto-columns: min(47%, 220px); }

/* ---------- product card: the photo on a white tile, the price the one bright thing ---------- */
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; padding: 6px; transition: border-color .15s;
}
@media (hover: hover) { .card:hover { border-color: color-mix(in srgb, var(--price) 55%, var(--line)); } }
.card-media { position: relative; aspect-ratio: 1; background: var(--tile); border-radius: 10px; display: grid; place-items: center; text-decoration: none; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-weight: 700; font-size: 14px; color: #8a93a8; background: #eef1f6;
}
.ph-icon { font-size: 44px; line-height: 1; }
.placeholder.big { min-height: 300px; border-radius: 10px; }
.placeholder.big .ph-icon { font-size: 72px; }
.card-body { padding: 10px 6px 4px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: var(--text); background: var(--soft); white-space: nowrap; }
.store-amazon, .store-shopee, .store-mercadolivre, .store-magalu { background: var(--soft); color: var(--text); }
.title { margin: 0; font-weight: 500; font-size: 14px; line-height: 1.35; color: var(--text); }
.title a { text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.title a::after { content: ""; position: absolute; inset: 0; }      /* whole card opens the offer… */
.card .btn, .card .coupon-mini { position: relative; z-index: 1; } /* …except the store button */
.badge, .timer { align-self: flex-start; font-size: 12px; font-weight: 600; line-height: 1.3; }
.badge { color: var(--badge-ink); display: inline-flex; gap: 5px; align-items: flex-start; }
.badge::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 1px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.6 4.9L6.9 9.6 4.4 7.1 3.3 8.2l3.6 3.6 5.8-5.8z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.6 4.9L6.9 9.6 4.4 7.1 3.3 8.2l3.6 3.6 5.8-5.8z'/%3E%3C/svg%3E") center / contain no-repeat; }
.timer { color: var(--desconto); }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; }

/* the price: R$ small, reais big, cents raised */
.prices { display: flex; flex-direction: column; align-items: flex-start; margin-top: auto; padding-top: 4px; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; width: 100%; }
.prices .was, .prices s { color: var(--muted); font-size: 12.5px; }
.strike, .prices s { text-decoration: line-through; text-decoration-color: var(--desconto); text-decoration-thickness: 1.5px; white-space: nowrap; }
.prices strong { color: var(--price); font-weight: 700; font-size: 26px; line-height: 1.05; }
.pt { display: inline-flex; align-items: flex-start; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-cur { font-size: .5em; font-weight: 600; margin: .2em .15em 0 0; }
.pt-cents { font-size: .55em; margin-top: .1em; }
.off { color: var(--desconto); font-weight: 700; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.saved { font-size: 13px; font-weight: 600; color: var(--conferido); margin-top: 6px; }
.coupon-mini { font-size: 12px; color: var(--muted); }
.coupon-mini code { color: var(--ink); font-weight: 700; }
.card .btn { margin-top: 6px; }
.card.ended { opacity: .5; }
.card.ended .btn { background: var(--soft); color: var(--muted); }
.ended-tag {
  position: absolute; inset: auto 0 0 0; background: rgba(18, 24, 38, .86); color: #fff;
  text-align: center; font-weight: 600; font-size: 13px; padding: 4px;
}

/* ---------- buttons ---------- */
.btn, .btn-ghost {
  display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 44px;
  border-radius: 10px; font: 700 15px var(--f); text-decoration: none; cursor: pointer;
  transition: background .15s, filter .15s, transform .1s;
}
.btn { background: var(--btn-bg); color: var(--btn-fg); border: 0; padding: 0 14px; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.big { font-size: 17px; min-height: 54px; padding: 0 20px; flex: 1; }
.btn.small { min-height: 38px; font-size: 14px; padding: 0 14px; }
.btn.light { background: var(--btn-bg); color: var(--btn-fg); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 0 16px; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-ghost.small { min-height: 36px; font-size: 13px; padding: 0 12px; }
.btn-ghost.icon { width: 54px; min-height: 54px; padding: 0; flex: none; }
.btn-ghost.done { border-color: var(--price); color: var(--price); }
.pager { display: flex; justify-content: center; gap: 12px; margin: 24px 0; }
.pager .btn-ghost { min-width: 200px; }
[aria-busy="true"] { opacity: .6; pointer-events: none; }
.empty { text-align: center; padding: 56px 0; color: var(--muted); }
.empty-big { font-weight: 800; font-size: 26px; color: var(--ink); margin-bottom: 4px; }

/* ---------- coupon page hero ---------- */
.ticket { position: relative; display: flex; flex-direction: column; color: var(--text); border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); }
.ticket.ended { filter: grayscale(.9); opacity: .75; }
.ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ticket-state { font-size: 13px; font-weight: 600; color: var(--muted); }
.ticket-deal { overflow-wrap: anywhere; margin: 6px 0 0; font-weight: 800; font-size: clamp(30px, 7vw, 38px); line-height: .95; color: var(--desconto); }
.ticket-title { margin: 0; font-weight: 700; font-size: 16px; line-height: 1.15; }
.ticket-meta { margin: 2px 0 0; font-size: 13px; }
.hero-ticket { padding: 22px 20px; gap: 10px; margin-bottom: 8px; }
.hero-ticket .ticket-deal { font-size: clamp(56px, 14vw, 96px); }
.hero-ticket .ticket-title { font-size: clamp(22px, 4.5vw, 32px); max-width: 24ch; }
.ended-banner { margin: 4px 0 0; background: var(--soft); padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.ticket-desc { margin: 0; max-width: 60ch; font-size: 14px; }
.ticket-sub { margin: 0; font-size: 13px; max-width: 70ch; color: var(--muted); }
.coupon.on-ticket { max-width: 420px; }
.btn-ghost.on-ticket { background: transparent; }
.hero-ticket .cta-bar { max-width: 520px; }

/* list items */
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 800px) { .items { grid-template-columns: 1fr 1fr; } }
.item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 8px 8px; }
.item-thumb { position: relative; flex: none; width: 64px; height: 64px; border-radius: 10px; background: #eef1f6; display: grid; place-items: center; font-size: 28px; overflow: hidden; }
.item-thumb img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: var(--tile); padding: 4px; }
.item-body { flex: 1; min-width: 0; }
.item-title { margin: 0; font-size: 14px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-prices { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.item-prices strong { font-weight: 700; font-size: 19px; color: var(--price); }
.item-prices s { color: var(--muted); font-size: 12px; text-decoration-color: var(--desconto); }
.item-off { font-size: 13px; font-weight: 700; color: var(--desconto); }

/* ---------- offer page ---------- */
.offer { display: grid; gap: 20px; background: var(--card); border-radius: var(--radius); padding: 10px; border: 1px solid var(--line); }
@media (min-width: 820px) { .offer { grid-template-columns: 1.05fr 1fr; padding: 14px 28px 14px 14px; gap: 36px; } }
.offer-media { position: relative; background: var(--tile); border-radius: 10px; display: grid; place-items: center; min-height: 280px; }
.offer-media img { max-height: 460px; width: auto; object-fit: contain; padding: 16px; }
.offer-info { display: flex; flex-direction: column; gap: 12px; padding: 4px 6px 6px; }
@media (min-width: 820px) { .offer-info { padding: 14px 0; } }
.offer-info h1 { font-weight: 700; font-size: clamp(22px, 3.4vw, 30px); line-height: 1.15; margin: 0; }
.prices.big { padding-top: 8px; }
.prices.big strong { font-size: clamp(48px, 10vw, 68px); }
.prices.big .price-row { justify-content: flex-start; align-items: baseline; }
.prices.big .off { font-size: 20px; background: color-mix(in srgb, var(--desconto) 14%, transparent); padding: 3px 9px; border-radius: 999px; }
.prices.big .was, .prices.big s { font-size: 15px; }
.stamp { color: var(--muted); font-size: 12.5px; margin: 0; }
.ended-note { background: color-mix(in srgb, var(--desconto) 14%, transparent); color: var(--desconto); padding: 10px 12px; border-radius: 10px; margin: 0; font-weight: 600; }
.coupon {
  display: flex; align-items: center; gap: 10px; border: 1.5px dashed var(--line);
  border-radius: 12px; padding: 8px 8px 8px 14px; background: var(--soft);
}
.coupon span { font-size: 12px; color: var(--muted); font-weight: 600; }
.coupon code { font-size: 18px; font-weight: 800; flex: 1; letter-spacing: .5px; color: var(--ink); }
.note { margin: 0; }
.cta-bar { display: flex; gap: 10px; align-items: stretch; }
@media (max-width: 819px) {
  /* thumb reach: the buy button stays on screen while reading */
  .offer .cta-bar {
    position: sticky; bottom: 0; z-index: 5; margin: 0 -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
  }
}
.history { margin: 32px 0; }
.history h2 { font-weight: 700; font-size: 24px; margin: 0 0 12px; }
.history img { background: #fff; border-radius: 12px; width: 100%; }

/* ---------- footer ---------- */
.foot { margin-top: 64px; padding: 28px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-grid { display: grid; gap: 16px; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.2fr 1fr; } .foot-grid .fine { grid-column: 1 / -1; } }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: start; align-items: center; }
.foot nav a { text-decoration: none; font-weight: 600; color: var(--ink); min-height: 32px; display: inline-flex; align-items: center; }
.theme-toggle { font: 600 14px var(--f); color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px;
  min-height: 32px; padding: 0 12px; cursor: pointer; }
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }
.fine { font-size: 12px; color: var(--muted); }

/* trust seals (footer) */
.trust { display: flex; flex-wrap: wrap; gap: 10px; }
.seal {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 12px;
  text-decoration: none; background: var(--card); border: 1px solid var(--line); color: var(--conferido);
}
.seal:hover { border-color: var(--conferido); }
.seal span { display: flex; flex-direction: column; line-height: 1.2; }
.seal strong { color: var(--ink); font-size: 13px; }
.seal small { color: var(--muted); font-size: 11.5px; }
@media (min-width: 800px) { .foot-grid .trust { grid-column: 1 / -1; } }

/* ---------- admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; }
.admin-head h1 { margin: 0;  }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; display: flex; flex-direction: column; gap: 12px; }
.panel.narrow { max-width: 380px; margin: 56px auto; }
.panel.ok { border-color: var(--green); }
.panel h1, .panel h2 { margin: 0;  }
.panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.panel input, .panel select, .panel textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px;
}
.panel input:focus, .panel select:focus, .panel textarea:focus { outline: none; border-color: var(--orange); }
.inline { display: flex; gap: 8px; }
.two, .three { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 640px) { .three { grid-template-columns: 1fr 1fr 1fr; } }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 700; color: var(--ink); cursor: pointer; }
.seg input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.warn { color: #b3261e; margin: 0; font-weight: 600; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row span { width: 84px; flex: none; font-size: 13px; color: var(--muted); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 56px minmax(0, 1fr) 130px auto; gap: 14px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--line); }
.pub:first-child { border-top: 0; }
.pub.dim > :not(.pub-actions) { opacity: .5; }
.pub-thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.pub-tag { display: grid; place-items: center; background: var(--badge-bg); color: var(--badge-ink); border: 0;
  font-weight: 800; font-size: 12px; line-height: 1.1; text-align: center; padding: 4px; overflow: hidden; }
.pub-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pub-title { font-weight: 700; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-title:hover { color: var(--orange-dark); text-decoration: underline; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.chip { background: var(--soft); color: var(--ink); border-radius: 999px; padding: 2px 8px; font-weight: 700; }
.chip-ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.chip-off { background: var(--soft); color: var(--muted); }
.pub-link { align-self: flex-start; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted);
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.pub-link:hover { color: var(--orange-dark); }
.pub-clicks { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.15; }
.pub-clicks strong {  font-size: 24px; font-variant-numeric: tabular-nums; }
.pub-clicks span, .pub-clicks small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pub-actions { display: flex; gap: 6px; align-items: flex-start; justify-content: flex-end; }
.pub-photo { position: relative; }
.pub-photo summary { list-style: none; cursor: pointer; }
.pub-photo summary::-webkit-details-marker { display: none; }
.pub-photo[open] .photo-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: min(360px, 80vw);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow-hover); }
.photo-form { display: flex; gap: 6px; align-items: center; }
.photo-form input { min-height: 36px; padding: 6px 8px; font-size: 13px; }
@media (max-width: 640px) {
  .pub { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; }
  .pub-thumb { width: 48px; height: 48px; }
  .pub-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .pub-clicks small { display: none; }
}

/* ---------- click stats (admin) ---------- */
.admin-nav { display: flex; gap: 8px; }
.admin-nav a { text-decoration: none; }
.seg-links { display: inline-flex; gap: 4px; background: var(--soft); border-radius: 999px; padding: 4px; margin-top: 16px; }
.seg-links a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.seg-links a[aria-current] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi span, .kpi small { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi strong {  font-size: 32px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-grid { display: grid; gap: 0 16px; }
@media (min-width: 800px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 10px; }
.hb-bar { display: block; height: 100%; min-width: 2px; background: var(--orange); border-radius: 0 4px 4px 0; }
.hb-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.hb-val small { color: var(--muted); font-weight: 600; }
.cols { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding-bottom: 20px; position: relative; border-bottom: 1px solid var(--line); }
.col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.col:hover .col-bar { background: var(--orange-dark); }
.col-bar { display: block; width: 100%; max-width: 28px; background: var(--orange); border-radius: 4px 4px 0 0; }
.col-label { position: absolute; bottom: -20px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.cols .col:nth-child(odd) .col-label { visibility: var(--odd-label, visible); }
@media (max-width: 600px) { .cols { --odd-label: hidden; } }
.table-wrap { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats-table th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.stats-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.stats-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- privacy page ---------- */
.prose { max-width: 680px; margin: 24px auto 48px; line-height: 1.6; }
.prose h1, .prose h2 {  }
.prose h2 { font-size: 20px; margin-top: 28px; }


/* ---------- coupon card: the deal on a stub, perforated from the body ---------- */
.coupon-card {
  --stub: 108px; --notch: 9px;
  position: relative; display: grid; grid-template-columns: var(--stub) minmax(0, 1fr);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  -webkit-mask: radial-gradient(circle var(--notch) at var(--stub) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at var(--stub) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at var(--stub) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at var(--stub) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  transition: border-color .15s; min-height: 136px;
}
@media (hover: hover) { .coupon-card:hover { border-color: color-mix(in srgb, var(--desconto) 50%, var(--line)); } }
.cc-stub {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center;
  padding: 12px 8px; color: var(--desconto); text-decoration: none; border-radius: 13px 0 0 13px;
  background: color-mix(in srgb, var(--desconto) 10%, var(--card)); border-right: 1.5px dashed var(--line);
}
.cc-deal { font-weight: 800; font-size: 30px; line-height: .95; overflow-wrap: anywhere; }
.cc-deal.long { font-size: 22px; }
.cc-deal.longer { font-size: 17px; line-height: 1.05; }
.cc-store { font-size: 11px; font-weight: 600; color: var(--muted); }
.cc-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px 16px; }
.cc-top { display: flex; gap: 6px; align-items: center; min-height: 20px; }
.cc-state { font-size: 12px; font-weight: 600; color: var(--muted); }
.cc-state.soon { color: var(--desconto); }
.cc-state.off { color: var(--muted); }
.cc-prime { font-weight: 700; font-size: 11px; color: #fff; background: #1a98ff; padding: 1px 8px; border-radius: 999px; margin-left: auto; }
.cc-name { margin: 0; font-weight: 700; font-size: 18px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-name a { color: var(--ink); text-decoration: none; }
.cc-name a::after { content: ""; position: absolute; inset: 0; }  /* whole card opens the coupon */
.cc-thumbs { display: flex; align-items: center; gap: 6px; }
.cc-thumbs img { width: 44px; height: 44px; object-fit: contain; background: var(--tile); border-radius: 8px; padding: 3px; }
.cc-more { font-size: 12px; font-weight: 600; color: var(--muted); padding-left: 2px; }
.cc-how { margin: auto 0 0; font-size: 13px; font-weight: 500; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
button.cc-code { position: relative; z-index: 1; font: 700 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink);
  background: var(--soft); border: 1.5px dashed var(--muted); border-radius: 8px; padding: 2px 8px; cursor: pointer; }
.coupon-card.ended { filter: grayscale(1); opacity: .55; }
.rail .coupon-card { min-height: 100%; }
@media (max-width: 480px) { .coupon-card { --stub: 92px; } .cc-deal { font-size: 26px; } .cc-deal.long { font-size: 20px; } }

/* coupon page: how to use */
.howto { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.howto h2 { margin: 0 0 12px; font-weight: 700; font-size: 22px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.steps li { counter-increment: step; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.steps li::before { content: counter(step); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--soft); color: var(--price); font: 700 14px var(--f); }
.steps strong { color: var(--ink); }
.steps code { font-weight: 700; color: var(--ink); }
.rules { margin-top: 12px; font-size: 13px; color: var(--muted); }
.rules summary { cursor: pointer; font-weight: 600; }
.rules p { margin: 8px 0 0; max-width: 75ch; }
