:root{
  --cirp-bg:#0b1220;
  --cirp-surface:#10192b;
  --cirp-card:#ffffff;
  --cirp-border:rgba(255,255,255,.12);
  --cirp-text:#0f172a;
  --cirp-muted:#64748b;
  --cirp-white:#ffffff;
  --cirp-accent:#2563eb;
  --cirp-accent-2:#0ea5e9;
  --cirp-soft:#eaf2ff;
  --cirp-shadow:0 20px 60px rgba(2,6,23,.18);
  --cirp-radius:22px;
}

.cirp-app{
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--cirp-text);
  margin: 30px 0;
}

.cirp-shell{
  background:
    radial-gradient(circle at top right, rgba(14,165,233,.18), transparent 28%),
    linear-gradient(180deg, #0b1220 0%, #111827 100%);
  color: var(--cirp-white);
  border-radius: 32px;
  padding: 28px;
  box-shadow: var(--cirp-shadow);
  overflow: hidden;
}

.cirp-hero{
  max-width: 720px;
  margin-bottom: 28px;
}

.cirp-eyebrow,
.cirp-result-kicker{
  display:inline-block;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:700;
  color:#93c5fd;
  margin-bottom:10px;
}

.cirp-hero h2{
  margin:0 0 10px;
  font-size:clamp(28px,4vw,42px);
  line-height:1.08;
  color:#fff;
}

.cirp-hero p{
  margin:0;
  max-width:680px;
  color:rgba(255,255,255,.78);
  font-size:16px;
}

.cirp-builder{
  background:rgba(255,255,255,.06);
  border:1px solid var(--cirp-border);
  border-radius:28px;
  padding:24px;
  backdrop-filter: blur(12px);
}

.cirp-progress{
  margin-bottom:22px;
}

.cirp-progress-bar{
  width:100%;
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  overflow:hidden;
}

.cirp-progress-bar span{
  display:block;
  width:25%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--cirp-accent-2), var(--cirp-accent));
  transition:width .28s ease;
}

.cirp-progress-text{
  font-size:14px;
  margin-top:10px;
  color:rgba(255,255,255,.84);
}

.cirp-step{
  display:none;
}

.cirp-step.is-active{
  display:block;
}

.cirp-step-header h3{
  margin:0 0 6px;
  font-size:24px;
  color:#fff;
}

.cirp-step-header p{
  margin:0 0 18px;
  color:rgba(255,255,255,.72);
}

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

.cirp-card-grid--compact{
  grid-template-columns:repeat(2, minmax(0,1fr));
}

.cirp-card{
  appearance:none;
  border:none;
  text-align:left;
  padding:18px;
  border-radius:24px;
  background:#fff;
  color:var(--cirp-text);
  box-shadow:0 12px 24px rgba(15,23,42,.12);
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, outline-color .18s ease, background .18s ease;
  min-height:124px;
}

.cirp-card:hover,
.cirp-card:focus{
  transform:translateY(-2px);
  box-shadow:0 18px 32px rgba(15,23,42,.18);
  outline:2px solid rgba(37,99,235,.18);
}

.cirp-card.is-selected{
  background:linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  outline:2px solid rgba(37,99,235,.45);
}

.cirp-card-title{
  display:block;
  font-size:18px;
  font-weight:700;
  margin-bottom:8px;
}

.cirp-card-desc{
  display:block;
  font-size:14px;
  line-height:1.5;
  color:var(--cirp-muted);
}

.cirp-actions{
  display:flex;
  gap:12px;
  margin-top:22px;
  align-items:center;
}

.cirp-btn{
  appearance:none;
  border:none;
  border-radius:999px;
  padding:14px 20px;
  font-weight:700;
  font-size:15px;
  cursor:pointer;
  transition:transform .18s ease, opacity .18s ease, background .18s ease;
}

.cirp-btn:hover{
  transform:translateY(-1px);
}

.cirp-btn:disabled{
  cursor:not-allowed;
  opacity:.45;
  transform:none;
}

.cirp-btn-primary{
  background:linear-gradient(90deg, var(--cirp-accent), var(--cirp-accent-2));
  color:#fff;
}

.cirp-btn-secondary{
  background:rgba(255,255,255,.1);
  color:#fff;
  border:1px solid rgba(255,255,255,.16);
}

.cirp-hidden{
  display:none !important;
}

.cirp-result{
  margin-top:26px;
  background:#fff;
  color:var(--cirp-text);
  border-radius:28px;
  padding:24px;
  box-shadow:var(--cirp-shadow);
}

.cirp-result-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:16px;
}

.cirp-result-head h3{
  margin:0 0 8px;
  font-size:30px;
}

.cirp-result-head p{
  margin:0;
  color:var(--cirp-muted);
}

.cirp-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:110px;
  padding:10px 16px;
  border-radius:999px;
  font-weight:700;
  font-size:14px;
  background:#e2e8f0;
  color:#0f172a;
}

.cirp-badge.low{background:#dcfce7;color:#166534;}
.cirp-badge.medium{background:#fef3c7;color:#92400e;}
.cirp-badge.high{background:#fed7aa;color:#9a3412;}
.cirp-badge.critical{background:#fee2e2;color:#991b1b;}

.cirp-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:18px;
}

.cirp-meta-chip{
  background:var(--cirp-soft);
  color:#1e3a8a;
  border-radius:999px;
  padding:8px 12px;
  font-size:13px;
  font-weight:600;
}

.cirp-priorities,
.cirp-panel{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:22px;
  padding:18px;
}

.cirp-priorities h4,
.cirp-panel h4{
  margin:0 0 12px;
  font-size:18px;
}

.cirp-priorities ul,
.cirp-panel ul{
  margin:0;
  padding-left:18px;
}

.cirp-priorities li,
.cirp-panel li{
  margin-bottom:9px;
  line-height:1.55;
}

.cirp-timeline{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:16px;
  margin:18px 0;
}

.cirp-time-card{
  background:#0f172a;
  color:#fff;
  border-radius:22px;
  padding:18px;
}

.cirp-time-card h5{
  margin:0 0 10px;
  font-size:17px;
}

.cirp-time-card p{
  margin:0;
  color:rgba(255,255,255,.82);
  line-height:1.6;
}

.cirp-panels{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:16px;
  margin-bottom:18px;
}

.cirp-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.cirp-links a{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  padding:10px 14px;
  border-radius:999px;
  background:#e0f2fe;
  color:#075985;
  font-weight:700;
}

.cirp-utility-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}

.cirp-utility-actions .cirp-btn-secondary{
  background:#eef2ff;
  color:#1e3a8a;
  border:1px solid #c7d2fe;
}

.cirp-disclaimer{
  font-size:13px;
  color:var(--cirp-muted);
  margin:18px 0 0;
}

@media (max-width: 900px){
  .cirp-card-grid,
  .cirp-card-grid--compact,
  .cirp-timeline,
  .cirp-panels{
    grid-template-columns:1fr;
  }

  .cirp-result-head{
    flex-direction:column;
  }
}

@media (max-width: 640px){
  .cirp-shell{
    padding:18px;
    border-radius:24px;
  }

  .cirp-builder,
  .cirp-result{
    padding:16px;
    border-radius:20px;
  }

  .cirp-card{
    min-height:auto;
  }

  .cirp-actions{
    flex-wrap:wrap;
  }

  .cirp-btn{
    width:100%;
    justify-content:center;
  }
}

@media print{
  body *{
    visibility:hidden;
  }
  #cirp-result, #cirp-result *{
    visibility:visible;
  }
  #cirp-result{
    position:absolute;
    left:0;
    top:0;
    width:100%;
    box-shadow:none;
    border-radius:0;
  }
}
