/* QuickFix Books - Clean Tech Design System */

:root {
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-dark: #0f0f0f;
  --text: #171717;
  --text-secondary: #525252;
  --text-muted: #737373;
  --border: #e5e5e5;
  --border-light: #f0f0f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --success: #22c55e;
  --success-light: #f0fdf4;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.08);
  --max-width: 1100px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo span { color: var(--primary); }

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

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all 0.15s;
}

.nav a:hover { color: var(--text); background: var(--bg-alt); }

.nav .cta-nav {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px;
  font-weight: 600;
}

.nav .cta-nav:hover { background: var(--primary-hover); }

/* Hero */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border-light);
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  color: var(--text);
}

.hero p {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.5;
}

/* Search */
.search-section {
  padding: 0 0 48px;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.search-box {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 18px 24px;
  padding-right: 130px;
  font-size: 17px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  outline: none;
  background: var(--bg);
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.search-box input::placeholder { color: var(--text-muted); }

.search-box button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.search-box button:hover { background: var(--primary-hover); }

/* Sections */
.section { padding: 64px 0; }

.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: var(--text);
}

.section-header p {
  font-size: 18px;
  color: var(--text-secondary);
}

/* Error Grid */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-tab:hover { border-color: var(--text-muted); }

.filter-tab.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.error-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.error-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s;
}

.error-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.error-card .code {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.error-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.error-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.error-card .meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.difficulty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.difficulty-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.difficulty-easy .difficulty-dot { background: var(--success); }
.difficulty-medium .difficulty-dot { background: var(--warning); }
.difficulty-hard .difficulty-dot { background: var(--danger); }

/* Trust Bar */
.trust-bar {
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 40px 0;
}

.trust-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.trust-item {
  text-align: center;
  padding: 16px;
}

.trust-item .icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 10px;
  color: var(--primary);
  stroke-width: 1.8;
}

.trust-item .icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.trust-item .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.trust-item .sublabel {
  font-size: 13px;
  color: var(--text-muted);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 8px;
}

.step {
  text-align: center;
  padding: 8px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.step h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  padding: 56px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 48px auto;
  max-width: 800px;
}

.cta-section h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.cta-section p {
  font-size: 17px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.cta-button {
  display: inline-block;
  background: var(--success);
  color: #fff;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

.cta-button:hover { background: #16a34a; transform: translateY(-1px); }

.cta-button-secondary {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  margin-left: 12px;
  transition: all 0.15s;
}

.cta-button-secondary:hover { background: rgba(255,255,255,0.25); }

/* Pricing Banner */
.pricing-banner {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.pricing-banner .price {
  font-size: 56px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -2px;
  line-height: 1;
  margin: 16px 0 8px;
}

.pricing-banner .price-note {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.pricing-banner ul {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  text-align: left;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-banner li {
  padding: 8px 0;
  font-size: 15px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pricing-banner li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

/* Footer */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-light);
  padding: 40px 0;
  text-align: center;
}

.footer p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 10px;
  font-size: 14px;
}

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

/* Article Styles */
.article {
  padding: 48px 0 64px;
}

.article-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

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

.tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.article-header h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: var(--text);
}

.article-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.article h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.article h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text);
}

.article p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.article ul, .article ol {
  margin: 0 0 20px 24px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.article li { margin-bottom: 8px; }

/* Boxes */
.box {
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
  font-size: 15px;
  line-height: 1.6;
}

.box-warning {
  background: var(--warning-light);
  border-left: 3px solid var(--warning);
}

.box-warning strong { color: #92400e; }

.box-tip {
  background: var(--success-light);
  border-left: 3px solid var(--success);
}

.box-tip strong { color: #166534; }

.box-info {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
}

.box-info strong { color: var(--primary-hover); }

/* Step Box */
.step-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 12px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-box .step-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--text);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.step-box .step-content {
  flex: 1;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-box .step-content strong {
  color: var(--text);
  font-weight: 600;
}

/* Code */
code {
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  border: 1px solid var(--border);
}

/* Form */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  font-family: var(--font-sans);
  background: var(--bg);
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

/* Contact Page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.contact-info p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.contact-method .icon {
  font-size: 24px;
  line-height: 1;
}

.contact-method h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text);
}

.contact-method p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.form-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.form-card .subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* About Page */
.about-hero {
  padding: 64px 0 48px;
  text-align: center;
}

.about-hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.about-hero p {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.about-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}

.about-card .icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.about-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.about-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 17px; }
  .section-header h2 { font-size: 26px; }
  .trust-items { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid { grid-template-columns: 1fr; }
  .nav a:not(.cta-nav) { display: none; }
  .cta-section { padding: 40px 24px; }
  .cta-section h3 { font-size: 22px; }
  .pricing-banner .price { font-size: 42px; }
  .article-header h1 { font-size: 28px; }
}
