@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(vendor/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(vendor/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --bg: #1a0c0f;
  --card: #2a1418;
  --card-2: #210f12;
  --track: #4a2329;
  --line: #43242a;
  --text: #f6eef0;
  --muted: #bca3a8;
  --dim: #8f767b;
  --blue: #3b82f6;
  --red: #ef4444;
  --yellow: #fbbf24;
  --green: #34d399;
  --light: #ecd5d9;
  --purple: #7c3aed;
  --orange: #f97316;
  --lead-bg: #2d2642;
  --sum-bg: #4a3218;
  --sum-text: #f6e6c6;
  --ok-bg: #243029;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ───────────── Site ───────────── */

.site { max-width: 1200px; margin: 0 auto; padding: 32px 16px 48px; }
.site-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; }
.brand { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.site-head h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.1; margin: 0; font-weight: 800; letter-spacing: -.02em; }
.site-head p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 680px; }

.controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 20px; }
@media (max-width: 760px) { .controls { grid-template-columns: 1fr; } }

.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.search { position: relative; }
.search input {
  width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 17px; padding: 0 16px;
  outline: none;
}
.search input:focus { border-color: var(--yellow); }
.results {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  margin: 0; padding: 6px; list-style: none; max-height: 360px; overflow: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.results[hidden] { display: none; }
.results li { padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.results li[aria-selected="true"], .results li:hover { background: var(--track); }
.results .kind { color: var(--dim); font-size: 13px; white-space: nowrap; align-self: center; }
.results .empty { color: var(--muted); cursor: default; }

.formats { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.formats button {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); background: transparent;
  border: 0; border-radius: 9px; padding: 0 14px; height: 38px; cursor: pointer;
}
.formats button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.formats small { font-weight: 500; opacity: .7; margin-left: 4px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.btn {
  font: inherit; font-size: 15px; font-weight: 600; height: 44px; padding: 0 18px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer;
}
.btn.primary { background: var(--yellow); color: #241505; border-color: var(--yellow); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn[hidden] { display: none; }
.status { color: var(--muted); font-size: 14px; }
.status.err { color: #fca5a5; }

.preview { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.frame { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.frame-box { overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), 0 18px 50px rgba(0,0,0,.4); }
.frame-box > .poster { transform-origin: 0 0; }
.frame .btn { height: 36px; font-size: 14px; }

.site-foot {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; gap: 12px 24px; flex-wrap: wrap; justify-content: space-between; color: var(--muted); font-size: 14px; line-height: 1.6;
}
.site-foot a { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.site-foot a:hover { color: var(--yellow); }
.site-foot svg { width: 18px; height: 18px; fill: currentColor; }
.site-foot .links { display: flex; gap: 18px; }

/* ───────────── Pôster (imagens exportadas) ───────────── */

.poster {
  position: relative; overflow: hidden; background: var(--bg); color: var(--text);
  font-family: 'Inter', sans-serif; line-height: 1.2; letter-spacing: -.005em;
  display: flex; flex-direction: column;
}
.poster .col { display: flex; flex-direction: column; gap: 1.4em; min-height: 0; overflow: hidden; }

.kicker { font-size: 1.13em; font-weight: 700; letter-spacing: .12em; color: var(--yellow); text-transform: uppercase; }
.title { font-size: 3.25em; font-weight: 800; letter-spacing: -.02em; line-height: 1.08; margin: .14em 0 .12em; white-space: nowrap; }
.title.wrap { white-space: normal; }
.subtitle { font-size: 1.25em; color: var(--muted); line-height: 1.35; }
.hdr { padding-top: .1em; }

.card { background: var(--card); border-radius: 1.25em; padding: 1.35em 1.35em 1.3em; display: flex; flex-direction: column; }
.card h2 { font-size: 1.5em; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .75em; }
.card-head .date { color: var(--muted); font-size: 1em; }

.row { margin-top: .55em; }
.row-line { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; }
.row-name { display: flex; align-items: center; gap: .45em; font-size: 1.25em; font-weight: 650; white-space: nowrap; }
.row-val { white-space: nowrap; }
.row-val b { font-size: 1.6em; font-weight: 750; letter-spacing: -.01em; }
.row-val small { font-size: 1em; color: var(--muted); margin-left: .35em; }
.row.minor .row-name { font-size: 1.13em; font-weight: 550; color: var(--muted); }
.row.minor .row-val b { font-size: 1.25em; }
.row.minor .row-val small { font-size: .95em; }
.dot { width: .55em; height: .55em; border-radius: 50%; flex: none; display: inline-block; }
.bar { height: .6em; border-radius: 1em; background: var(--track); margin-top: .5em; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 1em; }
.minor .bar { height: .55em; }

.lead { margin-top: 1.1em; background: var(--lead-bg); border-radius: .55em; padding: .62em .85em; font-size: 1.06em; font-weight: 600; }
.sep { height: 1px; background: var(--line); margin: 1em 0 .2em; }
.abst { display: flex; justify-content: space-between; align-items: baseline; margin-top: .9em; font-size: 1.13em; }
.abst span { color: var(--muted); font-weight: 500; }
.abst b { font-weight: 700; }

.adv { background: var(--card); border-radius: 1.25em; padding: 1.3em 1.45em; display: flex; align-items: center; gap: 1.4em; }
.adv label { display: block; color: var(--muted); font-size: 1em; margin-bottom: .25em; white-space: nowrap; }
.adv .stat .v { font-size: 2.15em; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; display: flex; align-items: baseline; gap: .3em; }
.adv .stat .who { font-size: .42em; font-weight: 650; display: inline-flex; align-items: center; gap: .35em; letter-spacing: 0; color: var(--muted); }
.adv .arrow { width: 1.5em; height: 1.5em; color: var(--muted); flex: none; margin-top: 1em; }
.adv .vsep { width: 1px; align-self: stretch; background: var(--line); margin: 0 .2em; }
.adv .dd { min-width: 0; }
.adv .dd .v { font-size: 2.45em; font-weight: 800; white-space: nowrap; }
.adv .dd .cap { white-space: nowrap; }
.adv .dd .cap { color: var(--muted); font-size: 1em; margin-top: .3em; }
.adv.stack { flex-wrap: wrap; row-gap: 1.1em; }
.adv.stack .vsep { display: none; }
.adv.stack .dd { flex-basis: 100%; border-top: 1px solid var(--line); padding-top: 1.1em; }

.gain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9em; }
.gain { min-width: 0; background: var(--card-2); border-radius: .9em; padding: 1em 1em .95em; }
.gain .nm { display: flex; align-items: center; gap: .4em; font-weight: 700; font-size: 1em; }
.gain .big { font-size: 2.55em; font-weight: 800; letter-spacing: -.02em; margin: .12em 0 .15em; white-space: nowrap; }
.gain .cap { color: var(--muted); font-size: .92em; }
.sum { margin-top: .85em; background: var(--sum-bg); color: var(--sum-text); border-radius: .55em; padding: .62em .85em; font-size: 1.04em; font-weight: 600; }

.stacked { display: flex; gap: .2em; height: 1.35em; margin: .2em 0 .55em; }
.stacked > i { display: block; height: 100%; border-radius: .3em; min-width: .3em; }
.legend .item { display: flex; justify-content: space-between; align-items: center; font-size: 1.13em; font-weight: 550; margin-top: .55em; }
.legend .item span { display: flex; align-items: center; gap: .45em; }
.legend .item b { font-weight: 700; }
.legend .item.neg span { color: var(--muted); }
.ok { margin-top: .9em; background: var(--ok-bg); border-radius: .55em; padding: .62em .85em; font-size: 1em; font-weight: 550; }

.part table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.part th { font-size: .88em; font-weight: 500; color: var(--muted); text-align: right; padding: 0 0 .5em; }
.part td { font-size: 1.13em; padding: .38em 0; text-align: right; font-weight: 700; }
.part td:first-child { text-align: left; font-weight: 500; color: var(--muted); }
.pos { color: var(--green); }
.neg { color: var(--red); }
.zero { color: var(--muted); }

.foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 2em; color: var(--dim); font-size: .92em; line-height: 1.45; }
.foot .url { color: var(--muted); font-weight: 600; white-space: nowrap; }
.foot .page { color: var(--muted); font-weight: 700; white-space: nowrap; }

/* 1920×1080 */
.p-wide { width: 1920px; height: 1080px; padding: 78px 56px 40px; font-size: 16px; }
.p-wide .cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.p-wide .col { gap: 1.4em; }
.p-wide .col > :last-child { flex: 1; }
.p-wide .foot { margin-top: 2.6em; font-size: .84em; }
.p-wide .hdr { margin-bottom: .45em; }

/* 1080×1920 e 1080×1350 */
.p-story, .p-car { width: 1080px; padding-left: 64px; padding-right: 64px; }
.p-story { height: 1920px; padding-top: 210px; padding-bottom: 150px; }
.p-car { height: 1350px; padding-top: 64px; padding-bottom: 48px; }
.p-story .col, .p-car .col { flex: 1; justify-content: center; }
.p-car .col { gap: 1.1em; }
.p-story .foot, .p-car .foot { margin-top: 1.6em; }
.p-story .title, .p-car .title { white-space: normal; }
.mini .title { font-size: 2.6em; }

/* Durante a medição, nada estica: o tamanho natural é o que importa. */
.measuring .col > * { flex: none !important; }
.measuring .col { justify-content: flex-start !important; }
