/* PROTOCOLO DELECTUS: tema do painel no tom do convite.
   Isolado do restante: remover o <link> em index.html volta ao visual anterior.
   Usa o mesmo fundo, a mesma serifa e o mesmo bronze fosco da tela do convite
   (ver 00_convite/entry-tree.css). Escopo: somente #dashboardView. */

:root {
  --dc-bronze-lt: #dcc3a0;
  --dc-bronze: #c9955a;
  --dc-bronze-btn: #94683f;
  --dc-line: rgba(94, 66, 44, .34);
  --dc-text: #efe3d1;
  --dc-text-soft: #a78f77;
  --dc-text-dim: #6f6255;
}

/* Fundo igual ao do convite */
body:has(:is(#dashboardView, #stageView[data-padrao]).active) {
  background:
    radial-gradient(ellipse at 48% 42%, #24171480, transparent 78%),
    radial-gradient(ellipse at 65% 72%, #20101460, transparent 85%),
    linear-gradient(150deg, #0a0707, #110b09 52%, #080606);
  background-attachment: fixed;
}
body:has(:is(#dashboardView, #stageView[data-padrao]).active)::before {
  opacity: .07;
  background:
    repeating-linear-gradient(23deg, #d6bfa522 0 1px, transparent 1px 3px),
    repeating-linear-gradient(113deg, #c4a38b18 0 1px, transparent 1px 5px);
  mix-blend-mode: soft-light;
}
body:has(:is(#dashboardView, #stageView[data-padrao]).active)::after {
  background: radial-gradient(ellipse at center, transparent 20%, #00000030 70%, #00000070);
}

/* Sem cartão: coluna de leitura direto sobre o fundo */
#dashboardView .dashboard-card {
  max-width: 42rem;
  margin: 0 auto;
  min-height: 0;
  padding: clamp(28px, 6vw, 56px) 16px 28px;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
#dashboardView .dashboard-card::after { display: none; }

/* Cabeçalho */
#dashboardView .dashboard-head { display: block; }
#dashboardView .protocol-heading { text-align: center; }
#dashboardView .head-lock {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0 auto 14px;
  color: #c09a6a;
}
#dashboardView .head-eyebrow {
  margin: 0;
  font: 500 10.5px/1.4 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #a77f50;
}
#dashboardView .protocol-heading h1 {
  margin: 14px 0 16px;
  font: 500 clamp(32px, 7vw, 51px)/1 "Cormorant Garamond", Georgia, serif;
  letter-spacing: .08em;
  color: #f1e6d6;
  text-wrap: balance;
}
/* Lema no cabeçalho: a mesma frase do rodapé e do espelho. Vira link para o
   Arquivo de Investigação depois da primeira visita ao espelho (stage6-mirror.js). */
#dashboardView .head-motto {
  margin: -4px 0 16px;
  font: italic 500 clamp(15px, 2.4vw, 17px)/1.35 "Cormorant Garamond", Georgia, serif;
  letter-spacing: .03em;
  color: #9c8063;
}
#dashboardView .head-motto.mirror-protocol-link a {
  color: #b9935d;
  text-decoration: none;
  animation: delectus-amber-clue 2.45s ease-in-out infinite;
}
#dashboardView .head-motto.mirror-protocol-link a:hover,
#dashboardView .head-motto.mirror-protocol-link a:focus-visible {
  color: #fff1d0;
  text-shadow: 0 0 3px rgba(255,246,223,.95), 0 0 12px rgba(255,220,141,.80), 0 0 26px rgba(217,143,49,.48);
  outline-color: #d6b07a;
}
#dashboardView .dashboard-footer .quote[hidden] { display: none; }
#dashboardView .status-line {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 400 11.5px/1 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .1em;
  color: #9a8672;
}
#dashboardView .status-line .prompt { color: #8e6540; margin-right: -2px; }
#dashboardView .status-line strong { font-weight: 500; color: var(--dc-bronze); }
#dashboardView .status-line .cursor {
  margin-left: -6px;
  color: var(--dc-bronze);
  animation: dcCursor 1.1s steps(1) infinite;
}
#dashboardView .status-line.is-dim strong,
#dashboardView .status-line.is-dim .cursor { color: #8a7864; }
@keyframes dcCursor { 50% { opacity: 0; } }

#dashboardView .progress-ticks {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  max-width: 26rem;
  margin: 24px auto 0;
}
#dashboardView .progress-ticks i { height: 2px; background: rgba(94, 66, 44, .45); }
#dashboardView .progress-ticks i.on { background: #8e6540; }
#dashboardView .progress-ticks i.cur { background: var(--dc-bronze); }
#dashboardView .progress-count {
  margin: 11px 0 0;
  font: 400 10.5px/1.4 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #7b6a58;
}
#dashboardView .important-info-btn { display: none; }

/* Linha do tempo */
#dashboardView .stages-wrap {
  margin-top: clamp(22px, 4vw, 32px);
  padding-top: 4px;
  border-top: 1px solid var(--dc-line);
}
#dashboardView .stage-list::before { display: none; }
/* Conectores vêm do tema anterior (.stage-row::before/::after); só ajustamos as medidas */
#dashboardView .stage-row {
  --marker-size: 50px;
  --marker-line-x: 25px;
  --marker-line-gap: 30px;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 18px;
  min-height: 0;
  padding: 17px 0;
  border-bottom: 1px solid rgba(94, 66, 44, .2);
  text-align: left;
}
#dashboardView .stage-row:last-child { border-bottom: 0; }

/* Anel com numeral romano */
#dashboardView .stage-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  min-width: 50px;
  overflow: visible;
  font: 600 17px/1 "Cormorant Garamond", Georgia, serif !important;
  letter-spacing: .03em;
  color: #dfc7a9 !important;
  border: 1px solid #765333;
  background: #0b0807;
  box-shadow: none !important;
}
#dashboardView .stage-row .stage-icon::after { content: none !important; }
#dashboardView .stage-row.done .stage-icon {
  color: #f8ecd8 !important;
  border-color: #b88d5c;
  background: radial-gradient(circle at 36% 28%, #a67b4f, #6f4d30 62%, #4a3220);
  box-shadow: inset 0 1px 0 rgba(255, 225, 180, .28) !important;
}
#dashboardView .stage-row.available .stage-icon {
  color: #fff0d2 !important;
  border-color: var(--dc-bronze);
  box-shadow: 0 0 22px rgba(201, 149, 90, .28), inset 0 0 14px rgba(201, 149, 90, .12) !important;
}
#dashboardView .stage-row.locked .stage-icon {
  color: #5a524b !important;
  border: 1px dashed #4a433c;
}

#dashboardView .stage-title {
  display: block;
  font: 600 clamp(20px, 3.4vw, 25px)/1.1 "Cormorant Garamond", Georgia, serif;
  letter-spacing: .03em;
  color: #eadbc7;
}
#dashboardView .stage-subtitle {
  display: block;
  margin-top: 5px;
  font: 400 11px/1.4 "IBM Plex Mono", ui-monospace, monospace !important;
  letter-spacing: .07em !important;
  text-transform: uppercase;
  color: var(--dc-text-soft);
}
#dashboardView .stage-row.locked { opacity: 1; }
#dashboardView .stage-row.locked .stage-title { color: #5f564e; }
#dashboardView .stage-row.locked .stage-subtitle { color: #554d46; }
#dashboardView .stage-row.available .stage-subtitle { color: #c4a173; }
#dashboardView .stage-row.available {
  box-shadow: none;
  background: linear-gradient(90deg, rgba(123, 69, 19, .09), transparent 55%);
}

/* Estados em texto; só "Abrir" parece botão, e discreto */
#dashboardView .stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font: 400 10.5px/1 "IBM Plex Mono", ui-monospace, monospace !important;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dc-text-soft);
  white-space: nowrap;
  justify-self: end;
}
#dashboardView .stage-badge svg { width: 15px; height: 15px; color: #a66a3b; }
#dashboardView .stage-row.locked .stage-badge { color: #5a524b; }
#dashboardView .stage-row.available .stage-badge {
  gap: 9px;
  padding: 10px 14px 9px;
  border: 1px solid rgba(201, 149, 90, .5);
  border-radius: 3px;
  background: transparent;
  font: 600 14px/1 "Cormorant Garamond", Georgia, serif !important;
  letter-spacing: .18em;
  color: var(--dc-bronze-lt);
  transition: background .2s, border-color .2s, color .2s;
}
#dashboardView .stage-row.available .stage-badge svg { width: 13px; height: 13px; color: inherit; opacity: .75; transition: transform .2s; }
#dashboardView .stage-row.available:hover .stage-badge,
#dashboardView .stage-row.available:focus-visible .stage-badge {
  background: rgba(148, 104, 63, .2);
  border-color: var(--dc-bronze);
  color: #f4ecdf;
}
#dashboardView .stage-row.available:hover .stage-badge svg { transform: translateX(2px); opacity: 1; }
#dashboardView .stage-row:focus-visible { outline: 2px solid var(--dc-text); outline-offset: 3px; }

/* Tarja nas descrições ainda não liberadas */
#dashboardView .redact {
  display: inline-block;
  width: 9ch;
  height: .8em;
  background: #2a211b;
  border-radius: 1px;
  vertical-align: -.08em;
}
#dashboardView .redact.wide { width: 15ch; height: .72em; }
#dashboardView .stage-row.beyond.locked .stage-icon { font-size: 14px; }

/* Rodapé */
#dashboardView .dashboard-footer {
  margin-top: clamp(20px, 4vw, 32px);
  padding-top: clamp(22px, 4vw, 30px);
  border-top: 1px solid var(--dc-line);
  text-align: center;
}
#dashboardView .quote {
  margin: 0;
  font: italic 500 clamp(18px, 3vw, 22px)/1.3 "Cormorant Garamond", Georgia, serif;
  letter-spacing: .02em;
  color: #c9ad8d;
}
#dashboardView .access-copy { display: none; }
#dashboardView .dashboard-actions { display: flex; justify-content: center; margin-top: 26px; }
#dashboardView #continueBtn { display: none; }
#dashboardView #logoutBtn {
  min-height: 0;
  padding: 4px 2px;
  border: 0;
  background: none;
  box-shadow: none;
  font: 400 12px/1 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .1em;
  color: #b0916f;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(176, 145, 111, .35);
}
#dashboardView #logoutBtn:hover { color: #e0c9a8; background: none; }
#dashboardView .protocol-reset-link { margin-top: 20px; }

@media (max-width: 520px) {
  #dashboardView .stage-row {
    --marker-size: 44px;
    --marker-line-x: 22px;
    --marker-line-gap: 27px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 14px;
  }
  #dashboardView .stage-icon { width: 44px; height: 44px; min-width: 44px; font-size: 15px !important; }
  #dashboardView .stage-row.done .stage-badge,
  #dashboardView .stage-row.locked .stage-badge { font-size: 0 !important; gap: 0; min-width: 0 !important; width: auto !important; justify-content: flex-end; }
  #dashboardView .stage-row.done .stage-badge svg,
  #dashboardView .stage-row.locked .stage-badge svg { width: 17px; height: 17px; }
  #dashboardView .stage-row.locked .stage-badge .badge-text { display: none; }
}

/* Monitor largo: a lista de etapas não é texto corrido, então pode ser mais larga que a coluna de leitura. */
@media (min-width: 1200px) {
  #dashboardView .dashboard-card { max-width: 50rem; }
  #dashboardView .protocol-heading h1 { font-size: 60px; }
  #dashboardView .stage-title { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  #dashboardView .status-line .cursor { animation: none; }
  #dashboardView .head-motto.mirror-protocol-link a { animation: none; color: #d6b07a; }
}
