/* Leitura e assinatura do Termo de Conduta no Portal do Prestador.
   Identidade visual do Guia Rápido do Intérprete: azul, laranja e dourado. */
#portal-termo-screen {
  --tm-azul: #17245e;
  --tm-noite: #0c1428;
  --tm-laranja: #ff7f1a;
  --tm-ouro: #c9a85c;
  --tm-texto: #1d2433;
  --tm-suave: #5d6678;
  --tm-linha: #dde1ec;
  --tm-fundo: #eef0f6;
  min-height: 100vh;
  background: var(--tm-fundo);
  color: var(--tm-texto);
  font-size: 15.5px;
  line-height: 1.65;
  text-align: left;
}
#portal-termo-screen * { box-sizing: border-box; }

.tm-topo { position: sticky; top: 0; z-index: 20; background: #fff; box-shadow: 0 1px 8px rgba(12, 20, 40, .08); padding-top: env(safe-area-inset-top); }
.tm-topo-linha { display: flex; align-items: center; gap: 10px; max-width: 860px; margin: 0 auto; padding: 10px 14px; }
.tm-topo-linha img { height: 36px; width: auto; }
.tm-topo-titulo { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tm-topo-titulo strong { color: var(--tm-azul); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-topo-titulo span { color: var(--tm-suave); font-size: 11.5px; }
.tm-relogio { background: var(--tm-azul); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-relogio.pronto { background: #1f7a4d; }
.tm-sair { background: none; border: 1px solid var(--tm-linha); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 12.5px; color: var(--tm-suave); cursor: pointer; }
/* Ouvir o termo */
.tm-fone { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; border: 1.5px solid var(--tm-laranja); background: #fff; color: var(--tm-azul); cursor: pointer; padding: 0; }
.tm-fone.ativo { background: var(--tm-laranja); color: #1b1004; }
.tm-ouvir { display: inline-flex; align-items: center; gap: 10px; background: var(--tm-laranja); color: #1b1004; border: 0; border-radius: 12px; padding: 10px 16px; margin: 0 0 14px; font: inherit; font-weight: 700; line-height: 1.25; text-align: left; cursor: pointer; }
.tm-ouvir small { display: block; font-weight: 500; font-size: 11.5px; }
.tm-ouvir small:empty { display: none; }
.tm-player { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 860px; margin: 0 auto; padding: 0 14px 10px; }
.tm-player[hidden] { display: none; }
.tm-player audio { flex: 1; min-width: 0; height: 40px; }
.tm-fechar-audio { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--tm-linha); background: none; color: var(--tm-suave); cursor: pointer; font: inherit; }
.tm-player .tm-erro { flex-basis: 100%; margin: 0; font-size: 12.5px; }
.tm-player .tm-erro:empty { display: none; }

.tm-progresso { height: 3px; background: var(--tm-linha); }
.tm-progresso div { height: 100%; width: 0; background: var(--tm-laranja); }

.tm-pagina { max-width: 860px; margin: 0 auto; padding: 16px 12px 60px; }
.tm-capa { background: var(--tm-azul); color: #fff; border-radius: 16px; padding: 26px 24px; }
.tm-olho { color: var(--tm-ouro); text-transform: uppercase; letter-spacing: 1.6px; font-size: 11.5px; font-weight: 700; }
.tm-capa h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 27px; line-height: 1.2; margin: 6px 0 10px; color: #fff; }
.tm-capa p { margin: 0 0 12px; color: #e4e8f8; }
.tm-meta { font-size: 12px; color: #aeb7dc; }

.tm-indice { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 12px; }
.tm-indice button { flex: 0 0 auto; background: #fff; border: 1px solid var(--tm-linha); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 12.5px; color: var(--tm-azul); cursor: pointer; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-indice .tm-ir-assinar { background: var(--tm-laranja); border-color: var(--tm-laranja); color: #1b1004; font-weight: 700; order: -1; }

.tm-folha { background: #fff; border-radius: 16px; padding: 24px 26px 30px; box-shadow: 0 2px 14px rgba(12, 20, 40, .06); margin-bottom: 16px; overflow-wrap: break-word; }
.tm-titulo-doc { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--tm-suave); margin: 0 0 4px; }
.tm-folha h2.tm-h1 { font-family: Georgia, 'Times New Roman', serif; color: var(--tm-azul); font-size: 21px; line-height: 1.3; margin: 34px 0 12px; padding-top: 18px; border-top: 1px solid var(--tm-linha); }
.tm-titulo-doc + h2.tm-h1, .tm-termo h2.tm-h1 { border-top: 0; margin-top: 8px; padding-top: 0; }
.tm-h2 { color: var(--tm-azul); font-size: 15.5px; margin: 22px 0 8px; }
.tm-folha p { margin: 0 0 12px; }
.tm-folha ul, .tm-folha ol { margin: 0 0 14px; padding-left: 22px; }
.tm-folha li { margin-bottom: 6px; }
.tm-folha li::marker { color: var(--tm-laranja); font-weight: 700; }
.tm-destaque { background: #fff3e8; border-left: 4px solid var(--tm-laranja); border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 4px 0 16px; }

.tm-tabela { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.tm-tabela th, .tm-tabela td { border: 1px solid var(--tm-linha); padding: 9px 11px; text-align: left; vertical-align: top; }
.tm-tabela th { background: #eef1f9; color: var(--tm-azul); }
.tm-colunas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.tm-coluna { border: 1px solid var(--tm-linha); border-radius: 12px; padding: 14px 14px 4px; font-size: 14px; }
.tm-coluna h4 { margin: 0 0 10px; font-size: 13px; color: #fff; background: var(--tm-azul); border-radius: 999px; display: inline-block; padding: 4px 12px; }
.tm-podenao .tm-coluna:first-child { background: #eef1fa; border-color: var(--tm-azul); }
.tm-podenao .tm-coluna:last-child { background: #fff3e8; border-color: var(--tm-laranja); }
.tm-podenao .tm-coluna:last-child h4 { background: var(--tm-laranja); color: #1b1004; }
.tm-papeis .tm-coluna:last-child h4 { background: var(--tm-ouro); color: #201803; }

.tm-linha { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.tm-linha > div { border-radius: 10px; background: #eef1f9; border-top: 4px solid var(--tm-azul); padding: 10px 12px; font-size: 13px; }
.tm-linha > div:last-child { background: #fff3e8; border-top-color: var(--tm-laranja); }
.tm-linha strong { display: block; color: var(--tm-azul); margin-bottom: 3px; }

.tm-folha ul.tm-check { list-style: none; padding-left: 0; }
.tm-check li { position: relative; padding-left: 28px; }
.tm-check li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 13px; height: 13px; border: 1.5px solid var(--tm-azul); border-radius: 3px; }

.tm-fundadores { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 14px; }
.tm-fundadores img { width: 250px; max-width: 100%; border-radius: 14px; }

.tm-termo { border: 2px solid var(--tm-azul); }
.tm-ref { font-size: 12.5px; color: var(--tm-suave); }
.tm-declaracoes { margin: 6px 0 4px; }
.tm-declaracoes label { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--tm-linha); border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; cursor: pointer; font-size: 14.5px; }
.tm-declaracoes input { width: 20px; height: 20px; flex: 0 0 20px; margin: 2px 0 0; accent-color: var(--tm-azul); }
.tm-declaracoes label:has(input:checked) { background: #eef1fa; border-color: var(--tm-azul); }
.tm-link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: #0d63b3; text-decoration: underline; cursor: pointer; }
#tm-marcar { margin-bottom: 16px; }
.tm-campos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 16px; }
.tm-campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tm-campo span, .tm-assinatura-campo span { font-size: 12.5px; font-weight: 700; color: var(--tm-suave); }
.tm-campo input { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1.5px solid #ccd2e0; border-radius: 9px; background: #fff; color: var(--tm-texto); }
.tm-campo input:disabled { background: #f1f2f6; color: var(--tm-suave); }
.tm-campo input:focus { outline: none; border-color: var(--tm-azul); box-shadow: 0 0 0 3px rgba(23, 36, 94, .14); }
.tm-largo { grid-column: 1 / -1; }
.tm-assinatura-campo { display: flex; flex-direction: column; gap: 5px; }
.tm-assinatura-campo input { width: 100%; font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 24px; text-align: center; padding: 22px 14px 14px; border: 1.5px dashed #9aa4c0; border-radius: 12px; background: #fff; color: #111a3a; }
.tm-assinatura-campo input::placeholder { font-size: 16px; color: #8a93a8; }
.tm-assinatura-campo input:focus { outline: none; border-style: solid; border-color: var(--tm-azul); box-shadow: 0 0 0 3px rgba(23, 36, 94, .14); }
.tm-erro { color: #b3261e; font-weight: 600; font-size: 14px; min-height: 22px; margin: 10px 0 4px; }
.tm-assinar { display: block; width: 100%; background: var(--tm-laranja); color: #1b1004; border: 0; border-radius: 12px; padding: 15px; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; font-variant-numeric: tabular-nums; }
.tm-assinar:disabled { background: #d5d9e4; color: #5d6678; cursor: not-allowed; }
.tm-folha p.tm-aviso { font-size: 12.5px; color: var(--tm-suave); text-align: center; margin: 10px 0 0; }
.tm-folha a, .tm-folha button:focus-visible { outline-offset: 2px; }

.tm-feito { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--tm-azul); }
.tm-feito-caixa { background: #fff; border-radius: 18px; padding: 32px 28px; max-width: 420px; width: 100%; text-align: center; }
.tm-selo { width: 66px; height: 66px; border-radius: 50%; background: #e4f4ec; color: #1f7a4d; font-size: 36px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.tm-feito h1 { font-family: Georgia, 'Times New Roman', serif; color: var(--tm-azul); font-size: 24px; margin: 0 0 8px; }
.tm-protocolo { font-size: 12.5px; color: var(--tm-suave); margin-bottom: 20px; }
.tm-secundario { display: block; width: 100%; margin-top: 10px; background: #fff; border: 1.5px solid var(--tm-azul); color: var(--tm-azul); border-radius: 12px; padding: 12px; font: inherit; font-weight: 700; cursor: pointer; }

/* Blocos dentro do Portal (perfil e visão do dono) */
.tm-painel p { margin: 0 0 10px; font-size: 14px; }
.tm-painel button { font-family: inherit; }
.tm-painel details { margin-top: 6px; }
.tm-painel summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.tm-linha-pessoa { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #eef0f4; font-size: 13.5px; }
.tm-linha-pessoa span { flex: 1; min-width: 0; }
.tm-linha-pessoa small { color: #718096; }
.tm-linha-pessoa button { padding: 4px 10px; font-size: 12px; }

@media (max-width: 640px) {
  .tm-folha { padding: 18px 16px 24px; }
  .tm-capa { padding: 20px 18px; }
  .tm-capa h1 { font-size: 23px; }
  .tm-colunas, .tm-linha, .tm-campos { grid-template-columns: 1fr; }
  .tm-fundadores { flex-direction: column; }
  .tm-fundadores img { width: 100%; }
  .tm-topo-titulo span { display: none; }
  /* Com o fone no topo, o título usa duas linhas em vez de ser cortado. */
  .tm-topo-linha { gap: 7px; padding-left: 10px; padding-right: 10px; }
  .tm-topo-titulo strong { white-space: normal; font-size: 13px; }
  .tm-relogio { padding: 6px 10px; }
}
