/* assets/css/itgr-engine.css
   Intent Tale | G.R.O.W.T.H Roadmap Engine
   Fully scoped to .itgr-root
*/

.itgr-root{
  font-family: var(--it-font, Fields Light, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif);
  color: var(--it-ink, #18181B);
  line-height: 1.35;
  isolation: isolate;
}
.itgr-root, .itgr-root *{ box-sizing:border-box; }
.itgr-root img{ max-width:100%; height:auto; display:block; }

.itgr-app{
  padding: 18px;
  background: var(--it-bg, #F4F7F9);
  border-radius: 22px;
}

.itgr-wrap{
  max-width: 1040px;
  margin: 0 auto;
}

/* Header */
.itgr-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 18px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.itgr-kicker-row{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-bottom: 10px;
}

.itgr-mark{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background: var(--it-purple, #4A154B);
  box-shadow: 0 14px 26px rgba(15,23,42,.10);
}
.itgr-logo{
  width: 84%;
  height: 84%;
  object-fit: contain;
}
.itgr-mark-fallback{
  display:none;
  width: 100%;
  height: 100%;
  align-items:center;
  justify-content:center;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .14em;
}
.itgr-logo-missing .itgr-logo{ display:none; }
.itgr-logo-missing .itgr-mark-fallback{ display:flex; }

.itgr-kicker{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #94A3B8;
}

.itgr-h1{
  margin: 0;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0F172A;
}
.itgr-hash{
  color: #CBD5E1;
  font-weight: 900;
  margin-left: 10px;
}

.itgr-client{
  margin: 10px 0 0;
  color: #64748B;
  font-size: 14px;
}
.itgr-client-name{
  font-weight: 900;
  color: #334155;
}

/* Buttons */
.itgr-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.itgr-btn{
  appearance:none;
  border: 1px solid rgba(226,232,240,.95);
  background: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}
.itgr-btn:hover{ background: #F8FAFC; }
.itgr-btn:active{ transform: translateY(1px); }

.itgr-btn-primary{
  background: #0F172A;
  border-color: #0F172A;
  color: #fff;
}
.itgr-btn-primary:hover{ background: #020617; }

/* Layout grid */
.itgr-grid{
  display:grid;
  grid-template-columns: 380px 1fr;
  gap: 22px;
  align-items:start;
}
@media (max-width: 980px){
  .itgr-grid{ grid-template-columns: 1fr; }
}

/* Card */
.itgr-card{
  background: var(--it-card, #fff);
  border: 1px solid var(--it-border, #E4E4E7);
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(15,23,42,.06);
}

/* Left */
.itgr-sticky{
  padding: 22px;
  position: sticky;
  top: 14px;
}
@media (max-width: 980px){
  .itgr-sticky{ position: static; }
}

.itgr-h2{
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 900;
  color: #0F172A;
}

.itgr-field{ margin-top: 14px; }
.itgr-label{
  display:block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 8px;
}
.itgr-input{
  width: 100%;
  border: 0;
  outline: none;
  background: #F1F5F9;
  border-radius: 14px;
  padding: 12px 12px;
  font-weight: 800;
  color: #0F172A;
}
.itgr-input:focus{
  box-shadow: 0 0 0 4px rgba(100,195,235,.22);
}
.itgr-ta{
  min-height: 96px;
  resize: vertical;
  font-weight: 600;
}
.itgr-tip{
  margin-top: 8px;
  font-size: 12px;
  color: #64748B;
}

/* Right track */
.itgr-track{
  display:flex;
  flex-direction: column;
  gap: 16px;
}

/* Phase card */
.itgr-phase{
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--it-border, #E4E4E7);
  background: #fff;
  position: relative;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease, opacity .2s ease;
}
.itgr-phase.is-active{
  border-color: var(--it-purple, #4A154B);
  box-shadow: var(--it-shadow, 0 20px 40px -10px rgba(74, 21, 75, 0.10));
}
.itgr-phase.is-pending{
  opacity: .45;
}
.itgr-phase-top{
  display:flex;
  justify-content: space-between;
  align-items:flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.itgr-phase-kicker{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--it-purple, #4A154B);
}
.itgr-phase.is-pending .itgr-phase-kicker,
.itgr-phase.is-done .itgr-phase-kicker{
  color: #94A3B8;
}

.itgr-status{
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 7px 10px;
  border-radius: 999px;
  background: #F1F5F9;
  color: #334155;
}
.itgr-phase.is-active .itgr-status{
  background: rgba(74,21,75,.10);
  color: var(--it-purple, #4A154B);
}
.itgr-phase.is-done .itgr-status{
  background: rgba(16,185,129,.12);
  color: #065F46;
}

.itgr-phase-title{
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0F172A;
}
.itgr-phase-desc{
  margin: 0;
  font-size: 14px;
  color: #64748B;
  line-height: 1.6;
}

/* AI box */
.itgr-risk{
  margin-top: 18px;
  padding: 22px;
  border-left: 4px solid var(--it-blue, #64C3EB);
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
}
.itgr-risk-top{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 10px;
}
.itgr-pulse{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--it-blue, #64C3EB);
  box-shadow: 0 0 0 0 rgba(100,195,235,.55);
  animation: itgrPulse 1.8s infinite;
}
@keyframes itgrPulse{
  0%{ box-shadow:0 0 0 0 rgba(100,195,235,.55); }
  70%{ box-shadow:0 0 0 12px rgba(100,195,235,0); }
  100%{ box-shadow:0 0 0 0 rgba(100,195,235,0); }
}
.itgr-risk-title{
  margin: 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #64748B;
}
.itgr-risk-text{
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  color: #334155;
}

.itgr-hidden{ display:none !important; }

/* Print */
@media print{
  .itgr-no-print{ display:none !important; }
  .itgr-app{ background:#fff !important; padding:0 !important; }
  .itgr-phase{ break-inside: avoid; page-break-inside: avoid; }
}
