/* ferramentas.css — as três ferramentas grátis (calendário de escala, escala do casal, contador de namoro). Página clara, como as legais:
   título grande, um cartão branco com a ferramenta, o texto em coluna de leitura, a faixa escura do app no fim. Depende do site.css
   (tokens, barra, botões, rodapé) e carrega depois dele. Cores de estado com texto escuro por cima (contraste AA medido no teste),
   e nenhuma informação só pela cor: cada dia tem o texto dele para o leitor de tela e a legenda explica as marcas. */
.ferramenta { padding-top: calc(var(--nav-h) + clamp(22px, 4vw, 44px)); background: var(--cinza-claro); color: var(--texto); }
.ferr-dentro { max-width: 1120px; margin: 0 auto; padding: 0 22px clamp(56px, 8vw, 96px); }

/* ---- migalha e topo ---- */
.migalha ol { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; color: var(--texto-2); }
.migalha li + li::before { content: "›"; margin-right: 8px; color: #8e8e93; }
.migalha a { color: var(--acento); text-decoration: none; } .migalha a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ferr-topo { max-width: 820px; }
.ferr-kicker { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: var(--acento); letter-spacing: -0.01em; }
.ferr-topo h1 { margin: 0; font-size: clamp(36px, 5.4vw, 60px); line-height: 1.05; font-weight: 600; letter-spacing: -0.032em; text-wrap: balance; }
.ferr-lead { margin: 16px 0 0; font-size: clamp(18px, 1.9vw, 21px); line-height: 1.45; color: var(--texto-2); text-wrap: pretty; }

/* ---- o cartão da ferramenta ---- */
.ferr-caixa { margin-top: clamp(24px, 4vw, 40px); background: #fff; border-radius: 28px; padding: clamp(18px, 3vw, 32px); overflow-wrap: break-word;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 18px 40px -24px rgb(0 0 0 / .28); }
.ferr-caixa .campo { display: grid; gap: 6px; min-width: 0; align-content: start; }
.ferr-caixa label, .ferr-caixa .rotulo { font-size: 14px; font-weight: 600; color: #3a3a3f; }
.ferr-caixa small, .campo-semana { font-size: 13px; line-height: 1.4; color: var(--texto-2); margin: 0; }
.ferr-caixa select, .ferr-caixa input[type="date"], .ferr-caixa input[type="time"], .ferr-caixa input[type="number"] {
  font: inherit; font-size: 16px; color: var(--texto); background: #fff; height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid #c7c7cc;
  box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; margin: 0; letter-spacing: 0; }
/* Data e hora SEM a aparência nativa. No iPhone, input date/time tem aparência automática "menulist-button" (RenderTheme.cpp,
   autoAppearanceForElement) e o tema do iOS passa por cima deste CSS quando a largura não é um número fixo (width:100% não é):
   box-sizing vira content-box e min-width vira a largura da data mais larga do idioma (RenderThemeIOS.mm adjustInputElementButtonStyle e
   RenderThemeCocoa.mm ...ForVectorBasedControls, o caminho do iOS 26+). Resultado no aparelho: 100% + 24 px de padding + 2 px de borda,
   o campo passava 26 px da coluna — a data saía do cartão e o primeiro horário cobria o traço e o segundo. Com appearance:none o
   RenderTheme::adjustStyle sai antes de qualquer ajuste, e valem o border-box, o min-width:0 e o padding daqui. O toque continua abrindo
   a roda de data/hora do iOS (a aparência só muda o desenho). Prova: scripts/teste-ferramentas-celular.mjs. */
.ferr-caixa input[type="date"], .ferr-caixa input[type="time"] { -webkit-appearance: none; appearance: none; text-align: start; }
/* o valor: o iOS centraliza (::-webkit-date-and-time-value { text-align: center }) e o Android antigo põe 24 px de margem à direita */
.ferr-caixa input::-webkit-date-and-time-value { text-align: start; margin: 0; min-width: 0; }
.ferr-caixa select { padding-right: 34px; -webkit-appearance: none; appearance: none; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f5f64' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; }
.ferr-caixa select:focus-visible, .ferr-caixa input:focus-visible { outline: 3px solid #0a6cff; outline-offset: 1px; border-color: #0a6cff; }
.ferr-caixa [hidden] { display: none !important; }
.horas { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; color: var(--texto-2); }

/* uma coluna que nunca passa do cartão: um filho largo (um botão de texto comprido) não alarga a grade inteira */
.esc-form { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.esc-pessoa { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.esc-pessoa legend { padding: 0; margin: 0 0 12px; font-size: 17px; font-weight: 600; letter-spacing: -0.012em; display: flex; align-items: center; gap: 8px; }
.esc-pessoa legend::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: #f8756d; }
.esc-pessoa[data-p="2"] legend::before { background: #3b6fd8; }
.campo-livre { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; display: grid; }
.campo-livre > div { display: grid; gap: 6px; min-width: 0; }
.esc-geral { display: flex; flex-wrap: wrap; align-items: end; gap: 14px 22px; padding-top: 18px; border-top: 1px solid #e5e5ea; min-width: 0; }
.esc-geral > * { min-width: 0; max-width: 100%; }
/* os botões do cartão quebram a linha em vez de passar da borda (o .botao do site é nowrap) */
.ferr-caixa .botao { white-space: normal; text-align: center; line-height: 1.25; padding-top: 10px; padding-bottom: 10px; max-width: 100%; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: #e9e9ee; gap: 2px; }
.seg button { border: 0; background: transparent; min-height: 40px; min-width: 72px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 15px; cursor: pointer; color: #3a3a3f; }
.seg button[aria-checked="true"] { background: #fff; color: var(--texto); box-shadow: 0 1px 4px rgb(0 0 0 / .18); }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500 !important; font-size: 15px !important; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: #b93d0a; margin: 0; }
.esc-par { margin-left: auto; }

/* ---- a saída: resumo, legenda, o ano ---- */
.esc-saida { margin-top: 26px; }
.cal-res { margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 136px), 1fr)); }
.cal-res > div { background: #f5f5f7; border-radius: 16px; padding: 12px 14px; min-height: 76px; min-width: 0; }
.cal-res dt { font-size: 13px; color: var(--texto-2); font-weight: 500; }
.cal-res dd { margin: 4px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.cal-legenda { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: #3a3a3f; }
.cal-legenda li { display: inline-flex; align-items: center; gap: 7px; }
.cal-legenda i { width: 16px; height: 16px; border-radius: 5px; background: #fff; box-shadow: inset 0 0 0 1px #c7c7cc; position: relative; }
.lg-trab i { background: #ffe1d2; box-shadow: inset 0 -3px 0 #e8603a; }
.lg-noite i { background: #e2e3fb; box-shadow: inset 0 -3px 0 #5a55d6; }
.lg-eu i { background: #fff; box-shadow: inset 0 0 0 1px #c7c7cc, inset 0 -4px 0 #e8603a; }
.lg-par i { background: #fff; box-shadow: inset 0 0 0 1px #c7c7cc, inset 0 -4px 0 #3b6fd8; }
.lg-juntos i { background: #ffe7a3; box-shadow: none; }
.lg-fer i::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: #c2185b; }
.lg-hj i { box-shadow: inset 0 0 0 2px #1d1d1f; }

.cal-ano { margin-top: 22px; display: grid; gap: 26px 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 292px), 1fr)); }
.cal-mes-tit { margin: 0 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -0.012em; }
.cal-mes-tit span { color: var(--texto-2); font-weight: 500; }
.cal-tab { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 3px; margin: 0 -3px; width: calc(100% + 6px); }
.cal-tab th { font-size: 12px; font-weight: 600; color: var(--texto-2); padding: 0 0 2px; text-align: center; }
.cal-tab td { height: 38px; padding: 0; text-align: center; vertical-align: middle; border-radius: 10px; font-size: 14px; position: relative; color: var(--texto); }
.cal-tab td.d { background: #fafafa; }
.cal-tab .n { position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.cal-tab .fds .n { font-weight: 600; }
.cal-tab td.t1 { background: #ffe1d2; box-shadow: inset 0 -3px 0 #e8603a; }
.cal-tab td.n1 { background: #e2e3fb; box-shadow: inset 0 -3px 0 #5a55d6; }
.cal-tab .fer::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: #c2185b; }
.cal-tab .hj { outline: 2px solid #1d1d1f; outline-offset: -2px; }
.cal-mes-res { margin: 6px 0 0; font-size: 13px; color: var(--texto-2); }

/* o casal: as duas barrinhas dizem quem trabalha; o dourado é a folga dos dois */
.cal-casal td.t1, .cal-casal td.n1 { background: #fafafa; box-shadow: none; }
.cal-tab .bs { position: absolute; left: 5px; right: 5px; bottom: 4px; display: flex; gap: 3px; }
.cal-tab .bs i { flex: 1; height: 4px; border-radius: 2px; background: transparent; }
.cal-tab .t1 .bs i:first-child, .cal-tab .n1 .bs i:first-child { background: #e8603a; }
.cal-tab .t2 .bs i:last-child, .cal-tab .n2 .bs i:last-child { background: #3b6fd8; }
.cal-tab .n1 .bs i:first-child { background: #5a55d6; }
.cal-tab td.jt { background: #ffe7a3; font-weight: 600; }
.cal-tab .jt .bs { display: none; }

.esc-nota { margin: 18px 0 0; font-size: 13px; line-height: 1.5; color: var(--texto-2); }
.esc-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.esc-acoes .botao { font-size: 15px; }

/* ---- o contador de namoro ---- */
.nam-form .campo { max-width: 340px; }
.nam-form input[type="date"] { height: 52px; font-size: 18px; }
.nam-vazio { margin: 18px 0 0; color: var(--texto-2); font-size: 16px; }
.nam-saida { margin-top: 22px; }
.nam-grande { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.nam-grande strong { font-size: clamp(56px, 11vw, 104px); line-height: 1; font-weight: 700; letter-spacing: -0.045em; color: var(--acento); font-variant-numeric: tabular-nums; }
.nam-grande span { font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; letter-spacing: -0.02em; }
.nam-detalhe { margin: 10px 0 0; font-size: 17px; color: #3a3a3f; }
.nam-res { margin-top: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.nam-res dd { font-size: 17px; line-height: 1.4; letter-spacing: -0.01em; }
.nam-sub { margin: 28px 0 10px; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.nam-marcos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nam-marcos li { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 10px 14px; border-radius: 14px; background: #fff4e6; }
.nam-marcos li.passou { background: #f5f5f7; }
.nam-marcos span { color: #3a3a3f; }
#nam-tabela tr.futuro th, #nam-tabela tr.futuro td { color: var(--texto-2); font-weight: 400; }

/* ---- tabelas de texto ---- */
.ferr-tabela { margin: 18px 0 0; overflow-x: auto; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .07); }
.ferr-tabela.estreita { max-width: 620px; }
.ferr-tabela table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.ferr-tabela th, .ferr-tabela td { padding: 11px 16px; text-align: left; vertical-align: top; border-top: 1px solid #e6e6eb; }
.ferr-tabela thead th { border-top: 0; background: #efeff3; font-weight: 600; font-size: 14px; color: #3a3a3f; }
.ferr-tabela tbody th { font-weight: 600; }
.ferr-tabela td { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* a tabela do contador mora dentro do cartão: a data longa ("terça-feira, 30 de abril de 2024") quebra a linha em vez de empurrar a
   coluna dos dias para uma rolagem lateral escondida; o tempo e o número de dias ficam inteiros, os dias à direita */
.ferr-caixa .ferr-tabela td { white-space: normal; }
.ferr-caixa .ferr-tabela tbody th, .ferr-caixa .ferr-tabela td:last-child { white-space: nowrap; }
.ferr-caixa .ferr-tabela td:last-child, .ferr-caixa .ferr-tabela thead th:last-child { text-align: right; }

/* ---- texto, perguntas, fontes, outras ---- */
.ferr-texto { max-width: 760px; margin-top: clamp(48px, 7vw, 80px); }
.ferr-texto h2, .ferr-fontes h2, .ferr-outras h2 { margin: 0 0 14px; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -0.026em; text-wrap: balance; }
.ferr-texto h3 { margin: 26px 0 8px; font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
.ferr-texto p { margin: 0 0 14px; font-size: 17px; line-height: 1.62; color: #3a3a3f; text-wrap: pretty; }
.ferr-texto a, .ferr-faq a { color: var(--acento); text-underline-offset: 3px; }
.ferramenta .faq { margin-top: 10px; border-top: 1px solid var(--linha); }
.ferramenta .faq details { border-bottom: 1px solid var(--linha); }
.ferramenta .faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.ferramenta .faq summary::-webkit-details-marker { display: none; }
.ferramenta .faq summary i { flex: none; width: 22px; height: 22px; position: relative; }
.ferramenta .faq summary i::before, .ferramenta .faq summary i::after { content: ""; position: absolute; left: 3px; right: 3px; top: 10px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--saida); }
.ferramenta .faq summary i::after { transform: rotate(90deg); }
.ferramenta .faq details[open] summary i::after { transform: rotate(0deg); }
.ferramenta .resposta { padding: 0 0 22px; }
.ferramenta .resposta p { margin: 0; font-size: 17px; line-height: 1.55; color: #3a3a3f; }
.ferr-fontes { max-width: 760px; margin-top: clamp(40px, 6vw, 64px); }
.ferr-fontes h2 { font-size: 21px; letter-spacing: -0.015em; }
.ferr-fontes ul { margin: 0; padding-left: 1.2em; font-size: 15px; line-height: 1.55; color: var(--texto-2); }
.ferr-fontes li { margin-bottom: 6px; }
.ferr-fontes a { color: var(--acento); text-underline-offset: 3px; overflow-wrap: anywhere; }
.ferr-outras { margin-top: clamp(48px, 7vw, 80px); }
.ferr-outras ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.ferr-outras a { display: grid; gap: 6px; height: 100%; padding: 20px 22px; border-radius: 22px; background: #fff; text-decoration: none; box-shadow: 0 0 0 1px rgb(0 0 0 / .06); transition: box-shadow .2s, transform .2s var(--mola); }
.ferr-outras a:hover { box-shadow: 0 0 0 1px rgb(0 0 0 / .1), 0 14px 30px -18px rgb(0 0 0 / .3); transform: translateY(-2px); }
.ferr-outras strong { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; color: var(--acento); }
.ferr-outras span { font-size: 15px; color: var(--texto-2); }

/* ---- a faixa do app ---- */
.ferr-cta { padding: clamp(64px, 9vw, 110px) 22px; text-align: center; }
.ferr-cta-dentro { max-width: 680px; margin: 0 auto; display: grid; justify-items: center; gap: 14px; }
.ferr-cta img { width: 64px; height: 64px; border-radius: 22.5%; }
.ferr-cta h2 { margin: 6px 0 0; font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.ferr-cta p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--texto-escuro-2); text-wrap: pretty; }
.ferr-cta .acoes { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 18px; margin-top: 12px; }

@media (max-width: 899px) { .esc-par { margin-left: 0; } }
/* no celular, o botão do par ocupa a linha inteira e as ações viram botões de largura total, um por linha (dois por linha quando cabem
   sem quebrar o texto: "Baixar para a agenda (.ics)" pede uns 240 px) */
@media (max-width: 560px) {
  .esc-par { width: 100%; padding-left: 16px; padding-right: 16px; }
  .esc-acoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
  .esc-acoes .botao { width: 100%; padding-left: 14px; padding-right: 14px; }
  .nam-form .campo { max-width: none; }
  .ferr-tabela th, .ferr-tabela td { padding: 10px 12px; }
}
/* o resumo do casal tem 5 blocos; com duas colunas (até ~500 px), a "próxima folga em comum" (uma data por extenso) ganha a linha
   inteira: 2 + 1 + 2, sem a data espremida em meia coluna e sem bloco órfão no fim */
@media (max-width: 500px) { .esc-saida:has(.cal-casal) .cal-res > div:nth-child(3) { grid-column: 1 / -1; } }
@media (max-width: 420px) {
  .ferr-dentro { padding-left: 16px; padding-right: 16px; }
  .ferr-caixa { padding: 16px 12px; border-radius: 22px; }
  .cal-tab td { height: 36px; font-size: 13px; }
  .cal-res dd { font-size: 19px; }
}

/* ---- impressão: o ano numa folha deitada, com o título, o resumo e a legenda ---- */
@media print {
  @page { size: A4 landscape; margin: 9mm; }
  .nav, .gaveta, .rodape, .migalha, .ferr-lead, .ferr-kicker, .esc-form, .esc-acoes, .ferr-texto, .ferr-faq, .ferr-fontes, .ferr-outras, .ferr-cta, .pular-ao-conteudo, .esc-nota { display: none !important; }
  body, .ferramenta { background: #fff !important; }
  .ferramenta { padding-top: 0; }
  .ferr-dentro { padding: 0; max-width: none; }
  .ferr-topo h1 { font-size: 20px; }
  .ferr-caixa { box-shadow: none; padding: 0; margin-top: 6px; border-radius: 0; }
  .esc-saida { margin-top: 6px; }
  .cal-res { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .cal-res > div { min-height: 0; padding: 4px 8px; }
  .cal-res dd { font-size: 14px; }
  .cal-legenda { margin-top: 6px; font-size: 10px; }
  .cal-ano { grid-template-columns: repeat(6, 1fr); gap: 8px 10px; margin-top: 8px; }
  .cal-mes-tit { font-size: 11px; margin-bottom: 2px; }
  .cal-tab { border-spacing: 1px; }
  .cal-tab th { font-size: 8px; }
  .cal-tab td { height: 17px; font-size: 9px; border-radius: 3px; }
  .cal-mes-res { font-size: 8px; margin-top: 2px; }
  .cal-tab .bs { bottom: 1px; left: 2px; right: 2px; } .cal-tab .bs i { height: 2px; }
  .cal-tab .fer::after { width: 3px; height: 3px; top: 1px; right: 1px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.esc-saida-tit { margin: 0 0 14px; font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; letter-spacing: -0.022em; line-height: 1.2; }
@media print { .esc-saida-tit { font-size: 13px; margin: 0 0 4px; } }
/* a sexta linha vazia (mês que cabe em cinco semanas) não ocupa espaço; a marcação continua com 6 linhas (igual no build e no script) */
.cal-tab tbody tr:not(:has(td.d)) { display: none; }

/* páginas de escala (escalas.py, 21/11/2026): as duas voltas do ciclo, a tabela mês a mês e o texto da lista */
.esc-ciclo { margin: clamp(28px, 4vw, 40px) 0 0; }
.esc-ciclo ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 520px; }
.esc-ciclo li { height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--texto-2); background: #fafafa; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .05); }
.esc-ciclo .cic-t { background: #ffe1d2; box-shadow: inset 0 -3px 0 #e8603a; color: #1d1d1f; }
.esc-ciclo .cic-n { background: #e2e3fb; box-shadow: inset 0 -3px 0 #5a55d6; color: #1d1d1f; }
.esc-ciclo figcaption { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--texto-2); }
.esc-mes td small { display: block; font-size: 12.5px; color: var(--texto-2); }
.esc-mes tr.total th, .esc-mes tr.total td { font-weight: 600; }
.ferr-outras-texto { margin: -4px 0 18px; color: var(--texto-2); max-width: 640px; }
