/* InkWoof v2: tela inicial (Nova), páginas internas e navegação do celular.
   Portado de design/ui-v2/mockups/home.html + mobile-home.html. Só tokens --iw-*. */

/* ======================================================================
   Casca das páginas (início, projetos, marcas, referências, agente)
   ====================================================================== */
.app-shell.iw-page {
  display: grid; grid-template-columns: var(--iw-rail-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  height: 100dvh; width: 100%; overflow: hidden; background: var(--iw-bg); color: var(--iw-text-1);
}
.iw-page > .main-nav { grid-column: 1; grid-row: 1; }
.iw-page > .main-content { grid-column: 2; grid-row: 1; min-width: 0; min-height: 0; }
.iw-page > .main-content.iw-home-main { padding: 0; }
.iw-home-main { position: relative; overflow: hidden auto; isolation: isolate; scrollbar-width: none; background: var(--iw-bg); }
.iw-home-main::-webkit-scrollbar { display: none; }
.iw-home-main::before { /* atmosfera: cobalto à esquerda, água no meio, mel ao fundo */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 720px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side at 18% 40%, rgba(61, 92, 255, .30), transparent) 0 0 / 760px 420px no-repeat,
    radial-gradient(closest-side at 42% 50%, rgba(62, 224, 197, .14), transparent) 34% 30% / 520px 360px no-repeat,
    radial-gradient(closest-side at 70% 30%, rgba(61, 92, 255, .22), transparent) 100% 0 / 620px 520px no-repeat,
    radial-gradient(closest-side at 80% 50%, rgba(245, 194, 94, .11), transparent) 78% 36% / 360px 300px no-repeat;
  filter: blur(40px);
}
.iw-home-main::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 720px; z-index: -1; pointer-events: none; background: linear-gradient(transparent 70%, var(--iw-bg)); }
.iw-home-inner { position: relative; z-index: 2; max-width: 1400px; margin: 0 auto; padding: 0 clamp(32px, 4.6vw, 72px) 48px; background: none; border: 0; box-shadow: none; }

.iw-home-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.iw-brand { display: flex; align-items: baseline; gap: 12px; flex: none; }
.iw-wordmark { font-family: var(--iw-font-display); font-size: 21px; font-weight: 760; letter-spacing: -.03em; }
.iw-wordmark span { color: var(--iw-accent-text); }
.iw-signature { font-size: 13px; color: var(--iw-text-3); white-space: nowrap; }
.iw-home-top-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.iw-search {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 12px; border-radius: 12px; font-size: 13px; color: var(--iw-text-3); min-width: 240px;
  background: color-mix(in oklab, var(--iw-surface-2) 70%, transparent); box-shadow: inset 0 0 0 1px var(--iw-line-2); backdrop-filter: blur(10px);
  transition: box-shadow var(--iw-dur-fast), background var(--iw-dur-fast);
}
.iw-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--iw-accent-text), 0 0 0 4px var(--iw-accent-soft); background: var(--iw-surface-2); }
.iw-search input { flex: 1; min-width: 0; height: 38px; min-height: 0; border: 0; outline: 0; background: transparent; box-shadow: none; padding: 0; color: var(--iw-text-1); font-size: 13px; }
.iw-search input::placeholder { color: var(--iw-text-3); opacity: 1; }
.iw-search input::-webkit-search-cancel-button { display: none; }
.iw-search kbd { margin-left: auto; }
.iw-agent-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 999px; font-size: 13px; color: var(--iw-text-2); white-space: nowrap;
  background: color-mix(in oklab, var(--iw-surface-2) 70%, transparent); box-shadow: inset 0 0 0 1px var(--iw-line-2); backdrop-filter: blur(10px);
  transition: box-shadow var(--iw-dur-fast), background var(--iw-dur-fast);
}
.iw-agent-pill:hover { background: var(--iw-surface-3); box-shadow: inset 0 0 0 1px var(--iw-accent-line); }
.iw-agent-pill b { color: var(--iw-text-1); font-weight: 600; }
.iw-agent-pill .iw-orb { width: 24px; height: 24px; }
.iw-top-avatar { display: none; }

/* Herói */
.iw-hero { display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 34%, 470px); gap: clamp(24px, 3vw, 56px); align-items: center; padding: 18px 0 30px; }
.iw-hero-copy { min-width: 0; }
.home-heading { position: relative; }
.iw-eyebrow { font-size: 15px; color: var(--iw-text-2); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.iw-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--iw-raw-cobalt-450), var(--iw-raw-teal-400)); }
.iw-title {
  font-family: var(--iw-font-display); font-weight: var(--iw-fw-display); color: var(--iw-text-1);
  font-size: clamp(44px, 4.45vw, 76px); line-height: var(--iw-lh-d2); letter-spacing: var(--iw-ls-d2); margin: 0 0 14px; font-variation-settings: "opsz" 96; text-wrap: balance;
}
.iw-title .ink { position: relative; display: inline-block; white-space: nowrap; }
.iw-title .ink svg { position: absolute; left: -2%; right: -4%; width: 106%; bottom: -.2em; height: .36em; overflow: visible; pointer-events: none; }
.iw-title .ink path { fill: none; stroke: url(#iw-ink-grad); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 330; stroke-dashoffset: 0; animation: iw-ink-draw 900ms var(--iw-ease-out) 250ms both; }
@keyframes iw-ink-draw { from { stroke-dashoffset: 330; } to { stroke-dashoffset: 0; } }
.iw-sub { font-size: 16.5px; line-height: 25px; color: var(--iw-text-2); margin: 0 0 26px; max-width: 52ch; }
.home-ai { display: block; }
.home-ai > summary { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home-agent-start { display: block; }

/* Compositor grande da tela inicial */
.brief-composer.iw-composer.hero {
  position: relative; border-radius: var(--iw-radius-2xl); padding: 18px 18px 14px 20px; gap: 6px;
  background: color-mix(in oklab, var(--iw-surface-2) 78%, transparent); backdrop-filter: blur(24px) saturate(140%);
  box-shadow: inset 0 0 0 1px var(--iw-line-2), inset 0 1px 0 var(--iw-highlight), 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 80px -30px rgba(61, 92, 255, .45);
}
.brief-composer.iw-composer.hero::before { opacity: .5; animation: iw-rim 9s linear infinite; animation-play-state: var(--iw-loop-state); }
.brief-composer.iw-composer.hero:focus-within::before { opacity: 1; }
.brief-composer.iw-composer.hero:focus-within { box-shadow: inset 0 0 0 1px transparent, 0 0 0 4px var(--iw-accent-soft), 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 80px -24px rgba(61, 92, 255, .55); }
.hero .composer-field textarea, .hero textarea[name="prompt"] { min-height: 76px; max-height: 300px; padding: 0; font-size: 17px; line-height: 26px; }
.hero .composer-bottom { margin-top: 6px; gap: 4px; }
.hero .composer-tools { gap: 4px; flex-wrap: nowrap; }
.hero .composer-bottom .iw-icon-btn { display: inline-flex; flex-direction: row; align-items: center; width: auto; height: 38px; padding: 0 10px; gap: 6px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--iw-text-2); }
.hero .composer-bottom .iw-icon-btn:hover:not(:disabled) { color: var(--iw-text-1); }
.hero .composer-bottom .iw-icon-btn svg { width: 17px; height: 17px; }
.hero .composer-tool-label { display: inline; }
.hero .composer-send.iw-send {
  display: inline-flex; flex-direction: row; align-items: center; justify-content: center; width: auto; height: var(--iw-control-h-lg); padding: 0 20px; border-radius: 14px; gap: 10px; font-size: 15px; font-weight: 600; margin-left: auto;
}
.hero .composer-send-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; order: -1; }
.hero .composer-send .i { width: 18px; height: 18px; transform: rotate(90deg); }
.hero + .iw-composer-hint, .home-ai .iw-composer-hint { margin-top: 10px; padding: 0 6px; font-size: 12.5px; }
.home-ai [data-home-reference-summary] { margin: 0; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; line-height: 18px; color: var(--iw-accent-text); background: var(--iw-accent-soft); box-shadow: inset 0 0 0 1px var(--iw-accent-line); }
.home-ai [data-home-reference-summary][hidden] { display: none; }
.iw-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 12px 0 0; padding: 0 6px; font-size: 12.5px; color: var(--iw-text-3); }
.iw-hint span { display: inline-flex; align-items: center; gap: 6px; }

/* Cena do Inko */
.iw-scene { position: relative; margin: 0; height: clamp(300px, 40vh, 420px); isolation: isolate; }
.iw-scene-glow { position: absolute; inset: 4% 0 10% 6%; border-radius: 50%; z-index: -2; background: radial-gradient(closest-side, rgba(61, 92, 255, .55), rgba(61, 92, 255, .16) 55%, transparent 75%); filter: blur(18px); }
.iw-scene-floor { position: absolute; left: 0; right: 0; bottom: 4%; height: 26%; z-index: -1; background: radial-gradient(50% 50% at 46% 40%, rgba(0, 0, 0, .55), transparent 70%); }
.iw-fan { position: absolute; inset: 0; }
.iw-fan > * {
  position: absolute; display: block; width: 41%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; left: 50%; top: 46%; background: #FBFBF9; overflow: hidden; padding: 0; border: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 60px -18px rgba(0, 0, 0, .85), 0 0 50px -16px rgba(61, 92, 255, .6);
  transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) perspective(1400px) rotateY(var(--ry, -16deg)) rotateX(4deg) rotate(var(--r)) scale(var(--s, 1));
  transition: transform var(--iw-dur-slow) var(--iw-ease-spring);
}
.iw-fan > img { background: #FBFBF9; }
.iw-fan > :nth-child(1) { --tx: -44%; --ty: -6%; --r: -10deg; --s: .9; --ry: -22deg; filter: brightness(.6) blur(1.2px); z-index: 1; }
.iw-fan > :nth-child(2) { --tx: 46%; --ty: -10%; --r: 9deg; --s: .92; --ry: -10deg; filter: brightness(.68) blur(.6px); z-index: 2; }
.iw-fan > :nth-child(3) { --tx: 6%; --ty: -2%; --r: -1.5deg; --s: 1.06; --ry: -14deg; z-index: 3; }
.iw-fan > button { cursor: pointer; }
.iw-fan > button:hover { filter: none; }
.iw-fan > button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iw-fan > button span { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(8, 9, 13, .72); }
.iw-fan .iw-fan-page::after { content: ""; position: absolute; left: 14%; right: 30%; top: 16%; height: 7%; border-radius: 3px; background: #D9DDE6; box-shadow: 0 26px 0 -2px #E6E9F0, 0 46px 0 -2px #E6E9F0; }
.iw-inko {
  position: absolute; z-index: 4; left: -10%; bottom: -2%; width: 58%; aspect-ratio: 1; object-fit: contain; transform: scaleX(-1);
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, .55)) drop-shadow(10px -4px 22px rgba(61, 92, 255, .38)) drop-shadow(-12px -6px 26px rgba(245, 194, 94, .2));
}
.iw-scene-cap { position: absolute; right: 0; bottom: -6px; z-index: 6; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--iw-text-3); }
.iw-scene-cap > span { display: none; }
.iw-scene-cap .iw-btn { height: 36px; padding: 0 10px; font-size: 12.5px; gap: 6px; background: var(--iw-glass-bg); backdrop-filter: var(--iw-glass-blur); box-shadow: inset 0 0 0 1px var(--iw-line-2); }
.iw-scene-cap .iw-btn svg { width: 15px; height: 15px; }
.home-film { position: absolute; inset: 2% 0 8% 4%; z-index: 7; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: var(--iw-shadow-3), 0 0 0 1px var(--iw-line-2); animation: iw-pop-in var(--iw-dur-base) var(--iw-ease-out) both; }
.home-film[hidden] { display: none; }
.home-film video { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }

/* Formatos */
.iw-sec-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.iw-sec-head h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.iw-sec-head p { font-size: 13px; color: var(--iw-text-3); margin: 0; }
.iw-sec-head .iw-sec-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.iw-sec-head .iw-btn-ghost { height: 36px; font-size: 13px; padding: 0 10px; gap: 6px; }
.iw-sec-head .iw-btn-ghost svg { width: 16px; height: 16px; }
.iw-count { font: 600 11px/20px var(--iw-font-mono); height: 20px; padding: 0 7px; border-radius: 999px; color: var(--iw-text-2); background: var(--iw-surface-3); align-self: center; }
.iw-count:empty { display: none; }
.iw-formats { margin-bottom: 36px; }
.iw-projects { margin-bottom: 40px; }
.iw-fgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.iw-ftile {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px 12px 14px; border-radius: 16px; text-align: left; overflow: hidden; color: var(--iw-text-1);
  background: color-mix(in oklab, var(--iw-surface-2) 82%, transparent); box-shadow: inset 0 0 0 1px var(--iw-line-1), inset 0 1px 0 var(--iw-highlight);
  transition: transform var(--iw-dur-fast) var(--iw-ease-spring), box-shadow var(--iw-dur-fast) var(--iw-ease-out), background var(--iw-dur-fast);
}
.iw-ftile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 0% 50%, color-mix(in oklab, var(--fc) 18%, transparent), transparent 70%); opacity: 0; transition: opacity var(--iw-dur-base); pointer-events: none; }
.iw-ftile:hover:not(:disabled) { transform: translateY(calc(var(--iw-move) * -3px)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fc) 55%, transparent), 0 16px 34px -18px rgba(0, 0, 0, .8); }
.iw-ftile:hover::after { opacity: 1; }
.iw-fglyph { position: relative; z-index: 1; width: 44px; height: 52px; display: grid; place-items: center; flex: none; }
.iw-fglyph i { display: block; border-radius: 3px; box-shadow: inset 0 0 0 1.75px var(--fc); background: color-mix(in oklab, var(--fc) 12%, transparent); }
.iw-fglyph.car i { width: 26px; height: 33px; box-shadow: inset 0 0 0 1.75px var(--fc), 5px -4px 0 -1px var(--iw-bg), 5px -4px 0 .75px color-mix(in oklab, var(--fc) 60%, transparent), 10px -8px 0 -1px var(--iw-bg), 10px -8px 0 .75px color-mix(in oklab, var(--fc) 35%, transparent); margin: 6px 8px 0 0; }
.iw-fglyph.post i { width: 32px; height: 32px; }
.iw-fglyph.story i { width: 24px; height: 42px; }
.iw-fglyph.custom i { width: 32px; height: 32px; box-shadow: none; border: 1.75px dashed var(--fc); background: none; }
.iw-ftxt { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iw-ftxt b { font-size: 15px; font-weight: 600; }
.iw-ftxt small { font: 500 12px/16px var(--iw-font-mono); color: var(--iw-text-3); white-space: nowrap; }
.iw-ftile > .i { position: relative; z-index: 1; margin-left: auto; color: var(--iw-text-3); width: 18px; height: 18px; }

/* Projetos */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 20px; }
.project-card { display: flex; flex-direction: column; gap: 12px; text-align: left; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--iw-text-1); min-width: 0; }
.project-preview {
  position: relative; height: clamp(170px, 23vh, 230px); border-radius: 18px; overflow: hidden; width: 100%; aspect-ratio: auto;
  background: radial-gradient(70% 80% at 50% 0%, rgba(255, 255, 255, .05), transparent 70%), var(--iw-surface-2);
  box-shadow: inset 0 0 0 1px var(--iw-line-1), inset 0 1px 0 var(--iw-highlight);
  transition: box-shadow var(--iw-dur-fast) var(--iw-ease-out), transform var(--iw-dur-fast) var(--iw-ease-spring);
}
.project-card:hover .project-preview { transform: translateY(calc(var(--iw-move) * -3px)); box-shadow: inset 0 0 0 1px var(--iw-line-3), 0 22px 40px -22px rgba(0, 0, 0, .9); }
.project-preview canvas {
  position: absolute; left: 50%; top: 54%; height: 70%; width: auto; max-width: 70%; border-radius: 4px; background: transparent; display: block;
  box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .10); transform: translate(-50%, -50%) translateX(var(--tx, 0)) rotate(var(--r, 0deg));
  transition: transform var(--iw-dur-base) var(--iw-ease-spring);
}
.project-preview canvas.project-stack-page { filter: brightness(.75); }
.project-preview canvas.page-1 { --tx: -46%; --r: -9deg; }
.project-preview canvas.page-2 { --tx: 46%; --r: 9deg; }
.project-card:hover .project-preview canvas.page-1 { --tx: -62%; --r: -13deg; }
.project-card:hover .project-preview canvas.page-2 { --tx: 62%; --r: 13deg; }
.project-preview.is-carousel canvas:not(.project-stack-page) { z-index: 3; }
.project-preview canvas[hidden] { display: none; }
.project-format { position: absolute; left: 12px; top: 12px; z-index: 4; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; color: var(--iw-text-2); background: var(--iw-glass-bg-strong); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px var(--iw-line-2); border: 0; }
.project-format[hidden] { display: none; }
.project-open { position: absolute; right: 10px; bottom: 10px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: var(--iw-accent); opacity: 0; transform: translateY(calc(var(--iw-move) * 6px)); transition: opacity var(--iw-dur-fast), transform var(--iw-dur-fast) var(--iw-ease-out); }
.project-open svg { width: 14px; height: 14px; transform: rotate(180deg); }
.project-card:hover .project-open, .project-card:focus-visible .project-open { opacity: 1; transform: none; }
.project-preview.is-draft { display: grid; place-items: center; }
.project-preview.is-draft::before { content: ""; position: absolute; left: 50%; top: 54%; width: 34%; aspect-ratio: 4 / 5; transform: translate(-50%, -50%); border-radius: 4px; border: 1.5px dashed var(--iw-line-3); }
.project-draft { position: relative; z-index: 2; display: grid; gap: 2px; text-align: center; color: var(--iw-text-3); font-size: 11.5px; }
.project-draft b { font-weight: 500; color: var(--iw-text-2); }
.project-draft span { display: none; }
.project-preview.preview-unavailable::after { content: "Prévia indisponível"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--iw-text-3); }
.project-meta { display: flex; flex-direction: column; gap: 3px; padding: 0 4px; }
.project-meta h3 { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.project-meta p { display: flex; flex-wrap: wrap; gap: 0 8px; margin: 0; font-size: 12.5px; color: var(--iw-text-3); }
.projects-empty { display: grid; place-items: center; text-align: center; padding: 42px 20px; border-radius: 18px; border: 1.5px dashed var(--iw-line-2); color: var(--iw-text-3); }
.projects-empty svg { width: 28px; height: 28px; color: var(--iw-text-2); margin-bottom: 8px; }
.projects-empty h3 { font-size: 15px; font-weight: 600; color: var(--iw-text-1); margin: 0 0 4px; }
.projects-empty p { margin: 0; font-size: 13px; max-width: 44ch; }
.loading-area, .search-empty { padding: 26px 4px; color: var(--iw-text-3); font-size: 13.5px; }

/* Modelos e contexto */
.home-curated { margin: 12px 0 40px; }
.home-curated[hidden] { display: none; }
.home-curated-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.home-curated-card { display: flex; flex-direction: column; gap: 8px; text-align: left; color: var(--iw-text-1); }
.home-curated-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: var(--iw-surface-3); box-shadow: var(--iw-shadow-thumb), 0 0 0 1px rgba(255, 255, 255, .09); transition: transform var(--iw-dur-fast) var(--iw-ease-spring); }
.home-curated-card:hover img { transform: translateY(calc(var(--iw-move) * -3px)); }
.home-curated-card b { display: block; font-size: 13.5px; font-weight: 600; }
.home-curated-card small { font-size: 12px; color: var(--iw-text-3); }
.home-context { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 18px 20px; border-radius: 18px; background: color-mix(in oklab, var(--iw-surface-2) 70%, transparent); box-shadow: inset 0 0 0 1px var(--iw-line-1); }
.home-context > div:first-child { display: grid; gap: 2px; font-size: 13px; color: var(--iw-text-3); }
.home-context b { color: var(--iw-text-1); font-weight: 600; font-size: 14px; }
.home-context .context-shortcut, .home-context .context-import { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px 6px 10px; border-radius: 14px; background: var(--iw-surface-2); box-shadow: inset 0 0 0 1px var(--iw-line-2); text-align: left; color: var(--iw-text-1); }
.home-context .context-shortcut:hover, .home-context .context-import:hover { background: var(--iw-surface-3); box-shadow: inset 0 0 0 1px var(--iw-accent-line); }
.home-context .context-shortcut > svg, .home-context .context-import > svg { color: var(--iw-accent-text); }
.home-context .context-shortcut b { font-size: 13.5px; display: block; }
.home-context .context-shortcut small { display: block; font-size: 12px; color: var(--iw-text-3); }
.context-swatches { display: inline-flex; margin-left: 4px; }
.context-swatches i { width: 14px; height: 14px; border-radius: 50%; margin-left: -4px; box-shadow: 0 0 0 1.5px var(--iw-surface-2); }

/* Páginas internas (referências, marcas, agente) */
.iw-page-main { overflow: hidden auto; padding: 8px clamp(20px, 4vw, 56px) 56px; background: var(--iw-bg); }
.iw-page-main > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.iw-page-main .page-header, .iw-page-main > .page-header { padding: 24px 0 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 0; }
.page-header h1 { font-family: var(--iw-font-display); font-size: var(--iw-fs-d3); line-height: var(--iw-lh-d3); letter-spacing: var(--iw-ls-d3); font-weight: var(--iw-fw-display); margin: 0 0 6px; text-wrap: balance; color: var(--iw-text-1); }
.page-header p { margin: 0; font-size: 15px; color: var(--iw-text-2); max-width: 60ch; }

/* ======================================================================
   Celular: barra de abas, topo enxuto, formatos em rolagem
   ====================================================================== */
.iw-rail-create { display: none; }
@media (max-width: 1100px) {
  .iw-hero { grid-template-columns: minmax(0, 1fr); }
  .iw-scene { display: none; }
  .home-heading::after { content: ""; position: absolute; right: -6px; top: -10px; width: 118px; height: 118px; background: url("brand/inko-body.png") center / contain no-repeat; transform: scaleX(-1); pointer-events: none; z-index: 3; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, .5)); }
  .iw-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 780px) and (min-width: 700px) {
  .iw-home-top { height: 60px; }
  .iw-hero { padding: 4px 0 18px; }
  .iw-eyebrow { margin-bottom: 8px; }
  .iw-title { font-size: 52px; margin-bottom: 10px; }
  .iw-sub { margin-bottom: 16px; font-size: 15.5px; line-height: 23px; }
  .hero textarea[name="prompt"] { min-height: 52px; }
  .iw-hint { margin-top: 8px; }
  .iw-formats { margin-bottom: 24px; }
  .iw-scene { height: 300px; }
}
@media (max-width: 700px) {
  .app-shell.iw-page { grid-template-columns: minmax(0, 1fr); }
  .iw-page > .main-content { grid-column: 1; padding-bottom: 84px; }
  .iw-page > .main-nav {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 76px; padding: 6px 8px 14px; z-index: var(--iw-z-popover); flex-direction: row; border-right: 0; border-top: 1px solid var(--iw-line-1);
    background: var(--iw-glass-bg-strong); backdrop-filter: var(--iw-glass-blur); overflow: visible;
  }
  .iw-page > .main-nav .iw-rail-logo { display: none; }
  .iw-page > .main-nav > nav { flex-direction: row; align-items: center; justify-content: space-around; overflow: visible; width: 100%; gap: 0; }
  .iw-page > .main-nav .iw-rail-tools, .iw-page > .main-nav .iw-rail-foot { display: contents; }
  .iw-page > .main-nav .iw-rail-btn { width: auto; flex: 1; min-height: 52px; font-size: 11px; background: none; box-shadow: none; }
  .iw-page > .main-nav .iw-rail-btn.active { background: none; box-shadow: none; }
  .iw-page > .main-nav [data-action="home-models"] { order: 4; }
  .iw-page > .main-nav [data-action="connections"] { order: 5; }
  .iw-page > .main-nav [data-action="projects"] { order: 1; }
  .iw-page > .main-nav [data-action="home-projects"] { order: 2; }
  .iw-page > .main-nav .iw-rail-create { display: flex; order: 3; }
  .iw-page > .main-nav .iw-rail-create > svg { width: 48px; height: 40px; padding: 10px 14px; border-radius: 14px; color: #fff; background: linear-gradient(180deg, var(--iw-accent-top), var(--iw-accent-bottom)); box-shadow: var(--iw-button-sheen), var(--iw-glow-accent); }
  .iw-page > .main-nav .iw-rail-create > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .iw-page > .main-nav [data-action="references"], .iw-page > .main-nav [data-action="brands"], .iw-page > .main-nav .iw-avatar { display: none; }
  .iw-home-inner { padding: 0 18px 24px; }
  .iw-home-top { height: 56px; }
  .iw-signature, .iw-search { display: none; }
  .iw-top-avatar { display: grid; width: 36px; height: 36px; }
  .iw-agent-pill { padding: 0 12px 0 6px; gap: 6px; max-width: 168px; overflow: hidden; }
  .iw-agent-pill b { overflow: hidden; text-overflow: ellipsis; }
  .iw-pill-state { display: none; }
  .home-heading .iw-eyebrow, .home-heading .iw-title { padding-right: 92px; }
  .hero .composer-bottom { flex-wrap: wrap; row-gap: 10px; }
  .hero .composer-tools { flex: 1 1 100%; }
  .hero .composer-send.iw-send { width: 100%; margin-left: 0; height: 48px; }
  .composer-picks .brand-picker { min-width: 0; }
  .iw-title { font-size: 40px; margin-bottom: 18px; }
  .iw-eyebrow { font-size: 14px; margin-bottom: 8px; }
  .iw-sub { font-size: 15px; line-height: 22px; margin-bottom: 18px; }
  .brief-composer.iw-composer.hero { padding: 14px 14px 12px; border-radius: 22px; }
  .hero textarea[name="prompt"] { font-size: 16px; min-height: 72px; }
  .hero .composer-tool-label { display: none; }
  .hero .composer-bottom .iw-icon-btn { width: 40px; padding: 0; }
  .hero .composer-send.iw-send { padding: 0 16px; font-size: 14px; }
  .iw-hint { gap: 6px 14px; }
  .home-ai .iw-composer-hint { display: none; }
  .iw-formats { margin-bottom: 28px; }
  .iw-fgrid { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px; scrollbar-width: none; }
  .iw-fgrid::-webkit-scrollbar { display: none; }
  .iw-fgrid .iw-ftile { flex: none; width: 168px; min-height: 68px; }
  .iw-fgrid .iw-ftile > .i { display: none; }
  .iw-sec-head p { display: none; }
  .project-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .project-preview { height: 168px; border-radius: 16px; }
  .project-open { display: none; }
  .home-context { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .iw-title .ink path { animation: none; }
  .iw-fan > *, .project-preview canvas { transition: none; }
}

/* Páginas herdadas (Meu agente, Referências): mesma matéria, sem ilhas claras */
.reference-access-symbol { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 12px; color: var(--iw-accent-text); background: var(--iw-accent-soft); box-shadow: inset 0 0 0 1px var(--iw-accent-line); }
.reference-access-symbol svg { width: 22px; height: 22px; }
.agent-reference-access { padding: 22px 24px; border-radius: 18px; background: var(--iw-surface-2); box-shadow: inset 0 0 0 1px var(--iw-line-2); }
.agent-reference-access h2 { font-size: 18px; font-weight: 650; margin: 0 0 8px; }
.agent-reference-access p { font-size: 14px; line-height: 1.7; color: var(--iw-text-2); margin: 0 0 8px; }
.reference-access-fallback { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--iw-accent-soft); font-size: 13.5px; color: var(--iw-text-2); }
.reference-access-fallback b { color: var(--iw-text-1); }

.runtime-initial { color: var(--iw-accent-text); font-weight: 650; }

/* ======================================================================
   Entrada: login, convite e link indisponível (Nova, escuro)
   ====================================================================== */
.auth-screen { position: relative; isolation: isolate; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr); background: var(--iw-bg); color: var(--iw-text-1); overflow: hidden; }
.auth-screen::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; filter: blur(46px);
  background:
    radial-gradient(closest-side at 22% 38%, rgba(61, 92, 255, .30), transparent) 0 0 / 780px 520px no-repeat,
    radial-gradient(closest-side at 50% 60%, rgba(62, 224, 197, .12), transparent) 28% 46% / 520px 420px no-repeat,
    radial-gradient(closest-side at 80% 20%, rgba(245, 194, 94, .10), transparent) 60% 0 / 420px 320px no-repeat;
}
.auth-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: clamp(28px, 5vw, 64px); min-height: 100dvh; min-width: 0; }
.auth-story .wordmark { display: inline-flex; align-items: center; gap: 12px; width: fit-content; color: var(--iw-text-1); }
.auth-story .wordmark .product-symbol { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.auth-story .wordmark .product-name { display: flex; flex-direction: column; gap: 2px; font-family: var(--iw-font-display); font-size: 22px; font-weight: 760; letter-spacing: -.03em; line-height: 1; }
.auth-story .wordmark .product-name small { font-family: var(--iw-font-ui); font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: var(--iw-text-3); }
.auth-showcase { display: grid; gap: 16px; align-content: center; flex: 1; }
.auth-showcase h1 { font-family: var(--iw-font-display); font-weight: var(--iw-fw-display); font-size: clamp(42px, 5vw, 78px); line-height: var(--iw-lh-d2); letter-spacing: var(--iw-ls-d2); margin: 0; text-wrap: balance; font-variation-settings: "opsz" 96; }
.auth-showcase p { margin: 0; max-width: 46ch; font-size: 16.5px; line-height: 25px; color: var(--iw-text-2); }
.auth-creative-scene { position: relative; height: clamp(250px, 34vh, 340px); margin-top: 8px; isolation: isolate; }
.auth-creative-scene::before { content: ""; position: absolute; inset: 6% 18% 4% 4%; border-radius: 50%; z-index: -1; background: radial-gradient(closest-side, rgba(61, 92, 255, .5), rgba(61, 92, 255, .12) 60%, transparent 78%); filter: blur(16px); }
.auth-mascot { margin: 0; height: 100%; }
.auth-mascot img { height: 100%; width: auto; max-width: 70%; object-fit: contain; filter: drop-shadow(0 24px 22px rgba(0, 0, 0, .55)) drop-shadow(8px -4px 22px rgba(61, 92, 255, .35)) drop-shadow(-10px -4px 24px rgba(245, 194, 94, .18)); }
.auth-mascot figcaption { position: absolute; left: 0; bottom: -4px; font-size: 13px; color: var(--iw-text-3); }
.scene-note { position: absolute; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 17px; font-weight: 600; color: var(--iw-text-1); background: var(--iw-glass-bg-strong); backdrop-filter: var(--iw-glass-blur); box-shadow: var(--iw-shadow-2); }
.scene-note.note-a { left: 48%; top: 6%; transform: rotate(-4deg); color: var(--iw-accent-text); }
.scene-note.note-b { left: 58%; bottom: 14%; transform: rotate(5deg); color: var(--iw-success); }
.scene-spark { position: absolute; right: 12%; top: 2%; font-size: 30px; line-height: 1; color: var(--iw-raw-teal-400); }
.auth-feature-row { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; color: var(--iw-text-3); }
.auth-feature-row span { display: inline-flex; align-items: center; gap: 8px; }
.auth-feature-row svg { width: 16px; height: 16px; color: var(--iw-text-2); }
.auth-form { display: grid; place-items: center; padding: clamp(24px, 4vw, 56px); background: var(--iw-surface-1); border-left: 1px solid var(--iw-line-1); box-shadow: -40px 0 80px -60px rgba(0, 0, 0, .8); }
.auth-form-inner { width: min(420px, 100%); display: grid; gap: 14px; padding: 28px; border-radius: 24px; background: var(--iw-surface-2); box-shadow: inset 0 0 0 1px var(--iw-line-2), inset 0 1px 0 var(--iw-highlight), 0 30px 80px -40px rgba(0, 0, 0, .9); }
.auth-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--iw-accent-text); background: var(--iw-accent-soft); box-shadow: inset 0 0 0 1px var(--iw-accent-line); }
.auth-icon svg { width: 22px; height: 22px; }
.auth-form-inner h2 { font-family: var(--iw-font-display); font-size: var(--iw-fs-d4); line-height: var(--iw-lh-d4); letter-spacing: var(--iw-ls-d4); font-weight: var(--iw-fw-display); margin: 4px 0 0; }
.auth-form-inner > p { margin: 0; font-size: 14.5px; line-height: 22px; color: var(--iw-text-2); }
#auth-form { display: grid; gap: 14px; margin-top: 4px; }
#auth-form .button.full { width: 100%; height: var(--iw-control-h-lg); }
.auth-help { font-size: 12.5px !important; line-height: 18px !important; color: var(--iw-text-3) !important; }
.auth-agent-note { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--iw-surface-1); box-shadow: inset 0 0 0 1px var(--iw-line-1); }
.auth-agent-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--iw-accent-text); }
.auth-agent-note p { margin: 0; font-size: 13px; line-height: 19px; color: var(--iw-text-1); }
.auth-agent-note p span { color: var(--iw-text-3); }
.form-error { color: var(--iw-danger); font-size: 13px; line-height: 19px; margin: 0; }
.form-error:empty { display: none; }
.link-error { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 32px; text-align: center; background: radial-gradient(60% 50% at 50% 30%, rgba(61, 92, 255, .16), transparent 70%), var(--iw-bg); }
.link-error .product-symbol { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .5)); }
.link-error h1 { font-family: var(--iw-font-display); font-size: var(--iw-fs-d3); line-height: var(--iw-lh-d3); letter-spacing: var(--iw-ls-d3); font-weight: var(--iw-fw-display); margin: 0; }
.link-error p { margin: 0; max-width: 44ch; font-size: 15px; line-height: 23px; color: var(--iw-text-2); }
@media (max-width: 900px) {
  .auth-screen { grid-template-columns: minmax(0, 1fr); }
  .auth-story { min-height: auto; padding-bottom: 8px; }
  .auth-showcase { gap: 12px; }
  .auth-creative-scene { height: 210px; }
  .auth-feature-row { display: none; }
  .auth-form { border-left: 0; border-top: 1px solid var(--iw-line-1); padding: 20px 16px 32px; }
  .auth-form-inner { padding: 22px; border-radius: 22px; }
}
@media (max-width: 480px) { .scene-note { display: none; } .auth-showcase h1 { font-size: 40px; } }
