/* Test Score Calculators */
.calc-page {
  padding: 48px 0 100px;
  background: #fafafa;
  min-height: 60vh;
}

.calc-page .container {
  max-width: 920px;
}

.calc-search-wrap {
  position: relative;
  margin-bottom: 40px;
}

.calc-search {
  width: 100%;
  padding: 16px 52px 16px 20px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f0f0f2;
  color: var(--text);
}

.calc-search:focus {
  outline: none;
  border-color: var(--purple);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(76, 55, 164, 0.12);
}

.calc-search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1.1rem;
}

.calc-pearson-slot {
  margin-bottom: 28px;
  text-align: center;
}

.calc-pearson-slot .pearson-slot-inline {
  margin: 0;
}

.calc-page-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 28px;
  color: var(--text);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

a.calc-card {
  color: inherit;
  text-decoration: none;
}

.calc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid #ebebef;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}

.calc-card:hover {
  border-color: #d8d8e0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.calc-card.hidden {
  display: none;
}

.calc-card-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: -0.02em;
}

.calc-card-logo.brand-pearson {
  background: #e8f0fe;
  color: #0066cc;
  border: 2px solid #0066cc;
  border-radius: 50%;
  font-size: 1.1rem;
}

.calc-card-logo.brand-toefl {
  color: #1a5fb4;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  width: auto;
}

.calc-card-logo.brand-gre {
  color: #5b2c8f;
  font-size: 1.1rem;
  font-weight: 800;
  width: auto;
}

.calc-card-logo.brand-ielts {
  color: #c41230;
  font-size: 1rem;
  font-weight: 800;
  width: auto;
}

.calc-card-logo.brand-clb {
  font-size: 1.5rem;
  background: transparent;
  width: auto;
}

.calc-card-body {
  flex: 1;
  min-width: 0;
}

.calc-card-body h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.calc-card-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 1.25rem;
}

.calc-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  display: none;
}

.calc-empty.visible {
  display: block;
}

/* Detail page */
.calc-detail-header {
  margin-bottom: 32px;
}

.calc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: 16px;
}

.calc-back:hover {
  text-decoration: underline;
}

.calc-detail-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 8px;
}

.calc-detail-header p {
  margin: 0;
  color: var(--text-muted);
}

.calc-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow);
}

.calc-skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.calc-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.calc-field input,
.calc-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
}

.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(76, 55, 164, 0.12);
}

.calc-field small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.calc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.calc-result {
  background: var(--bg-hero);
  border-radius: 12px;
  padding: 24px;
  display: none;
}

.calc-result.visible {
  display: block;
}

.calc-result h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.calc-result-main {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--purple);
  line-height: 1.2;
  margin-bottom: 8px;
}

.calc-result-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.calc-breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.calc-breakdown th,
.calc-breakdown td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.calc-breakdown th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calc-disclaimer {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .calc-skills-grid {
    grid-template-columns: 1fr;
  }
}
