/* ============================================================
   SITE.CSS — Shared design system for selfemploymenttaxestimator.com
   Bright / Energetic theme — bold gradients, vibrant accents
   ============================================================ */

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

/* ---- CSS CUSTOM PROPERTIES ---- */
:root {
  /* Primary palette: electric green + deep teal */
  --primary:       #00C853;
  --primary-dark:  #00A844;
  --primary-light: #69F0AE;
  --primary-pale:  #E8FFF0;
  --primary-glow:  rgba(0, 200, 83, .15);

  /* Accent: vibrant blue */
  --accent:        #2979FF;
  --accent-dark:   #1565C0;
  --accent-light:  #82B1FF;
  --accent-pale:   #E3F2FD;

  /* Warm accent for CTAs and attention */
  --hot:           #FF6D00;
  --hot-pale:      #FFF3E0;

  /* Semantic */
  --success:       #00C853;
  --success-pale:  #E8FFF0;
  --warning:       #FF9100;
  --warning-pale:  #FFF8E1;
  --danger:        #FF1744;
  --danger-pale:   #FFE8EC;

  /* Neutrals */
  --gray-50:       #FAFBFC;
  --gray-100:      #F1F3F5;
  --gray-200:      #E1E4E8;
  --gray-300:      #D1D5DB;
  --gray-400:      #9CA3AF;
  --gray-500:      #6B7280;
  --gray-600:      #4B5563;
  --gray-700:      #374151;
  --gray-800:      #1F2937;
  --gray-900:      #0D1117;
  --white:         #FFFFFF;

  /* Gradients */
  --grad-hero:     linear-gradient(135deg, #0D1117 0%, #1a1a2e 40%, #16213e 100%);
  --grad-primary:  linear-gradient(135deg, #00C853, #00B0FF);
  --grad-accent:   linear-gradient(135deg, #2979FF, #00BFA5);
  --grad-hot:      linear-gradient(135deg, #FF6D00, #FF9100);
  --grad-glow:     radial-gradient(ellipse at 50% 0%, rgba(0,200,83,.12) 0%, transparent 70%);

  /* Shadows */
  --shadow-xs:     0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:     0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:     0 12px 32px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --shadow-xl:     0 20px 48px rgba(0,0,0,.15);
  --shadow-glow:   0 0 24px rgba(0,200,83,.2);
  --shadow-card:   0 2px 8px rgba(0,0,0,.06), 0 0 1px rgba(0,0,0,.1);

  /* Radius */
  --radius:        16px;
  --radius-sm:     10px;
  --radius-xs:     6px;
  --radius-full:   999px;

  /* Typography */
  --font:          'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --max-w:         960px;
  --max-w-narrow:  720px;
}

/* ---- BASE ---- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ---- HEADER ---- */
header {
  background: var(--grad-hero);
  color: var(--white);
  padding: 0 1.5rem;
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-glow);
  pointer-events: none;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 0 3.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Logo badge */
.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(0,200,83,.15);
  border: 1px solid rgba(0,200,83,.3);
  border-radius: var(--radius-full);
  padding: .4rem 1rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--primary-light);
}
.logo-badge svg { width: 14px; height: 14px; }

header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: .75rem;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, #fff 0%, #69F0AE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header p.subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Compact header (for landing/article pages) */
header.compact .header-inner {
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  text-align: left;
}
header.compact h1 {
  font-size: 1rem;
  background: none;
  -webkit-text-fill-color: #fff;
}

.site-brand {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -.01em;
}
.site-brand span { color: var(--primary-light); }

/* ---- YEAR TOGGLE ---- */
.year-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}
.year-toggle {
  display: inline-flex;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-full);
  padding: 4px;
  backdrop-filter: blur(8px);
}
.year-toggle button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  padding: .5rem 1.4rem;
  border-radius: var(--radius-full);
  transition: all .25s;
}
.year-toggle button.active {
  background: var(--primary);
  color: var(--gray-900);
  box-shadow: 0 2px 12px rgba(0,200,83,.4);
}
.year-toggle button:hover:not(.active) {
  color: rgba(255,255,255,.9);
}
.year-est-note {
  text-align: center;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  margin-top: .5rem;
  padding-bottom: 1rem;
  display: none;
}
.year-est-note.visible { display: block; }

/* ---- NAVIGATION ---- */
.site-nav {
  background: rgba(13,17,23,.95);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.site-nav a {
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 600;
  padding: .7rem .9rem;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}
.site-nav a:hover {
  color: var(--primary-light);
  text-decoration: none;
}
.site-nav a.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}
.site-nav svg { width: 14px; height: 14px; }

/* Theme toggle */
.theme-toggle-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  padding: .5rem .6rem;
  margin-left: auto;
  display: flex;
  align-items: center;
  border-radius: var(--radius-xs);
  transition: color .2s, background .2s;
  line-height: 1;
}
.theme-toggle-btn:hover { color: var(--primary-light); background: rgba(255,255,255,.08); }
.theme-toggle-btn svg { width: 17px; height: 17px; }
.theme-toggle-btn .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle-btn .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle-btn .icon-moon { display: block; }

/* ---- MAIN CALCULATOR LAYOUT ---- */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 700px) {
  main { grid-template-columns: 1fr; }
}

/* ---- CARDS ---- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  border: 1px solid var(--gray-200);
  transition: box-shadow .2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
}
.card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.card-title svg {
  width: 20px; height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

/* ---- FORM ELEMENTS ---- */
.field { margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }
label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: .4rem;
  letter-spacing: .01em;
}
label .hint {
  font-weight: 400;
  color: var(--gray-400);
  font-size: .78rem;
}
.input-wrap { position: relative; }
.input-wrap .prefix {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-weight: 700;
  font-size: .95rem;
  pointer-events: none;
}

input[type="number"], select {
  width: 100%;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: .65rem .85rem;
  font-family: inherit;
  font-size: .95rem;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -moz-appearance: textfield;
}
input[type="number"] { padding-left: 1.65rem; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type="number"]:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

/* SE Income Sources */
#se-sources { margin-bottom: .75rem; }
.se-source-row {
  display: flex;
  gap: .5rem;
  margin-bottom: .6rem;
  align-items: center;
}
.se-source-row .input-wrap { flex: 1; }
.se-source-row input { font-size: .9rem; }

.btn-remove {
  background: none;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xs);
  color: var(--gray-400);
  cursor: pointer;
  padding: .45rem .55rem;
  line-height: 1;
  transition: all .15s;
  flex-shrink: 0;
}
.btn-remove:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-pale); }

.btn-add {
  background: var(--primary-pale);
  border: 2px dashed rgba(0,200,83,.35);
  border-radius: var(--radius-sm);
  color: var(--primary-dark);
  cursor: pointer;
  font-family: inherit;
  font-size: .84rem;
  font-weight: 700;
  padding: .55rem 1rem;
  width: 100%;
  text-align: center;
  transition: all .15s;
  margin-bottom: .75rem;
}
.btn-add:hover { background: rgba(0,200,83,.15); border-color: var(--primary); }

/* Expense toggle */
.expense-toggle {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .84rem;
  color: var(--gray-500);
  cursor: pointer;
  margin-bottom: .75rem;
}
.expense-toggle input[type="checkbox"] {
  width: auto;
  accent-color: var(--primary);
}
#expense-field { display: none; }
#expense-field.visible { display: block; margin-top: .5rem; }

/* ---- RESULTS ---- */
.results-card { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .results-card { grid-column: 1; }
}

.results-placeholder {
  text-align: center;
  padding: 2.5rem;
  color: var(--gray-400);
  font-size: .95rem;
}
.results-placeholder svg {
  width: 48px; height: 48px;
  margin-bottom: .75rem;
  opacity: .25;
}

#results-content { display: none; }
#results-content.visible { display: block; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .9rem;
  margin-bottom: 1.5rem;
}

.result-box {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  transition: transform .15s, box-shadow .15s;
}
.result-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.result-box.highlight {
  background: var(--primary-pale);
  border-color: rgba(0,200,83,.3);
}
.result-box.success {
  background: var(--success-pale);
  border-color: rgba(0,200,83,.3);
}
.result-box.warning {
  background: var(--warning-pale);
  border-color: rgba(255,145,0,.3);
}

.result-box .label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .35rem;
}
.result-box.highlight .label { color: var(--primary-dark); }
.result-box.success .label { color: var(--success); }
.result-box.warning .label { color: var(--warning); }
.result-box .value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -.02em;
  line-height: 1;
}
.result-box .sub {
  font-size: .72rem;
  color: var(--gray-400);
  margin-top: .25rem;
}

/* Breakdown Table */
.breakdown-title {
  font-size: .85rem;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: .6rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--gray-100);
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .88rem;
  padding: .4rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.breakdown-row:last-child { border-bottom: none; font-weight: 700; }
.breakdown-row .row-label { color: var(--gray-600); }
.breakdown-row .row-value { font-weight: 600; color: var(--gray-900); }
.breakdown-row.total .row-label { color: var(--gray-900); font-weight: 800; }
.breakdown-row.total .row-value { color: var(--primary-dark); font-size: .95rem; font-weight: 800; }
.breakdown-row.deduction .row-value { color: var(--success); }
.breakdown-row.indent .row-label { padding-left: 1rem; color: var(--gray-400); font-size: .83rem; }
.breakdown-row.indent .row-value { color: var(--gray-500); font-size: .83rem; }

.breakdown-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}
@media (max-width: 560px) {
  .breakdown-cols { grid-template-columns: 1fr; }
}

/* Effective rate bar */
.rate-bar-wrap { margin-top: 1.25rem; }
.rate-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--gray-500);
  margin-bottom: .4rem;
  font-weight: 700;
}
.rate-bar-track {
  background: var(--gray-100);
  border-radius: var(--radius-full);
  height: 10px;
  overflow: hidden;
}
.rate-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--grad-primary);
  transition: width .5s ease;
  width: 0%;
  box-shadow: 0 0 12px rgba(0,200,83,.3);
}

/* Quarterly estimates */
.quarterly-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--gray-100);
}
.quarterly-title {
  font-size: .85rem;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: .6rem;
}
.quarterly-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}
@media (max-width: 560px) {
  .quarterly-grid { grid-template-columns: repeat(2, 1fr); }
}
.q-box {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: .75rem;
  text-align: center;
  transition: border-color .15s;
}
.q-box:hover { border-color: var(--primary); }
.q-box .q-label { font-size: .72rem; color: var(--gray-500); font-weight: 700; }
.q-box .q-due { font-size: .68rem; color: var(--gray-400); margin-bottom: .2rem; }
.q-box .q-amount { font-size: 1.05rem; font-weight: 900; color: var(--gray-900); }

/* ---- INFO SECTIONS ---- */
.info-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
}

/* Ad slot placeholder */
.ad-slot {
  display: none;
  background: var(--gray-100);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 1.5rem;
  color: var(--gray-400);
  font-size: .8rem;
  margin: 1.5rem auto;
  max-width: 728px;
}

/* How it works */
.how-it-works {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.how-it-works h2, .faq-section h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: 1rem;
  letter-spacing: -.02em;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.step-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}
.step-num {
  background: var(--grad-primary);
  color: var(--gray-900);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: .1rem;
  box-shadow: 0 2px 8px rgba(0,200,83,.25);
}
.step-text { font-size: .88rem; color: var(--gray-600); }
.step-text strong { display: block; color: var(--gray-900); font-size: .92rem; margin-bottom: .15rem; }

/* Rate table */
.rate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.rate-table th {
  background: var(--gray-900);
  color: var(--white);
  padding: .7rem .85rem;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.rate-table td {
  padding: .6rem .85rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}
.rate-table tr:last-child td { border-bottom: none; }
.rate-table tr:nth-child(even) td { background: var(--gray-50); }

/* ---- FAQ ---- */
.faq-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.faq-item { border-bottom: 1px solid var(--gray-100); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: .9rem 0;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-900);
  gap: .5rem;
}
.faq-q svg {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: var(--primary);
  transition: transform .25s;
}
.faq-q.open svg { transform: rotate(180deg); }
.faq-a {
  display: none;
  font-size: .9rem;
  color: var(--gray-600);
  padding-bottom: 1rem;
  line-height: 1.7;
}
.faq-a.open { display: block; }

/* ---- PLATFORM & PROFESSION CARDS ---- */
.platforms-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.platforms-section > h2 {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: .4rem;
  letter-spacing: -.01em;
}
.platforms-section .section-sub {
  font-size: .88rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.platform-group { margin-bottom: 1.75rem; }
.platform-group:last-child { margin-bottom: 0; }
.platform-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .85rem;
}
.platform-group-header h3 {
  font-size: .82rem;
  font-weight: 800;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.platform-group-header a {
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
}
.platform-group-header a:hover { text-decoration: underline; }

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .75rem;
}

.platform-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: .65rem;
  transition: all .2s;
}
.platform-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,200,83,.12);
  transform: translateY(-2px);
  text-decoration: none;
}
.platform-card .pc-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.platform-card:hover .pc-icon { background: var(--primary); }
.platform-card .pc-icon svg { width: 16px; height: 16px; color: var(--primary-dark); transition: color .15s; }
.platform-card:hover .pc-icon svg { color: var(--white); }
.platform-card .pc-text { min-width: 0; }
.platform-card .pc-name {
  font-size: .88rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}
.platform-card .pc-type {
  font-size: .7rem;
  color: var(--gray-400);
  line-height: 1.3;
}

/* ---- GUIDES / ARTICLES CARDS ---- */
.guides-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.guides-section h2 {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: 1.1rem;
  letter-spacing: -.01em;
}
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.guide-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.guide-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity .2s;
}
.guide-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,200,83,.1);
  transform: translateY(-2px);
  text-decoration: none;
}
.guide-card:hover::before { opacity: 1; }

.guide-card .gc-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: .4rem;
}
.guide-card h3 {
  font-size: .95rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: .4rem;
  line-height: 1.35;
}
.guide-card p {
  font-size: .82rem;
  color: var(--gray-500);
  line-height: 1.55;
  margin-bottom: .6rem;
}
.guide-card .gc-meta {
  font-size: .75rem;
  color: var(--gray-400);
}
.guide-card .gc-read {
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: .5rem;
}
.gc-new {
  display: inline-block;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--primary);
  color: var(--gray-900);
  padding: .15rem .5rem;
  border-radius: 4px;
  margin-left: .5rem;
  vertical-align: middle;
}

/* ---- DISCLAIMER ---- */
.disclaimer {
  background: var(--warning-pale);
  border: 2px solid rgba(255,145,0,.3);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.disclaimer h3 {
  font-size: .9rem;
  font-weight: 800;
  color: var(--warning);
  margin-bottom: .4rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.disclaimer p {
  font-size: .84rem;
  color: var(--gray-700);
  line-height: 1.65;
}
.disclaimer a { color: var(--accent); }

/* ---- FOOTER ---- */
footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: .82rem;
}
footer a { color: rgba(255,255,255,.65); text-decoration: underline; }
footer a:hover { color: var(--primary-light); }
footer p + p { margin-top: .4rem; }
.footer-links { margin-bottom: .6rem; }
.footer-links a { margin: 0 .5rem; }

/* ---- ARTICLE PAGES ---- */
.article-container {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.article-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
  padding: 2.5rem;
  margin-bottom: 1.5rem;
}
.article-label {
  display: inline-block;
  background: var(--primary-pale);
  color: var(--primary-dark);
  border: 1px solid rgba(0,200,83,.3);
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .75rem;
  margin-bottom: .75rem;
}
.article-section h2 {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.3;
  margin-bottom: .3rem;
  letter-spacing: -.02em;
}
.article-date {
  font-size: .78rem;
  color: var(--gray-400);
  margin-bottom: 1.25rem;
}
.article-meta {
  font-size: .78rem;
  color: var(--gray-400);
  margin-bottom: 1.25rem;
}
.article-section h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 1.5rem 0 .5rem;
}
.article-section p {
  font-size: .93rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: .75rem;
}
.article-section p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .article-section { padding: 1.5rem; }
}

/* Upfront box */
.upfront-box {
  background: var(--primary-pale);
  border: 2px solid rgba(0,200,83,.25);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.upfront-box h3 {
  color: var(--primary-dark);
  font-size: .92rem;
  font-weight: 800;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.upfront-box ul {
  margin: 0;
  padding-left: 1.25rem;
}
.upfront-box li {
  font-size: .88rem;
  color: var(--gray-700);
  line-height: 1.65;
  margin-bottom: .25rem;
}

/* Article listing cards (for articles/index.html) */
.ac-new {
  display: inline-block;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--primary);
  color: var(--gray-900);
  padding: .15rem .5rem;
  border-radius: 4px;
  margin-left: .5rem;
  vertical-align: middle;
}

/* Author box */
.author-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.author-box .author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-900);
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.author-box .author-info .author-name {
  font-weight: 800;
  color: var(--gray-900);
  font-size: .9rem;
}
.author-box .author-info .author-bio {
  font-size: .82rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ---- LANDING PAGE SECTIONS ---- */
.landing-container {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.landing-hero {
  text-align: center;
  margin-bottom: 2rem;
}
.landing-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: .5rem;
  letter-spacing: -.02em;
}
.landing-hero .landing-sub {
  font-size: 1rem;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto;
}

/* Related links */
.related-links {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.related-links h3 {
  font-size: .85rem;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: .75rem;
}
.related-links a {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--accent);
  padding: .3rem 0;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeIn .35s ease forwards; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(0,200,83,.2); }
  50% { box-shadow: 0 0 24px rgba(0,200,83,.35); }
}

/* ---- MOBILE TWEAKS ---- */
@media (max-width: 480px) {
  .card { padding: 1.25rem; }
  .result-box .value { font-size: 1.25rem; }
  .header-inner { padding: 2rem 0 2.5rem; }
}

/* ---- DARK MODE ---- */
[data-theme="dark"] {
  --gray-50:      #0D1117;
  --gray-100:     #161B22;
  --gray-200:     #21262D;
  --gray-300:     #30363D;
  --gray-400:     #484F58;
  --gray-500:     #8B949E;
  --gray-600:     #C9D1D9;
  --gray-700:     #E6EDF3;
  --gray-800:     #F0F3F6;
  --gray-900:     #F0F6FC;
  --white:        #161B22;

  --primary-pale:   #0a2e14;
  --primary-glow:   rgba(0, 200, 83, .1);
  --accent-pale:    #0d1f3c;
  --success-pale:   #0a2e14;
  --warning-pale:   #2d1500;
  --danger-pale:    #3b0a0a;

  --shadow-xs:    0 1px 2px rgba(0,0,0,.3);
  --shadow-sm:    0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 12px rgba(0,0,0,.5);
  --shadow-lg:    0 12px 32px rgba(0,0,0,.6);
  --shadow-card:  0 2px 8px rgba(0,0,0,.3), 0 0 1px rgba(0,0,0,.4);
}

[data-theme="dark"] header {
  background: linear-gradient(135deg, #010409 0%, #0D1117 40%, #161B22 100%);
}
[data-theme="dark"] header h1 {
  background: linear-gradient(135deg, #F0F6FC 0%, #69F0AE 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme="dark"] .site-nav {
  background: rgba(1,4,9,.95);
}

[data-theme="dark"] input[type="number"],
[data-theme="dark"] select {
  background: var(--gray-100);
  color: var(--gray-900);
  border-color: var(--gray-200);
}

[data-theme="dark"] .card {
  border-color: var(--gray-200);
}

[data-theme="dark"] .platform-card {
  border-color: var(--gray-200);
}
[data-theme="dark"] .platform-card:hover {
  border-color: var(--primary);
  background: rgba(0,200,83,.05);
}
[data-theme="dark"] .platform-card .pc-icon {
  background: rgba(0,200,83,.1);
}

[data-theme="dark"] .guide-card {
  border-color: var(--gray-200);
}
[data-theme="dark"] .guide-card:hover {
  border-color: var(--primary);
  background: rgba(0,200,83,.03);
}

[data-theme="dark"] footer {
  background: #010409;
}

/* ---- GOOGLE FONTS PRECONNECT NOTE ----
   Add these to <head> of every page:
   <link rel="preconnect" href="https://fonts.googleapis.com" />
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
   <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet" />
*/
