/* Oyá App — Raio X de Vendas. Identidade visual Oyá (mesma família da Central de Trabalho). Mobile-first. */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/montserrat-latin-800-normal.woff2") format("woff2"); }

:root {
	/* Marca Oyá */
	--bg: #f6efea;          /* creme da Central */
	--surface: #ffffff;
	--surface-2: #fbf6f2;   /* creme mais claro para áreas internas */
	--wine: #4a0404;        /* vinho institucional */
	--wine-deep: #2b0000;
	--wine-ink: #3a0a0a;    /* títulos */
	--wine-soft: #f4e6e1;   /* seleção / realce */
	--gold: #ee9c61;        /* rótulos sobre o vinho (como na Central) */
	--ink: #2a1a1a;
	--muted: #6b5552;
	--line: #eadfd8;
	--focus: #b4501a;
	--shadow: 0 1px 2px rgba(58, 10, 10, .05), 0 4px 16px rgba(58, 10, 10, .05);
	/* Estados das dimensões (só para os estados que o motor já gera) */
	--s0: #2e6b47; --s0-bg: #e7f1ea;
	--s1: #946410; --s1-bg: #fbf1dc;
	--s2: #b4501a; --s2-bg: #fbe8dd;
	--s3: #a61b1b; --s3-bg: #f9e2e0;
	--radius: 16px;
	--tap: 52px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font: 16px/1.55 "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	min-height: 100vh; display: flex; flex-direction: column;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--wine-ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--wine); font-weight: 600; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.eyebrow { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--wine); margin-bottom: 10px; }
.dark .eyebrow { color: var(--gold); }

/* Topo */
.topbar {
	position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
	gap: 12px; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--wine-ink); text-decoration: none; }
.brand b { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: var(--wine); }
.brand span { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line); }
#nav { display: flex; gap: 2px; flex-wrap: nowrap; }
#nav a, #nav button {
	white-space: nowrap; color: var(--wine-ink); background: transparent; border: 0; font: inherit; font-size: .85rem; font-weight: 600;
	padding: 8px 12px; border-radius: 99px; text-decoration: none; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center;
}
#nav a[aria-current="page"] { background: var(--wine); color: #fff; }

main { width: 100%; max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; outline: none; flex: 1; }
.foot { text-align: center; font-size: .75rem; color: var(--muted); padding: 18px 16px 28px; }
.foot b { color: var(--wine); font-weight: 800; }
.loading { display: flex; gap: 10px; align-items: center; padding: 48px 0; color: var(--muted); }
.spinner { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--wine); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Superfícies */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.dark {
	position: relative; overflow: hidden; color: #f8ece6; border: 0;
	background: linear-gradient(160deg, var(--wine) 0%, var(--wine-deep) 100%);
	border-radius: 20px; padding: 28px 22px; margin: 0 0 16px; box-shadow: 0 10px 30px rgba(43, 0, 0, .18);
}
.dark::after { /* círculo decorativo, como nos cards da Central */
	content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%;
	background: rgba(255, 255, 255, .05); pointer-events: none;
}
.dark h1, .dark h2, .dark h3 { color: #fff; }
.dark p { color: rgba(255, 240, 232, .86); }
.section-title { margin: 28px 0 12px; }
.section-title p { color: var(--muted); font-size: .9rem; margin: 0; }

/* Botões */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
	min-height: var(--tap); padding: 14px 22px; border-radius: 12px; border: 1px solid transparent;
	background: var(--wine); color: #fff; font: inherit; font-weight: 700; letter-spacing: .01em; cursor: pointer; text-decoration: none;
	transition: background .15s;
}
.btn:hover { background: #5e0909; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.light { background: #fff; color: var(--wine); }
.btn.light:hover { background: #fbefe9; }
.btn.secondary { background: transparent; color: var(--wine); border-color: var(--wine); }
.btn.secondary:hover { background: var(--wine-soft); }
.btn.link { background: transparent; color: var(--wine); width: auto; padding: 8px 4px; min-height: 44px; }
.btn.link:hover { background: transparent; text-decoration: underline; }

/* Entrada */
.hero h1 { font-size: 1.9rem; margin-bottom: 14px; }
.checks { list-style: none; padding: 0; margin: 0 0 22px; }
.checks li { position: relative; padding: 6px 0 6px 30px; font-weight: 600; color: #fff; }
.checks li::before {
	content: "✓"; position: absolute; left: 0; top: 7px; width: 20px; height: 20px; border-radius: 50%;
	background: rgba(238, 156, 97, .18); color: var(--gold); font-size: .75rem; display: grid; place-items: center;
}
.hero .meta { font-size: .85rem; margin: 12px 0 0; color: rgba(255, 240, 232, .7); text-align: center; }
.method { text-align: center; padding: 6px 4px; }
.method p { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; padding: 0; margin: 0; }
.chips li { font-size: .78rem; font-weight: 600; color: var(--wine-ink); background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 99px; }

/* Perguntas */
.qhead { margin-bottom: 22px; }
.qrow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.qrow .dimname { color: var(--wine); letter-spacing: .08em; text-transform: uppercase; }
.progress { height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--wine); border-radius: 99px; transition: width .25s; }
.qtext { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.qhint { font-size: .875rem; color: var(--muted); margin-bottom: 18px; }
.options { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; border: 0; }
.opt {
	display: flex; align-items: center; gap: 14px; min-height: var(--tap); padding: 14px 16px; width: 100%; text-align: left;
	background: var(--surface); border: 1.5px solid transparent; border-radius: 14px; font: inherit; font-weight: 500; color: var(--ink);
	cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s, background .15s;
}
.opt:hover { border-color: #dcc7bd; }
.opt[aria-checked="true"] { border-color: var(--wine); background: var(--wine-soft); color: var(--wine-ink); font-weight: 600; }
.opt .mark { flex: 0 0 22px; height: 22px; border: 2px solid #cdb9b1; border-radius: 50%; display: grid; place-items: center; transition: all .15s; }
.opt.multi .mark { border-radius: 7px; }
.opt[aria-checked="true"] .mark { border-color: var(--wine); background: var(--wine); }
.opt[aria-checked="true"] .mark::after { content: "✓"; color: #fff; font-size: .7rem; font-weight: 800; }
.navq { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.navq .btn:not(.link) { flex: 1; max-width: 260px; margin-left: auto; }

/* Formulários */
.done-head { text-align: center; padding: 8px 8px 4px; }
.done-head .ok { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--wine); color: #fff; font-size: 1.5rem; font-weight: 800; box-shadow: 0 8px 20px rgba(74, 4, 4, .25); }
.done-head p { color: var(--muted); }
.group { border: 0; margin: 0 0 18px; padding: 0; }
.group legend { float: left; width: 100%; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--wine); margin-bottom: 12px; padding: 0; }
.group > legend + * { clear: both; }
.group + .group { border-top: 1px solid var(--line); padding-top: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--wine-ink); }
.opt-tag { font-weight: 500; color: var(--muted); font-size: .8rem; }
.input {
	width: 100%; min-height: var(--tap); padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px;
	font: inherit; color: var(--ink); background: var(--surface-2); transition: border-color .15s, background .15s;
}
.input:focus { border-color: var(--wine); background: #fff; outline: none; }
.input[aria-invalid="true"] { border-color: var(--s3); }
.pw { position: relative; }
.pw .input { padding-right: 96px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 40px; padding: 6px 10px; border: 0; background: transparent; color: var(--wine); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.err { color: var(--s3); font-size: .85rem; margin-top: 6px; }
.err:empty { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; cursor: pointer; font-size: .875rem; color: var(--ink); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 20px; accent-color: var(--wine); }
.alert { border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; font-size: .9rem; }
.alert.error { background: var(--s3-bg); color: var(--s3); }
.alert.info { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--wine); box-shadow: var(--shadow); color: var(--ink); }
.alert.info strong { color: var(--wine-ink); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.links { text-align: center; font-size: .875rem; margin-top: 8px; }

/* Estados das dimensões */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s0 { color: var(--s0); background: var(--s0-bg); }
.s1 { color: var(--s1); background: var(--s1-bg); }
.s2 { color: var(--s2); background: var(--s2-bg); }
.s3 { color: var(--s3); background: var(--s3-bg); }

/* Resultado */
.result-hero h1 { font-size: 1.75rem; }
.mapcard { padding: 18px; }
.mapcard h2 { margin-bottom: 4px; }
.dims { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dims li {
	position: relative; background: var(--surface-2); border-radius: 12px; padding: 12px 12px 12px 16px; min-height: 84px;
	display: flex; flex-direction: column; justify-content: space-between; gap: 8px; overflow: hidden;
}
.dims li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: currentColor; }
.dims li.t0 { color: var(--s0); } .dims li.t1 { color: var(--s1); } .dims li.t2 { color: var(--s2); } .dims li.t3 { color: var(--s3); }
.dims .dname { font-size: .85rem; font-weight: 700; color: var(--wine-ink); line-height: 1.25; }
.dims .badge { align-self: flex-start; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .72rem; color: var(--muted); margin-top: 12px; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: currentColor; vertical-align: 1px; }
.prio { position: relative; padding: 20px 20px 16px; }
.prio .phead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.prio .num { width: 30px; height: 30px; border-radius: 50%; background: var(--wine); color: #fff; font-weight: 800; font-size: .9rem; display: grid; place-items: center; flex: 0 0 30px; }
.prio .pdim { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.prio .plabel { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wine); width: 100%; margin-top: -4px; padding-left: 40px; }
.prio h3 { font-size: 1.1rem; margin-bottom: 10px; }
.focus { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: .92rem; margin-bottom: 4px; }
.focus b { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--wine); margin-bottom: 2px; }
details.more > summary, .how > summary {
	list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .875rem; font-weight: 700; color: var(--wine);
}
details.more > summary::-webkit-details-marker, .how > summary::-webkit-details-marker { display: none; }
details.more > summary::after, .how > summary::after { content: "→"; transition: transform .15s; }
details.more[open] > summary::after, .how[open] > summary::after { transform: rotate(90deg); }
details.more p, .how p { font-size: .92rem; }
.acc { list-style: none; padding: 0; margin: 0; }
.acc li { border-top: 1px solid var(--line); }
.acc li:first-child { border-top: 0; }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; min-height: var(--tap); font-weight: 600; color: var(--wine-ink); }
.acc summary::-webkit-details-marker { display: none; }
.acc .body { padding: 0 0 14px; font-size: .92rem; }
.bridge { padding: 26px 22px; }
.bridge .steps { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 14px; }
.bridge .steps li { display: flex; gap: 14px; align-items: flex-start; }
.bridge .ico { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; line-height: 1; font-weight: 800; font-size: .85rem; background: rgba(255,255,255,.1); color: var(--gold); }
.bridge .steps strong { display: block; color: #fff; font-size: .95rem; }
.bridge .steps div > span { display: block; color: rgba(255, 240, 232, .8); font-size: .88rem; line-height: 1.45; }
.bridge .btn.secondary { border-color: rgba(255,255,255,.7); color: #fff; }
.bridge .btn.secondary:hover { background: rgba(255,255,255,.08); }
.maint { list-style: none; padding: 0; margin: 0; }
.maint li { padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.maint li:first-child { border-top: 0; }
.maint b { display: block; color: var(--wine-ink); font-size: .85rem; }

/* Plano */
.planhead { padding: 22px 20px; }
.planhead .count { font-size: .95rem; font-weight: 600; color: var(--muted); margin: -4px 0 14px; }
.planhead .count b { color: var(--wine-ink); }
.planhead .progress { height: 6px; }
.planhead .note { font-size: .82rem; color: var(--muted); margin: 12px 0 0; }
.week { padding: 0; overflow: hidden; }
.week > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-height: 64px; }
.week > summary::-webkit-details-marker { display: none; }
.week > summary::after { content: "+"; margin-left: auto; font-weight: 700; color: var(--muted); }
.week[open] > summary::after { content: "–"; }
.week .wn { flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--wine); }
.week.current .wn { background: var(--wine); color: #fff; }
.week .wt { font-weight: 700; color: var(--wine-ink); display: block; line-height: 1.3; }
.week .wcount { font-size: .8rem; color: var(--muted); font-weight: 600; }
.week .tp { color: var(--s0); font-weight: 700; }
.week.current { border-color: #d9bfb4; }
.week .wbody { padding: 0 18px 8px; }
.week .goal { font-size: .85rem; color: var(--muted); margin: 0 0 4px; }
.action { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.action:first-of-type { border-top: 0; }
.tick {
	flex: 0 0 28px; width: 28px; height: 28px; margin-top: 2px; border-radius: 8px; border: 2px solid #cdb9b1; background: #fff; cursor: pointer;
	display: grid; place-items: center; font-size: 15px; font-weight: 800; color: #fff; position: relative;
}
.tick::before { content: ""; position: absolute; inset: -10px; } /* área de toque de 48px */
.tick[aria-checked="true"] { background: var(--wine); border-color: var(--wine); }
.tick[aria-checked="true"]::after { content: "✓"; }
.atitle { font-weight: 600; color: var(--ink); line-height: 1.4; }
.action.done .atitle { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(107, 85, 82, .5); }
.adim { font-size: .75rem; font-weight: 600; color: var(--muted); margin-top: 2px; }
.adim.p { color: var(--wine); }
.how > summary { min-height: 36px; font-size: .82rem; }
.how .hbody { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-top: 4px; }
.how .hbody p:last-child { margin-bottom: 0; }
.how .why { color: var(--muted); }
.how .why b { color: var(--wine-ink); }

/* #TáPago */
.modal { position: fixed; inset: 0; background: rgba(43, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; }
.tp-head { background: linear-gradient(160deg, var(--wine) 0%, var(--wine-deep) 100%); color: #fff; padding: 26px 22px 22px; text-align: center; position: relative; overflow: hidden; }
.tp-head::after { content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -80px; border-radius: 50%; background: rgba(255,255,255,.06); }
.tp-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.6rem; letter-spacing: -.01em; color: #fff; }
.tp-tag i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--wine-deep); font-size: 1rem; display: grid; place-items: center; }
.tp-head h2 { color: var(--gold); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin: 10px 0 0; }
.tp-body { padding: 20px 22px 26px; }
.tp-body > p { color: var(--muted); font-size: .92rem; }
.sheet fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.sheet legend { font-weight: 700; color: var(--wine-ink); margin-bottom: 10px; font-size: .95rem; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: 44px; border: 1.5px solid var(--line); border-radius: 99px; font-size: .875rem; font-weight: 600; cursor: pointer; background: #fff; }
.pill input { accent-color: var(--wine); width: 16px; height: 16px; margin: 0; }
.pill:has(input:checked) { border-color: var(--wine); background: var(--wine-soft); color: var(--wine-ink); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--wine-ink); color: #fff; font-weight: 600; font-size: .9rem; padding: 12px 18px; border-radius: 12px; max-width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 30; }
.toast.show { opacity: 1; }

@media (max-width: 340px) { .brand span { display: none; } }
@media (max-width: 480px) { .topbar.compact .brand span { display: none; } }
.brand span { white-space: nowrap; }
@media (min-width: 720px) {
	main { padding-top: 36px; }
	h1 { font-size: 1.9rem; }
	.hero { padding: 44px 40px; }
	.hero h1 { font-size: 2.4rem; max-width: 520px; }
	.hero .btn { width: auto; min-width: 280px; }
	.hero .meta { text-align: left; }
	.dark { padding: 34px 36px; }
	.qtext { font-size: 1.6rem; }
	.dims { grid-template-columns: repeat(3, 1fr); }
	.card { padding: 24px; }
	.modal { align-items: center; }
	.sheet { border-radius: 22px; }
	.bridge .steps { grid-template-columns: 1fr 1fr; }
	.bridge .btn { width: auto; }
	.authcard { max-width: 480px; margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
