/* ============================================
   KALKULATOR OBLIGACJI — Design System
   Bloomberg Terminal meets Modern Art Gallery
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  --bg:           oklch(0.16 0.02 160);
  --card:         oklch(0.21 0.02 160);
  --muted:        oklch(0.27 0.02 160);
  --input-bg:     oklch(0.24 0.02 160);
  --sidebar:      oklch(0.18 0.02 160);
  --fg:           oklch(0.98 0.01 160);
  --muted-fg:     oklch(0.70 0.02 160);
  --primary:      oklch(0.62 0.18 150);
  --primary-fg:   oklch(0.10 0.02 150);
  --primary-glow: oklch(0.62 0.18 150 / 0.25);
  --accent:       oklch(0.82 0.16 80);
  --accent-dim:   oklch(0.82 0.16 80 / 0.15);
  --border:       oklch(0.32 0.03 160);
  --border-subtle:oklch(0.25 0.02 160);
  --ring:         oklch(0.62 0.18 150);
  --danger:       oklch(0.65 0.22 25);
  --success:      oklch(0.70 0.18 150);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --radius-sm:  6px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 8px oklch(0 0 0 / 0.3);
  --shadow:    0 8px 32px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 24px 64px oklch(0 0 0 / 0.5);
  --glow:      0 0 40px var(--primary-glow);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --header-h: 72px;
  --container: 1200px;
  --container-text: 780px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  background-color: var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Subtle grid background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(oklch(0.62 0.18 150 / 0.03) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.62 0.18 150 / 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg);
}

/* ============================================
   TYPOGRAPHY SCALE
   ============================================ */
.text-xs   { font-size: 0.75rem; }
.text-sm   { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 1.875rem; }
.text-4xl  { font-size: 2.25rem; }
.text-5xl  { font-size: 3rem; }
.text-6xl  { font-size: 3.75rem; }

.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.text-muted { color: var(--muted-fg); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-balance { text-wrap: balance; }

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container--text {
  max-width: var(--container-text);
}

section, .section {
  padding: 80px 0;
}

.section--sm { padding: 48px 0; }
.section--lg { padding: 120px 0; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-h);
  background: oklch(0.16 0.02 160 / 0.92);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 32px oklch(0 0 0 / 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
}

.logo-tagline {
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  white-space: nowrap;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-fg);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--fg);
  background: var(--muted);
}

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

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.menu-toggle:hover { background: var(--muted); }

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.8rem;
  color: var(--muted-fg);
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  color: var(--border);
}

.breadcrumb a {
  color: var(--muted-fg);
  transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li:last-child { color: var(--fg); }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.hero-content {
  padding-top: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid oklch(0.82 0.16 80 / 0.3);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  text-wrap: balance;
}

.hero h1 .highlight {
  color: var(--primary);
  position: relative;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--muted-fg);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--muted-fg);
  margin-top: 4px;
}

/* ============================================
   CALCULATOR CARD
   ============================================ */
.calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.calc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary-glow) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0.4;
}

.calc-header {
  margin-bottom: 28px;
}

.calc-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
}

.calc-subtitle {
  font-size: 0.8rem;
  color: var(--muted-fg);
}

/* Form elements */
.form-grid {
  display: grid;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted-fg);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 1rem;
  font-family: var(--font-mono);
  font-weight: 500;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: oklch(0.26 0.02 160);
}

input[type="number"]::placeholder {
  color: oklch(0.45 0.02 160);
  font-weight: 400;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

select option {
  background: var(--card);
  color: var(--fg);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
}

.checkbox-label:hover {
  border-color: var(--ring);
  background: oklch(0.26 0.02 160);
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-custom::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--primary-fg);
  border-bottom: 2px solid var(--primary-fg);
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
  transition: opacity var(--transition);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom::after {
  opacity: 1;
}

.checkbox-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  flex: 1;
}

.checkbox-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted-fg);
  margin-top: 2px;
}

/* ============================================
   RESULTS DISPLAY
   ============================================ */
.calc-results {
  margin-top: 24px;
  padding: 24px;
  background: oklch(0.13 0.02 160);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 12px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.result-row--highlight {
  padding: 14px 16px;
  margin: 4px -8px;
  background: var(--accent-dim);
  border: 1px solid oklch(0.82 0.16 80 / 0.25);
  border-radius: var(--radius);
}

.result-label {
  font-size: 0.8rem;
  color: var(--muted-fg);
  font-weight: 500;
}

.result-row--highlight .result-label {
  color: var(--accent);
  font-weight: 600;
}

.result-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}

.result-row--highlight .result-value {
  font-size: 1.3rem;
  color: var(--accent);
}

.result-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.result-disclaimer {
  font-size: 0.7rem;
  color: oklch(0.50 0.02 160);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  background: oklch(0.68 0.18 150);
  box-shadow: 0 6px 24px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--muted-fg);
}

.btn-ghost:hover {
  background: var(--muted);
  color: var(--fg);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-full { width: 100%; }

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.content-section {
  padding: 72px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--primary);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.2;
}

.content-body p {
  font-size: 1rem;
  color: var(--muted-fg);
  line-height: 1.8;
  margin-bottom: 16px;
}

.content-body p:last-child { margin-bottom: 0; }

.content-body strong {
  color: var(--fg);
  font-weight: 600;
}

.content-body a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--primary-glow);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition);
}

.content-body a:hover {
  text-decoration-color: var(--primary);
}

/* Two column content layout */
.content-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* ============================================
   CALCULATOR LINK CARDS
   ============================================ */
.calc-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.calc-link-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.calc-link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), oklch(0.62 0.18 150 / 0));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.calc-link-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--glow), var(--shadow);
}

.calc-link-card:hover::before {
  transform: scaleX(1);
}

.calc-link-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-glow);
  border: 1px solid oklch(0.62 0.18 150 / 0.3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.calc-link-icon svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.calc-link-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
  line-height: 1.3;
}

.calc-link-desc {
  font-size: 0.8rem;
  color: var(--muted-fg);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.calc-link-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  transition: gap var(--transition);
}

.calc-link-card:hover .calc-link-arrow {
  gap: 10px;
}

/* ============================================
   COMPARISON TABLE
   ============================================ */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 0.9rem;
}

.comparison-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-fg);
  border-bottom: 2px solid var(--border);
}

.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--muted-fg);
  vertical-align: top;
}

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

.comparison-table tr:hover td {
  background: var(--muted);
  color: var(--fg);
}

.comparison-table td:first-child {
  font-weight: 600;
  color: var(--fg);
}

.badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.badge-green { background: oklch(0.62 0.18 150 / 0.15); color: var(--primary); }
.badge-amber { background: var(--accent-dim); color: var(--accent); }
.badge-red   { background: oklch(0.65 0.22 25 / 0.15); color: var(--danger); }

/* ============================================
   MATH EXAMPLE BOX
   ============================================ */
.math-box {
  padding: 24px 28px;
  background: oklch(0.13 0.02 160);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  margin: 24px 0;
}

.math-box .math-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.math-box p {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-bottom: 8px;
}

.math-box .math-result {
  font-weight: 700;
  color: var(--accent);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 10px;
  margin-bottom: 0;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-subtle);
}

.faq-header {
  margin-bottom: 48px;
}

.faq-grid {
  display: grid;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item.open {
  border-color: oklch(0.62 0.18 150 / 0.4);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--muted);
}

.faq-icon {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.faq-item.open .faq-icon {
  background: var(--primary-glow);
  border-color: var(--primary);
  transform: rotate(45deg);
}

.faq-icon svg {
  width: 12px;
  height: 12px;
  color: var(--muted-fg);
  transition: color var(--transition);
}

.faq-item.open .faq-icon svg {
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 0.9rem;
  color: var(--muted-fg);
  line-height: 1.8;
}

/* ============================================
   AUTHOR SECTION / CARD
   ============================================ */
.author-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-subtle);
}

.author-card-large {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding: 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.author-avatar {
  position: relative;
}

.author-avatar-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-glow), var(--accent-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  overflow: hidden;
}

.author-avatar-placeholder {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: var(--primary);
}

.author-info {}

.author-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.author-title {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.author-bio p {
  font-size: 1rem;
  color: var(--muted-fg);
  line-height: 1.8;
  margin-bottom: 16px;
}

.author-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.credential-badge {
  padding: 6px 14px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg);
}

.author-social {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted-fg);
  transition: all var(--transition);
}

.social-link:hover {
  color: var(--fg);
  border-color: var(--primary);
  background: var(--primary-glow);
}

.social-link svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   TRUST SIGNALS / STATS BAR
   ============================================ */
.trust-bar {
  padding: 32px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--sidebar);
}

.trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted-fg);
}

.trust-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

.trust-item strong {
  color: var(--fg);
}

/* ============================================
   DISCLAIMER BOX
   ============================================ */
.disclaimer-box {
  padding: 16px 20px;
  background: oklch(0.20 0.02 160);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--muted-fg);
  line-height: 1.7;
}

.disclaimer-box strong {
  color: var(--accent);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  margin-top: 0;
  background: var(--sidebar);
  border-top: 1px solid var(--border);
}

.footer-main {
  padding: 64px 0 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--muted-fg);
  line-height: 1.8;
  max-width: 300px;
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social-link {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted-fg);
  transition: all var(--transition);
}

.footer-social-link:hover {
  color: var(--fg);
  border-color: var(--primary);
  background: var(--primary-glow);
}

.footer-social-link svg { width: 16px; height: 16px; }

.footer-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--muted-fg);
  transition: color var(--transition);
}

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

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted-fg);
}

.footer-legal {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 0.8rem;
  color: var(--muted-fg);
  transition: color var(--transition);
}

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

/* ============================================
   PAGE HERO (Inner pages)
   ============================================ */
.page-hero {
  padding: 60px 0 48px;
  position: relative;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.page-hero h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  margin-bottom: 16px;
}

.page-hero .lead {
  font-size: 1.05rem;
  color: var(--muted-fg);
  max-width: 640px;
  line-height: 1.7;
}

/* ============================================
   INNER CALC LAYOUT
   ============================================ */
.calc-page-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: start;
  padding-top: 48px;
}

.calc-page-layout .calc-main {
  min-width: 0;
}

.calc-page-layout .calc-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

/* ============================================
   INFO CARDS
   ============================================ */
.info-card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.info-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card-title svg {
  width: 14px;
  height: 14px;
}

/* Step list */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.step-item {
  display: flex;
  gap: 16px;
  align-items: start;
}

.step-num {
  width: 28px;
  height: 28px;
  background: var(--primary-glow);
  border: 1px solid oklch(0.62 0.18 150 / 0.4);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

.step-content {
  flex: 1;
}

.step-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fg);
  margin-bottom: 4px;
}

.step-desc {
  font-size: 0.825rem;
  color: var(--muted-fg);
  line-height: 1.6;
}

/* ============================================
   LEGAL PAGES
   ============================================ */
.legal-content {
  max-width: var(--container-text);
  margin: 0 auto;
  padding: 48px 0 80px;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--fg);
}

.legal-content h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--fg);
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-content p {
  font-size: 0.9rem;
  color: var(--muted-fg);
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-content ul li {
  font-size: 0.9rem;
  color: var(--muted-fg);
  margin-bottom: 6px;
  line-height: 1.7;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.animate-fade-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-fade {
  animation: fadeIn 0.4s ease both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-content {
    padding-top: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .calc-page-layout {
    grid-template-columns: 1fr;
  }

  .calc-page-layout .calc-sidebar {
    position: static;
    order: -1;
  }

  .author-card-large {
    grid-template-columns: 200px 1fr;
    gap: 32px;
    padding: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: oklch(0.18 0.02 160);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    z-index: 99;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 48px 0 60px;
  }

  .calc-links-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .content-2col {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .author-card-large {
    grid-template-columns: 1fr;
  }

  .author-avatar-img {
    max-width: 140px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  section, .section {
    padding: 56px 0;
  }

  .trust-items {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .calc-card { padding: 24px 20px; }
  .hero-stats { gap: 20px; }
  .calc-results { padding: 16px; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .site-header, .site-footer, .menu-toggle { display: none; }
  body { background: white; color: black; }
  .calc-card, .faq-item { border: 1px solid #ccc; }
}
