/* ==========================================================================
   Tema "Apple" — camada de TESTE. Só é carregada em /beta (html.apple).
   Não troca a marca: logo, cores amarelo/madeira e a estrutura continuam.
   Muda o acabamento: fonte do sistema (SF Pro), vidro fosco, cantos contínuos,
   sombras suaves, botões em pílula, movimento com mola e muito respiro.
   ========================================================================== */
html.apple {
  --ap-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  --ap-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  --ap-serif: 'New York', 'Iowan Old Style', 'Fraunces', Georgia, serif;
  --ap-r: 18px; --ap-r-sm: 12px;
  --ap-ease: cubic-bezier(.32, .72, 0, 1);          /* curva das animações do iOS */
  --ap-spring: cubic-bezier(.34, 1.56, .64, 1);
  --bg: #000; --bg-1: #1C1C1E; --bg-2: #2C2C2E; --bg-3: #3A3A3C;
  --fg: #F5F5F7; --fg-2: #A1A1A6; --fg-3: #8E8E93;
  --border: rgba(255,255,255,.08); --border-2: rgba(255,255,255,.14);
  --ap-glass: rgba(22,22,23,.72);
  --ap-card-shadow: 0 1px 1px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
  --ap-card-shadow-hover: 0 2px 4px rgba(0,0,0,.3), 0 24px 50px -18px rgba(0,0,0,.75);
}
html.apple[data-tema="claro"] {
  --bg: #F5F5F7; --bg-1: #FFFFFF; --bg-2: #F0F0F2; --bg-3: #E5E5EA;
  --fg: #1D1D1F; --fg-2: #6E6E73; --fg-3: #86868B;
  --border: rgba(0,0,0,.06); --border-2: rgba(0,0,0,.12);
  --ap-glass: rgba(255,255,255,.72);
  --ap-card-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px -10px rgba(0,0,0,.12);
  --ap-card-shadow-hover: 0 2px 6px rgba(0,0,0,.06), 0 22px 48px -16px rgba(0,0,0,.2);
}

/* ---------- Tipografia ---------- */
html.apple body { font-family: var(--ap-font) !important; font-size: 17px; line-height: 1.47; letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; background: var(--bg); }
html.apple :is(h1, h2, h3, h4, .card-title, .hero-title, .nh-tit, .nh-tit-ed, .section-title, .side-item-title, .tema-titulo, .tl-title,
  .mn-ep-title, .pod-ep-tit, .rcv-title, .city-modal-title, .nl-title, .matracada-anuncie__titulo, .ad-nome, .relacionadas a, .nh-h1, .nh-card h3, .nh-peq h4, .nh-tit, .nh-lista a) {
  font-family: var(--ap-display) !important; font-weight: 700; letter-spacing: -.028em; }
html.apple :is(h1, .hero-title, .nh-h1, .nh-manchete h1, .nh-manchete h2) { font-weight: 800; letter-spacing: -.04em; line-height: 1.06; }
html.apple .section-title, html.apple .section-head h2 { font-size: clamp(26px, 3vw, 34px) !important; letter-spacing: -.035em; }
/* Leitura: serifa da Apple (New York) só no corpo da matéria, como no Apple News */
html.apple .reader-title { font-family: var(--ap-display) !important; font-weight: 800; letter-spacing: -.04em; font-size: clamp(34px, 5vw, 56px); line-height: 1.04; }
html.apple .reader-dek { font-family: var(--ap-display); font-weight: 500; color: var(--fg-2); letter-spacing: -.02em; }
html.apple .reader-text { font-family: var(--ap-serif); font-size: clamp(19px, 1.6vw, 21px); line-height: 1.62; letter-spacing: -.003em; }
html.apple .reader-text p:first-of-type::first-letter { float: left; font-size: 3.4em; line-height: .86; font-weight: 700; padding: .06em .08em 0 0; color: var(--yellow-txt); }
/* A marca não muda */
html.apple :is(.nav-logo-m, .footer-logo-m, .ml-logo, .city-name-display, .entry-mark, .mn-brand, .matracada-anuncie__marca, .mcast-txt) { font-family: 'Inter Tight', -apple-system, sans-serif !important; }

/* ---------- Barra superior: vidro fosco (vibrancy) ---------- */
html.apple .top-bar { background: var(--ap-glass) !important; -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: .5px solid var(--border-2) !important; box-shadow: none; }
html.apple .top-bar-inner { height: 64px; }
html.apple .nav-logo-m { font-size: 34px; }
html.apple .ticker-bar { background: transparent !important; border-bottom: .5px solid var(--border) !important; }

/* ---------- Botões: pílulas, peso médio, toque com mola ---------- */
html.apple :is(button, .btn, .btn-primary, .btn-home, .btn-menu, .btn-tema, .mtab, .iv-tab, .tv-btn, .chip, a.nh-faixa) {
  transition: transform .45s var(--ap-spring), background-color .25s var(--ap-ease), box-shadow .3s var(--ap-ease), opacity .2s; }
html.apple :is(.btn-primary, .btn-home, .btn-menu, .btn-tema, .tv-btn) { border-radius: 980px !important; font-family: var(--ap-font) !important; font-weight: 600 !important; letter-spacing: -.01em !important; }
html.apple .btn-primary { background: var(--yellow) !important; color: #000 !important; border: 0 !important; padding: 12px 22px !important; box-shadow: 0 6px 18px -8px rgba(255,198,0,.7); }
html.apple :is(.btn-home, .btn-menu, .btn-tema) { background: color-mix(in srgb, var(--fg) 8%, transparent) !important; border: 0 !important; }
html.apple :is(button, .btn-primary, .btn-home, .btn-menu, .btn-tema, .mtab, a.nh-faixa):active { transform: scale(.96); }
html.apple :focus-visible { outline: 3px solid color-mix(in srgb, #0A84FF 70%, transparent) !important; outline-offset: 2px; border-radius: 12px; }

/* Abas como controle segmentado */
html.apple :is(.mtab, .iv-tab) { border-radius: 980px !important; border: 0 !important; background: transparent; font-weight: 600; }
html.apple :is(.mtab, .iv-tab).on, html.apple :is(.mtab, .iv-tab)[aria-selected="true"] { background: var(--bg-1) !important; color: var(--fg) !important; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 0 0 .5px var(--border-2); }

/* ---------- Cartões: cantos contínuos, sombra flutuante, foto que respira ---------- */
html.apple :is(.news-card, .hero-card-main, .hero-side-item, .city-card, .rx-card, .iv-item, .mn-ep, a.nh-faixa, .relacionadas, .reader-grupo) {
  border-radius: var(--ap-r) !important; border: 0 !important; background: var(--bg-1) !important; box-shadow: var(--ap-card-shadow);
  overflow: hidden; transition: transform .6s var(--ap-ease), box-shadow .6s var(--ap-ease); }
html.apple :is(.news-card, .hero-side-item, .city-card, .mn-ep, a.nh-faixa, .rx-card):hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--ap-card-shadow-hover); }
html.apple :is(.news-card, .hero-card-main, .hero-side-item) img, html.apple .thumb-bg { transition: transform 1.2s var(--ap-ease); }
html.apple :is(.news-card, .hero-card-main, .hero-side-item):hover :is(img, .thumb-bg) { transform: scale(1.04); }
html.apple .card-excerpt { color: var(--fg-2); }
html.apple .cat-badge { border-radius: 980px !important; font-family: var(--ap-font) !important; font-weight: 600 !important; letter-spacing: .02em !important; text-transform: uppercase; font-size: 11px !important;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
html.apple .reader-grupo { box-shadow: 0 0 0 1.5px #30D158, var(--ap-card-shadow); }

/* ---------- Campos ---------- */
html.apple :is(input[type=search], input[type=text], input[type=email], input[type=tel], select, textarea) {
  border-radius: 12px !important; border: 0 !important; background: color-mix(in srgb, var(--fg) 7%, transparent) !important; font-family: var(--ap-font) !important;
  transition: box-shadow .25s var(--ap-ease); }
html.apple :is(input, select, textarea):focus { box-shadow: 0 0 0 4px color-mix(in srgb, #0A84FF 35%, transparent) !important; outline: none; }

/* ---------- Janelas (modais e leitor): folha que sobe com mola, fundo desfocado ---------- */
html.apple :is(.city-modal, #reader) { -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); }
html.apple #reader:not([hidden]) > * { animation: ap-sobe .7s var(--ap-ease) both; }
@keyframes ap-sobe { from { opacity: 0; transform: translateY(28px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- Entrada suave dos blocos ao rolar ---------- */
html.apple .ap-revela { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ap-ease), transform .9s var(--ap-ease); }
html.apple .ap-revela.ap-visto { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.apple *, html.apple *::before, html.apple *::after { animation: none !important; transition: none !important; }
  html.apple .ap-revela { opacity: 1; transform: none; }
}

/* ---------- Respiro e rodapé ---------- */
html.apple .section-head { margin-bottom: 22px; }
html.apple footer { background: var(--bg) !important; border-top: .5px solid var(--border-2); font-size: 13px; color: var(--fg-2); }

/* Selo de teste */
html.apple .ap-selo { position: fixed; z-index: 999; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--ap-glass); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  color: var(--fg); font: 600 13px var(--ap-font); padding: 9px 16px; border-radius: 980px; box-shadow: 0 8px 30px -8px rgba(0,0,0,.4), 0 0 0 .5px var(--border-2); text-decoration: none; }

/* ---------- Capa (nh-*): manchete gigante, cartões flutuantes ---------- */
html.apple .nh-h1 { font-size: clamp(36px, 4.6vw, 64px) !important; }
html.apple .nh-card { border-radius: var(--ap-r); background: var(--bg-1); box-shadow: var(--ap-card-shadow); overflow: hidden; padding-bottom: 14px;
  transition: transform .6s var(--ap-ease), box-shadow .6s var(--ap-ease); }
html.apple .nh-card > :not(:first-child) { padding-left: 16px; padding-right: 16px; }
html.apple .nh-card:hover { transform: translateY(-4px); box-shadow: var(--ap-card-shadow-hover); }
html.apple .nh-card :is(img, .thumb-bg, [class*="foto"]) { border-radius: 0 !important; }
html.apple .nh-peq { border-radius: var(--ap-r-sm); padding: 10px; transition: background-color .3s var(--ap-ease); }
html.apple .nh-peq:hover { background: var(--bg-1); }
html.apple .nh-peq :is(img, .thumb-bg, [class*="foto"]) { border-radius: 12px !important; }
html.apple :is(.nh-card h3, .nh-peq h4) { letter-spacing: -.025em; line-height: 1.2; }
html.apple .ap-selo { white-space: nowrap; }
@media (max-width: 480px) { html.apple .ap-selo { font-size: 12px; padding: 8px 14px; } }

/* ---------- Cantos arredondados sem cortar nada da notícia ----------
   Tudo o que encostava no canto (faixa da editoria, número, selo, texto sobre a foto)
   foi afastado para dentro da curva, para nada ser cortado pelo arredondamento. */
html.apple .nh-foto::after { top: 12px !important; left: 12px !important; width: 24px !important; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
html.apple .nh-peq .nh-foto::after { top: 7px !important; left: 7px !important; width: 16px !important; height: 3px !important; }
html.apple .nh-n { top: 12px !important; left: 12px !important; border-radius: 8px !important; }
html.apple .nh-grande h3 { padding: 52px 20px 20px !important; }
html.apple .hero-side-item::before { top: 14px !important; bottom: 14px !important; left: 6px !important; border-radius: 3px !important; }
html.apple .news-card-thumb::after { left: 14px !important; right: 14px !important; bottom: 8px !important; border-radius: 2px; }
html.apple .anuncio.faixa .ad-tag { top: 16px !important; left: 20px !important; }
html.apple :is(.news-card, .hero-card-main, .hero-side-item, .city-card, .rx-card, .iv-item, .mn-ep, a.nh-faixa, .nh-card) :is(.cat-badge, .card-badge, .ad-tag) { margin: 4px; }

/* ==========================================================================
   Escala tipográfica premium com piso de legibilidade.
   Nada abaixo de 13 px. Rótulos em caixa alta: 13 px, peso 600, espaçamento amplo
   (o que dá o ar "Apple" é o espaçamento e o peso, não letra miúda).
   Metadados e notas: 14 px. Pílulas e botões pequenos: 15 px.
   ========================================================================== */
/* Rótulos e sobretítulos (eyebrows) */
html.apple :is(.ticker-eyebrow, .cities-band-label, .city-group-label, .ml-tit, .footer-redes-tit, .enq-tag, .hero-urgent-badge,
  .mn-ep-kind, .ad-tag, .pod-exemplo, .cat-badge, .nh-faixa b, .city-card-region, .pod-ep-num) {
  font-size: 13px !important; font-weight: 600 !important; letter-spacing: .06em !important; line-height: 1.3 !important; }
/* "No Maranhão" / "No Brasil" e demais subtítulos de bloco: viram títulos de seção de verdade */
html.apple h3:is(:not([class])) { font-size: clamp(17px, 1.6vw, 20px) !important; letter-spacing: -.02em !important; text-transform: none !important; }
html.apple .ticker-bar :is(b, small), html.apple [class*="alta"] :is(b, small) { font-size: 13px !important; letter-spacing: .04em; }
/* Selos de editoria sobre as fotos */
html.apple em { font-size: max(13px, 1em); }
/* Metadados, datas, durações, notas e rótulos de formulário */
html.apple :is(small, .mn-ep-len, .pod-mini-d, .enq-nota, .geo-nota, .rcv-ok-txt, .rcv-pular, .side-item-meta, .nh-meta, .card-meta, .meta-sep, label) {
  font-size: max(14px, .85em) !important; line-height: 1.4; }
/* Pílulas de cidades, abas e botões pequenos */
html.apple :is(.city-pill, .chip, .mtab, .iv-tab, .tv-btn) { font-size: 15px !important; }
html.apple :is(button, .btn) { font-size: max(15px, 1em); }
/* Barra de atalhos do celular (Minha cidade, MatraCast…) */
html.apple :is(nav, footer, [class*="dock"], [class*="atalho"]) span { font-size: max(13px, 1em) !important; }
html.apple .sep { font-size: inherit !important; }

/* Revisão de cantos: a faixa de seção (section.nh-faixa) não é cartão; ranking numerado sem faixa colorida
   atrás do número; seta "›" dos subtítulos com recuo próprio dentro do cartão. */
html.apple section.nh-faixa { background: transparent !important; box-shadow: none !important; border-radius: 0 !important; overflow: visible !important; }
html.apple .nh-ml-i .nh-foto::after { display: none !important; }
html.apple .nh-card > .nh-sub { padding-left: 32px !important; padding-right: 16px !important; }
html.apple .nh-card > .nh-sub::before { left: 16px !important; }
html.apple .nh-indic b { font-size: 13px !important; letter-spacing: .06em; font-weight: 600; }
html.apple .pod-ep-meta, html.apple .pod-ep-meta span { font-size: 14px !important; }
html.apple .nh-tv-txt { padding: 14px 18px 18px !important; }
html.apple .nh-tv-txt small { font-size: 13px !important; letter-spacing: .08em !important; }
html.apple .nh-tv { border-radius: var(--ap-r) !important; }
