/* Shared components for calculator pages — extends style.css tokens */

.breadcrumbs {
  padding: 0 0 22px;
  font-size: 13px;
  color: #a49cc9;
}
.breadcrumbs a { color: #a49cc9; text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs .sep { margin: 0 6px; opacity: 0.5; }
.breadcrumbs .current { color: #fff; font-weight: 600; }

/* Dark calculator hero — reuses .hero base (background/glow/grid) from style.css */
.calc-page-hero {
  padding: 32px 0 108px;
  text-align: left;
}
.calc-hero-inner { text-align: left; }

.calc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
}
.calc-eyebrow-icon {
  display: inline-flex;
  color: #c4b5fd;
}

.calc-h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 14px;
  color: #ffffff;
  max-width: 760px;
}
.calc-subhead {
  font-size: 17px;
  color: #d8d3f5;
  max-width: 680px;
  margin: 0 0 14px;
}
.calc-intro {
  font-size: 14.5px;
  color: #a49cc9;
  max-width: 680px;
  line-height: 1.7;
  margin: 0;
}

/* Accent per category, matching homepage cat-section palette */
body[data-color="violet"] .calc-eyebrow-icon { color: #c4b5fd; }
body[data-color="emerald"] .calc-eyebrow-icon { color: #6ee7b7; }
body[data-color="amber"] .calc-eyebrow-icon { color: #fcd34d; }
body[data-color="blue"] .calc-eyebrow-icon { color: #93c5fd; }
body[data-color="teal"] .calc-eyebrow-icon { color: #5eead4; }
body[data-color="orange"] .calc-eyebrow-icon { color: #fdba74; }
body[data-color="sky"] .calc-eyebrow-icon { color: #7dd3fc; }
body[data-color="slate"] .calc-eyebrow-icon { color: #cbd5e1; }
body[data-color="rose"] .calc-eyebrow-icon { color: #fda4af; }
body[data-color="purple"] .calc-eyebrow-icon { color: #d8b4fe; }

body[data-color="violet"] .calc-card { border-top: 3px solid #7c3aed; }
body[data-color="emerald"] .calc-card { border-top: 3px solid #059669; }
body[data-color="amber"] .calc-card { border-top: 3px solid #b45309; }
body[data-color="blue"] .calc-card { border-top: 3px solid #2563eb; }
body[data-color="teal"] .calc-card { border-top: 3px solid #0d9488; }
body[data-color="orange"] .calc-card { border-top: 3px solid #ea580c; }
body[data-color="sky"] .calc-card { border-top: 3px solid #0284c7; }
body[data-color="slate"] .calc-card { border-top: 3px solid #475569; }
body[data-color="rose"] .calc-card { border-top: 3px solid #e11d48; }
body[data-color="purple"] .calc-card { border-top: 3px solid #9333ea; }

body[data-color="violet"] .btn-primary { background: #7c3aed; }
body[data-color="emerald"] .btn-primary { background: #059669; }
body[data-color="amber"] .btn-primary { background: #b45309; }
body[data-color="blue"] .btn-primary { background: #2563eb; }
body[data-color="teal"] .btn-primary { background: #0d9488; }
body[data-color="orange"] .btn-primary { background: #ea580c; }
body[data-color="sky"] .btn-primary { background: #0284c7; }
body[data-color="slate"] .btn-primary { background: #475569; }
body[data-color="rose"] .btn-primary { background: #e11d48; }
body[data-color="purple"] .btn-primary { background: #9333ea; }

.calc-tool {
  margin: 32px 0;
}
.calc-tool-overlap {
  margin-top: -84px;
  position: relative;
  z-index: 2;
}

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

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.field .hint {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}
.field input[type="number"],
.field input[type="text"],
.field input[type="date"],
.field select {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field input:focus, .field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.field .error-msg {
  font-size: 12px;
  color: #dc2626;
  min-height: 16px;
  display: none;
}
.field.has-error input, .field.has-error select { border-color: #dc2626; }
.field.has-error .error-msg { display: block; }

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

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.result-box {
  margin-top: 22px;
  padding: 22px;
  border-radius: 14px;
  background: var(--primary-tint);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  display: none;
}
.result-box.is-visible { display: block; }
.result-box .result-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin: 0 0 6px;
}
.result-box .result-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.result-box .result-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.result-grid .result-item {
  background: var(--surface);
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
}
.result-grid .result-item .k {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.result-grid .result-item .v {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

/* How-to-use */
.how-to {
  margin: 44px 0;
}
.how-to h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 18px;
}
.how-to ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}
.how-to li {
  counter-increment: step;
  position: relative;
  padding: 16px 20px 16px 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.6;
}
.how-to li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Educational content article */
.calc-content {
  margin: 44px 0;
  max-width: 780px;
}
.calc-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin: 36px 0 14px;
  letter-spacing: -0.01em;
}
.calc-content h2:first-child { margin-top: 0; }
.calc-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 22px 0 10px;
}
.calc-content p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.calc-content ul, .calc-content ol {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
}
.calc-content li { margin-bottom: 6px; }
.calc-content strong { color: var(--text); }
.calc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 14px;
}
.calc-content th, .calc-content td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.calc-content th { color: var(--text); font-weight: 700; }
.calc-content td { color: var(--text-muted); }

/* FAQ accordion */
.calc-faq {
  margin: 44px 0;
  max-width: 780px;
}
.calc-faq h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 18px;
}
.calc-faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 20px;
  margin-bottom: 10px;
}
.calc-faq summary {
  font-weight: 700;
  font-size: 15px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.calc-faq summary::-webkit-details-marker { display: none; }
.calc-faq summary::after {
  content: '+';
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.calc-faq details[open] summary::after { transform: rotate(45deg); }
.calc-faq .faq-answer {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-muted);
  padding: 0 0 18px;
  margin: 0;
}

.disclaimer-box {
  margin: 36px 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-muted);
  max-width: 780px;
}

/* Simple content page (about/contact/privacy/terms) */
.page-content {
  max-width: 720px;
  margin: 40px 0 60px;
}
.page-content h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.page-content h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 10px;
}
.page-content p { font-size: 15px; line-height: 1.75; color: var(--text-muted); margin: 0 0 14px; }
.page-content ul { padding-left: 20px; color: var(--text-muted); font-size: 15px; line-height: 1.75; }
.page-content a { color: var(--primary); }

@media (max-width: 640px) {
  .calc-card { padding: 20px; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-page-hero { padding: 24px 0 72px; }
  .calc-tool-overlap { margin-top: -52px; }
}
