:root {
  --ink: #16231d;
  --green-950: #0c2117;
  --green-900: #10271d;
  --green-800: #173f2e;
  --green-700: #24583f;
  --sage: #839b8d;
  --orange: #ef5a22;
  --orange-soft: #ffdfd0;
  --ivory: #f4f0e7;
  --paper: #fbfaf6;
  --white: #fff;
  --line: #dcd8ce;
  --line-dark: rgba(255,255,255,.13);
  --muted: #4d564f;
  --on-orange: #10271d;
  --success: #1e7a4e;
  --danger: #b43c2b;
  --shadow: 0 18px 45px rgba(17,33,24,.11);
  --radius: 18px;
  --sidebar: 260px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--ivory); font: 15px/1.55 "Instrument Sans", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { background: var(--orange-soft); color: var(--ink); }
:focus-visible { outline: 3px solid rgba(239,90,34,.4); outline-offset: 2px; }

.skip-link { position: fixed; left: 12px; top: -70px; z-index: 1000; padding: 12px 16px; background: var(--white); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 30; display: flex; flex-direction: column; padding: 24px 16px 18px; overflow-y: auto; color: rgba(255,255,255,.75); background: var(--green-950); border-right: 1px solid var(--line-dark); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 24px; color: var(--white); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; color: var(--green-950); background: var(--orange); border-radius: 10px 10px 3px 10px; font: 700 25px/1 "Newsreader", serif; }
.brand strong, .brand small { display: block; }
.brand strong { font: 650 17px/1.2 "Instrument Sans", sans-serif; }
.brand small { margin-top: 2px; color: #a8b9ae; font: 500 11px/1.2 "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.main-nav { flex: 1; }
.nav-label { margin: 19px 10px 7px; color: rgba(255,255,255,.62); font: 500 12px/1 "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.main-nav a { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 9px 11px; margin: 2px 0; border: 1px solid transparent; border-radius: 10px; font-weight: 520; transition: .18s ease; }
.main-nav a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.main-nav a.active { color: var(--white); background: rgba(255,255,255,.095); border-color: var(--line-dark); box-shadow: inset 3px 0 0 var(--orange); }
.nav-icon { width: 20px; height: 20px; display: inline-grid; place-items: center; color: var(--sage); flex: 0 0 auto; }
.nav-icon svg { display: block; }
.nav-count { margin-left: auto; padding: 1px 6px; color: var(--orange-soft); background: rgba(239,90,34,.15); border-radius: 20px; font: 500 12px "DM Mono", monospace; }
.sidebar-note { display: flex; gap: 9px; margin-top: 24px; padding: 13px; color: rgba(255,255,255,.78); background: rgba(255,255,255,.045); border: 1px solid var(--line-dark); border-radius: 12px; font-size: 12px; line-height: 1.4; }
.sidebar-note p { margin: 0; }
.sidebar-note strong { display: block; margin-bottom: 2px; color: rgba(255,255,255,.82); }
.privacy-dot { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 5px; background: #61d394; border-radius: 50%; box-shadow: 0 0 0 4px rgba(97,211,148,.12); }

.app-area { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(18px,4vw,56px); background: rgba(244,240,231,.88); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(22,35,29,.08); }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.breadcrumb b { color: #b4b3aa; }
.breadcrumb strong { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.connection-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font: 500 12px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .05em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.connection-status i { width: 6px; height: 6px; background: #57b97c; border-radius: 50%; }
.menu-button { display: none !important; }

#app-main { min-height: calc(100vh - 68px); padding: clamp(28px,4vw,58px) clamp(18px,5vw,72px) 80px; }
.page { width: min(1180px,100%); margin: 0 auto; animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 30px; }
.page-head-copy { max-width: 740px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--orange); font: 600 12px/1 "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 17px; height: 1px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font: 650 clamp(34px,5vw,58px)/.98 "Newsreader", serif; letter-spacing: -.025em; }
h2 { margin-bottom: 9px; font: 650 clamp(24px,3.5vw,36px)/1.05 "Newsreader", serif; letter-spacing: -.018em; }
h3 { margin-bottom: 7px; font-size: 17px; line-height: 1.25; }
.page-subtitle { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: clamp(14px,1.8vw,17px); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: "DM Mono", monospace; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; cursor: pointer; border: 1px solid transparent; border-radius: 10px; font-weight: 650; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: var(--on-orange); background: var(--orange); box-shadow: 0 8px 22px rgba(239,90,34,.18); }
.button.primary:hover { background: #df4c17; }
.button.dark { color: var(--white); background: var(--green-800); }
.button.ghost { background: transparent; border-color: var(--line); }
.button.ghost:hover { background: rgba(255,255,255,.6); }
.button.danger { color: var(--danger); border-color: rgba(180,60,43,.3); background: transparent; }
.button.compact { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.button:disabled { color: #3d4540; background: #d5d2c8; border-color: #c5c1b6; opacity: 1; cursor: not-allowed; transform: none; }
.button.primary:disabled { color: #3d4540; background: #e8b49a; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; cursor: pointer; color: inherit; background: transparent; border: 1px solid var(--line); border-radius: 10px; font-size: 20px; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.grid.four { grid-template-columns: repeat(4,minmax(0,1fr)); }
.card { padding: clamp(20px,3vw,30px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset; }
.card.dark { color: var(--white); background: var(--green-900); border-color: rgba(255,255,255,.08); }
.card.dark p, .card.dark .muted, .card.dark .small, .card.dark li { color: rgba(255,255,255,.84); }
.card.orange { color: var(--green-950); background: var(--orange-soft); border-color: rgba(239,90,34,.2); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-head h2, .card-head h3 { margin: 0; }
.kpi { min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; }
.kpi-label { color: var(--muted); font: 500 12px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.kpi strong { display: block; font: 650 38px/1 "Newsreader", serif; }
.kpi small { color: var(--muted); }
.kpi.dark .kpi-label, .kpi.dark small { color: rgba(255,255,255,.82); }
.progress { height: 7px; overflow: hidden; background: rgba(22,35,29,.09); border-radius: 20px; }
.progress span { display: block; height: 100%; background: var(--orange); border-radius: inherit; }
.action-card { min-height: 190px; position: relative; display: flex; flex-direction: column; overflow: hidden; transition: .18s ease; }
.action-card:hover { transform: translateY(-3px); border-color: #c8c2b5; box-shadow: var(--shadow); }
.action-card .step-number { position: absolute; right: 18px; top: 11px; color: rgba(22,35,29,.07); font: 700 68px/1 "Newsreader", serif; }
.action-card p { color: var(--muted); }
.action-card .button { margin-top: auto; align-self: flex-start; }

.section { margin-top: 28px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 14px; }
.section-title h2 { margin: 0; }
.notice { display: flex; gap: 13px; padding: 16px 18px; margin-bottom: 24px; color: #4d514c; background: #fff7dc; border: 1px solid #e8d99e; border-radius: 13px; }
.notice strong { display: block; color: var(--ink); }
.notice-icon { font-size: 19px; }
.empty-state { padding: 56px 24px; text-align: center; background: rgba(255,255,255,.35); border: 1px dashed #c9c4b9; border-radius: var(--radius); }
.empty-state .empty-mark { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 16px; color: var(--orange); background: var(--orange-soft); border-radius: 50%; font-size: 25px; }
.empty-state p { max-width: 500px; margin: 0 auto 20px; color: var(--muted); }

.source-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 22px; }
.source-tab { min-height: 105px; padding: 16px; cursor: pointer; text-align: left; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.source-tab strong, .source-tab small { display: block; }
.source-tab strong { margin: 7px 0 4px; }
.source-tab small { color: var(--muted); line-height: 1.35; }
.source-tab.active { background: var(--green-900); color: var(--white); border-color: var(--green-900); box-shadow: 0 7px 0 var(--orange); }
.source-tab.active small { color: rgba(255,255,255,.62); }
.form-card { padding: clamp(22px,4vw,38px); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 650; font-size: 13px; }
.field-hint { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.4; }
.field input::placeholder, .field textarea::placeholder, .search-input::placeholder { color: #66706a; opacity: 1; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin: 6px 0 0; color: var(--danger); font-size: 12px; }
.field input, .field select, .field textarea, .search-input { width: 100%; padding: 12px 13px; color: var(--ink); background: var(--white); border: 1px solid #cbc7bd; border-radius: 10px; outline: none; }
.field textarea { min-height: 108px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(36,88,63,.1); }
.field .other-input { margin-top: 2px; border-style: dashed; background: #fffdf8; }
.guided-intro { margin: -4px 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.form-grid > .guided-intro,
.form-grid > .full-span { grid-column: 1 / -1; margin-bottom: 4px; }
.palette-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.palette-card, .font-card {
  display: grid; gap: 8px; padding: 12px; text-align: left; cursor: pointer;
  color: var(--ink); background: var(--white); border: 1px solid #cbc7bd; border-radius: 14px;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.palette-card:hover, .font-card:hover { transform: translateY(-2px); border-color: #a9b8ae; box-shadow: var(--shadow); }
.palette-card.active, .font-card.active { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(241,93,34,.14); }
.palette-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; height: 34px; }
.palette-swatches i { display: block; border-radius: 6px; border: 1px solid rgba(22,35,29,.08); }
.palette-card strong, .font-card strong { font-size: 13px; }
.palette-card small, .font-card small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.palette-card-custom { place-items: start; background: linear-gradient(180deg, #fffdf8, #f0ebe1); }
.palette-custom-mark { color: var(--orange); font-size: 22px; line-height: 1; }
.color-custom { margin-top: 12px; padding: 14px; background: #f7f3ea; border: 1px solid var(--line); border-radius: 14px; }
.color-pick-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.color-pick { display: grid; gap: 7px; font-size: 12px; font-weight: 650; }
.color-pick-row { display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: center; }
.color-pick input[type="color"] {
  width: 54px; height: 44px; padding: 0; border: 1px solid #cbc7bd; border-radius: 10px; background: transparent; cursor: pointer;
}
.color-pick input[type="text"] { font: 12px "DM Mono", monospace; text-transform: uppercase; }
.font-group { display: grid; gap: 8px; margin-top: 10px; }
.font-group-label {
  margin: 4px 0 0; color: var(--orange); font: 700 12px/1 "DM Mono", monospace;
  letter-spacing: .12em; text-transform: uppercase;
}
.font-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.font-card { grid-template-columns: 72px 1fr; align-items: center; gap: 12px; }
.font-sample {
  display: grid; place-items: center; min-height: 64px; border-radius: 12px;
  background: #f4f0e7; color: var(--green-900); font-size: 28px;
}
.font-meta { display: grid; gap: 4px; min-width: 0; }
.font-other-wrap { display: grid; gap: 8px; margin-top: 10px; }
.font-card-other { width: 100%; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 22px; margin-top: 24px; border-top: 1px solid var(--line); }
.checklist { display: grid; gap: 9px; padding: 0; margin: 15px 0 0; list-style: none; }
.checklist li { display: flex; gap: 9px; color: var(--muted); }
.checklist li::before { content: "✓"; color: var(--success); font-weight: 800; }

.dna-hero { position: relative; overflow: hidden; }
.dna-hero::after { content: "DNA"; position: absolute; right: -10px; bottom: -38px; color: rgba(255,255,255,.035); font: 700 150px/1 "Newsreader", serif; }
.dna-identity { position: relative; z-index: 1; }
.dna-identity .brand-name { margin: 4px 0 8px; font: 650 clamp(32px,5vw,55px)/1 "Newsreader", serif; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { display: inline-flex; align-items: center; min-height: 27px; padding: 4px 9px; color: var(--green-800); background: #e4ebe4; border-radius: 100px; font-size: 12px; font-weight: 650; }
.card.dark .tag { color: rgba(255,255,255,.8); background: rgba(255,255,255,.09); }
.colors { display: grid; grid-template-columns: repeat(7,1fr); gap: 8px; margin-top: 18px; }
.color-chip { min-width: 0; }
.color-swatch { height: 62px; border: 1px solid rgba(22,35,29,.12); border-radius: 10px; }
.color-chip small { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font: 12px "DM Mono", monospace; text-overflow: ellipsis; }
.dna-section { padding: 20px 0; border-top: 1px solid var(--line); }
.dna-section:first-child { border-top: 0; padding-top: 0; }
.dna-section h3 { font: 650 21px "Newsreader", serif; }
.rule-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.rule-list li { position: relative; padding-left: 21px; }
.rule-list.approved li::before, .rule-list.avoid li::before { position: absolute; left: 0; font-weight: 800; }
.rule-list.approved li::before { content: "✓"; color: var(--success); }
.rule-list.avoid li::before { content: "×"; color: var(--danger); }
.validation-errors { padding: 15px 18px; margin-top: 14px; color: var(--danger); background: #fff0eb; border: 1px solid #f0b8aa; border-radius: 10px; }
.validation-errors ul { margin-bottom: 0; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 20px; }
.search-input { flex: 1 1 260px; max-width: 420px; }
.filter-button { min-height: 38px; padding: 8px 12px; cursor: pointer; background: transparent; border: 1px solid var(--line); border-radius: 100px; font-size: 12px; font-weight: 650; }
.filter-button.active { color: var(--white); background: var(--green-800); border-color: var(--green-800); }
.library-card { display: flex; flex-direction: column; min-height: 245px; }
.library-card p { color: var(--muted); }
.library-card .card-actions { margin-top: auto; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.favorite-button.active { color: var(--orange); border-color: rgba(239,90,34,.3); background: var(--orange-soft); }
.list-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 19px 21px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.list-card + .list-card { margin-top: 10px; }
.list-card h3 { margin-bottom: 4px; }
.list-card p { margin-bottom: 0; color: var(--muted); font-size: 12px; }

.steps { counter-reset: guide; }
.guide-step { position: relative; padding-left: 72px; }
.guide-step::before { counter-increment: guide; content: counter(guide); position: absolute; left: 22px; top: 22px; width: 34px; height: 34px; display: grid; place-items: center; color: var(--white); background: var(--green-800); border-radius: 50%; font: 600 12px "DM Mono", monospace; }
.guide-step + .guide-step { margin-top: 11px; }
.guide-step code { padding: 2px 5px; background: #ece8de; border-radius: 4px; font: 12px "DM Mono", monospace; }
.gpt-card { min-height: 275px; display: flex; flex-direction: column; }
.gpt-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 28px; color: var(--orange); background: var(--orange-soft); border-radius: 14px; font-size: 23px; }
.gpt-card p { color: var(--muted); }
.gpt-card .button { margin-top: auto; align-self: flex-start; }

.modal { position: relative; width: min(860px,calc(100% - 28px)); max-height: calc(100vh - 30px); padding: clamp(20px,4vw,34px); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 90px rgba(12,33,23,.33); }
.modal::backdrop { background: rgba(8,24,16,.72); backdrop-filter: blur(5px); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.modal-head h2 { margin-bottom: 12px; }
.modal-description { color: var(--muted); }
.modal-summary { margin: 8px 0 4px; }
.summary-list { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.summary-list li {
  display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 10px;
  padding: 10px 12px; background: #f7f3ea; border: 1px solid var(--line); border-radius: 12px;
}
.summary-list span { color: var(--muted); font-size: 12px; }
.summary-list strong { font-size: 14px; line-height: 1.35; }
.prompt-details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.prompt-details summary {
  cursor: pointer; color: var(--muted); font: 650 13px/1.4 "Instrument Sans", sans-serif;
  list-style: none;
}
.prompt-details summary::-webkit-details-marker { display: none; }
.prompt-details[open] summary { margin-bottom: 10px; color: var(--ink); }
.prompt-output { width: 100%; min-height: min(28vh, 260px); padding: 18px; resize: vertical; color: #d8eee0; background: var(--green-950); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; font: 12px/1.6 "DM Mono", monospace; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.modal-actions-primary { margin-top: 18px; }
.chip-field .chip-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.chip-count { color: var(--muted); font: 500 12px/1 "DM Mono", monospace; white-space: nowrap; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  appearance: none; border: 1px solid #cbc7bd; background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 12px; font: 600 12px/1.2 "Instrument Sans", sans-serif;
  cursor: pointer; transition: .15s ease;
}
.chip:hover:not(:disabled) { border-color: #a9b8ae; transform: translateY(-1px); }
.chip.active { border-color: var(--orange); background: rgba(241,93,34,.08); box-shadow: 0 0 0 2px rgba(241,93,34,.12); }
.chip:disabled { opacity: .45; cursor: not-allowed; }
.chip:focus-visible { outline: 3px solid rgba(241,93,34,.35); outline-offset: 2px; }
.onboarding-steps { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.onboarding-steps li {
  display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: center;
  padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
}
.onboarding-steps li span {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: #efe9dc; color: var(--green-900); font: 700 14px "DM Mono", monospace;
}
.onboarding-steps li.current { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(241,93,34,.12); }
.onboarding-steps li.done span { background: var(--green-900); color: #fff; }
.onboarding-steps strong { display: block; }
.onboarding-steps small { color: var(--muted); }
.first-access-cta h2 { margin: 8px 0 10px; }
.first-access-cta p { color: rgba(255,255,255,.7); margin-bottom: 18px; }
.brand-review .summary-list { margin-top: 8px; }
.privacy-caption { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
/* Dentro de <dialog showModal>, toasts precisam viver na top layer — anexamos ao dialog */
.toast-region--dialog {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: auto;
  top: 16px;
  z-index: 20;
  width: min(420px, calc(100% - 28px));
  transform: translateX(-50%);
}
.toast { max-width: 390px; width: 100%; padding: 13px 16px; color: var(--white); background: var(--green-950); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; box-shadow: 0 18px 40px rgba(8,24,16,.35); animation: toast-in .22s ease; pointer-events: auto; text-align: center; font-size: 13px; font-weight: 600; }
.toast.error { background: #7d281e; }
.toast:not(.error) { background: #123528; border-color: rgba(97,211,148,.28); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.mobile-overlay { position: fixed; inset: 0; z-index: 25; background: rgba(8,24,16,.6); }
@media (min-width: 761px) { .mobile-overlay { display: none !important; } }

/* MVP enxuto: hierarquia orientada a resultados */
.hero-process { min-height: 230px; display: grid; grid-template-columns: minmax(0,1.6fr) 60px minmax(220px,.7fr); align-items: center; gap: 26px; overflow: hidden; position: relative; }
.hero-process::after { content: "↗"; position: absolute; right: -18px; top: -42px; color: rgba(255,255,255,.035); font: 220px/1 "Newsreader",serif; }
.hero-process h2 { max-width: 660px; font-size: clamp(30px,4.2vw,52px); }
.hero-process h2 i { color: var(--orange); font-style: normal; }
.hero-process p { max-width: 660px; color: rgba(255,255,255,.62); }
.process-arrow { color: var(--orange); font-size: 42px; text-align: center; }
.process-result { position: relative; z-index: 1; padding: 22px; background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; }
.process-result span { display: block; margin-bottom: 10px; color: var(--sage); font: 500 12px "DM Mono",monospace; letter-spacing: .1em; }
.process-result strong { font: 650 25px/1.1 "Newsreader",serif; }

.create-featured-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px; }
.create-card { min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; transition: .2s ease; }
.create-card:hover { transform: translateY(-4px); border-color: #bdb7aa; box-shadow: var(--shadow); }
.create-card.principal:first-child { color: var(--white); background: var(--green-900); border-color: var(--green-900); }
.create-card.principal:first-child p { color: rgba(255,255,255,.62); }
.create-index { font: 500 12px "DM Mono",monospace; color: var(--orange); }
.create-card h2 { margin-bottom: 9px; font-size: clamp(25px,3vw,37px); }
.create-card p { color: var(--muted); }
.create-link { font-weight: 700; font-size: 12px; }
.compact-create-grid .create-card { min-height: 190px; }
.compact-create-grid .create-card h2 { font-size: 25px; }

.mode-switch { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; max-width: 620px; margin-bottom: 20px; }
.mode-switch button { padding: 16px 18px; cursor: pointer; text-align: left; color: var(--ink); background: rgba(255,255,255,.45); border: 1px solid var(--line); border-radius: 12px; }
.mode-switch strong,.mode-switch small { display: block; }
.mode-switch small { margin-top: 3px; color: var(--muted); }
.mode-switch button.active { color: var(--white); background: var(--green-900); border-color: var(--green-900); box-shadow: inset 3px 0 0 var(--orange); }
.mode-switch button.active small { color: rgba(255,255,255,.6); }

.inner-title { margin-top: 8px; padding-top: 25px; border-top: 1px solid var(--line); }
.inner-title h2 { margin-bottom: 0; }
.asset-package { margin-bottom: 26px; }
.asset-package > .inner-title:first-child { padding-top: 0; border-top: 0; }
.privacy-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; color: var(--success); background: #e6f3eb; border-radius: 100px; font: 600 12px "DM Mono",monospace; text-transform: uppercase; }
.privacy-badge::before { content: "●"; font-size: 7px; }
.asset-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.asset-slot { min-width: 0; min-height: 112px; position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 14px; cursor: pointer; overflow: hidden; background: var(--white); border: 1px dashed #bbb6aa; border-radius: 12px; transition: .18s ease; }
.asset-slot:hover { border-color: var(--orange); background: #fffaf6; }
.asset-slot.filled { border-style: solid; border-color: rgba(30,122,78,.35); background: #f4faf6; }
.asset-slot b { color: var(--orange); font: 600 12px "DM Mono",monospace; }
.asset-slot span { min-width: 0; position: relative; z-index: 1; }
.asset-slot strong,.asset-slot small { display: block; }
.asset-slot strong { font-size: 12px; }
.asset-slot small { max-width: 120px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.asset-slot > i { margin-left: auto; color: #aaa69c; font-style: normal; font-size: 22px; }
.asset-slot img { position: absolute; inset: auto 0 0 auto; width: 64px; height: 64px; object-fit: cover; opacity: .34; border-radius: 10px 0 0 0; }
.advanced-panel { grid-column: 1/-1; margin-top: 18px; padding: 0 18px; background: #f5f2e9; border: 1px solid var(--line); border-radius: 12px; }
.advanced-panel summary { padding: 15px 0; cursor: pointer; font-weight: 700; }
.advanced-panel summary span { color: var(--muted); font-weight: 400; }
.advanced-panel[open] { padding-bottom: 18px; }
.advanced-controls { padding: 17px; background: #f5f2e9; border: 1px solid var(--line); border-radius: 12px; }
.reference-choice { padding: 14px 16px; margin-top: 18px; background: #edf4ef; border: 1px solid #cbdccf; border-radius: 10px; }
.reference-choice label { display: flex; align-items: center; gap: 8px; }
.reference-card.active { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }

.subnav { display: flex; gap: 6px; padding-bottom: 14px; margin-bottom: 22px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.subnav button { flex: 0 0 auto; padding: 9px 13px; cursor: pointer; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-weight: 650; }
.subnav button.active { color: var(--white); background: var(--green-800); }
.status-word { display: inline-block; margin-bottom: 13px; padding: 6px 9px; border-radius: 100px; font: 650 12px "DM Mono",monospace; letter-spacing: .08em; }
.status-word.approved { color: var(--success); background: #e1f2e7; }
.status-word.adjust { color: #916209; background: #fff0c7; }
.status-word.review { color: var(--danger); background: #ffe5df; }
.learn-card {
  min-height: 220px; transition: .18s ease; text-align: left; cursor: pointer;
  font: inherit; color: inherit; width: 100%;
}
.learn-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.learn-card:focus-visible { outline: 3px solid rgba(241,93,34,.35); outline-offset: 2px; }
.learn-card > span { color: var(--orange); font: 600 12px "DM Mono",monospace; }
.learn-card h2 { margin-top: 35px; }
.learn-card p { color: var(--muted); }

.quick-commands { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.quick-commands > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 11px; }
.quick-commands > div { display: flex; flex-wrap: wrap; gap: 7px; }
.attachment-modal { width: min(680px,calc(100% - 28px)); }
.attachment-steps { display: grid; gap: 8px; padding-left: 23px; color: var(--muted); }
.attachment-summary { display: grid; gap: 7px; padding: 14px; background: #eeeadf; border-radius: 11px; }
.attachment-summary > div { display: flex; gap: 11px; align-items: center; padding: 8px; background: rgba(255,255,255,.6); border-radius: 8px; }
.attachment-summary b { color: var(--orange); font: 600 10px "DM Mono",monospace; }
.attachment-summary strong,.attachment-summary span { display: block; }
.attachment-summary span { font-size: 11px; }

@media (max-width: 1000px) {
  .hero-process { grid-template-columns: 1fr 40px .7fr; }
  .create-featured-grid { grid-template-columns: 1fr 1fr; }
  .create-featured-grid .create-card:first-child { grid-column: 1/-1; min-height: 220px; }
  .asset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1000px) {
  .grid.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid.three { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .colors { grid-template-columns: repeat(4,1fr); }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .app-area { min-width: 0; }
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(8,24,16,.3); }
  body.menu-open .sidebar { transform: translateX(0); }
  .menu-button { display: inline-grid !important; }
  .topbar { height: 60px; padding: 0 14px; }
  .breadcrumb span, .breadcrumb b, .connection-status, .top-actions .button { display: none; }
  #app-main { min-height: calc(100vh - 60px); padding: 25px 14px 60px; }
  .page-head { display: block; }
  .page-head > .button, .page-head > .card-actions { margin-top: 18px; }
  .grid.two, .grid.three, .grid.four, .form-grid { grid-template-columns: 1fr; }
  .palette-grid, .font-grid, .color-pick-grid { grid-template-columns: 1fr 1fr; }
  .font-card { grid-template-columns: 60px 1fr; }
  .source-tabs { display: flex; overflow-x: auto; padding: 0 1px 8px; scroll-snap-type: x mandatory; }
  .source-tab { flex: 0 0 78%; scroll-snap-align: start; }
  .field.full { grid-column: auto; }
  .colors { grid-template-columns: repeat(4,1fr); }
  .list-card { grid-template-columns: 1fr; }
  .modal { width: calc(100% - 16px); max-height: calc(100vh - 16px); padding: 19px; }
  .modal-actions .button { flex: 1 1 calc(50% - 6px); }
  .toast-region { left: 10px; right: 10px; bottom: 10px; }
  .toast-region--dialog { left: 50%; right: auto; bottom: auto; top: 14px; width: calc(100% - 24px); }
  .toast { max-width: none; }
  .hero-process { grid-template-columns: 1fr; min-height: 0; }
  .process-arrow { transform: rotate(90deg); }
  .create-featured-grid { grid-template-columns: 1fr; }
  .create-featured-grid .create-card:first-child { grid-column: auto; }
  .asset-grid { grid-template-columns: 1fr 1fr; }
  .asset-slot { min-height: 105px; }
  .mode-switch { grid-template-columns: 1fr; }
  .notice { flex-wrap: wrap; }
}

@media (max-width: 390px) {
  h1 { font-size: 36px; }
  .card { padding: 18px; }
  .colors { grid-template-columns: repeat(3,1fr); }
  .form-actions .button, .page-head > .button { width: 100%; }
  .modal-actions .button { flex-basis: 100%; }
  .asset-grid { grid-template-columns: 1fr; }
  .asset-slot { min-height: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.draft-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 12px; color: var(--muted); font-size: 12px;
}
.brand-app-preview {
  display: grid; gap: 16px; margin-top: 18px; padding: 18px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--paper);
}
.brand-app-preview h3 { margin: 0 0 4px; font-size: 15px; }
.brand-app-stage {
  display: grid; gap: 14px; padding: 22px; border-radius: 14px;
}
.brand-app-stage .preview-kicker { margin: 0; font: 600 12px/1 "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.brand-app-stage .preview-headline { margin: 0; font-size: clamp(26px, 4vw, 36px); line-height: 1.05; letter-spacing: -.02em; }
.brand-app-stage .preview-support { margin: 0; max-width: 42ch; font-size: 15px; line-height: 1.45; opacity: .88; }
.brand-app-stage .preview-cta {
  justify-self: start; min-height: 40px; padding: 10px 16px; border: 0; border-radius: 10px;
  font-weight: 700; cursor: default;
}
.brand-app-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.brand-app-card, .brand-app-post {
  padding: 16px; border-radius: 14px; border: 1px solid rgba(0,0,0,.08);
}
.brand-app-card strong, .brand-app-post strong { display: block; margin-bottom: 6px; font-size: 16px; }
.brand-app-card p, .brand-app-post p { margin: 0; font-size: 13px; line-height: 1.4; opacity: .88; }
.brand-app-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-app-swatches span {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(0,0,0,.12);
}
.brand-app-type { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.project-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 420px; }
.faq-list { display: grid; gap: 8px; margin-top: 16px; }
.faq-list details { padding: 10px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.faq-list summary { cursor: pointer; font-weight: 650; }
.faq-list p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.source-tabs [role="tab"] { text-align: left; }

@media (max-width: 760px) {
  .brand-app-row { grid-template-columns: 1fr; }
  .project-actions { max-width: none; justify-content: stretch; }
}

