/* ── Company Profile Pages ───────────────────────────────────────────────── */

.breadcrumb {
  font-size: .8rem;
  color: #64748b;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: #64748b; text-decoration: none; }
.breadcrumb a:hover { color: var(--emerald); }

/* Hero */
.cp-hero {
  background: var(--void);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}
.cp-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cp-tier-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.cp-hero__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 8px;
  line-height: 1.2;
}
.cp-hero__sector {
  color: #94a3b8;
  font-size: .9rem;
  margin: 0 0 14px;
  max-width: 560px;
}
.cp-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: .78rem;
  color: #64748b;
}
.cp-hero__meta strong { color: #cbd5e1; }

/* Score ring */
.cp-score-ring {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.cp-score-val {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.cp-score-label {
  font-size: .65rem;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.3;
}

/* Top risk pills */
.cp-top-risks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 16px;
}
.top-risk-pill {
  background: rgba(248,113,113,.1);
  color: #f87171;
  border: 1px solid rgba(248,113,113,.25);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
}

/* Main grid */
.cp-main { padding: 8px 0 80px; }
.cp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

/* Cards */
.cp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.cp-section-title {
  font-size: .85rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 18px;
}

/* Risk bars */
.rb-list { display: flex; flex-direction: column; gap: 10px; }
.rb-row  { display: flex; align-items: center; gap: 10px; }
.rb-label { font-size: .8rem; color: #94a3b8; width: 130px; flex-shrink: 0; }
.rb-track { flex: 1; height: 6px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; }
.rb-fill  { height: 100%; border-radius: 3px; transition: width .4s; }
.rb-val   { font-size: .78rem; font-weight: 600; width: 28px; text-align: right; }

/* Financial exposure grid */
.fe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fe-item { display: flex; flex-direction: column; gap: 3px; }
.fe-label { font-size: .72rem; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.fe-val   { font-size: .9rem; color: #e2e8f0; font-weight: 500; }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 600;
}
.badge--green  { background: rgba(52,211,153,.15); color: #34d399; }
.badge--amber  { background: rgba(251,191,36,.15);  color: #fbbf24; }

/* Table */
.cp-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.cp-table th { color: #64748b; font-weight: 500; text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.cp-table td { padding: 8px 10px; color: #cbd5e1; border-bottom: 1px solid rgba(255,255,255,.04); }

/* Material pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.mat-pill {
  background: rgba(99,102,241,.12);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,.25);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
}

/* AI summary */
.cp-ai-text {
  font-size: .88rem;
  line-height: 1.7;
  color: #cbd5e1;
  white-space: pre-line;
}
.cp-disclaimer {
  font-size: .72rem;
  color: #475569;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.05);
  line-height: 1.5;
}

/* CTA */
.cp-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.cp-cta-btn {
  background: var(--emerald);
  color: #0a0f0a;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
}
.cp-cta-btn:hover { opacity: .88; }
.cp-cta-link { color: #64748b; font-size: .85rem; text-decoration: none; }
.cp-cta-link:hover { color: var(--emerald); }

@media (max-width: 640px) {
  .cp-hero__inner { flex-direction: column; }
  .cp-score-ring  { width: 80px; height: 80px; }
  .cp-score-val   { font-size: 1.5rem; }
  .fe-grid        { grid-template-columns: 1fr; }
  .rb-label       { width: 100px; }
}

/* ── Print / PDF styles ───────────────────────────────────────────────────── */
.cp-pdf-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #94a3b8; border-radius: 8px;
  padding: 9px 16px; font-size: .84rem; cursor: pointer;
  text-decoration: none; transition: all .15s;
}
.cp-pdf-btn:hover { border-color: var(--emerald); color: var(--emerald); }

@media print {
  /* Hide everything except content */
  .site-header, .nav__mobile, .breadcrumb,
  .cp-cta, .cp-pdf-btn, .site-footer,
  .scroll-progress { display: none !important; }

  body { background: #fff !important; color: #111 !important; font-size: 11pt; }
  .cp-hero { background: #fff !important; border-bottom: 2px solid #16a34a; padding: 24px 0 16px; }
  .cp-hero__title { color: #111 !important; font-size: 18pt; }
  .cp-hero__sector { color: #444 !important; }
  .cp-tier-badge { border: 1px solid currentColor !important; }
  .cp-score-ring { border-color: currentColor !important; }
  .cp-score-val, .cp-tier-badge { color: #111 !important; }

  .cp-card {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    break-inside: avoid;
    margin-bottom: 12pt;
  }
  .cp-section-title { color: #555 !important; }
  .fe-label { color: #666 !important; }
  .fe-val   { color: #111 !important; }
  .rb-label { color: #555 !important; }
  .rb-track { background: #e5e7eb !important; }
  .rb-val   { color: #111 !important; }
  .rb-fill  { background: #16a34a !important; }
  .cp-ai-text { color: #333 !important; }
  .cp-disclaimer { color: #888 !important; border-top-color: #e5e7eb !important; }
  .badge--green { background: #dcfce7 !important; color: #166534 !important; }
  .badge--amber { background: #fef9c3 !important; color: #854d0e !important; }
  .cp-table th, .cp-table td { color: #333 !important; border-color: #e5e7eb !important; }
  .top-risk-pill { background: #fee2e2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }
  .mat-pill { background: #ede9fe !important; color: #5b21b6 !important; border-color: #c4b5fd !important; }

  /* Print header */
  .cp-hero::after {
    content: 'ESG Financial Quotient  |  greencurve.github.io  |  Source: SEBI BRSR Public Filing  |  Not investment advice';
    display: block;
    font-size: 8pt;
    color: #888;
    margin-top: 12pt;
    border-top: 1px solid #e5e7eb;
    padding-top: 6pt;
  }

  /* Force page break before AI section */
  .cp-card:nth-child(3) { page-break-before: auto; }
  .cp-grid { display: block; }
  .cp-grid .cp-card { width: 100%; margin-bottom: 10pt; }
}
