/* ================================================================
   FreelanceCalc — Global Stylesheet
   Palette : Indigo-700 primary · Emerald-600 accent · Slate neutrals
   Font    : Inter (400 500 600 700)
   ================================================================ */

/* ── Variables ──────────────────────────────────────────────────── */
:root {
  --primary:       #4338CA;
  --primary-mid:   #4F46E5;
  --primary-light: #EEF2FF;
  --primary-border:#C7D2FE;
  --accent:        #059669;
  --accent-light:  #ECFDF5;
  --accent-border: #A7F3D0;

  --bg:       #F8FAFC;
  --surface:  #FFFFFF;
  --border:   #E2E8F0;
  --border-2: #CBD5E1;

  --text:     #0F172A;
  --text-2:   #334155;
  --text-3:   #64748B;
  --text-4:   #94A3B8;

  --danger:   #DC2626;
  --warning:  #D97706;
  --info:     #0284C7;

  --max-w:    1120px;
  --r:        10px;
  --r-sm:     6px;
  --r-lg:     16px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,.10), 0 4px 6px -4px rgba(0,0,0,.04);

  --transition: 150ms ease;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary-mid); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }
main { flex: 1; }

/* ── Typography ─────────────────────────────────────────────────── */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.875rem); font-weight: 700; line-height: 1.2; letter-spacing: -.015em; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.25rem); font-weight: 600; line-height: 1.3; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-2); }
.lead { font-size: 1.125rem; color: var(--text-3); }

/* ── Layout ─────────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--sm { padding: 32px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

/* ── Navigation ─────────────────────────────────────────────────── */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}
.nav__logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav__logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 700;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  flex-wrap: nowrap;
  overflow: hidden;
}
.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.nav__links a:hover, .nav__links a.active {
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}
.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 1.2rem;
  color: var(--text-2);
  line-height: 1;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e3a5f 100%);
  color: white;
  padding: 80px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero__content { position: relative; }
.hero h1 { color: white; margin-bottom: 20px; }
.hero .lead { color: rgba(255,255,255,.75); max-width: 600px; margin: 0 auto 36px; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}

/* ── Tool Cards (homepage grid) ─────────────────────────────────── */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: inherit;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-border);
  text-decoration: none;
}
.tool-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 4px;
}
.tool-card__icon--indigo { background: var(--primary-light); }
.tool-card__icon--emerald { background: var(--accent-light); }
.tool-card__icon--amber { background: #FFFBEB; }
.tool-card__icon--sky { background: #F0F9FF; }
.tool-card__title { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.tool-card__desc { font-size: 0.875rem; color: var(--text-3); line-height: 1.55; flex: 1; }
.tool-card__cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-mid);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* ── Card ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card--accent {
  border-color: var(--accent-border);
  background: var(--accent-light);
}
.card--primary {
  border-color: var(--primary-border);
  background: var(--primary-light);
}
.card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Calculator Layout ──────────────────────────────────────────── */
.calc-page { padding: 40px 0 64px; }
.calc-header { margin-bottom: 36px; }
.calc-header h1 { margin-bottom: 8px; }
.calc-header p { font-size: 1.05rem; color: var(--text-3); }
.calc-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 28px;
  align-items: start;
}
.calc-layout--full { grid-template-columns: 1fr; }
.result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--text-4);
}
.result-placeholder .icon { font-size: 2.5rem; }
.result-placeholder p { font-size: 0.875rem; }

/* ── Form Elements ──────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group + .form-group { margin-top: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.label-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-3);
  margin-left: auto;
}
.input-wrap { position: relative; display: flex; }
.input-prefix, .input-suffix {
  background: var(--bg);
  border: 1px solid var(--border-2);
  padding: 0 12px;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-3);
  font-weight: 500;
  user-select: none;
}
.input-prefix { border-right: none; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-suffix { border-left: none; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
input[type="number"],
input[type="text"],
input[type="date"],
select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
input[type="number"]:focus,
input[type="text"]:focus,
input[type="date"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary-mid);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.input-wrap input {
  border-radius: 0;
  flex: 1;
}
.input-wrap input:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-wrap input:last-child  { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.input-wrap .input-prefix + input { border-radius: 0; }
.input-wrap input + .input-suffix { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.form-hint {
  font-size: 0.775rem;
  color: var(--text-3);
  line-height: 1.4;
}
.toggle-group {
  display: flex;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.toggle-group label {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  margin: 0;
  justify-content: center;
  font-weight: 500;
  color: var(--text-3);
}
.toggle-group input[type="radio"] { display: none; }
.toggle-group input[type="radio"]:checked + label {
  background: var(--primary);
  color: white;
}
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--primary);
  color: white;
}
.btn--primary:hover { background: var(--primary-mid); box-shadow: var(--shadow-md); }
.btn--accent {
  background: var(--accent);
  color: white;
}
.btn--accent:hover { background: var(--accent-dark); box-shadow: var(--shadow-md); }
.btn--outline {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-2);
}
.btn--outline:hover { background: var(--bg); border-color: var(--text-3); }
.btn--ghost {
  background: transparent;
  color: var(--primary-mid);
  height: auto;
  padding: 6px 10px;
  font-size: 0.8125rem;
}
.btn--ghost:hover { background: var(--primary-light); }
.btn--full { width: 100%; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 0.8125rem; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }

/* ── Result Components ──────────────────────────────────────────── */
.result-big {
  text-align: center;
  padding: 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  border-radius: var(--r);
  color: white;
  margin-bottom: 20px;
}
.result-big__label { font-size: 0.8rem; opacity: .75; font-weight: 500; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.result-big__value { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 700; letter-spacing: -.02em; margin: 4px 0; }
.result-big__sub { font-size: 0.875rem; opacity: .8; }

.result-big--accent {
  background: linear-gradient(135deg, var(--accent) 0%, #34D399 100%);
}

.breakdown {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-row:nth-child(even) { background: var(--bg); }
.breakdown-row__label { color: var(--text-3); }
.breakdown-row__value { font-weight: 600; color: var(--text); }
.breakdown-row--total {
  background: var(--primary-light) !important;
  border-top: 2px solid var(--primary-border);
  font-weight: 600;
}
.breakdown-row--total .breakdown-row__label { color: var(--primary); }
.breakdown-row--total .breakdown-row__value { color: var(--primary); font-size: 1rem; }
.breakdown-row--danger .breakdown-row__value { color: var(--danger); }
.breakdown-row--success .breakdown-row__value { color: var(--accent); }

/* ── Comparison Table ───────────────────────────────────────────── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.comparison-table th {
  background: var(--bg);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
}
.comparison-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr.best-row td { background: var(--accent-light); }
.processor-name { font-weight: 600; color: var(--text); }
.processor-sub { font-size: 0.75rem; color: var(--text-3); }
.best-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Tabs ───────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  gap: 0;
  overflow-x: auto;
}
.tab {
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color var(--transition), border-color var(--transition);
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab:hover:not(.active) { color: var(--text-2); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Alert / Info Box ───────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 0.8125rem;
  line-height: 1.55;
  display: flex;
  gap: 10px;
}
.alert--info    { background: #F0F9FF; border: 1px solid #BAE6FD; color: #0369A1; }
.alert--warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.alert--danger  { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert--success { background: var(--accent-light); border: 1px solid var(--accent-border); color: #065F46; }

/* ── How it Works ───────────────────────────────────────────────── */
.how-it-works {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.how-it-works h3 { margin-bottom: 16px; }
.how-it-works p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 10px; }
.how-it-works p:last-child { margin-bottom: 0; }
.formula-box {
  background: #1E1B4B;
  color: #E0E7FF;
  padding: 16px 20px;
  border-radius: var(--r-sm);
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  margin: 16px 0;
  overflow-x: auto;
}

/* ── Related Tools ──────────────────────────────────────────────── */
.related-tools { margin-top: 48px; }
.related-tools h3 { margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.related-card:hover { border-color: var(--primary-border); box-shadow: var(--shadow-md); text-decoration: none; }
.related-card__title { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.related-card__desc  { font-size: 0.8rem; color: var(--text-3); }

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-3);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--primary-mid); text-decoration: none; }
.breadcrumb__sep { color: var(--text-4); }

/* ── Badge ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge--free    { background: var(--accent-light); color: var(--accent-dark); border: 1px solid var(--accent-border); }
.badge--updated { background: #F0F9FF; color: #0369A1; border: 1px solid #BAE6FD; }
.badge--tag     { background: var(--bg); color: var(--text-3); border: 1px solid var(--border); }

/* ── Copy Button ────────────────────────────────────────────────── */
.copy-btn {
  background: none;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.copy-btn:hover { background: var(--bg); border-color: var(--text-3); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent-border); background: var(--accent-light); }

/* ── Print Button ───────────────────────────────────────────────── */
.print-btn {
  background: none;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.print-btn:hover { background: var(--bg); }

/* ── Stats Strip ────────────────────────────────────────────────── */
.stats-strip {
  background: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.stats-strip__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat__value { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.stat__label { font-size: 0.8rem; color: var(--text-3); margin-top: 2px; }

/* ── Footer ─────────────────────────────────────────────────────── */
.footer {
  background: #1E1B4B;
  color: rgba(255,255,255,.7);
  padding: 48px 0 28px;
  margin-top: auto;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer__brand { color: white; font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.footer__tagline { font-size: 0.8125rem; line-height: 1.6; }
.footer__col h4 { color: white; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer__col a {
  display: block;
  color: rgba(255,255,255,.6);
  font-size: 0.8125rem;
  margin-bottom: 8px;
  transition: color var(--transition);
}
.footer__col a:hover { color: white; text-decoration: none; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.775rem;
}
.footer__bottom a { color: rgba(255,255,255,.5); }
.footer__bottom a:hover { color: white; text-decoration: none; }

/* ── Quarterly Tax Specific ─────────────────────────────────────── */
.quarter-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.payment-quarter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 16px;
}
.payment-quarter__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.payment-quarter__number {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.875rem;
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 100px;
}
.payment-quarter__due {
  font-size: 0.775rem;
  color: var(--text-3);
}
.payment-quarter__amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}
.payment-quarter__sub {
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ── Processor Logo Strip ───────────────────────────────────────── */
.processor-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  margin-right: 8px;
}
.pl--paypal   { background: #003087; }
.pl--stripe   { background: #635BFF; }
.pl--square   { background: #3E4348; }
.pl--wise     { background: #00B9FF; }
.pl--payoneer { background: #FF4800; }

/* ── Utility Classes ────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.775rem; }
.text-muted  { color: var(--text-3); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--accent); }
.text-primary{ color: var(--primary-mid); }
.font-bold   { font-weight: 700; }
.font-semi   { font-weight: 600; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-strip__inner { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding: 52px 0 48px; }
  .section { padding: 40px 0; }
  .calc-page { padding: 24px 0 48px; }
  .card { padding: 20px; }
  .nav__links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px; box-shadow: var(--shadow-md); }
  .nav__links.open { display: flex; }
  .nav__toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .stats-strip__inner { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .quarter-inputs { grid-template-columns: 1fr; }
  .comparison-table { font-size: 0.8rem; }
  .comparison-table td, .comparison-table th { padding: 10px; }
  .btn-group { gap: 6px; }
}

/* ── Author Byline ──────────────────────────────────────────────── */
.author-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-3);
  margin-bottom: 20px;
  padding: 9px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.author-byline a { color: var(--text-2); font-weight: 500; text-decoration: none; }
.author-byline a:hover { color: var(--primary-mid); }
.author-byline__sep { color: var(--border-2); }

/* ── Disclaimer Strip ───────────────────────────────────────────── */
.disclaimer-strip {
  font-size: .775rem;
  color: #78350F;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--r-sm);
  padding: 8px 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── AEO Definition Box ─────────────────────────────────────────── */
.aeo-definition {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 16px 18px;
  margin-bottom: 20px;
  font-size: .9375rem;
  line-height: 1.75;
  color: var(--text-2);
}
.aeo-definition strong { color: var(--text); }

/* ── FAQ Section ────────────────────────────────────────────────── */
.faq-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.faq-section h2 { font-size: 1.25rem; margin-bottom: 16px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--surface);
}
.faq-item summary {
  padding: 13px 16px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.1rem;
  color: var(--primary-mid);
  font-weight: 400;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item[open] summary {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.faq-answer {
  padding: 14px 16px;
  font-size: .875rem;
  line-height: 1.75;
  color: var(--text-2);
}
.faq-answer p { margin-bottom: 8px; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ── Source Citation ────────────────────────────────────────────── */
.source-list {
  font-size: .775rem;
  color: var(--text-3);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.source-list a { color: var(--text-3); }
.source-list a:hover { color: var(--primary-mid); }

/* ── Print Styles ───────────────────────────────────────────────── */
@media print {
  .nav, .footer, .btn, .related-tools, .how-it-works { display: none !important; }
  .calc-layout { grid-template-columns: 1fr !important; }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .result-big { background: #1E1B4B !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
