:root{
  --brand-950:#0b1f45;
  --brand-900:#0f2d63;
  --brand-800:#14438d;
  --brand-700:#2160c4;
  --brand-100:#dfeaff;
  --accent:#f0b44b;
  --accent-soft:#fff2d6;
  --bg:#eef3f7;
  --surface:#ffffff;
  --surface-soft:#f7fafc;
  --surface-strong:#eaf1f8;
  --line:#d6e1ec;
  --line-strong:#bfd0e3;
  --text:#182430;
  --muted:#5d6c7d;
  --muted-soft:#76879a;
  --ok:#1f8b58;
  --ok-soft:#e7f6ee;
  --warn:#b86a07;
  --warn-soft:#fff4de;
  --danger:#c33c2d;
  --danger-soft:#fdeceb;
  --neutral:#64748b;
  --neutral-soft:#eef2f7;
  --shadow:0 18px 42px rgba(14, 38, 74, .08);
  --shadow-soft:0 10px 24px rgba(14, 38, 74, .06);
  --radius-xl:24px;
  --radius-lg:18px;
  --radius-md:14px;
  --radius-sm:12px;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  min-height:100vh;
  color:var(--text);
  font-family:"Avenir Next","Segoe UI Variable","Trebuchet MS",sans-serif;
  background:
    radial-gradient(circle at top right, rgba(33,96,196,.10), transparent 24%),
    radial-gradient(circle at top left, rgba(240,180,75,.08), transparent 18%),
    linear-gradient(180deg, #f8fbfe 0%, var(--bg) 100%);
}

a{
  color:var(--brand-700);
  text-decoration:none;
}

a:hover{ text-decoration:underline; }

a.small{
  font-weight:800;
}

.site-header{
  position:relative;
  overflow:hidden;
  color:#fff;
  background:
    linear-gradient(135deg, var(--brand-950) 0%, var(--brand-900) 38%, var(--brand-800) 100%);
  box-shadow:0 12px 30px rgba(10, 31, 69, .24);
}

.site-header::before,
.site-header::after{
  content:"";
  position:absolute;
  inset:auto;
  border-radius:999px;
  pointer-events:none;
}

.site-header::before{
  width:280px;
  height:280px;
  right:-60px;
  top:-120px;
  background:radial-gradient(circle, rgba(240,180,75,.28) 0%, rgba(240,180,75,0) 70%);
}

.site-header::after{
  width:420px;
  height:420px;
  left:-140px;
  bottom:-220px;
  background:radial-gradient(circle, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 72%);
}

.site-header__inner,
.page-section,
.hero-wrap{
  width:min(1240px, calc(100% - 32px));
  margin:0 auto;
}

.site-header__inner{
  position:relative;
  z-index:1;
  padding:22px 0 28px;
}

.header-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
}

.site-title{
  margin:10px 0 8px;
  font-family:"Avenir Next Condensed","Gill Sans","Trebuchet MS",sans-serif;
  font-size:clamp(28px, 4vw, 42px);
  line-height:1.02;
  letter-spacing:-.02em;
}

.site-subtitle{
  max-width:760px;
  margin:0;
  font-size:15px;
  line-height:1.55;
  color:rgba(255,255,255,.86);
}

.header-meta{
  margin-top:14px;
  color:rgba(255,255,255,.78);
  font-size:13px;
}

.header-actions,
.header-links{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.header-actions{ justify-content:flex-end; }

.nav-link,
.ghost-link,
.toolbar-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:0 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  transition:transform .16s ease, background .16s ease, border-color .16s ease;
}

.nav-link{
  color:#fff;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
}

.nav-link:hover,
.ghost-link:hover,
.toolbar-link:hover{
  transform:translateY(-1px);
  text-decoration:none;
}

.nav-link:hover{ background:rgba(255,255,255,.18); }

.nav-link--accent{
  color:var(--brand-950);
  background:linear-gradient(135deg, #fff 0%, #eef5ff 100%);
}

.nav-link--accent:hover{ background:#fff; }

.hero-wrap{
  margin-top:-18px;
  position:relative;
  z-index:2;
}

.hero-card{
  overflow:hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(244,248,253,.96) 100%);
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow);
}

.hero-card--soft{
  padding:0;
}

.soft-hero{
  padding:28px 26px 22px;
}

.soft-hero__badges{
  margin-bottom:14px;
}

.soft-hero__title{
  margin:0;
  max-width:1180px;
  font-family:"Avenir Next","Segoe UI Variable","Trebuchet MS",sans-serif;
  font-size:clamp(34px, 4.1vw, 58px);
  line-height:1.08;
  letter-spacing:-.035em;
  color:var(--brand-950);
}

.soft-hero__summary{
  margin:14px 0 0;
  max-width:1120px;
  font-size:18px;
  line-height:1.55;
  color:var(--text);
}

.soft-hero__grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  margin-top:18px;
}

.soft-hero__box{
  min-height:92px;
  padding:16px 18px;
  border-radius:20px;
  background:rgba(247,250,252,.9);
  border:1px solid rgba(20,67,141,.12);
  box-shadow:var(--shadow-soft);
}

.soft-hero__box-title{
  font-size:16px;
  line-height:1.5;
  color:var(--text);
}

.soft-hero__note{
  margin-top:14px;
  padding:10px 0 0;
  border-top:1px solid rgba(20,67,141,.08);
  font-size:15px;
  line-height:1.5;
  color:var(--muted);
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.35fr) minmax(320px, .95fr);
  gap:20px;
  padding:24px;
  align-items:start;
}

.hero-main h2,
.hero-side h3{
  margin:0;
  font-family:"Avenir Next Condensed","Gill Sans","Trebuchet MS",sans-serif;
  letter-spacing:-.01em;
}

.hero-kicker{
  margin:0 0 10px;
  color:var(--brand-800);
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.hero-copy{
  margin:12px 0 0;
  font-size:16px;
  line-height:1.65;
  color:var(--text);
  overflow-wrap:anywhere;
}

.hero-copy strong{ color:var(--brand-950); }

.hero-list{
  display:grid;
  gap:10px;
  margin:18px 0 0;
}

.hero-list__item{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
  align-items:flex-start;
  padding:12px 14px;
  border-radius:16px;
  background:var(--surface-soft);
  border:1px solid rgba(20, 67, 141, .08);
}

.hero-list__item strong{
  display:block;
  margin-bottom:2px;
}

.hero-side{
  display:grid;
  gap:14px;
}

.hero-side .panel{
  height:100%;
}

.hero-stats{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(132px,1fr));
  gap:12px;
  margin-top:18px;
}

.stat-card{
  min-height:110px;
  padding:14px 16px;
  border-radius:18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(237,244,252,.96) 100%);
  border:1px solid rgba(20, 67, 141, .10);
  box-shadow:var(--shadow-soft);
}

.stat-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted-soft);
}

.stat-value{
  margin-top:8px;
  font-size:28px;
  line-height:1;
  font-weight:800;
  color:var(--brand-950);
}

.stat-note{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  line-height:1.5;
}

.page-section{
  padding:22px 0 0;
}

.page-section--tight{
  padding-top:14px;
}

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
  flex-wrap:wrap;
}

.section-head h2{
  margin:0;
  font-family:"Avenir Next Condensed","Gill Sans","Trebuchet MS",sans-serif;
  font-size:28px;
  line-height:1.05;
  color:var(--brand-950);
}

.section-head p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:14px;
}

.panel{
  padding:18px;
  border-radius:var(--radius-lg);
  border:1px solid var(--line);
  background:var(--surface);
  box-shadow:var(--shadow-soft);
}

.panel--quiet{
  padding:14px 16px;
}

.panel-soft{
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(246,249,253,.98) 100%);
}

.panel-accent{
  background:linear-gradient(135deg, #fff 0%, #f4f8ff 48%, #fff6e8 100%);
}

.banner{
  display:grid;
  gap:8px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid transparent;
}

.banner--ok{
  background:var(--ok-soft);
  color:#0f6a3f;
  border-color:rgba(31,139,88,.16);
}

.banner--warn{
  background:var(--warn-soft);
  color:#8c520a;
  border-color:rgba(184,106,7,.16);
}

.banner--critical{
  background:var(--danger-soft);
  color:#8d2a1f;
  border-color:rgba(195,60,45,.16);
}

.banner--neutral{
  background:var(--neutral-soft);
  color:#475569;
  border-color:rgba(100,116,139,.14);
}

.banner-title{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.banner-text{
  font-size:14px;
  line-height:1.55;
  overflow-wrap:anywhere;
}

.grid-2,
.grid-3,
.grid-4,
.grid-auto{
  display:grid;
  gap:16px;
}

.grid-2{
  grid-template-columns:repeat(2, minmax(0, 1fr));
  align-items:start;
}
.grid-3{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
.grid-4{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
.grid-auto{ grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); }

.info-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
}

.info-tile{
  padding:14px 16px;
  border-radius:16px;
  background:var(--surface-soft);
  border:1px solid rgba(20, 67, 141, .08);
}

.info-tile__label{
  font-size:11px;
  font-weight:800;
  color:var(--muted-soft);
  text-transform:uppercase;
  letter-spacing:.08em;
}

.info-tile__value{
  margin-top:8px;
  font-size:21px;
  font-weight:800;
  color:var(--brand-950);
  overflow-wrap:anywhere;
}

.info-tile__note{
  margin-top:4px;
  font-size:12px;
  color:var(--muted);
}

.status-chip{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px 11px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.07em;
  white-space:nowrap;
}

.status-chip::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:currentColor;
}

.status-chip--ok{
  color:var(--ok);
  background:var(--ok-soft);
}

.status-chip--warn{
  color:var(--warn);
  background:var(--warn-soft);
}

.status-chip--critical{
  color:var(--danger);
  background:var(--danger-soft);
}

.status-chip--neutral{
  color:var(--neutral);
  background:var(--neutral-soft);
}

.kpi-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.kpi-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  color:var(--brand-950);
  background:#f0f5fb;
  border:1px solid rgba(20,67,141,.10);
}

.kpi-pill strong{ font-size:15px; }

.action-list{
  display:grid;
  gap:12px;
  margin:0;
  padding:0;
  list-style:none;
}

.action-item{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:12px;
  align-items:flex-start;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(20,67,141,.10);
  background:linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.action-item__meta{
  display:grid;
  gap:4px;
  min-width:0;
}

.action-item__title{
  font-size:16px;
  font-weight:800;
  color:var(--brand-950);
}

.action-item__detail{
  font-size:13px;
  line-height:1.55;
  color:var(--muted);
  overflow-wrap:anywhere;
}

.action-item__aside{
  font-size:12px;
  color:var(--muted);
  text-align:right;
  min-width:72px;
  align-self:center;
}

.action-item__aside a{
  font-weight:800;
}

.front-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:18px;
}

.front-card{
  display:flex;
  flex-direction:column;
  gap:16px;
  min-height:188px;
  padding:22px 22px 20px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(249,252,255,.96) 100%);
  border:1px solid var(--line);
  box-shadow:var(--shadow-soft);
}

.front-card--ok{ border-top:4px solid rgba(31,139,88,.38); }
.front-card--warn{ border-top:4px solid rgba(184,106,7,.34); }
.front-card--critical{ border-top:4px solid rgba(195,60,45,.34); }
.front-card--neutral{ border-top:4px solid rgba(100,116,139,.25); }

.front-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.front-card__title{
  margin:0;
  font-size:26px;
  line-height:1.12;
  color:var(--brand-950);
}

.front-card__summary{
  margin:0;
  font-size:17px;
  line-height:1.55;
  color:var(--text);
}

.decision-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-height:224px;
  padding:18px;
  border-radius:20px;
  background:linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  border:1px solid var(--line);
  box-shadow:var(--shadow-soft);
}

.decision-card--ok{ border-top:5px solid var(--ok); }
.decision-card--warn{ border-top:5px solid var(--warn); }
.decision-card--critical{ border-top:5px solid var(--danger); }
.decision-card--neutral{ border-top:5px solid var(--neutral); }

.decision-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.decision-title{
  margin:0;
  font-size:20px;
  line-height:1.1;
  color:var(--brand-950);
}

.decision-summary{
  margin:0;
  font-size:14px;
  line-height:1.6;
  color:var(--text);
  overflow-wrap:anywhere;
}

.decision-foot{
  margin-top:auto;
  display:grid;
  gap:8px;
}

.decision-notes{
  display:grid;
  gap:4px;
  font-size:12px;
  line-height:1.55;
  color:var(--muted);
}

.metric-inline{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.metric-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:32px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  color:var(--muted);
  background:var(--surface-soft);
  border:1px solid rgba(20,67,141,.08);
}

.metric-chip strong{
  color:var(--brand-950);
  font-size:13px;
}

.muted{ color:var(--muted); }
.small{ font-size:12px; color:var(--muted); }
.mono{ font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }

.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.toolbar-group{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.toolbar-link{
  color:var(--brand-950);
  background:#fff;
  border:1px solid rgba(20,67,141,.12);
}

.toolbar-status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid rgba(20,67,141,.10);
  background:var(--surface-soft);
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.search{
  min-width:240px;
  height:44px;
  padding:0 16px;
  border-radius:999px;
  border:1px solid var(--line-strong);
  background:#fff;
  color:var(--text);
  font-size:14px;
}

.search:focus{
  outline:none;
  border-color:rgba(33,96,196,.45);
  box-shadow:0 0 0 4px rgba(33,96,196,.12);
}

.filter-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:0 13px;
  border-radius:999px;
  border:1px solid rgba(20,67,141,.12);
  background:#fff;
  color:var(--brand-950);
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}

.filter-chip.is-active{
  background:var(--brand-950);
  border-color:var(--brand-950);
  color:#fff;
}

.button-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
  margin-top:10px;
}

.field{
  display:grid;
  gap:6px;
}

.field-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted-soft);
}

.field-input{
  width:100%;
  min-height:44px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid var(--line-strong);
  background:#fff;
  color:var(--text);
  font-size:14px;
}

.field-input:focus{
  outline:none;
  border-color:rgba(33,96,196,.45);
  box-shadow:0 0 0 4px rgba(33,96,196,.12);
}

.field-input--textarea{
  min-height:92px;
  padding:12px 14px;
  resize:vertical;
  font:inherit;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:38px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid transparent;
  background:#fff;
  color:var(--text);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 18px rgba(12,34,68,.08);
}

.btn-primary{
  color:#fff;
  background:linear-gradient(135deg, var(--brand-800) 0%, var(--brand-700) 100%);
}

.btn-ok{
  color:var(--ok);
  background:var(--ok-soft);
  border-color:rgba(31,139,88,.16);
}

.btn-warn{
  color:var(--warn);
  background:var(--warn-soft);
  border-color:rgba(184,106,7,.16);
}

.btn-critical{
  color:var(--danger);
  background:var(--danger-soft);
  border-color:rgba(195,60,45,.16);
}

.btn-neutral{
  color:var(--neutral);
  background:var(--neutral-soft);
  border-color:rgba(100,116,139,.16);
}

.btn-ghost{
  color:var(--brand-900);
  background:rgba(255,255,255,.72);
  border-color:rgba(20,67,141,.12);
}

.btn-small{
  min-height:32px;
  padding:0 12px;
  font-size:11px;
  border-radius:10px;
}

.talhao-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-height:320px;
}

.talhao-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.talhao-title{
  margin:0;
  font-size:24px;
  line-height:1;
  color:var(--brand-950);
}

.meta-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}

.meta-card{
  padding:12px;
  border-radius:14px;
  background:var(--surface-soft);
  border:1px solid rgba(20,67,141,.08);
}

.meta-card .label{
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted-soft);
}

.meta-card .value{
  margin-top:6px;
  font-size:16px;
  font-weight:800;
  color:var(--brand-950);
}

.focus-box{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(20,67,141,.10);
  background:linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.focus-title{
  margin:6px 0 0;
  font-size:18px;
  line-height:1.35;
  color:var(--brand-950);
}

.focus-note{
  margin:8px 0 0;
  font-size:13px;
  line-height:1.55;
  color:var(--muted);
  overflow-wrap:anywhere;
}

.detail-list{
  display:grid;
  gap:8px;
  margin:0;
  padding-left:18px;
}

.detail-list li{
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}

details.panel-collapse{
  border-radius:16px;
  border:1px solid rgba(20,67,141,.10);
  background:var(--surface-soft);
  padding:0 14px;
}

details.panel-collapse + details.panel-collapse{
  margin-top:10px;
}

details.panel-collapse[open]{
  padding-bottom:12px;
}

details.panel-collapse summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:46px;
  cursor:pointer;
  list-style:none;
  font-size:14px;
  font-weight:800;
  color:var(--brand-950);
}

details.panel-collapse summary::-webkit-details-marker{ display:none; }

.empty-state{
  padding:22px;
  text-align:center;
  border-radius:18px;
  background:linear-gradient(180deg, #fff 0%, #f7fafc 100%);
  border:1px dashed rgba(20,67,141,.18);
  color:var(--muted);
}

.empty-state--compact{
  padding:14px 16px;
  text-align:left;
  border-radius:14px;
  font-size:13px;
}

.joao-chat{
  display:grid;
  gap:14px;
}

.joao-chat__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.joao-chat__log{
  display:grid;
  gap:12px;
  min-height:156px;
  max-height:360px;
  padding:6px;
  border-radius:16px;
  background:linear-gradient(180deg, rgba(248,251,255,.96) 0%, rgba(255,255,255,.98) 100%);
  border:1px solid rgba(20,67,141,.08);
  overflow:auto;
}

.joao-chat__composer{
  display:grid;
  gap:10px;
  padding-top:6px;
  border-top:1px solid rgba(20,67,141,.08);
}

.joao-upload-row{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:12px;
}

.chat-message{
  max-width:92%;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(20,67,141,.10);
  background:linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  box-shadow:var(--shadow-soft);
}

.chat-message--user{
  justify-self:end;
  background:linear-gradient(135deg, rgba(20,67,141,.10) 0%, rgba(255,255,255,.98) 100%);
}

.chat-message--assistant{
  justify-self:start;
}

.chat-message--pending .chat-message__body{
  color:var(--muted);
}

.chat-message__head{
  margin-bottom:6px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted-soft);
}

.chat-message__body{
  font-size:14px;
  line-height:1.65;
  color:var(--text);
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.chat-message__flags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.chat-message__sources{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
  margin-top:10px;
}

.chat-source-card{
  padding:10px 12px;
  border-radius:14px;
  background:rgba(245,248,253,.92);
  border:1px solid rgba(20,67,141,.08);
}

.chat-source-card__title{
  font-size:12px;
  font-weight:800;
  color:var(--brand-900);
  margin-bottom:4px;
}

.chat-source-card__excerpt{
  font-size:12px;
  line-height:1.55;
  color:var(--muted);
}

.chat-message__meta{
  margin-top:10px;
  border-top:1px solid rgba(20,67,141,.08);
  padding-top:8px;
}

.chat-message__meta summary{
  cursor:pointer;
  list-style:none;
  font-size:12px;
  font-weight:800;
  color:var(--muted);
}

.chat-message__meta summary::-webkit-details-marker{
  display:none;
}

.chat-meta-list{
  display:grid;
  gap:8px;
  margin-top:8px;
}

.chat-meta-item{
  padding:10px 12px;
  border-radius:14px;
  background:var(--surface-soft);
  border:1px solid rgba(20,67,141,.08);
  font-size:12px;
  line-height:1.55;
  color:var(--muted);
}

.chat-meta-item strong{
  display:block;
  margin-bottom:4px;
  color:var(--brand-950);
}

.prompt-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}

.toggle-check{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:12px;
  font-size:13px;
  font-weight:700;
  color:var(--text);
}

.toggle-check input{
  width:18px;
  height:18px;
  accent-color:var(--brand-700);
}

.mini-feed{
  display:grid;
  gap:10px;
  margin:12px 0 0;
  padding:0;
  list-style:none;
}

.mini-feed li{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  gap:10px;
  align-items:center;
}

.mini-feed__body{
  min-width:0;
}

.mini-feed__body strong{
  display:block;
  color:var(--brand-950);
}

.mini-feed__meta{
  justify-self:end;
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  white-space:nowrap;
}

.pending-actions{
  display:grid;
  gap:10px;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--line);
}

.pending-actions__title{
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}

.pending-action-card{
  padding:12px 14px;
  border-radius:16px;
  background:var(--surface-soft);
  border:1px solid var(--line);
}

.pending-action-card__summary{
  font-size:14px;
  font-weight:800;
  color:var(--brand-950);
}

.pending-action-card__meta{
  margin-top:4px;
  font-size:12px;
  color:var(--muted);
}

@media (max-width: 860px){
  .joao-upload-row{
    grid-template-columns:1fr;
  }
}

.prompt-chip{
  display:block;
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(20,67,141,.10);
  background:#fff;
  color:var(--brand-950);
  font-size:13px;
  font-weight:700;
  text-align:left;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.prompt-chip:hover{
  transform:translateY(-1px);
  border-color:rgba(33,96,196,.24);
  box-shadow:0 10px 18px rgba(12,34,68,.06);
}

.joao-side{
  display:grid;
  gap:14px;
  align-content:start;
}

.chart-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:390px;
}

.chart-frame{
  position:relative;
  height:320px;
  min-height:320px;
  border-radius:16px;
  background:#fbfdff;
  border:1px solid rgba(20,67,141,.08);
  overflow:hidden;
}

canvas{
  width:100% !important;
  height:100% !important;
  display:block;
}

.placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  height:100%;
  padding:24px;
  text-align:center;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}

.legend-note{
  font-size:12px;
  color:var(--muted);
}

.badge-stack{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.capi-hero{
  position:relative;
  overflow:hidden;
  border-color:rgba(20,67,141,.14);
  background:
    linear-gradient(135deg, rgba(255,255,255,.99) 0%, rgba(242,247,252,.98) 48%, rgba(236,243,249,.96) 100%);
}

.capi-hero__orb{
  position:absolute;
  border-radius:999px;
  pointer-events:none;
  filter:blur(2px);
}

.capi-hero__orb--gold{
  width:240px;
  height:240px;
  right:-80px;
  top:-64px;
  background:radial-gradient(circle, rgba(240,180,75,.30) 0%, rgba(240,180,75,0) 72%);
}

.capi-hero__orb--blue{
  width:360px;
  height:360px;
  left:-120px;
  bottom:-240px;
  background:radial-gradient(circle, rgba(20,67,141,.12) 0%, rgba(20,67,141,0) 72%);
}

.capi-hero__grid{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:minmax(0, 1.6fr) minmax(320px, .95fr);
  gap:18px;
  padding:26px;
}

.capi-hero__main,
.capi-hero__rail{
  display:grid;
  gap:16px;
  align-content:start;
}

.capi-hero__title{
  margin:0;
  max-width:900px;
  font-family:"Avenir Next Condensed","Gill Sans","Trebuchet MS",sans-serif;
  font-size:clamp(34px, 4.8vw, 58px);
  line-height:1;
  letter-spacing:-.04em;
  color:var(--brand-950);
}

.capi-hero__summary{
  margin:0;
  max-width:900px;
  font-size:17px;
  line-height:1.65;
  color:var(--text);
}

.capi-hero__badges{
  margin-top:2px;
}

.capi-hero__stats{
  margin-top:4px;
}

.capi-stack{
  display:grid;
  gap:12px;
}

.capi-assumptions{
  margin:0;
  padding-left:18px;
}

.capi-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
}

.capi-kpi{
  min-height:156px;
  padding:18px 18px 16px;
  border-radius:20px;
  background:linear-gradient(180deg, #fff 0%, #f7fbff 100%);
  border:1px solid rgba(20,67,141,.10);
  box-shadow:var(--shadow-soft);
  display:grid;
  gap:10px;
  align-content:start;
}

.capi-kpi--ok{ border-top:5px solid rgba(31,139,88,.85); }
.capi-kpi--warn{ border-top:5px solid rgba(184,106,7,.82); }
.capi-kpi--critical{ border-top:5px solid rgba(195,60,45,.88); }
.capi-kpi--neutral{ border-top:5px solid rgba(100,116,139,.45); }

.capi-kpi__label{
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted-soft);
}

.capi-kpi__value{
  font-size:clamp(24px, 3vw, 34px);
  line-height:1.05;
  font-weight:800;
  letter-spacing:-.03em;
  color:var(--brand-950);
}

.capi-kpi__note{
  font-size:13px;
  line-height:1.6;
  color:var(--muted);
}

.capi-source-grid{
  display:grid;
  gap:12px;
}

.capi-field-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.capi-field-card{
  min-height:unset;
  padding:18px;
  border-radius:22px;
  background:linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  border:1px solid rgba(20,67,141,.10);
  box-shadow:var(--shadow-soft);
}

.capi-aside-grid{
  display:grid;
  gap:18px;
  align-content:start;
}

.capi-alert-stack{
  display:grid;
  gap:10px;
}

.capi-toolbar{
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:12px;
  align-items:end;
}

.capi-toolbar .field{
  margin:0;
}

.capi-table-wrap{
  overflow:auto;
  border-radius:18px;
  border:1px solid rgba(20,67,141,.10);
  background:#fff;
}

.capi-table{
  width:100%;
  min-width:980px;
  border-collapse:collapse;
}

.capi-table thead th{
  position:sticky;
  top:0;
  z-index:1;
  padding:14px 16px;
  text-align:left;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted-soft);
  background:linear-gradient(180deg, #f7fbff 0%, #eef4fa 100%);
  border-bottom:1px solid rgba(20,67,141,.10);
}

.capi-table tbody td{
  padding:14px 16px;
  vertical-align:top;
  border-bottom:1px solid rgba(20,67,141,.08);
  font-size:14px;
  line-height:1.55;
  color:var(--text);
}

.capi-table tbody tr:hover{
  background:rgba(20,67,141,.03);
}

.capi-table__primary{
  font-weight:800;
  color:var(--brand-950);
}

.two-col-copy{
  columns:2;
  column-gap:20px;
}

.hidden{ display:none !important; }

@media (max-width:1080px){
  .hero-grid,
  .grid-4{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .grid-3{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .grid-2{ grid-template-columns:1fr; }
  .soft-hero__grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .prompt-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .capi-hero__grid{ grid-template-columns:1fr; }
  .capi-kpi-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .capi-toolbar{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
}

@media (max-width:760px){
  .site-header__inner,
  .page-section,
  .hero-wrap{
    width:min(1240px, calc(100% - 20px));
  }

  .site-header__inner{ padding:18px 0 22px; }
  .hero-wrap{ margin-top:-12px; }
  .hero-grid{ grid-template-columns:1fr; padding:18px; }
  .soft-hero{ padding:22px 18px 18px; }
  .soft-hero__title{ font-size:clamp(28px, 9vw, 40px); }
  .soft-hero__summary{ font-size:16px; }
  .soft-hero__grid{ grid-template-columns:1fr; }
  .page-section{ padding-top:18px; }
  .section-head h2{ font-size:24px; }
  .panel{ padding:16px; }
  .grid-3,
  .grid-4,
  .grid-auto{ grid-template-columns:1fr; }
  .front-grid{ grid-template-columns:1fr; }
  .capi-field-grid,
  .capi-kpi-grid,
  .capi-toolbar{ grid-template-columns:1fr; }
  .capi-hero__grid{ padding:18px; }
  .capi-hero__title{ font-size:clamp(28px, 10vw, 42px); }
  .capi-hero__summary{ font-size:15px; }
  .hero-stats{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .hero-list__item{
    grid-template-columns:1fr;
    align-items:flex-start;
  }
  .hero-list__item .status-chip{
    justify-self:start;
    max-width:100%;
    white-space:normal;
    line-height:1.25;
  }
  .action-item{ grid-template-columns:1fr; }
  .action-item__aside{ text-align:left; min-width:0; }
  .prompt-grid{ grid-template-columns:1fr; }
  .joao-chat__header{
    flex-direction:column;
    align-items:stretch;
  }
  .mini-feed li{ grid-template-columns:auto 1fr; align-items:flex-start; }
  .mini-feed__meta{ justify-self:start; }
  .meta-grid{ grid-template-columns:1fr; }
  .chart-frame{ height:280px; min-height:280px; }
  .search{ min-width:0; width:100%; }
  .decision-card{
    min-height:auto;
    padding:16px;
  }
  .talhao-card{
    min-height:auto;
    gap:12px;
  }
  .action-item{
    padding:12px 14px;
  }
  .btn{
    min-height:36px;
    padding:0 12px;
  }
}

@media (max-width:520px){
  .hero-stats{ grid-template-columns:1fr; }
  .site-title{ font-size:30px; }
  .toolbar{ align-items:stretch; }
  .front-card{ min-height:auto; }
  .hero-copy{ font-size:15px; line-height:1.55; }
  .decision-title{ font-size:18px; }
  .focus-title{ font-size:17px; }
  .status-chip{
    max-width:100%;
    white-space:normal;
    line-height:1.25;
  }
}
