/* ============================== */
/* PERCENTAGE CALCULATOR STYLES   */
/* ============================== */

/* Breadcrumb */
.breadcrumb {
  padding: 12px 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  transition: background var(--transition), border var(--transition);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Hero Section */
.pct-hero {
  padding: 44px 0 32px;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border var(--transition);
}

.pct-hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pct-hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 16px;
  line-height: 1.6;
}

.pct-hero-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pct-hero-badge span:first-child {
  color: #16a34a;
  font-weight: 600;
}

/* Calculator Section */
.pct-calculator-section {
  padding: 40px 0 60px;
}

.pct-calculator-wrapper {
  max-width: 920px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
  transition: background var(--transition), border var(--transition), box-shadow var(--transition);
}

/* Mode Switcher Tabs */
.pct-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.pct-tab-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
}

.pct-tab-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--bg);
}

.pct-tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* Panels */
.pct-panel {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.pct-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card Grid Layout */
.pct-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

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

/* Form Styles */
.pct-form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.pct-form-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pct-field {
  margin-bottom: 16px;
}

.pct-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.pct-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pct-input-wrap input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1.05rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.pct-input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.pct-input-affix {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  pointer-events: none;
}

.pct-radio-group {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.pct-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.pct-radio-label:hover {
  border-color: var(--accent);
}

.pct-radio-label input:checked + span {
  color: var(--accent);
  font-weight: 700;
}

.pct-btn-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.pct-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.pct-btn.primary {
  background: var(--accent);
  color: #fff;
}

.pct-btn.primary:hover {
  background: var(--accent-hover);
}

.pct-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.pct-btn.secondary:hover {
  color: var(--text);
  background: var(--border);
}

/* Result Card */
.pct-result-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pct-result-header {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pct-highlight-box {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  margin-bottom: 20px;
}

.pct-highlight-box .result-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.pct-highlight-box .result-val {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  word-break: break-all;
}

.pct-highlight-box .result-val.positive {
  color: #16a34a;
}

.pct-highlight-box .result-val.negative {
  color: #dc2626;
}

/* Breakdown rows */
.pct-breakdown-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.pct-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.pct-breakdown-item:last-child {
  border-bottom: none;
}

.pct-breakdown-label {
  color: var(--text-secondary);
}

.pct-breakdown-value {
  font-weight: 600;
  color: var(--text);
}

/* Step-by-step formula explanation */
.pct-formula-box {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.5;
}

.pct-formula-box code {
  background: var(--bg-secondary);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
  font-weight: 600;
}

/* Copy Action */
.pct-copy-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pct-copy-btn {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition);
}

.pct-copy-btn:hover {
  background: var(--border);
  border-color: var(--text-muted);
}

.pct-copy-btn.copied {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}

/* SEO & Content Article */
.pct-content-article {
  padding: 60px 0 40px;
  line-height: 1.75;
}

.pct-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.pct-content-wrapper h2 {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 40px 0 16px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.pct-content-wrapper h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text);
}

.pct-content-wrapper p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.02rem;
}

.pct-content-wrapper ul,
.pct-content-wrapper ol {
  margin: 0 0 20px 24px;
  color: var(--text-secondary);
}

.pct-content-wrapper li {
  margin-bottom: 8px;
}

/* Formula Showcase Card */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.formula-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.formula-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.formula-card .math-expr {
  display: block;
  background: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
  font-weight: 700;
  color: var(--accent);
  margin: 10px 0;
}

.formula-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Percentage Quick Reference Table */
.pct-table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.pct-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.pct-table th,
.pct-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.pct-table th {
  background: var(--bg-secondary);
  font-weight: 700;
  color: var(--text);
}

.pct-table tr:last-child td {
  border-bottom: none;
}

.pct-table tr:hover td {
  background: var(--bg);
}

/* Callout Note */
.pct-callout {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 28px 0;
}

.pct-callout h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.pct-callout p {
  margin: 0;
  font-size: 0.95rem;
}

/* FAQ Section */
.pct-faq-section {
  padding: 40px 0 60px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.pct-faq-wrapper {
  max-width: 820px;
  margin: 0 auto;
}

.pct-faq-wrapper h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  background: none;
  border: none;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 22px 18px;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
}

.faq-answer[aria-hidden="true"] {
  display: none;
}
