/* Painel Espiral: preto, branco e oliva nos detalhes (manual v2). Fonte: Manrope. */
@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/manrope/Manrope-VF.woff2") format("woff2-variations"),
       url("../assets/fonts/manrope/Manrope-VF.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ink: #0A0A0A;
  --paper: #FFFFFF;
  --olive: #808000;
  --sun: #A6A628;
  --text: var(--paper);
  --text-2: color-mix(in srgb, var(--paper) 72%, var(--ink));
  --text-3: color-mix(in srgb, var(--paper) 52%, var(--ink));
  --line: color-mix(in srgb, var(--paper) 12%, transparent);
  --card: color-mix(in srgb, var(--paper) 6%, var(--ink));
  --card-2: color-mix(in srgb, var(--paper) 10%, var(--ink));
  --warn: #E0A84A;
  --r-card: 20px;
  --r-pill: 999px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ink);
  color: var(--text);
  font: 400 15px/1.55 "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--text-3); }
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
pre.caption { white-space: pre-wrap; font: inherit; margin: 0; color: var(--text-2); }

/* top bar */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.top__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.top__brand img { height: 22px; width: auto; display: block; }
.top__product { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.top__ctx { display: flex; gap: 8px; }
.top__user { margin-left: auto; font-size: 13px; color: var(--text-3); }
select, input, textarea {
  font: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 12px;
}
textarea { width: 100%; min-height: 84px; resize: vertical; }
input[type="text"], input[type="url"] { width: 100%; }
select:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--sun); outline-offset: 2px;
}

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--card); border-radius: var(--r-pill); }
.tabs a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--r-pill);
  text-decoration: none; font-weight: 600; font-size: 14px; color: var(--text-2);
}
.tabs a span {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  font-size: 11px; background: var(--line);
}
.tabs a[aria-current="page"] { background: var(--card-2); color: var(--text); }
.tabs a[aria-current="page"] span { background: var(--sun); color: var(--ink); }

.demo-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  padding: 8px 24px; font-size: 13px; color: var(--text-2);
  background: color-mix(in srgb, var(--sun) 12%, var(--ink));
  border-bottom: 1px solid var(--line);
}
.demo-bar select { padding: 4px 8px; margin-left: 6px; }

/* layout */
.view { max-width: 1180px; margin: 0 auto; padding: 32px 24px 96px; outline: none; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.head p { color: var(--text-2); max-width: 62ch; margin-top: 6px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px 22px;
}
.card--plan pre { white-space: pre-wrap; font: inherit; color: var(--text-2); margin: 12px 0 16px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 18px; border-radius: var(--r-pill);
  font: 600 14px "Manrope", sans-serif; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
}
.btn:hover { background: color-mix(in srgb, var(--paper) 14%, var(--ink)); }
.btn--primary { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--sun) 88%, var(--paper)); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn--small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.link { background: none; border: 0; padding: 0; color: var(--text); text-decoration: underline; font: inherit; cursor: pointer; }

/* status chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; background: var(--line); color: var(--text-2);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip--briefing { color: var(--text-2); }
.chip--arte { color: var(--warn); }
.chip--pronto { color: var(--sun); }
.chip--publicado { color: var(--paper); }
.chip--comments { color: var(--warn); }
.chip--comments::before { display: none; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-3); }

/* briefing list */
.post { display: grid; gap: 12px; }
.post__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.post__hook { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.post details summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 14px; }
.post details[open] summary { margin-bottom: 12px; }
.brief { display: grid; gap: 14px; }
.brief ol { margin: 4px 0 0; padding-left: 20px; color: var(--text-2); }
.brief .box { padding: 14px 16px; border-radius: 14px; background: var(--ink); border: 1px solid var(--line); }
.ask { display: grid; gap: 8px; }

/* art grid (feed overview) */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-width: 760px; }
.tile {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--card); text-decoration: none;
}
.tile canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile__empty { position: absolute; inset: 0; display: grid; align-content: center; gap: 8px; padding: 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.tile__badge { position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; justify-content: space-between; gap: 6px; }
.tile__badge .chip { background: color-mix(in srgb, var(--ink) 78%, transparent); backdrop-filter: blur(6px); }
.tile__date { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink) 78%, transparent); }
.tile__fmt { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink) 78%, transparent); }
.tile:hover { outline: 2px solid var(--sun); outline-offset: -2px; }
.overview { display: grid; grid-template-columns: minmax(0, 760px) minmax(240px, 1fr); gap: 32px; align-items: start; }
.legend { display: grid; gap: 10px; font-size: 14px; color: var(--text-2); }

/* post detail */
.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 1fr); gap: 32px; align-items: start; }
.stage { position: sticky; top: 96px; display: grid; gap: 12px; }
.stage__canvas { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.stage--story .stage__canvas { max-width: 380px; margin: 0 auto; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: 0 0 auto; padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--sun); }
.thumbs canvas { display: block; width: 64px; height: auto; border-radius: 6px; }
.panel { display: grid; gap: 16px; }
.panel section { display: grid; gap: 10px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--text-3); }
.comments { display: grid; gap: 8px; }
.comment { padding: 12px 14px; border-radius: 14px; background: var(--ink); border: 1px solid var(--line); }
.comment--done { opacity: 0.5; }
.comment b { font-size: 13px; }
.comment p { color: var(--text-2); white-space: pre-wrap; margin-top: 4px; }
.back { display: inline-block; margin-bottom: 16px; color: var(--text-3); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--text); }

/* login */
.login { max-width: 400px; margin: 8vh auto 0; display: grid; gap: 16px; }
.login input { width: 100%; }
.login__error { color: var(--warn); min-height: 1.5em; font-size: 14px; }

/* ready list */
.ready { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: start; }
.ready canvas { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  padding: 10px 18px; border-radius: var(--r-pill); background: var(--paper); color: var(--ink);
  font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 860px) {
  .top { padding: 12px 16px; }
  .top__user { display: none; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  .tabs a { white-space: nowrap; padding: 8px 12px; }
  .tile__fmt { display: none; }
  .tile__date { font-size: 10px; }
  .tile__badge .chip { font-size: 0; gap: 0; padding: 5px; }
  .tile__badge .chip--comments { font-size: 11px; padding: 2px 7px; }
  .view { padding: 24px 16px 80px; }
  .detail, .overview { grid-template-columns: 1fr; }
  .stage { position: static; }
  .ready { grid-template-columns: 96px 1fr; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
