/* Home de 20 set 2026 — mockup 03-home-sugestoes-simples (IOLLO V2.0/04-MOCKUPS/
   00-IOLLO/2026-09-19-home-fazer-whatsapp), à densidade da app. Ilustrações
   dos temas e mascote a piscar: assets/home-v3 (biblioteca de 18 set). Copy,
   cartões, balão e fundos são HTML/CSS; nunca texto dentro das imagens. */
.home-visually-hidden { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }

/* Home v3 (22 set 2026, mockup 03-home-header-vivo). O fundo azul/dourado é o
   svg/header-glow.svg do pacote, sem caixa: cobre o topo do ecrã — logótipo,
   menu e saudação — e desvanece para o marfim da página com uma máscara. Fica
   no #app para poder passar por trás do cabeçalho; os filhos sobem-lhe por
   cima com z-index, não com posição. */
.product-ready #app:has(> .main-home) { position:relative; }
.product-ready #app:has(> .main-home)::before {
  content:''; position:absolute; inset:0 0 auto; height:min(58%, 420px); z-index:0; pointer-events:none;
  background:url("/assets/home-chat-v2/svg/header-glow.svg") center top / 100% 100% no-repeat;
  -webkit-mask-image:linear-gradient(#000 58%, transparent); mask-image:linear-gradient(#000 58%, transparent);
}
.product-ready #app:has(> .main-home) > * { position:relative; z-index:1; }

/* Saudação à esquerda, mascote com os tracinhos à direita. As duas colunas
   nunca se sobrepõem: o texto tem coluna própria e quebra dentro dela. */
.product-ready .home-welcome { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; justify-items:start; gap:8px; padding-top:6px; text-align:left; }
.product-ready .home-welcome-copy { display:grid; gap:3px; min-width:0; }
.product-ready .main-greeting { margin:0; font-size:clamp(22px, 6.6vw, 30px); line-height:1.06; font-weight:800; letter-spacing:-.035em; text-align:left; text-wrap:balance; overflow-wrap:anywhere; }
/* O turquesa é o --io-turq-700 e não o tom mais claro do mockup: a 3:1 de
   contraste o texto grande continua legível no marfim. */
.product-ready .main-question { margin:0; font-size:clamp(20px, 6vw, 27px); line-height:1.1; font-weight:800; letter-spacing:-.03em; text-align:left; color:var(--io-turq-700); text-wrap:balance; }
.product-ready .home-mascot { position:relative; display:block; flex:none; }
.product-ready .main-mascot { display:block; width:118px; height:118px; margin:0 -4px 0 0; object-fit:contain; background:none; }
/* Os tracinhos dourados são um elemento à parte do pacote, não parte da
   mascote: ficam acima e à direita dela, e não entram no fluxo do texto. */
.product-ready .home-tracinhos { position:absolute; top:4px; right:-6px; width:40px; height:40px; pointer-events:none; }

/* As três sugestões em pílulas claras, centradas e em duas filas (mockup
   03-home-header-vivo). Cada uma leva o ícone da sua categoria. */
.product-ready .home-quick-replies { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:14px calc(var(--io-page-gutter) - var(--io-home-gutter)) 0; width:auto; }
.product-ready .home-suggestions { display:contents; }
.product-ready .home-quick-replies .product-button { display:inline-flex; align-items:center; gap:8px; flex:0 1 auto; width:auto; max-width:100%; min-width:0; min-height:44px; padding:9px 14px; font-size:14px; line-height:1.3; font-weight:500; text-align:left; white-space:normal; border:1px solid var(--io-border); border-radius:999px; background:var(--io-surface); color:var(--io-text); box-shadow:var(--io-shadow-control); }
.product-ready .home-quick-replies .product-button .v3-icon { width:18px; height:18px; color:var(--io-text); }
.product-ready .home-suggestion-text { min-width:0; }

/* «Retomar: …» numa pílula dourada, por baixo das sugestões. */
.product-ready .home-resume-slot { display:flex; justify-content:center; width:100%; margin-top:10px; }
.product-ready .home-resume-slot:empty { display:none; }
.product-ready .home-resume { display:inline-flex; align-items:center; gap:10px; width:min(100%, 420px); min-height:50px; padding:10px 16px; border:1px solid color-mix(in srgb, var(--io-gold-500) 40%, var(--io-surface)); border-radius:999px; background:var(--io-gold-100); color:var(--io-text); font-size:15px; font-weight:500; text-align:left; }
.product-ready .home-resume .v3-icon { width:21px; height:21px; color:var(--io-gold-700); }
.product-ready .home-resume .home-pill-arrow { margin-left:auto; color:var(--io-text); }
.product-ready .home-resume-text { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; min-width:0; }

/* Home v3: a caixa de escrever deixou de estar no meio do ecrã e de subir e
   descer com o deslizar. Está fixa no fundo (.home-dock), em todas as áreas. */
.product-ready .home-draft-status { font-size:12px; line-height:1.5; color:var(--io-text-secondary); margin:6px 0 0; text-align:center; }

/* Banner da área: um só, no fim do que desliza, antes da caixa de escrever. A
   peça é uma fotografia com o texto lá dentro, por isso usa a margem da
   página, como as pílulas: quanto mais larga, mais legível o texto pintado. */
.product-ready .home-banner-slot { margin:16px calc(var(--io-page-gutter) - var(--io-home-gutter)) 4px; }
.product-ready .home-banner-slot:empty { display:none; }

/* Cabeçalhos das secções da home. */
.product-ready .main-home .product-section { margin-top:14px; gap:10px; }
.product-ready .home-section-heading { display:grid; gap:2px; }
.product-ready .main-home .home-section-heading h2 { margin:0; font-size:22px; font-weight:800; line-height:1.15; letter-spacing:-.03em; }
.product-ready .home-section-heading p { margin:0; font-size:14px; line-height:1.4; color:var(--io-text-secondary); }

/* «O que queres ver hoje?»: quatro selectores ilustrados; os cartões só depois da escolha.
   Faixa como no mockup 03-home-sugestoes-simples (cartão 3:1, ilustração ao
   centro-direita, rótulo em baixo à esquerda e seta à direita, na mesma linha).
   Abaixo de 380px de app passa a uma coluna (ver a container query no fim do
   ficheiro). `width:100%` impede que o `min-height` mande no `aspect-ratio` e
   torne o cartão mais largo que a sua coluna. */
.product-ready .home-topic-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; }
.product-ready .home-topic { --home-topic-bg:#cff5f3; container:iollo-topic / size; position:relative; display:block; width:100%; aspect-ratio:3/1; min-height:60px; max-height:72px; padding:0; border:0; border-radius:16px; background:var(--home-topic-bg); color:#164b50; font:inherit; text-align:left; cursor:pointer; overflow:hidden; isolation:isolate; }
.product-ready .home-topic[data-home-topic="videos"] { --home-topic-bg:#ffd1bc; }
.product-ready .home-topic[data-home-topic="desporto"] { --home-topic-bg:#d6f4dd; }
.product-ready .home-topic[data-home-topic="cultura"] { --home-topic-bg:#ffebaa; }
/* As medidas da arte são por tema porque cada ficheiro de /assets/home-v3 tem
   uma margem transparente diferente: o desenho ocupa 78% do quadrado no
   Desporto e só 56% na Cultura. Com um valor único a bola saía grande e as
   máscaras pequenas. Estes números põem os quatro desenhos com a mesma altura
   visível e centrados na mesma faixa, à direita do rótulo. Se as ilustrações
   mudarem, remedir a caixa opaca de cada uma. */
.product-ready .home-topic-art { position:absolute; z-index:-1; right:var(--home-topic-art-x); bottom:var(--home-topic-art-y); width:auto; height:var(--home-topic-art-h); aspect-ratio:1; object-fit:contain; pointer-events:none; }
.product-ready .home-topic[data-home-topic="noticias"] { --home-topic-art-h:104.8cqh; --home-topic-art-x:calc(30px - 4.72cqh); --home-topic-art-y:-0.78cqh; }
.product-ready .home-topic[data-home-topic="videos"] { --home-topic-art-h:102.3cqh; --home-topic-art-x:calc(30px - 9cqh); --home-topic-art-y:-1.45cqh; }
.product-ready .home-topic[data-home-topic="desporto"] { --home-topic-art-h:80.8cqh; --home-topic-art-x:calc(30px - 8.4cqh); --home-topic-art-y:9.85cqh; }
.product-ready .home-topic[data-home-topic="cultura"] { --home-topic-art-h:111.7cqh; --home-topic-art-x:calc(30px - 4.36cqh); --home-topic-art-y:-5.07cqh; }
.product-ready .home-topic-label { position:absolute; left:12px; right:auto; bottom:9px; font-size:15px; font-weight:700; line-height:1.2; letter-spacing:-.02em; }
.product-ready .home-topic-arrow { position:absolute; right:10px; bottom:11px; width:16px; height:16px; color:#164b50; }
.product-ready .home-topic-arrow svg { width:100%; height:100%; }
.product-ready .home-topic[aria-pressed="true"] { box-shadow:inset 0 0 0 2.5px var(--io-turq-700); }
.product-ready .home-topic:hover { filter:brightness(.985); }
.product-ready .home-topic:focus-visible { outline:3px solid var(--io-turq-500); outline-offset:2px; }
.product-ready .home-topic-results { display:grid; gap:12px; margin-top:2px; }
.product-ready .home-topic-results[hidden] { display:none; }
.product-ready .home-topic-results .home-topic-more { justify-self:start; min-height:36px; font-size:13px; }

/* Fazer na home: promessa, um exemplo com a mascote e as seis entradas do catálogo. */
.product-ready .home-fazer { gap:10px; }
.product-ready .home-eyebrow { margin:0 0 -4px; font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--io-turq-700); }
.product-ready .main-home .home-fazer > .home-fazer-title { margin:0; font-size:24px; font-weight:800; line-height:1.12; letter-spacing:-.03em; text-wrap:balance; }
.product-ready .home-fazer-destaque { color:var(--io-turq-700); }
.product-ready .home-fazer-exemplo { display:grid; grid-template-columns:92px minmax(0,1fr); align-items:center; gap:4px; margin-top:2px; }
.product-ready .home-fazer-personagem { display:block; width:92px; height:auto; }
.product-ready .home-fazer-balao { display:grid; gap:2px; padding:12px 14px; border-radius:18px; background:var(--io-surface); box-shadow:var(--io-shadow-card); font-size:14px; line-height:1.4; color:var(--io-text); }
.product-ready .home-fazer-balao p { margin:0; }
.product-ready .home-fazer-balao strong { font-weight:700; }
.product-ready .home-fazer-balao em { font-style:normal; font-weight:600; color:var(--io-turq-700); }
.product-ready .home-fazer-ligacao { display:inline-flex; align-items:center; gap:4px; min-height:32px; margin-top:2px; color:var(--io-turq-700); font-weight:600; text-decoration:none; }
.product-ready .home-fazer-ligacao:hover, .product-ready .home-fazer-ver-todas:hover { text-decoration:underline; }
.product-ready .home-fazer-grelha-titulo { margin:6px 0 0; font-size:20px; font-weight:800; line-height:1.15; letter-spacing:-.025em; }
.product-ready .home-fazer-grelha { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px 6px; margin:0; padding:0; list-style:none; }
.product-ready .home-fazer-cartao { display:grid; justify-items:center; gap:5px; padding:4px 2px 6px; border-radius:14px; color:var(--io-text); text-decoration:none; text-align:center; }
.product-ready .home-fazer-cartao:hover { background:color-mix(in srgb, var(--io-turq-500) 10%, transparent); }
.product-ready .home-fazer-cartao:focus-visible { outline:3px solid var(--io-turq-500); outline-offset:2px; }
.product-ready .home-fazer-art { display:block; width:min(100%, 96px); height:auto; }
.product-ready .home-fazer-cartao .fazer-il-vector { display:grid; place-items:center; width:min(100%, 96px); aspect-ratio:1; border-radius:14px; background:color-mix(in srgb, var(--io-turq-500) 14%, var(--io-surface)); color:var(--io-turq-700); }
.product-ready .home-fazer-cartao .fazer-il-vector svg { width:50%; height:50%; }
.product-ready .home-fazer-rotulo { font-size:13px; font-weight:600; line-height:1.25; }
.product-ready .home-fazer-ver-todas { display:inline-flex; align-items:center; justify-content:center; gap:6px; justify-self:center; min-height:40px; padding:0 8px; color:var(--io-turq-700); font-size:14px; font-weight:600; text-decoration:none; }
.product-ready .home-fazer-ver-todas svg { width:18px; height:18px; }

/* Cartões de conteúdo (Notícias, Vídeos, Desporto, Cultura). */
.home-story { position:relative; min-width:0; overflow:hidden; isolation:isolate; border:1px solid var(--io-border); border-radius:11px; background:var(--io-canvas, #f7f3ec); color:var(--io-text); }
.home-story-photo { display:block; width:100%; height:100%; object-fit:cover; }
.home-story-copy { display:flex; flex-direction:column; gap:5px; min-width:0; padding:12px; }
.home-story-label { align-self:flex-start; max-width:100%; color:var(--io-text-secondary); font-size:8px; font-weight:500; line-height:1.35; text-transform:uppercase; border:1px solid currentColor; border-radius:999px; padding:3px 5px; overflow-wrap:anywhere; }
.home-story h3 { margin:0; font-size:14px; font-weight:600; line-height:1.35; letter-spacing:-.015em; overflow-wrap:anywhere; }
.home-story-meta { margin:0; font-size:10px; line-height:1.4; color:var(--io-text-secondary); }
.home-story-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:7px; margin-top:auto; padding-top:3px; }
.product-ready .home-story .product-button { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:28px; padding:5px 15px; font-size:11px; font-weight:500; line-height:1.3; border-radius:999px; text-decoration:none; width:fit-content; max-width:100%; text-align:center; }
.home-story .product-button svg { width:15px; height:15px; flex-shrink:0; }
.home-feature { min-height:177px; display:flex; flex-direction:column; justify-content:flex-end; }
.home-feature.has-photo { color:#fff; background:#29251f; }
.home-feature>.home-story-photo { position:absolute; inset:0; z-index:-2; }
.home-feature.has-photo::before { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(180deg,rgba(0,0,0,.15),rgba(0,0,0,.22) 25%,rgba(0,0,0,.78) 100%); }
.home-feature .home-story-copy { min-height:177px; padding:12px; gap:5px; }
.home-feature .home-story-label { margin-bottom:auto; }
.home-feature.has-photo .home-story-label { color:#fff; background:#24211dc4; }
.home-feature .home-story-label.is-live { color:#fff; background:#a4231a; border-color:#a4231a; }
.home-feature h3 { margin-top:20px; font-size:18px; line-height:1.25; font-weight:600; }
.home-feature.has-photo .home-story-meta { color:#f7f3ec; }
.home-feature .home-story-actions { margin-top:1px; }
.home-save { display:grid; place-items:center; width:30px; height:30px; padding:5px; border:1px solid currentColor; border-radius:50%; background:transparent; color:inherit; cursor:pointer; }
.home-save svg { width:16px; height:16px; }
.home-save[aria-pressed="true"] { background:var(--io-gold, #edbb74); color:#25231e; border-color:var(--io-gold, #edbb74); }
.home-save:disabled { opacity:.5; cursor:default; }
.home-compact { display:grid; grid-template-columns:minmax(0,1fr); min-height:107px; }
.home-compact.has-photo { grid-template-columns:33% minmax(0,1fr); }
.home-compact>.home-story-photo { align-self:stretch; height:100%; min-height:107px; }
.home-compact .home-story-copy { padding:10px 11px; }
.home-compact .home-story-label { color:#fff; background:#267743; border-color:transparent; }
.home-compact .home-story-actions { justify-content:flex-end; }
.home-utility .home-story-label { color:#fff; background:#007f8e; border-color:transparent; }
.home-utility .home-story-photo { object-position:48% 50%; }
.home-video-dialog { width:min(650px,calc(100% - 24px)); max-height:calc(100dvh - 32px); padding:16px; border:1px solid var(--io-border); border-radius:18px; background:var(--io-canvas,#f7f3ec); color:var(--io-text); font-family:inherit; overflow:auto; }
.home-video-dialog::backdrop { background:rgba(23,22,19,.65); }
.home-video-heading { display:flex; gap:12px; align-items:flex-start; justify-content:space-between; }
.home-video-heading h2 { font-size:17px; line-height:1.4; margin:0 0 12px; overflow-wrap:anywhere; }
.home-video-close { display:grid; place-items:center; width:32px; height:32px; flex:0 0 32px; border:0; background:transparent; color:inherit; cursor:pointer; }
.home-video-close svg { width:20px; height:20px; }
.home-video-dialog iframe { display:block; aspect-ratio:16/9; width:100%; border:0; border-radius:8px; background:#181818; }
.home-video-dialog p { font-size:12px; line-height:1.5; color:var(--io-text-secondary); }
.home-video-actions { display:flex; flex-wrap:wrap; gap:8px; }
.home-video-actions .product-button { min-height:36px; font-size:12px; }
.home-update-status:empty { display:none; }
.home-update-status, .home-feed-empty { margin:0; color:var(--io-text-secondary); font-size:13px; line-height:1.5; }
.home-feed-empty { padding:8px 0; }
.home-feed-empty p { margin:0 0 5px; }
.home-feed-empty .product-text-button { color:var(--io-text-teal,#087c88); font:inherit; border:0; background:transparent; min-height:28px; cursor:pointer; }
@media (max-width:360px) { .product-ready .main-mascot { width:98px; height:98px; } .product-ready .home-tracinhos { width:34px; height:34px; } .home-compact .home-story-copy { padding:9px; } .home-story h3 { font-size:13px; } .home-feature h3 { font-size:16px; } .product-ready .home-fazer-grelha { grid-template-columns:repeat(2, minmax(0,1fr)); } }

/* Match Para ti's approved reading scale at the actual app width. */
#app:has(> .main-home) { container: iollo-home / inline-size; }
/* Abaixo de 380px de app o cartão a duas colunas fica com menos de 160px: o
   rótulo «Desporto» leva 82px desses e o desenho colidia com ele. Aí passa a
   uma coluna. Os 380px cobrem os telemóveis correntes (390, 393, 430) a duas
   colunas, como no mockup. */
@container iollo-home (max-width: 379px) {
  .product-ready .home-topic-grid { grid-template-columns:minmax(0,1fr); }
}

@container iollo-home (max-width: 600px) {
  .home-story-label, .home-story-meta, .home-update-status, .home-feed-empty { font-size: 13px; line-height: 1.45; }
  .product-ready .home-story .product-button { font-size: 13px; line-height: 1.35; min-height: 34px; padding: 6px 10px; }
  .home-story h3 { font-size: 15px; line-height: 1.4; }
  .home-feature h3 { font-size: 18px; line-height: 1.35; }
  .home-story-copy { gap: 7px; }
  .product-ready .main-home .guest-note, .product-ready .main-home .link-button { font-size: 13px; line-height: 1.45; }
}
