/**
 * ProfitHelm Minimal Sleek Design System
 * Anti-Slop Directive: Bright porcelain editorial canvas, crisp hairline borders,
 * high-contrast deep ink typography, creative visual meters, and zero dark AI slop.
 */

:root {
  /* Minimal Luxury Porcelain Palette */
  --bg-canvas: #fbfcfd;
  --bg-surface: #ffffff;
  --bg-subtle: #f4f6f8;
  --bg-muted: #eef2f6;

  /* Hairline Borders */
  --border-hairline: #e5e9f0;
  --border-subtle: #dbe1ea;
  --border-focus: #2563eb;

  /* Typography Colors */
  --text-primary: #090d16;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  /* Brand Accents */
  --brand-primary: #1d4ed8;
  --brand-hover: #1e40af;
  --brand-soft: #eff6ff;
  --brand-border: #bfdbfe;

  /* Functional Status Accents */
  --status-positive: #059669;
  --status-positive-bg: #ecfdf5;
  --status-positive-border: #a7f3d0;
  
  --status-negative: #dc2626;
  --status-negative-bg: #fef2f2;
  --status-negative-border: #fecaca;

  --status-warning: #d97706;
  --status-warning-bg: #fffbeb;
  --status-warning-border: #fde68a;

  /* Shadows */
  --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
  --shadow-elevated: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);

  /* Typography Stack */
  --font-sans: -apple-system, BlinkMacSystemFont, "Geist Sans", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Navigation Header */
.header {
  background-color: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border-hairline);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #090d16;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.125rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 150ms ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-primary);
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1.25rem 0 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

.breadcrumbs span.separator {
  margin: 0 0.5rem;
  color: var(--border-subtle);
}

/* Main Content Area */
.main {
  flex: 1;
  padding-bottom: 5rem;
}

.hero-section {
  padding: 2.5rem 0 2rem 0;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--brand-soft);
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 1.6rem + 2vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 72ch;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* Position 0 Quick Answer Box */
.quick-answer {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-left: 4px solid var(--brand-primary);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-card);
}

.quick-answer-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-primary);
  margin-bottom: 0.5rem;
}

.quick-answer-body {
  font-size: 1.0625rem;
  color: var(--text-primary);
  line-height: 1.65;
}

/* Creative Visual Bracket Meter */
.bracket-meter-wrap {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
}

.bracket-meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.bracket-meter-bar {
  display: flex;
  height: 16px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-muted);
  gap: 2px;
}

.bracket-meter-seg {
  height: 100%;
  transition: width 200ms ease;
  position: relative;
}

.bracket-meter-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* Interactive Calculator Layout */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 860px) {
  .calculator-grid {
    grid-template-columns: 390px 1fr;
  }
}

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

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-hairline);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Form Controls with 48px Height */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input, .form-select {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  font-variant-numeric: tabular-nums;
}

.form-input:focus, .form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* Creative Slider Control - 44px Touch Target */
.slider-control {
  width: 100%;
  height: 44px;
  padding: 18px 0;
  background: transparent;
  outline: none;
  margin: 0.25rem 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.slider-control::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: var(--bg-muted);
  border-radius: 3px;
}

.slider-control::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-primary);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  margin-top: -8px;
  transition: transform 120ms ease;
}

.slider-control::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Preset Buttons */
.preset-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.625rem;
}

.preset-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  padding: 0.375rem 0.75rem;
  min-height: 44px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 150ms ease;
  font-variant-numeric: tabular-nums;
}

.preset-btn:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.preset-btn:active {
  transform: scale(0.97);
}

/* Result Metrics Grid */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  padding: 1.125rem 1.25rem;
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.metric-value.highlight {
  color: var(--brand-primary);
}

/* Princeton +37% High Citation Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  margin: 1.5rem 0;
  background: var(--bg-surface);
}

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

th {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-hairline);
}

td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-hairline);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

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

tr:hover td {
  background: #f8fafc;
}

/* High-Ticket Affiliate Callout Cards */
.affiliate-section {
  margin: 3rem 0;
}

.affiliate-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

@media (min-width: 640px) {
  .affiliate-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.affiliate-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-elevated);
}

.affiliate-info {
  flex: 1;
}

.affiliate-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: var(--brand-soft);
  color: var(--brand-primary);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.affiliate-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.affiliate-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 160px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--brand-primary);
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, transform 120ms ease;
}

.btn-cta:hover {
  background: var(--brand-hover);
}

.btn-cta:active {
  transform: scale(0.98);
}

/* Article Content & Editorial Prose */
.article-content {
  margin: 3.5rem 0;
  max-width: 75ch;
}

.article-content h2 {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 2.25rem 0 1rem 0;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 1.75rem 0 0.75rem 0;
  color: var(--text-primary);
}

.article-content p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.article-content ul, .article-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Status Badges */
.badge-success {
  background: var(--status-positive-bg);
  color: var(--status-positive);
  border: 1px solid var(--status-positive-border);
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  display: inline-block;
}

.badge-danger {
  background: var(--status-negative-bg);
  color: var(--status-negative);
  border: 1px solid var(--status-negative-border);
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  display: inline-block;
}

.badge-warning {
  background: var(--status-warning-bg);
  color: var(--status-warning);
  border: 1px solid var(--status-warning-border);
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  display: inline-block;
}

.badge-neutral {
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  display: inline-block;
}

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border-hairline);
  padding: 3.5rem 0 2.5rem 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.75rem;
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-link {
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.25rem 0;
  min-height: 44px;
  line-height: 44px;
  transition: color 150ms ease;
}

.footer-link:hover {
  color: var(--brand-primary);
}

.footer-compliance {
  border-top: 1px solid var(--border-hairline);
  padding-top: 1.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Utilities */
.text-right { text-align: right; }
.font-mono { font-family: var(--font-mono); }
