/* ============ HOME DO PORTAL: painel de partida (celular primeiro) ============ */
.hm { padding-bottom: var(--sp-xl); }
.hm-block { padding-top: var(--sp-xl); }
@media (min-width: 900px) { .hm-block { padding-top: var(--sp-2xl); } }
.hm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hm-head a { font-weight: 650; font-size: .92rem; white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; }
.hm-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* busca de abertura */
.hm-start { padding: var(--sp-lg) 0 var(--sp-sm); }
.hm-start .h1 { margin-bottom: 14px; }
.hm-search { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; border-radius: 16px 18px 16px 14px; background: var(--soft); color: var(--ink-2); cursor: text; }
.hm-search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 55%, transparent); }
.hm-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 16px/1.4 var(--font); padding: 14px 0; }
.hm-search input::placeholder { color: var(--ink-3); }
.hm-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; font-size: .88rem; color: var(--ink-2); }
.hm-try .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: .9rem; font-weight: 600; cursor: pointer; }
.hm-try .chip:hover { background: var(--soft); }
.hm-try .chip i { width: 14px; height: 14px; border-radius: 4px; }
@media (min-width: 900px) { .hm-start { padding-top: var(--sp-2xl); } .hm-search { min-height: 64px; max-width: 880px; } }

/* ferramentas */
.hm-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .hm-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.hm-tool { display: grid; gap: 4px; align-content: start; padding: 10px 10px 14px; border-radius: 14px 16px 14px 12px; background: var(--soft); text-decoration: none; min-width: 0; transition: background .15s, transform .15s var(--ease), box-shadow .15s; }
.hm-tool:hover { background: var(--paper); box-shadow: var(--lift); transform: translateY(-2px); }
.hm-tool-strip { display: grid; grid-auto-flow: column; height: 40px; border-radius: 9px; overflow: hidden; margin-bottom: 6px; }
.hm-tool b { font-weight: 700; font-size: .98rem; line-height: 1.25; }
.hm-tool > span:last-child { font-size: .84rem; line-height: 1.35; color: var(--ink-2); }

/* continue de onde parou */
.hm-resume { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.hm-resume::-webkit-scrollbar { display: none; }
.hm-res { flex: 0 0 auto; display: grid; gap: 8px; align-content: start; width: 200px; padding: 12px; border-radius: 14px 12px 14px 16px; background: var(--soft); text-decoration: none; font-size: .9rem; font-weight: 600; }
a.hm-res:hover { box-shadow: var(--lift); background: var(--paper); }
.hm-res-sw { display: grid; grid-auto-flow: column; height: 44px; border-radius: 9px; overflow: hidden; }
.hm-res-score b { font-weight: 850; font-stretch: 62%; font-size: 3rem; line-height: .9; }
.hm-res-score span { font-weight: 500; color: var(--ink-2); }
.hm-res-colors { width: 240px; font-weight: 500; color: var(--ink-2); }
.hm-res-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-res-dots a { width: 44px; height: 44px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); }

/* paleta do dia + paletas */
.hm-pals { display: grid; gap: var(--sp-xl); }
@media (min-width: 1000px) { .hm-pals { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--sp-2xl); align-items: start; } }
.hm-day-sw { display: flex; height: clamp(160px, 30vw, 260px); border-radius: 16px 18px 16px 14px; overflow: hidden; }
.hm-day-sw button { flex: 1; min-width: 0; border: 0; padding: 10px 6px; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; font: 700 .78rem var(--font); transition: flex .3s var(--ease); }
.hm-day-sw button span { opacity: 0; transition: opacity .2s; }
.hm-day-sw button:hover, .hm-day-sw button:focus-visible { flex: 1.8; }
.hm-day-sw button:hover span, .hm-day-sw button:focus-visible span { opacity: 1; }
@media (hover: none) { .hm-day-sw button span { opacity: 1; font-size: .66rem; } }
.hm-day-meta { display: grid; gap: 8px; margin-top: 14px; }
.hm-day-name { font-weight: 750; font-size: 1.2rem; text-decoration: none; }
.hm-day-name:hover { text-decoration: underline; }
.hm-day-meta p { margin: 0; color: var(--ink-2); max-width: 52ch; }

.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.pcard { min-width: 0; border-radius: 12px 14px 12px 10px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); overflow: hidden; transition: box-shadow .15s, transform .15s var(--ease); }
.pcard:hover { box-shadow: var(--lift); transform: translateY(-2px); }
.pcard-sw { display: grid; grid-auto-flow: column; height: 72px; }
.pcard-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 2px 4px 2px 10px; min-height: 48px; }
.pcard-name { font-weight: 600; font-size: .88rem; line-height: 1.25; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pcard-act { display: flex; flex: none; }
.ic-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; }
.ic-btn:hover { background: var(--soft); color: var(--ink); }
@media (hover: hover) and (min-width: 700px) {
  .pcard .pcard-act { opacity: 0; transition: opacity .15s; }
  .pcard:hover .pcard-act, .pcard:focus-within .pcard-act { opacity: 1; }
}

/* temas */
.hm .tm-cards { margin-top: 0; }
@media (min-width: 900px) { .hm .tm-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* teste */
.hm-test { display: grid; gap: var(--sp-xl); padding: var(--sp-lg); border-radius: 18px 20px 18px 16px; background: var(--soft); }
@media (min-width: 900px) { .hm-test { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--sp-2xl); padding: var(--sp-2xl); align-items: center; } }
.hm-test-text { display: grid; gap: 12px; align-content: start; }
.hm-test-text .h2, .hm-test-text p { margin: 0; }
.hm-test-text .muted { max-width: 58ch; }
.hm-spec { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 4px 0; }
.hm-spec li { display: grid; }
.hm-spec b { font-weight: 800; font-size: 1.15rem; }
.hm-spec span { font-size: .82rem; color: var(--ink-2); }
.hm-test-try .teaser { border-radius: 14px; }
.hm-test-try .teaser-grid button { border-radius: 4px; }
.hm-cert { margin-top: var(--sp-xl); max-width: 760px; }

/* artigos */
.hm-articles { display: grid; gap: 10px; }
@media (min-width: 700px) { .hm-articles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .hm-articles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hm-art { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px 12px 14px 16px; box-shadow: 0 0 0 1px var(--line); text-decoration: none; }
.hm-art:hover { box-shadow: var(--lift); }
.hm-art b { font-weight: 700; }
.hm-art span { font-size: .88rem; color: var(--ink-2); line-height: 1.4; }

/* dúvidas */
.hm-faq { max-width: 860px; }
.hm-faq .h2 { margin-bottom: 10px; }

.hm-day-sw button, .pcard-sw i, .hm-tool-strip i, .hm-res-sw i { min-width: 0; }
.hm-tool.is-soon { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.hm-tool.is-soon:hover { transform: none; box-shadow: inset 0 0 0 1px var(--line); }

/* ações do cartão por cima das cores, para o nome ficar com a largura toda */
.pcard { position: relative; }
.pcard-meta { padding: 8px 10px; min-height: 0; }
.pcard-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pcard-act { position: absolute; top: 14px; right: 6px; gap: 4px; }
.pcard-act .ic-btn { background: var(--paper); color: var(--ink); box-shadow: 0 2px 8px rgb(0 0 0 / .18); }
.pcard-act .ic-btn:hover { background: var(--soft); }
.hm-test-try { width: 100%; max-width: 380px; justify-self: center; }
.hm-cert { max-width: 560px; }
/* no toque, o cartão abre a página da paleta, que tem todas as ações */
@media (hover: none) { .pcard-act { display: none; } }
.hm-tool-all { align-content: center; background: transparent; box-shadow: inset 0 0 0 1px var(--field); }
.hm-tool-all b::after { content: ' →'; }
@media (max-width: 699px) { .hm-tools .hm-tool:nth-child(n+6):not(.hm-tool-all) { display: none; } }
