.tool-hero {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  color: #fff;
}
.tool-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff !important;
  line-height: 1.25;
  margin: 0 auto 0.5rem;
  max-width: 720px;
}
.tool-hero p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  max-width: 580px;
  margin: 0 auto;
}
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}
.tool-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem;
}
.cc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
@media (max-width: 860px) {
  .cc-grid { grid-template-columns: minmax(0, 1fr); }
}
.calc-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 18px;
  padding: 1.65rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}
.cc-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.cc-top-row h2 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.cc-top-row h2 i { color: #4f46e5; }
.cc-btn-ghost {
  background: var(--bg, #f8fafc);
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 9px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cc-btn-ghost:hover { border-color: #4f46e5; color: #4f46e5; }

.cc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.cc-chip {
  background: var(--bg, #f8fafc);
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}
.cc-chip:hover { border-color: #4f46e5; color: #4f46e5; }

.cc-pickers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.15rem;
}
@media (max-width: 500px) {
  .cc-pickers { grid-template-columns: 1fr; }
}
.cc-color-box label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.cc-input-pair {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.5rem;
  align-items: center;
}
.cc-input-pair input[type="color"] {
  width: 48px;
  height: 44px;
  padding: 2px;
  border: 1.5px solid var(--border, #cbd5e1);
  border-radius: 10px;
  background: var(--bg, #fff);
  cursor: pointer;
}
.cc-input-pair input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 0.8rem;
  font-family: monospace;
  font-size: 1rem;
  font-weight: 700;
  border: 1.5px solid var(--border, #cbd5e1);
  border-radius: 10px;
  background: var(--bg, #fff);
  color: var(--text, #0f172a);
}
.cc-rgb {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.74rem;
  color: var(--text-muted, #64748b);
}

.cc-fix-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.15rem;
}
.cc-fix-text { font-size: 0.84rem; margin-bottom: 0.65rem; color: var(--text, #0f172a); }
.cc-fix-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cc-fix-btn {
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.42rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.cc-fix-btn.secondary {
  background: var(--card-bg, #fff);
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #cbd5e1);
}

.cc-css-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
}
.cc-css-bar code {
  font-size: 0.78rem;
  color: var(--text, #0f172a);
  background: transparent;
  padding: 0;
  overflow-x: auto;
}

.cc-ratio-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: var(--bg, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  margin-bottom: 1rem;
}
.cc-ratio-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted, #64748b); }
.cc-ratio-number { font-size: 2.2rem; font-weight: 800; line-height: 1.1; color: var(--text, #0f172a); }
.cc-grade-pill {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}
.cc-grade-pill.pass { background: #dcfce7; color: #166534; }
.cc-grade-pill.warn { background: #fef3c7; color: #92400e; }
.cc-grade-pill.fail { background: #fee2e2; color: #991b1b; }

.cc-badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}
@media (max-width: 500px) {
  .cc-badges-grid { grid-template-columns: 1fr; }
}
.cc-audit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border, #e2e8f0);
  font-size: 0.82rem;
  font-weight: 600;
}
.cc-audit-item small { opacity: 0.7; font-weight: 500; }
.audit-status {
  padding: 0.16rem 0.52rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
}
.cc-audit-item.is-pass .audit-status { background: #dcfce7; color: #166534; }
.cc-audit-item.is-fail .audit-status { background: #fee2e2; color: #991b1b; }

.cc-live-preview {
  border-radius: 14px;
  padding: 1.35rem;
  border: 1.5px solid rgba(128, 128, 128, 0.25);
  transition: background 0.15s ease, color 0.15s ease;
}
.lp-heading { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.45rem; }
.lp-body { font-size: 0.96rem; line-height: 1.6; margin-bottom: 1rem; }
.lp-controls { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }
.lp-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 2px solid currentColor;
  font-size: 0.84rem;
  font-weight: 700;
}
.lp-input {
  flex: 1;
  min-width: 180px;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 0.84rem;
}
