/* Paleta */
:root{
  --yellow:#F2C94C;
  --yellow-soft:#FFF4C7;
  --orange:#F2994A;
  --orange-soft:#FCE3CF;
  --offwhite:#F9F7F3;
  --white:#FFFFFF;
  --text:#2D2A26;
  --muted:#6B675F;
  --border:#E8E2D9;
  --shadow:0 1px 2px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}

/* Base */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Arial,sans-serif;
  color:var(--text);
  background:var(--white);
  line-height:1.6;
}
.container{width:min(1100px,92%); margin-inline:auto}
.diagram{display:block; width:100%; height:auto; border:1px solid var(--border); border-radius:.75rem}

/* Acessibilidade */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0;
}
.skip-to-content{position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden}
.skip-to-content:focus{
  left:1rem; top:1rem; width:auto; height:auto; background:var(--yellow); color:var(--text);
  padding:.5rem .75rem; border-radius:.5rem; box-shadow:var(--shadow)
}

/* Header */
.site-header{
  background:linear-gradient(180deg, var(--offwhite), var(--white));
  border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:10;
}
.header-inner{display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 0}
.site-header h1{margin:0; font-size:1.25rem; letter-spacing:.2px}
.nav{list-style:none; display:flex; gap:.5rem; margin:0; padding:0}
.nav a{display:inline-block; padding:.5rem .7rem; border-radius:.5rem; text-decoration:none; color:var(--text)}
.nav a:hover{background:var(--offwhite)}
.nav a:focus-visible{outline:2px solid var(--orange); outline-offset:2px}

/* Seções */
.section{padding:2.25rem 0; border-bottom:1px solid var(--border)}
.section h2{margin-top:0; font-size:1.5rem}
.section-header{display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap}
.callout{
  background:var(--offwhite); border:1px dashed var(--border);
  border-left:6px solid var(--orange); padding:1rem; border-radius:.75rem;
}

/* Botões */
.btn{
  appearance:none; border:1px solid var(--orange); background:transparent; color:var(--text);
  padding:.6rem .9rem; border-radius:.6rem; cursor:pointer; font-weight:600;
}
.btn:hover{background:var(--offwhite)}
.btn:focus-visible{outline:2px solid var(--orange); outline-offset:2px}
.btn-primary{background:var(--orange); border-color:var(--orange); color:#1D1200}
.btn-primary:hover{filter:brightness(.95)}
.btn-outline{background:transparent; color:var(--text)}
.muted{color:var(--muted); font-size:.95rem}

/* Kanban */
.kanban{display:grid; gap:1rem; grid-template-columns: repeat(5, 1fr); align-items:start}
@media (max-width: 980px){.kanban{grid-template-columns: repeat(2, 1fr)}}
@media (max-width: 640px){.kanban{grid-template-columns: 1fr}}

.kanban-column{
  background:var(--offwhite); border:1px solid var(--border);
  border-radius:.75rem; box-shadow:var(--shadow); padding:.75rem; min-height:220px; transition: box-shadow .2s, border-color .2s, background-color .2s;
}
.kanban-column.wip-breached{border-color:#CC4C17; background:#FFF0E6; box-shadow:0 0 0 2px #F2994A55}
.kanban-column-header{
  display:flex; align-items:center; justify-content:space-between; gap:.5rem;
  border-bottom:1px solid var(--border); padding-bottom:.5rem; margin-bottom:.5rem;
}
.kanban-column h3{margin:0; font-size:1.05rem}
.badge{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.25rem .5rem; border-radius:999px; font-size:.8rem; border:1px solid var(--border);
}
.badge-wip{background:var(--yellow-soft)}
.badge-done{background:var(--orange-soft)}
.badge-neutral{background:var(--white)}

.kanban-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.5rem}
.kanban-card{
  background:var(--white); border:1px solid var(--border);
  border-left:6px solid var(--yellow);
  border-radius:.6rem; padding:.6rem .7rem; box-shadow:var(--shadow);
}
.kanban-card:focus-visible{outline:2px solid var(--orange); outline-offset:2px}
.kanban-card strong{display:block; margin-bottom:.15rem}
.kanban-card small{color:var(--muted)}
.card-simular{border-left-color:var(--orange); position:relative}
.card-simular::after{
  content:"Simulação"; position:absolute; top:.35rem; right:.45rem;
  background:var(--orange); color:#1D1200; font-size:.7rem; padding:.1rem .4rem; border-radius:.4rem;
}

/* Legend */
.legend{display:flex; align-items:center; gap:1rem; margin-top:.75rem; color:var(--muted); font-size:.95rem}
.dot{width:.8rem; height:.8rem; border-radius:50%; display:inline-block; border:1px solid var(--border); margin-right:.35rem}
.dot-yellow{background:var(--yellow)}
.dot-orange{background:var(--orange)}
.dot-neutral{background:var(--offwhite)}

/* Details */
.policy{margin-top:1rem; background:var(--offwhite); border:1px solid var(--border); border-radius:.6rem; padding:.5rem .75rem}
.policy summary{cursor:pointer; font-weight:600}

/* Tabelas */
.table-wrapper{overflow:auto; border:1px solid var(--border); border-radius:.75rem}
table{width:100%; border-collapse:collapse; background:var(--white)}
caption{
  text-align:left; padding:.75rem; font-weight:600; background:var(--offwhite); border-bottom:1px solid var(--border)
}
thead th{
  text-align:left; font-size:.92rem; color:#3A372F; background:#FFF8DF; position:sticky; top:0; z-index:1;
}
th, td{padding:.75rem; border-bottom:1px solid var(--border); vertical-align:top}
tbody tr:nth-child(even){background:#FBFAF7}
tbody tr:hover{background:#FFF8DF}

/* RACI */
table.raci td, table.raci th { text-align:center }
table.raci td:first-child, table.raci th:first-child { text-align:left }
table.raci td { font-weight:600 }
table.raci td::after{
  content:"";
}

/* Rodapé */
.site-footer{
  background:linear-gradient(180deg, var(--white), var(--offwhite));
  border-top:1px solid var(--border); margin-top:2rem; padding:1.5rem 0;
}
.site-footer a{color:inherit}
.site-footer a:focus-visible{outline:2px solid var(--orange); outline-offset:2px}

/* Toast */
.toast{
  position:fixed; right:1rem; bottom:1rem; background:var(--orange); color:#1D1200;
  border-radius:.6rem; padding:.75rem .9rem; box-shadow:var(--shadow); max-width:min(90vw, 360px);
  border:1px solid #CC4C17;
}

/* Impressão */
@media print{
  .site-header, .actions, .legend, .policy summary, .toast { display:none !important; }
  body{background:#fff}
  .section{break-inside:avoid}
}