.tool-hero {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  padding: 5rem 1.5rem 3rem;
  margin-top: 68px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tool-hero::before {
  content: ''; position: absolute;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,0.06); top: -150px; right: -100px;
}
.tool-hero::after {
  content: ''; position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,0.04); bottom: -100px; left: -50px;
}
.tool-hero-content { position: relative; z-index: 1; }
.tool-hero-icon {
  width: 72px; height: 72px; border-radius: 20px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 1.25rem;
  border: 1px solid rgba(255,255,255,0.2);
}
.tool-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800; color: white;
  letter-spacing: -1px; margin-bottom: 0.75rem;
}
.tool-hero p { font-size: 1rem; color: rgba(255,255,255,0.78); max-width: 480px; margin: 0 auto; }
.tool-main { max-width: 960px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }

.mode-tabs {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.mode-tab {
  padding: 0.5rem 1rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 0.82rem; font-weight: 600; font-family: 'Inter', sans-serif;
  color: var(--text-muted); cursor: pointer;
  transition: var(--transition);
}
.mode-tab:hover { border-color: #f59e0b; color: #d97706; }
.mode-tab.active {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-color: transparent;
  color: white;
  box-shadow: 0 3px 10px rgba(245,158,11,0.3);
}

.pct-cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

.pct-card {
  background: white; border-radius: var(--radius-lg);
  border: 1.5px solid var(--border); box-shadow: var(--shadow);
  overflow: hidden; transition: var(--transition);
}
.pct-card:hover { border-color: rgba(245,158,11,0.3); box-shadow: var(--shadow-md); }
.pct-card.active-card { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.1); }

.pct-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 0.625rem;
}
.pct-card-num {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white; font-size: 0.75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.pct-card-title { font-size: 0.875rem; font-weight: 700; color: var(--text); }
.pct-card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.875rem; }

.pct-formula {
  display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap;
}
.pct-input {
  flex: 1; min-width: 70px;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 700; font-family: 'Inter', sans-serif;
  color: var(--text); outline: none;
  transition: var(--transition); background: var(--bg);
  text-align: center;
}
.pct-input:focus { border-color: #f59e0b; background: white; box-shadow: 0 0 0 3px rgba(245,158,11,0.1); }
.pct-input::placeholder { font-size: 0.85rem; font-weight: 400; color: var(--text-light); }
.pct-op { font-size: 0.9rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

.pct-result-bar {
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, rgba(245,158,11,0.06), rgba(239,68,68,0.06));
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245,158,11,0.15);
  display: flex; justify-content: space-between; align-items: center;
}
.pct-result-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.pct-result-value { font-size: 1.25rem; font-weight: 900; color: #d97706; letter-spacing: -0.5px; }

/* Marks mode - full width */
.pct-card.marks-mode { grid-column: 1 / -1; }
.marks-inputs { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.marks-field {
  flex: 1; min-width: 120px;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.marks-field-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.marks-result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 0.25rem; }
.marks-stat {
  padding: 0.875rem 0.75rem;
  background: var(--bg); border-radius: var(--radius-sm);
  text-align: center;
}
.marks-stat-value { font-size: 1.25rem; font-weight: 900; color: var(--text); letter-spacing: -0.5px; display: block; }
.marks-stat-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; display: block; margin-top: 3px; }

@media (max-width: 640px) {
  .pct-cards-grid { grid-template-columns: 1fr; }
  .pct-card.marks-mode { grid-column: auto; }
  .marks-result-grid { grid-template-columns: 1fr 1fr; }
  .mode-tabs { gap: 0.375rem; }
  .mode-tab { font-size: 0.78rem; padding: 0.45rem 0.875rem; }
}
