:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  --secondary: #0284c7;
  --secondary-light: #f0f9ff;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.85rem 1.5rem;
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.logo-badge {
  background: var(--primary);
  color: #ffffff;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

nav {
  display: flex;
  gap: 1.25rem;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: color 0.15s, background-color 0.15s;
}

nav a:hover, nav a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.main-content {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
}

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-size: 2.35rem;
  line-height: 1.2;
  margin-bottom: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto;
}

/* Calculator Grid - OmniCalculator Style */
.calc-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

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

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

.card h2 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #0f172a;
  font-weight: 700;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-group .hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

input[type="number"], select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="number"]:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.range-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.range-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
}

.range-val {
  min-width: 60px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

/* Results Section - Crisp Highlight */
.results-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 4px solid var(--primary);
  background: #ffffff;
}

.metric-highlight {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.metric-highlight .label {
  font-size: 0.8rem;
  color: #047857;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-highlight .value {
  font-size: 2.4rem;
  font-weight: 800;
  color: #047857;
  margin: 0.25rem 0;
  line-height: 1.1;
}

.metrics-subgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.submetric {
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
}

.submetric .sub-label {
  font-size: 0.76rem;
  color: var(--text-light);
  font-weight: 500;
}

.submetric .sub-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 0.2rem;
}

.payback-bar-container {
  margin-top: 0.6rem;
}

.payback-bar-bg {
  height: 7px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.payback-bar-fill {
  height: 100%;
  width: 50%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Ad Placement Slots - Clean Professional Style */
.adsense-container {
  margin: 2.25rem 0;
  padding: 0.9rem;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  text-align: center;
}

.ad-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.ad-box {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Features & Guides Grid */
.features-section {
  margin-top: 3.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1.5rem;
  text-align: center;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.guide-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.guide-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.guide-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: #0f172a;
  font-weight: 700;
}

.guide-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.guide-card .read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Article Page Typography - Crisp & Readable */
.article-wrap {
  max-width: 780px;
  margin: 1.5rem auto 3rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.article-header {
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
}

.article-header h1 {
  font-size: 2rem;
  line-height: 1.3;
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.article-meta {
  font-size: 0.82rem;
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.6rem;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}

.article-body h2 {
  font-size: 1.35rem;
  color: #0f172a;
  margin: 2rem 0 0.75rem;
  font-weight: 700;
}

.article-body h3 {
  font-size: 1.12rem;
  color: var(--primary-hover);
  margin: 1.5rem 0 0.5rem;
  font-weight: 700;
}

.article-body p {
  margin-bottom: 1.25rem;
}

.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

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

th, td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

tr:nth-child(even) {
  background: #fbfcfe;
}

tr:hover {
  background: #f1f5f9;
}

.cta-box {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2.25rem 0;
  text-align: center;
}

.cta-box h3 {
  color: #065f46;
  margin-bottom: 0.4rem;
  font-weight: 800;
}

.cta-box p {
  color: #047857;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  background: #ffffff;
  margin-top: 4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--primary);
}
