
:root{
  --ink:#201e1e;
  --ink-2:#2c2828;
  --red:#d6231f;
  --red-dark:#a8140f;
  --green:#1ba34f;
  --yellow:#f2e205;
  --paper:#f7f6f2;
  --text-soft:#6a6560;
  --line:#e4e0d5;
}

*{box-sizing:border-box;}

body{
  background:var(--paper);
  color:var(--ink);
  font-family:'Inter',system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3,.font-display{
  font-family:'Lora',Georgia,serif;
}

a{ color:var(--red-dark); }

/* ---------- Navbar ---------- */
.navbar-org{
  background:var(--ink);
  padding:.7rem 0;
}
.navbar-org .navbar-brand{
  display:flex;
  align-items:center;
  gap:.7rem;
}
.navbar-org .navbar-brand img{
  height:44px;
  width:auto;
}
.navbar-org .brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.15;
}
.navbar-org .brand-text .brand-main{
  font-family:'Lora',serif;
  font-weight:700;
  letter-spacing:.03em;
  color:#fff;
  font-size:1.1rem;
}
.navbar-org .brand-text .brand-sub{
  font-size:.68rem;
  color:rgba(255,255,255,.55);
  letter-spacing:.03em;
}
.navbar-org .nav-link{
  color:rgba(255,255,255,.75);
  font-size:.92rem;
  font-weight:500;
  padding:.4rem .9rem !important;
}
.navbar-org .nav-link:hover{ color:#fff; }
.navbar-org .btn-ministro{
  border:1px solid rgba(255,255,255,.3);
  color:#fff;
  font-size:.85rem;
  padding:.4rem 1rem;
  border-radius:2px;
}
.navbar-org .btn-ministro:hover{ background:rgba(255,255,255,.08); color:#fff; }

/* ---------- Hero ---------- */
.hero{
  background:
  radial-gradient(1100px 420px at 12% -15%, rgba(214,35,31,.25), transparent 60%),
  linear-gradient(180deg,var(--ink) 0%,var(--ink-2) 100%);
  color:#fff;
  padding:4.5rem 0 3.6rem;
  position:relative;
}
.hero .ribbon{
  position:absolute;
  left:0; right:0; bottom:0;
  height:8px;
  display:flex;
}
.hero .ribbon span{ flex:1; }
.hero .ribbon span:first-child{ background:var(--green); }
.hero .ribbon span:last-child{ background:var(--yellow); }
.hero .eyebrow{
  text-transform:uppercase;
  letter-spacing:.18em;
  font-size:.74rem;
  color:#ef8a87;
  font-weight:600;
}
.hero h1{
  font-size:2.5rem;
  font-weight:600;
  margin:.6rem 0 .9rem;
  max-width:680px;
}
.hero p.lead{
  color:rgba(255,255,255,.78);
  max-width:600px;
  font-size:1.05rem;
  margin-bottom:0;
}

/* ---------- Section shell ---------- */
.section-wrap{
  max-width:920px;
  margin:0 auto;
  padding:0 1rem;
}
main{ padding:3.8rem 0 4rem; }

/* ---------- Steps grid ---------- */
.steps-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:2.6rem 2rem;
}
@media (min-width:768px){
  .steps-grid{ grid-template-columns:1fr 1fr; }
}

.step{ position:relative; }
.step-num{
  position:absolute;
  top:-1rem;
  left:1.6rem;
  width:2.1rem; height:2.1rem;
  border-radius:50%;
  background:#fff;
  border:1.5px solid var(--red);
  color:var(--ink);
  font-family:'Lora',serif;
  font-weight:700;
  font-size:.95rem;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 2px 4px rgba(0,0,0,.06);
  z-index:2;
}

.card-block{
  height:100%;
  background:#fff;
  border:1px solid var(--line);
  border-top:3px solid var(--red);
  border-radius:4px;
  padding:2rem 1.75rem 1.75rem;
  display:flex;
  flex-direction:column;
}
.card-block h2{
  font-size:1.18rem;
  font-weight:600;
  color:var(--ink);
  margin-bottom:.6rem;
}
.card-block p{
  color:var(--text-soft);
  font-size:.96rem;
  line-height:1.6;
  margin-bottom:1.1rem;
}
.card-block p:last-of-type{ margin-bottom:0; }

.btn-red{
  background:var(--red);
  color:#fff;
  border:none;
  font-size:.88rem;
  font-weight:500;
  padding:.55rem 1.2rem;
  border-radius:2px;
  display:inline-flex;
  align-items:center;
  gap:.4rem;
}
.btn-red:hover{ background:var(--red-dark); color:#fff; }

.btn-outline-nav{
  border:1px solid var(--line);
  color:var(--ink);
  font-size:.88rem;
  font-weight:500;
  padding:.55rem 1.2rem;
  border-radius:2px;
}
.btn-outline-nav:hover{ background:var(--paper); color:var(--ink); }

.btn-row{ display:flex; flex-wrap:wrap; gap:.6rem; margin-top:auto; }

.btn-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.6rem;
  margin-top:auto;
}
.btn-grid .btn{
  width:100%;
  text-align:center;
  justify-content:center;
  white-space:normal;
}
@media (max-width:420px){
  .btn-grid{ grid-template-columns:1fr; }
}

.btn[disabled],
.btn.disabled{

  cursor:not-allowed;
  pointer-events:none;
  
}

/* file callout inside step 2 */
.doc-callout{
  margin-top:1.3rem;
  background:var(--paper);
  border:1px dashed var(--line);
  border-radius:4px;
  padding:1.1rem 1.3rem;
}
.doc-callout .toggle-link{
  font-size:.88rem;
  font-weight:600;
  color:var(--red-dark);
  text-decoration:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:.35rem;
}
.doc-callout ul{
  margin:1rem 0 0;
  padding-left:1.2rem;
  font-size:.9rem;
  color:var(--text-soft);
  line-height:1.7;
  display:none;
}
.doc-callout.open ul{ display:block; }
.doc-callout .chevron{ transition:transform .2s ease; }
.doc-callout.open .chevron{ transform:rotate(90deg); }

.deadline-note{
  font-size:.85rem;
  color:var(--text-soft);
  margin-top:1.3rem;
  padding-top:1.2rem;
  border-top:1px solid var(--line);
}
.deadline-note strong{ color:var(--ink); }

/* ---------- Timeline / Cronograma ---------- */
.timeline-wrap{ margin-top:3.5rem; }
.timeline-wrap h3{
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--text-soft);
  font-weight:600;
  margin-bottom:1.6rem;
}
.timeline{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:1.7rem;
}
.timeline::before{
  content:"";
  position:absolute;
  left:.5rem;
  top:.25rem;
  bottom:.25rem;
  width:1px;
  background:var(--line);
}
.timeline-item{ position:relative; padding-left:2.1rem; }
.timeline-dot{
  position:absolute;
  left:0; top:.15rem;
  width:1.05rem; height:1.05rem;
  border-radius:50%;
  background:#fff;
  border:2px solid var(--red);
}
.timeline-date{
  font-size:.76rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--red-dark);
  margin-bottom:.2rem;
}
.timeline-title{
  font-weight:600;
  font-size:.98rem;
  color:var(--ink);
  margin-bottom:.2rem;
}
.timeline-desc{
  font-size:.87rem;
  color:var(--text-soft);
  line-height:1.5;
  margin:0;
}

@media (min-width:768px){
  .timeline{ flex-direction:row; gap:0; align-items:flex-start; }
  .timeline::before{
    left:0; right:0; top:.62rem; bottom:auto;
    height:1px; width:auto;
  }
  .timeline-item{
    flex:1;
    padding-left:0;
    padding-top:2rem;
    padding-right:1.4rem;
  }
  .timeline-item:last-child{ padding-right:0; }
  .timeline-dot{ left:0; top:0; }
}

/* ---------- Docs links section ---------- */
.doc-links{
  margin-top:3.2rem;
}
.doc-links h3{
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--text-soft);
  font-weight:600;
  margin-bottom:1rem;
}
.doc-links a{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:.85rem 0;
  border-bottom:1px solid var(--line);
  color:var(--ink);
  text-decoration:none;
  font-size:.95rem;
  font-weight:500;
}
.doc-links a:hover{ color:var(--red-dark); }
.doc-links a span.arrow{ color:var(--red); font-family:'Lora',serif; }

/* ---------- Footer ---------- */
footer{
  background:var(--ink);
  color:rgba(255,255,255,.65);
  padding:2.6rem 0 1.5rem;
  margin-top:2rem;
  font-size:.88rem;
}
footer .footer-brand{
  display:flex;
  align-items:center;
  gap:.75rem;
  margin-bottom:1.1rem;
}
footer .footer-brand img{ height:46px; width:auto; }
footer .footer-brand .name{
  font-family:'Lora',serif;
  color:#fff;
  font-weight:700;
  font-size:1.05rem;
  line-height:1.2;
}
footer .footer-brand .full-name{
  font-size:.76rem;
  color:rgba(255,255,255,.5);
}
footer h4{
  font-family:'Lora',serif;
  color:#fff;
  font-size:1rem;
  margin-bottom:.9rem;
}
footer a{ color:rgba(255,255,255,.65); text-decoration:none; }
footer a:hover{ color:#fff; }
footer .col-links li{ margin-bottom:.5rem; list-style:none; }
footer .col-links{ padding-left:0; }
footer .copyright{
  border-top:1px solid rgba(255,255,255,.12);
  margin-top:2rem;
  padding-top:1.2rem;
  font-size:.8rem;
  color:rgba(255,255,255,.4);
}

.section-wrap{ max-width:760px; margin:0 auto; padding:0 1rem; }
main{ padding:2.4rem 0 4rem; }

.back-link{
  display:inline-block;
  font-size:.88rem;
  font-weight:500;
  text-decoration:none;
  margin-bottom:2rem;
}
.back-link:hover{ text-decoration:underline; }

.form-label{ font-size:.85rem; font-weight:600; color:var(--ink); margin-bottom:.3rem; }
.form-control{ border-radius:2px; border-color:var(--line); font-size:.95rem; padding:.6rem .8rem; }
.form-control:focus{
  border-color:var(--red);
  box-shadow:0 0 0 .2rem rgba(214,35,31,.15);
}
.form-control[readonly]{ background:var(--paper); color:var(--text-soft); }

.btn-red{
  background:var(--red); color:#fff; border:none;
  font-size:.88rem; font-weight:500; padding:.65rem 1.4rem; border-radius:2px;
  display:inline-flex; align-items:center; gap:.4rem;
}
.btn-red:hover{ background:var(--red-dark); color:#fff; }

.protocolo-box{
  background:var(--paper);
  border:1px dashed var(--line);
  border-radius:4px;
  padding:.9rem 1.1rem;
  margin-bottom:1.3rem;
  font-size:.88rem;
  color:var(--text-soft);
}
.protocolo-box[hidden]{ display:none; }
.protocolo-box .label{
  display:block; font-size:.7rem; text-transform:uppercase; letter-spacing:.12em; font-weight:600;
}
.protocolo-box strong{
  font-family:'Lora',serif; font-size:1.15rem; color:var(--ink); letter-spacing:.03em;
}
.protocolo-box p{ margin:.35rem 0 0; }


.file-list{ list-style:none; margin:1.5rem 0 0; padding:0; }
.file-empty{ color:var(--text-soft); font-size:.9rem; margin:1.5rem 0 0; }

.file-item{
  padding:.95rem 0;
  border-top:1px solid var(--line);
}
.file-item:last-child{ border-bottom:1px solid var(--line); }
.file-head{ display:flex; justify-content:space-between; gap:1rem; align-items:baseline; }
.file-name{ font-size:.93rem; font-weight:500; min-width:0; overflow-wrap:anywhere; }
.file-size{ font-size:.78rem; color:var(--text-soft); white-space:nowrap; }

.file-bar{
  height:6px; background:var(--line); border-radius:3px; overflow:hidden; margin:.55rem 0 .4rem;
}
.file-bar-fill{ height:100%; width:0; background:var(--red); transition:width .15s linear; }

.file-status{ font-size:.8rem; color:var(--text-soft); overflow-wrap:anywhere; }
.file-status .saved-as{ display:block; margin-top:.1rem; font-size:.75rem; opacity:.85; }

.file-item[data-state="done"] .file-bar-fill{ background:var(--green); }
.file-item[data-state="done"] .file-status{ color:#12803b; font-weight:500; }
.file-item[data-state="error"] .file-bar-fill{ background:var(--red); }
.file-item[data-state="error"] .file-status{ color:var(--red-dark); font-weight:500; }
.file-item[data-state="waiting"] .file-bar-fill{ background:#bdb7ab; }

.btn-retry{
  background:none; border:none; padding:0 0 0 .5rem;
  color:var(--red-dark); font-size:.8rem; font-weight:600; text-decoration:underline; cursor:pointer;
}