/* Geist, a mesma fonte do app, servida daqui (sem Google Fonts) */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* Page CSS do site do Tributox: só o que fica dentro de um visual e o kit não tem (references/system.md). */

/* o logo do cliente: o "Tx" do app, um quadrado preto de cantos redondos */
.logo-tx { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 8px;
  background: var(--p-ink); color: var(--p-bg); font: 700 14px/1 var(--font-text); letter-spacing: -0.04em; }
.logo-tx--sm { width: 16px; height: 16px; margin-right: 0; border-radius: 4px; font-size: 9px; }
.ground-inverse .logo-tx { background: var(--p-inv-ink); color: var(--p-inv-bg); }

/* pílulas: filmes curtos do próprio produto (HyperFrames e Remotion), mudos e em loop */
.pilula-frame { position: relative; overflow: hidden; background: var(--p-bg); }
.pilula-frame > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero__media.pilula-frame > video { object-fit: cover; object-position: 50% 50%; }
.frame.pilula-frame { aspect-ratio: 4 / 3; }
.pilula-frame--dark { background: #0a0a0a; }
[data-moment="pinned-chapters"] .mo-pc__visual > video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
[data-moment="pinned-chapters"].is-live .mo-pc__visual > video { height: 100%; aspect-ratio: auto; }
@media (min-width: 640px) { [data-moment="pinned-chapters"]:not(.is-live) .mo-pc__visual > video { max-height: 30svh; } }
@media (max-width: 639px) { [data-moment="pinned-chapters"]:not(.is-live) .mo-pc__visual > video { max-height: 23svh; } }

/* listas de fatos curtos ao lado de um visual */
.facts { list-style: none; margin-inline: 0; margin-bottom: 0; padding: 0; display: grid; gap: var(--s-3); }

/* app-frame (sections-library.md, app-frame): a lista ao lado da nota aberta, numa janela só */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}

/* a nota aberta: o desenho da tela de nota do app, em HTML */
.nota { font-size: 13px; line-height: 1.45; color: var(--u-ink); }
.nota__bar { display: flex; align-items: center; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--u-line); background: var(--u-fill); color: var(--u-muted); }
.nota__back::before { content: "← "; }
.nota__btn { height: 26px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--u-line-2); background: var(--u-bg); color: var(--u-ink); font-weight: 500; }
.nota__body { padding: 18px 22px 24px; display: grid; gap: 12px; }
.nota__head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.nota__title { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.nota__meta { margin: 2px 0 0; color: var(--u-muted); font-family: var(--font-mono); font-size: 13px; }
.nota__chip { flex: none; height: 24px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 999px; font-weight: 500; }
.nota__chip--bad { background: #fdecec; color: #9b1c1c; }
.nota__alert { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fdecec; color: #9b1c1c; }
.nota__sig { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #cfd6c9; color: #1c2a20; }
.nota__sig b { display: block; font-weight: 600; }
.nota__sig small { display: block; font-size: 13px; color: #34433a; }
.nota__shield { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #f7f8f6; }
.nota__shield svg { width: 16px; height: 16px; fill: none; stroke: #1f4e5a; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.nota__calc { margin-left: auto; flex: none; height: 24px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px dashed #8a958a; font-family: var(--font-mono); font-size: 13px; }
.nota__item { margin: 4px 0 0; font-weight: 600; }
.nota__item small { display: block; font-weight: 400; color: var(--u-muted); font-family: var(--font-mono); font-size: 13px; }
.nota__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.nota__table th { font-weight: 400; color: var(--u-muted); text-align: right; padding: 6px 0; border-bottom: 1px solid var(--u-line); }
.nota__table td { text-align: right; padding: 8px 0; border-bottom: 1px solid var(--u-line); font-family: var(--font-mono); }
.nota__table :is(th, td):first-child { text-align: left; font-family: var(--font-text); }
.nota__table tr.is-bad td { background: #fdecec; }
.nota__table tr.is-bad td:last-child { color: #9b1c1c; font-weight: 600; }
.nota__memo-h { margin: 6px 0 0; color: var(--u-muted); }
.nota__memo { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--u-fill); font-family: var(--font-mono); font-size: 13px; color: var(--u-muted); }
@media (max-width: 639px) { .nota__calc { display: none; } .nota__body { padding: 14px 14px 20px; } }

/* recursos: quatro telas pequenas do app, em HTML, dentro dos painéis */
#recursos .panel { --p-h: 300px; }
.panel--mini { display: flex; align-items: flex-start; justify-content: center; padding: 28px 28px 0; background: color-mix(in oklab, var(--p-accent) 8%, var(--p-bg)); overflow: hidden; }
.mini { width: 100%; max-width: 460px; background: #fff; border: 1px solid #e4e4e7; border-radius: 14px 14px 0 0; border-bottom: 0; padding: 18px 20px 28px; font-size: 14px; line-height: 1.45; color: #0a0a0a; display: grid; gap: 10px; min-height: calc(var(--p-h) - 28px); align-content: start; }
.mini__label { margin: 0; font-size: 13px; color: #52525b; }
.mini__alert { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: #fcf4d6; color: #6b4a00; }
.mini__alert b, .mini__linha b, .mini__file b { display: block; font-weight: 500; }
.mini__alert small, .mini__linha small, .mini__file small { display: block; font-size: 13px; color: #52525b; }
.mini__dot { width: 8px; height: 8px; border-radius: 50%; background: #b7791f; }
.mini__dot--ok { background: #1f4e5a; margin-top: 6px; align-self: start; }
.mini__btn { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 8px; background: #0a0a0a; color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; }
.mini__btn--line { justify-self: start; background: #1f4e5a; color: #fff; }
.mini__row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f1f2; }
.mini__row b { font-family: var(--font-mono); font-weight: 500; }
.mini__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini__table th { font-weight: 400; color: #52525b; text-align: right; padding: 6px 0; border-bottom: 1px solid #e4e4e7; }
.mini__table td { text-align: right; padding: 9px 0; border-bottom: 1px solid #f1f1f2; font-family: var(--font-mono); }
.mini__table :is(th, td):first-child { text-align: left; font-family: var(--font-text); }
.mini__file { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #e4e4e7; border-radius: 10px; }
.mini__ext { width: 44px; height: 36px; display: grid; place-items: center; border-radius: 8px; font: 600 12px/1 var(--font-mono); color: #fff; }
.mini__ext--csv { background: #1f4e5a; }
.mini__ext--xlsx { background: #107c41; }
.mini__total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 10px; background: #0a0a0a; color: #f2f2f0; }
.mini__total b { font-family: var(--font-mono); font-weight: 500; font-size: 18px; }
.mini__chave { margin: 0; font-family: var(--font-mono); font-size: 14px; line-height: 1.6; word-spacing: 2px; }
.mini__linha { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
@media (max-width: 639px) { #recursos .panel { --p-h: 236px; } .panel--mini { padding: 16px 16px 0; } .mini__alert { grid-template-columns: auto 1fr; } .mini__alert .mini__btn { display: none; } }

/* a afirmação: o cálculo é da Receita (liquid-type) e três números da própria calculadora */
.statement { display: grid; align-content: start; gap: var(--s-8); }
.statement__head { max-width: none; }
.statement__head .mo-lt__type { font-size: clamp(48px, 6.6vw, 104px); line-height: 1; letter-spacing: var(--display-tracking-xl); max-width: 16ch; }
.statement__head .t-lead { max-width: 52ch; margin-top: var(--s-5); }
.statement__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin: 0; }
.statement__facts > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--s-2); }
.statement__facts dd { margin: 0; font: var(--display-weight) var(--t-stat)/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.statement__facts dt { color: var(--muted); font-size: var(--t-small); }
.statement__note { margin: 0; max-width: 62ch; color: var(--ink); }
@media (max-width: 639px) { .statement__facts { grid-template-columns: 1fr; gap: var(--s-4); } .statement { gap: var(--s-6); } }

/* planos: os três cartões alinhados linha a linha */
@media (min-width: 1024px) { .plans > .card--plan { display: grid; grid-template-rows: subgrid; grid-row: span 5; } }
.card--plan .price { margin: 0; flex-wrap: wrap; }
.card--plan .price .t-stat { white-space: nowrap; }
.card--plan > p { margin: 0; }

/* títulos sem hifenização automática: "NF-e" e "calculadora" nunca quebram no meio */
:is(h1, h2, h3) { hyphens: manual; -webkit-hyphens: manual; }
/* nos passos fixos o quadro é 4:3 como o filme, mas pode ficar mais baixo: o filme inteiro, nunca cortado */
[data-moment="pinned-chapters"].is-live .mo-pc__visual { background: var(--p-bg); }
[data-moment="pinned-chapters"].is-live .mo-pc__visual > video { object-fit: contain; }

/* calculadora: o diagrama ocupa a altura da tela ao lado do texto */
@media (min-width: 1024px) { #calculadora .frame--split { --ratio: 116%; } }
/* passos fixos: o texto começa na mesma altura das outras seções (--padt), não no meio da tela */
main #como-funciona[data-moment].is-live > .mo-pc__grid { align-content: start; padding-top: var(--padt); }
/* diagrama compacto (celular): a legenda mede o próprio texto, não a largura do ícone */
.dg[data-tier="c"] .dg-cap { width: max-content; }
/* plano em destaque: o selo fica no canto, fora do título */
.card--plan { position: relative; }
.plan__badge { position: absolute; top: var(--s-5); right: var(--s-5); }
/* rodapé: links legais lado a lado */
.legal__links { display: inline-flex; flex-wrap: wrap; gap: var(--s-4); }
/* telas muito estreitas: o menu fica com o botão de abrir; o teste grátis segue no topo da página */
@media (max-width: 359px) { .nav__actions .btn--primary { display: none; } }
/* celular: os recursos e os planos cabem em duas telas (o texto do cartão sai; o porte de cada plano já está na lista) */
@media (max-width: 639px) {
  #recursos .card > p { display: none; }
  .card--plan > p.muted { display: none; }
  main > #como-funciona[data-moment]:not(.is-live) { min-height: 200svh; }
}
/* celular e telas baixas (notebook de 768px de altura): as telinhas dos recursos mostram só o essencial */
@media (max-width: 639px), (max-width: 1279px) and (max-height: 820px) {
  #recursos .panel { --p-h: 176px; }
  #recursos .mini { padding-bottom: 16px; }
  .mini__table tbody tr:nth-child(n+4) { display: none; }
}
@media (min-width: 640px) and (max-width: 1279px) and (max-height: 820px) { #recursos h2 .muted { display: none; } }
@media (max-width: 639px) {
  .mini--aviso .mini__row:nth-of-type(n+2), .mini__table tbody tr:nth-child(n+3), .mini--arquivos .mini__total, .mini__linha + .mini__linha { display: none; }
}
/* tablet em pé: os três planos lado a lado, numa tela só */
@media (min-width: 640px) and (max-width: 1023px) {
  .grid.plans > .card--plan { grid-column: span 4; }
  .card--plan .btn { padding-inline: 12px; }
  .plan__badge { position: static; justify-self: start; align-self: start; }
}
/* notebook estreito (1024 a 1199): o menu do meio fica com três links para não encostar em "Entrar" */
@media (min-width: 1024px) and (max-width: 1199px) {
  .nav__links > .nav__item:is(:nth-of-type(2), :nth-of-type(5)) { display: none; }
}
/* a telinha do app desce até o fim do painel, mesmo quando o vizinho é mais alto */
.panel--mini > .mini { align-self: stretch; }
