/* Encomenda de estação OSCE — tudo escopado em .encx para não colidir com o tema. */
.encx {
	--paper: #eef7fa;
	--surface: #ffffff;
	--surface-2: #f4f9fb;
	--line: #cfe2e8;
	--line-soft: #e2eef2;
	--ink: #173a40;
	--ink-2: #3a5054;
	--ink-3: #587075;
	--accent: #2b6872;
	--accent-bg: #e3f2f7;
	--err: #b4232f;
	--err-bg: #fbe7e8;
	--ok: #2b6872;
	--ok-bg: #e3f2f7;
	/* Modalidades: código de leitura, sempre acompanhado do rótulo. */
	--m1: #0b6a5e;
	--m1-bg: #ddf2ee;
	--m2: #a8511f;
	--m2-bg: #f8e9dc;
	--m3: #68467c;
	--m3-bg: #ede6f3;
	--m4: #2a5d8f;
	--m4-bg: #e2ecf7;
	--r: 10px;
	--mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	color: var(--ink);
	font-family: "Manrope", system-ui, sans-serif;
	font-size: 15px;
	line-height: 1.55;
}

.encx *,
.encx *::before,
.encx *::after {
	box-sizing: border-box;
}

/* Neutraliza os estilos de botão do tema (as regras específicas abaixo têm prioridade). */
.encx button {
	font: inherit;
	text-transform: none;
	letter-spacing: normal;
	white-space: normal;
	box-shadow: none;
}

.encx button:hover,
.encx button:focus {
	background-color: transparent;
	color: inherit;
}

.encx h1,
.encx h2,
.encx h3 {
	font-family: "Fraunces", Georgia, serif;
	font-weight: 450;
	color: var(--ink);
	text-wrap: balance;
	margin: 0;
}

.encx .mono {
	font-family: var(--mono);
}

.encx .encx-trilha {
	font-size: 13px;
	color: var(--ink-3);
	margin: 0 0 14px;
}

.encx .encx-trilha a {
	color: var(--accent);
	text-decoration: none;
}

.encx .eyebrow {
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
	font-weight: 700;
	margin: 0;
}

/* Cabeçalho do formulário */
.encx .encx-head {
	background: var(--surface);
	border: 1px solid var(--line-soft);
	border-radius: var(--r) var(--r) 0 0;
	padding: 26px 28px 0;
}

.encx .htop {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	flex-wrap: wrap;
}

.encx h1 {
	font-size: clamp(28px, 3.4vw, 40px);
	line-height: 1.1;
	letter-spacing: -0.01em;
	margin: 8px 0 8px;
}

.encx .hsub {
	color: var(--ink-2);
	font-size: 15px;
	max-width: 62ch;
	margin: 0;
}

.encx .proto {
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--ink-2);
	border: 1px dashed var(--line);
	border-radius: 8px;
	padding: 7px 12px;
	white-space: nowrap;
	background: var(--surface-2);
}

.encx .proto b {
	color: var(--ink);
}

/* Etapas */
.encx .steps {
	display: flex;
	margin-top: 22px;
	border-top: 1px solid var(--line-soft);
	overflow-x: auto;
	scrollbar-width: none;
}

.encx .steps::-webkit-scrollbar {
	display: none;
}

.encx .step {
	flex: none;
	border: 0;
	border-top: 2px solid transparent;
	border-radius: 0;
	background: none;
	color: var(--ink-3);
	cursor: pointer;
	padding: 12px 14px 11px;
	margin-top: -1px;
	font-size: 13px;
	white-space: nowrap;
	display: flex;
	gap: 8px;
	align-items: center;
}

.encx .step:hover,
.encx .step:focus {
	color: var(--ink);
	background: none;
}

.encx .step:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: -2px;
}

.encx .step[aria-current="step"] {
	color: var(--ink);
	border-top-color: var(--accent);
	font-weight: 700;
}

.encx .step i {
	font-family: var(--mono);
	font-style: normal;
	font-size: 11px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--surface-2);
	border: 1px solid var(--line);
	flex: none;
}

.encx .step[aria-current="step"] i {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

.encx .step.done i {
	background: var(--ok-bg);
	color: var(--ok);
	border-color: var(--ok);
}

/* Corpo */
.encx .encx-main {
	background: var(--paper);
	border: 1px solid var(--line-soft);
	border-top: 0;
	border-radius: 0 0 var(--r) var(--r);
	padding: 26px 28px 34px;
}

.encx .cols {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 310px;
	gap: 26px;
	align-items: start;
}

.encx .panel {
	background: var(--surface);
	border: 1px solid var(--line-soft);
	border-radius: var(--r);
	padding: 28px 30px 30px;
}

.encx .panel h2 {
	font-size: 26px;
	margin-bottom: 6px;
}

.encx .panel .lead {
	color: var(--ink-2);
	font-size: 14.5px;
	margin: 0 0 24px;
}

/* Campos */
.encx .f {
	margin-bottom: 20px;
}

.encx .f > label,
.encx .flabel {
	display: block;
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 6px;
	color: var(--ink);
}

.encx .req {
	color: var(--err);
	font-weight: 400;
}

.encx .hint {
	font-size: 13px;
	color: var(--ink-3);
	margin: -1px 0 8px;
	line-height: 1.45;
}

#encx input[type="text"],
#encx input[type="email"],
#encx input[type="tel"],
#encx textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface-2);
	color: var(--ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	box-shadow: none;
}

#encx textarea {
	resize: vertical;
	min-height: 84px;
}

#encx input:focus,
#encx textarea:focus {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
	background: var(--surface);
	border-color: var(--accent);
}

#encx input.err,
#encx textarea.err {
	border-color: var(--err);
	background: var(--err-bg);
}

.encx .errmsg {
	font-size: 13px;
	color: var(--err);
	margin: 5px 0 0;
	display: none;
}

.encx .errmsg.on {
	display: block;
}

.encx .two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* Opções */
.encx .opts {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.encx .opt {
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--ink-2);
	border-radius: 100px;
	padding: 7px 14px;
	font-size: 14px;
	cursor: pointer;
	transition: 0.12s;
	line-height: 1.35;
}

.encx .opt:hover,
.encx .opt:focus {
	border-color: var(--ink-3);
	color: var(--ink);
	background: var(--surface);
}

.encx .opt:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}

.encx .opt[aria-pressed="true"] {
	background: var(--ink);
	color: #fff;
	border-color: var(--ink);
}

.encx .grid-chk {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
	gap: 4px 16px;
}

.encx .chk {
	display: flex;
	gap: 9px;
	align-items: flex-start;
	font-size: 14px;
	padding: 4px 0;
	cursor: pointer;
	color: var(--ink-2);
	font-weight: 400;
	margin: 0;
}

.encx .chk input {
	margin: 4px 0 0;
	accent-color: var(--accent);
	flex: none;
	width: 16px;
	height: 16px;
}

.encx .chk:hover,
.encx .chk input:checked + span {
	color: var(--ink);
}

.encx .chk input:checked + span {
	font-weight: 600;
}

.encx .eixogrp {
	margin-bottom: 16px;
}

.encx .eixogrp > p {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 6px;
	font-weight: 700;
}

.encx .lgpd {
	background: var(--surface-2);
	border: 1px solid var(--line-soft);
	border-radius: 8px;
	padding: 12px 14px;
}

.encx .lgpd .chk {
	color: var(--ink-2);
	font-size: 13.5px;
}

.encx .lgpd a {
	color: var(--accent);
}

/* Campo-armadilha contra spam: fora da tela, sem foco. */
.encx .encx-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Pesos */
.encx .pesos {
	display: grid;
	gap: 2px;
}

.encx .peso {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 14px;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid var(--line-soft);
}

.encx .peso:last-child {
	border-bottom: 0;
}

.encx .peso > span {
	font-size: 14px;
}

.encx .peso .rr {
	display: flex;
	gap: 4px;
}

.encx .peso .rr button {
	width: 32px;
	height: 32px;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--ink-3);
	border-radius: 6px;
	font-family: var(--mono);
	font-size: 13px;
	cursor: pointer;
	padding: 0;
}

.encx .peso .rr button:hover {
	border-color: var(--ink-3);
	background: var(--surface);
	color: var(--ink);
}

.encx .peso .rr button[aria-pressed="true"] {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

.encx .peso .rr button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}

/* Banco de cenários (etapa 0) */
.encx .busca {
	position: relative;
	margin-bottom: 12px;
}

#encx .busca input[type="text"] {
	padding-left: 34px;
}

.encx .busca svg {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ink-3);
}

.encx .lista {
	max-height: 380px;
	overflow-y: auto;
	border: 1px solid var(--line-soft);
	border-radius: 8px;
}

.encx .item {
	display: block;
	width: 100%;
	text-align: left;
	border: 0;
	border-bottom: 1px solid var(--line-soft);
	border-radius: 0;
	background: none;
	padding: 12px 15px;
	color: inherit;
	cursor: pointer;
}

.encx .item:last-child {
	border-bottom: 0;
}

.encx .item:hover,
.encx .item:focus {
	background: var(--surface-2);
	color: inherit;
}

.encx .item:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: -2px;
}

.encx .item[aria-pressed="true"] {
	background: var(--accent-bg);
}

.encx .item .l1 {
	display: flex;
	justify-content: space-between;
	gap: 9px;
	align-items: center;
	margin-bottom: 3px;
}

.encx .item .c {
	font-family: var(--mono);
	font-size: 11.5px;
	color: var(--ink-3);
}

.encx .item .t {
	display: block;
	font-size: 14.5px;
	line-height: 1.35;
	font-weight: 600;
	color: var(--ink);
}

.encx .item .a {
	display: block;
	font-size: 13px;
	color: var(--ink-2);
	margin-top: 3px;
}

.encx .item .m {
	display: block;
	font-size: 12.5px;
	color: var(--ink-3);
	margin-top: 4px;
}

.encx .badge {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	padding: 2px 7px;
	border-radius: 4px;
	flex: none;
}

.encx .badge.M1 { background: var(--m1-bg); color: var(--m1); }
.encx .badge.M2 { background: var(--m2-bg); color: var(--m2); }
.encx .badge.M3 { background: var(--m3-bg); color: var(--m3); }
.encx .badge.M4 { background: var(--m4-bg); color: var(--m4); }

/* Cartões de partida */
.encx .partida {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 6px;
}

.encx .pcard {
	text-align: left;
	border: 1px solid var(--line);
	background: var(--surface);
	border-radius: var(--r);
	padding: 18px 20px;
	color: inherit;
	cursor: pointer;
	transition: 0.12s;
}

.encx .pcard:hover,
.encx .pcard:focus {
	border-color: var(--ink-3);
	background: var(--surface);
	color: inherit;
}

.encx .pcard:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}

.encx .pcard[aria-pressed="true"] {
	border-color: var(--accent);
	background: var(--accent-bg);
}

.encx .pcard b {
	display: block;
	font-size: 15.5px;
	margin-bottom: 5px;
	color: var(--ink);
}

.encx .pcard span {
	font-size: 13.5px;
	color: var(--ink-2);
	line-height: 1.45;
}

/* Leitura automática */
.encx .encx-aside {
	position: sticky;
	top: calc(var(--enc-header-h, 84px) + 18px);
	display: grid;
	gap: 12px;
}

.encx .est {
	background: var(--surface);
	border: 1px solid var(--line-soft);
	border-radius: var(--r);
	padding: 18px 19px;
}

.encx .est h3 {
	font-family: "Manrope", system-ui, sans-serif;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-3);
	font-weight: 700;
	margin-bottom: 12px;
}

.encx .kv {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	align-items: baseline;
	padding: 7px 0;
	border-bottom: 1px solid var(--line-soft);
	font-size: 14px;
}

.encx .kv:last-of-type {
	border-bottom: 0;
}

.encx .kv b {
	font-weight: 700;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.encx .kv .mod-nome {
	font-size: 13px;
	color: var(--ink-3);
}

.encx .est .nota {
	font-size: 12.5px;
	color: var(--ink-3);
	line-height: 1.45;
	margin: 10px 0 0;
	padding-top: 10px;
	border-top: 1px solid var(--line-soft);
}

.encx .tchips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 8px;
}

.encx .tchip {
	font-size: 12px;
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 2px 7px;
	color: var(--ink-2);
}

.encx .bars {
	display: grid;
	gap: 6px;
	margin-top: 4px;
}

.encx .bar {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 8px;
	align-items: center;
	font-size: 12px;
}

.encx .bar .tr {
	height: 7px;
	background: var(--surface-2);
	border: 1px solid var(--line-soft);
	border-radius: 4px;
	overflow: hidden;
}

.encx .bar .fl {
	display: block;
	height: 100%;
	background: var(--accent);
}

.encx .bar .lb {
	font-family: var(--mono);
	color: var(--ink-3);
}

.encx .bar.on .lb {
	color: var(--accent);
	font-weight: 700;
}

/* Navegação */
.encx .nav {
	display: flex;
	gap: 10px;
	justify-content: space-between;
	margin-top: 22px;
}

.encx .btn {
	border: 1.5px solid var(--accent);
	background: var(--surface);
	color: var(--accent);
	border-radius: 100px;
	padding: 11px 24px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	line-height: 1.3;
	text-decoration: none;
	display: inline-block;
}

.encx .btn:hover,
.encx .btn:focus {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

.encx .btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.encx .btn.pri {
	background: var(--accent);
	color: #fff;
}

.encx .btn.pri:hover,
.encx .btn.pri:focus {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
}

.encx .btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.encx .btn:disabled:hover {
	background: var(--surface);
	color: var(--accent);
}

.encx .btn.gh {
	background: none;
	border-color: transparent;
	color: var(--ink-3);
}

.encx .btn.gh:hover,
.encx .btn.gh:focus {
	background: none;
	color: var(--ink);
	border-color: transparent;
}

/* Revisão */
.encx .rsec {
	border-bottom: 1px solid var(--line-soft);
	padding: 14px 0;
}

.encx .rsec:last-child {
	border-bottom: 0;
}

.encx .rsec .rh {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 7px;
}

.encx .rsec .rh p {
	margin: 0;
	font-size: 12px;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--accent);
	font-weight: 700;
}

.encx .rsec .rh button {
	border: 0;
	background: none;
	color: var(--accent);
	font-size: 13px;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.encx .rsec dl {
	margin: 0;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 5px 18px;
	font-size: 14px;
}

.encx .rsec dt {
	color: var(--ink-3);
	white-space: nowrap;
	font-weight: 400;
}

.encx .rsec dd {
	margin: 0;
	color: var(--ink-2);
}

.encx .rsec dd.empty {
	color: var(--ink-3);
	font-style: italic;
}

/* Envio concluído */
.encx .done-box {
	text-align: center;
	padding: 30px 10px 20px;
}

.encx .done-box .tick {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: var(--ok-bg);
	color: var(--ok);
	display: grid;
	place-items: center;
	margin: 0 auto 16px;
}

.encx .done-box h2 {
	font-size: 30px;
	margin-bottom: 8px;
}

.encx .done-box p {
	color: var(--ink-2);
	font-size: 15px;
	max-width: 54ch;
	margin: 0 auto 4px;
}

.encx .pcode {
	font-family: var(--mono);
	font-size: 22px;
	letter-spacing: 0.06em;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 12px 22px;
	display: inline-block;
	margin: 18px 0 8px;
}

.encx .acts {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 20px;
	align-items: center;
}

.encx .fallback {
	font-size: 13px;
	color: var(--ink-3);
	max-width: 58ch;
	margin: 14px auto 0;
	line-height: 1.5;
}

.encx .fallback a {
	color: var(--accent);
}

.encx pre.brief {
	background: var(--surface-2);
	border: 1px solid var(--line-soft);
	border-radius: 8px;
	padding: 16px 18px;
	font-family: var(--mono);
	font-size: 12.5px;
	line-height: 1.65;
	white-space: pre-wrap;
	word-break: break-word;
	max-height: 430px;
	overflow-y: auto;
	margin: 22px 0 0;
	text-align: left;
	color: var(--ink-2);
}

.encx .encx-rodape {
	padding: 18px 2px 0;
	font-size: 12.5px;
	color: var(--ink-3);
	line-height: 1.6;
	margin: 0;
}

.encx .toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	transform: translateX(-50%);
	background: var(--ink);
	color: #fff;
	padding: 11px 20px;
	border-radius: 100px;
	font-size: 14px;
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
	max-width: calc(100vw - 32px);
	text-align: center;
}

.encx .toast.on {
	opacity: 1;
}

.encx .encx-carregando {
	padding: 40px 10px;
	text-align: center;
	color: var(--ink-3);
}

.encx [hidden] {
	display: none !important;
}

/* Celular: a leitura automática vira uma faixa logo abaixo das etapas (não some),
   e o painel completo fica depois do formulário. */
.encx .encx-faixa {
	display: none;
}

@media (max-width: 900px) {
	.encx .cols {
		grid-template-columns: 1fr;
	}

	.encx .encx-aside {
		position: static;
	}

	.encx .two,
	.encx .partida {
		grid-template-columns: 1fr;
	}

	.encx .encx-head {
		padding: 20px 18px 0;
	}

	.encx .encx-main {
		padding: 14px 12px 24px;
	}

	.encx .panel {
		padding: 22px 18px 24px;
	}

	.encx .encx-faixa {
		display: flex;
		position: sticky;
		top: calc(var(--enc-header-h, 72px) + 6px);
		z-index: 5;
		gap: 8px;
		align-items: center;
		justify-content: space-between;
		background: var(--surface);
		border: 1px solid var(--line);
		border-radius: 8px;
		padding: 9px 12px;
		margin-bottom: 12px;
		font-size: 13px;
		box-shadow: 0 8px 20px -14px rgba(23, 58, 64, 0.35);
	}

	.encx .encx-faixa a {
		color: var(--accent);
		font-weight: 700;
		white-space: nowrap;
	}

	.encx .rsec dl {
		grid-template-columns: 1fr;
		gap: 0 0;
	}

	.encx .rsec dd {
		margin-bottom: 6px;
	}

	.encx .nav .btn {
		padding: 11px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.encx * {
		transition: none !important;
	}
}
