/* ============================================================
   Bank Statement Guide — Article Page Styles
   Design: Editorial / Long-form content-first
   ============================================================ */

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

:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #1c1917;
  --color-text-secondary: #57534e;
  --color-text-tertiary: #a8a29e;
  --color-accent: #1e40af;
  --color-accent-light: #dbeafe;
  --color-accent-dark: #1e3a8a;
  --color-border: #e7e5e4;
  --color-border-light: #f5f5f4;
  --color-green: #15803d;
  --color-green-bg: #f0fdf4;
  --color-amber: #b45309;
  --color-amber-bg: #fffbeb;
  --color-red: #b91c1c;
  --color-red-bg: #fef2f2;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --max-width: 1200px;
  --article-width: 720px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.05);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 8px 30px rgba(28, 25, 23, 0.12);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

img {
  max-width: 100%;
  height: auto;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--color-border-light);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-accent-dark);
}

/* ---------- READING PROGRESS BAR ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #3b82f6);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
}

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

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.site-logo i {
  color: var(--color-accent);
  font-size: 1.25rem;
}

.site-logo:hover {
  color: var(--color-text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.site-nav a:hover {
  background: var(--color-border-light);
  color: var(--color-text);
  text-decoration: none;
}

.site-nav a.active {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--color-text);
  cursor: pointer;
  padding: 8px;
}

.mobile-nav {
  display: none;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 24px;
  flex-direction: column;
  gap: 4px;
}

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

.mobile-nav a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
}

.mobile-nav a.active {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* ---------- ARTICLE HERO ---------- */
.article-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e40af 100%);
  color: #ffffff;
  padding: 48px 24px 56px;
}

.hero-inner {
  max-width: var(--article-width);
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  opacity: 0.8;
}

.breadcrumbs a {
  color: #93c5fd;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.breadcrumbs i {
  font-size: 0.6rem;
  opacity: 0.5;
}

.breadcrumbs span {
  color: #e0e7ff;
}

.article-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.author-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.author-cred {
  font-size: 0.82rem;
  opacity: 0.75;
}

.meta-details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  opacity: 0.8;
}

.meta-details i {
  margin-right: 4px;
}

.ymyl-badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ymyl-badge i {
  color: #86efac;
}

/* ---------- CONTENT WRAPPER ---------- */
.content-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- VERIFICATION BAR ---------- */
.verification-bar {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-green-bg);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.verify-icon {
  color: var(--color-green);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.verify-text strong {
  color: var(--color-green);
}

/* ---------- ARTICLE LAYOUT (TOC + CONTENT) ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 60px;
}

/* ---------- TOC SIDEBAR ---------- */
.toc-sidebar {
  position: relative;
}

.toc-sticky {
  position: sticky;
  top: 80px;
}

.toc-heading {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  margin-bottom: 12px;
  font-weight: 600;
}

.toc-heading i {
  margin-right: 6px;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-link {
  font-size: 0.84rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.2s;
  line-height: 1.5;
}

.toc-link:hover {
  color: var(--color-accent);
  background: var(--color-accent-light);
  text-decoration: none;
}

.toc-link.active {
  color: var(--color-accent);
  background: var(--color-accent-light);
  border-left-color: var(--color-accent);
  font-weight: 500;
}

/* ---------- ARTICLE BODY ---------- */
.article-body {
  max-width: var(--article-width);
  min-width: 0;
}

.article-section {
  margin-bottom: 40px;
}

.article-section h2 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: -0.01em;
  padding-top: 8px;
}

.article-section h2 i {
  margin-right: 8px;
  font-size: 0.9em;
  color: var(--color-accent);
}

.article-section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--color-text);
  line-height: 1.4;
}

.article-section h3 i {
  margin-right: 6px;
}

.article-section p {
  margin-bottom: 16px;
  font-size: 1.02rem;
  color: var(--color-text);
  line-height: 1.8;
}

.article-section ul, .article-section ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-section li {
  margin-bottom: 8px;
  line-height: 1.7;
}

/* ---------- OPENING / LEDE ---------- */
.opening-section .lede {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--color-text);
  font-weight: 400;
}

/* ---------- QUICK REFERENCE GRID ---------- */
.quick-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.ref-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: box-shadow 0.2s;
}

.ref-card:hover {
  box-shadow: var(--shadow-md);
}

.ref-icon {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--color-accent);
}

.ref-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-tertiary);
  margin-bottom: 4px;
  font-weight: 600;
}

.ref-value {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text);
  word-break: break-word;
}

.ref-value a {
  font-weight: 500;
}

.ref-note {
  font-size: 0.78rem;
  color: var(--color-text-tertiary);
  font-weight: 400;
}

.highlight-card {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-color: #93c5fd;
}

.highlight-card .ref-icon {
  color: var(--color-accent-dark);
}

/* ---------- STEPS ---------- */
.steps-container {
  margin: 20px 0 24px;
}

.step-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 18px;
  top: 42px;
  bottom: -16px;
  width: 2px;
  background: var(--color-border);
}

.step-number {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step-content {
  flex: 1;
  padding-top: 6px;
}

.step-content strong {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* ---------- CALLOUTS ---------- */
.callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  margin: 24px 0;
  font-size: 0.92rem;
  line-height: 1.7;
}

.callout-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-content a {
  font-weight: 500;
}

.callout-amber {
  background: var(--color-amber-bg);
  border: 1px solid #fde68a;
}

.callout-amber .callout-icon {
  color: var(--color-amber);
}

.callout-green {
  background: var(--color-green-bg);
  border: 1px solid #bbf7d0;
}

.callout-green .callout-icon {
  color: var(--color-green);
}

.callout-red {
  background: var(--color-red-bg);
  border: 1px solid #fecaca;
}

.callout-red .callout-icon {
  color: var(--color-red);
}

/* ---------- PASSWORD EXAMPLE ---------- */
.password-example {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 20px 0;
}

.password-header {
  background: #1e293b;
  color: #ffffff;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 600;
}

.password-header i {
  margin-right: 8px;
}

.password-body {
  padding: 16px 20px;
}

.password-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.password-row:last-child {
  border-bottom: none;
}

.pw-label {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.pw-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-green);
}

.pw-wrong {
  color: var(--color-red);
  text-decoration: line-through;
}

.pw-wrong i {
  margin-left: 6px;
  text-decoration: none;
  display: inline-block;
}

/* ---------- USER QUOTES ---------- */
blockquote.user-quote {
  background: var(--color-border-light);
  border-left: 4px solid var(--color-accent);
  padding: 20px 24px;
  margin: 20px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

blockquote.user-quote p {
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 8px;
  color: var(--color-text);
}

blockquote.user-quote cite {
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  font-style: normal;
  display: block;
}

/* ---------- COMPARISON TABLE ---------- */
.table-wrapper {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--color-surface);
}

.comparison-table thead {
  background: #f1f5f9;
}

.comparison-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: top;
  line-height: 1.5;
}

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

.comparison-table tbody tr:hover {
  background: #f8fafc;
}

.comparison-table td i {
  margin-right: 6px;
  color: var(--color-accent);
}

.table-source {
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  margin-top: 8px;
}

/* ---------- STATS GRID ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1.2;
}

.stat-unit {
  font-size: 1rem;
  font-weight: 600;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

.stat-source {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  margin-top: 4px;
}

.stat-source a {
  color: var(--color-text-tertiary);
  text-decoration: underline;
}

/* ---------- ASIDE SECTION ---------- */
.aside-section {
  background: var(--color-border-light);
  padding: 24px 28px !important;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-accent);
}

.aside-section h2 {
  font-size: 1.25rem;
}

/* ---------- SOURCES ---------- */
.sources-section h3 {
  font-size: 1rem;
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.source-list {
  list-style: none;
  padding: 0;
}

.source-list li {
  padding: 6px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--color-border-light);
  line-height: 1.6;
}

.source-list li:last-child {
  border-bottom: none;
}

/* ---------- DISCLAIMER ---------- */
.disclaimer-section {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px !important;
}

.disclaimer-section p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* ---------- AUTHOR BOX ---------- */
.author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 40px;
}

.author-box-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
  flex-shrink: 0;
}

.author-box-content h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-tertiary);
  margin-bottom: 6px;
}

.author-box-content p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 24px;
  margin-top: 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-brand i {
  margin-right: 8px;
  color: #3b82f6;
}

.footer-copy {
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.85rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* ---------- BACK TO TOP ---------- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .toc-sidebar {
    display: none;
  }

  .article-body {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .article-hero {
    padding: 32px 20px 40px;
  }

  .article-hero h1 {
    font-size: 1.5rem;
  }

  .header-inner {
    padding: 0 16px;
  }

  .content-wrapper {
    padding: 0 16px;
  }

  .quick-ref-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Responsive table */
  .comparison-table thead {
    display: none;
  }

  .comparison-table tbody tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 4px;
  }

  .comparison-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    text-align: right;
  }

  .comparison-table td::before {
    content: attr(data-label);
    font-weight: 600;
    text-align: left;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
  }

  .step-item:not(:last-child)::after {
    display: none;
  }

  .aside-section {
    padding: 20px !important;
  }
}

@media (max-width: 480px) {
  .quick-ref-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .meta-details {
    font-size: 0.8rem;
    gap: 10px;
  }

  .callout {
    flex-direction: column;
    gap: 8px;
  }

  .verification-bar {
    flex-direction: column;
    gap: 8px;
  }
}

/* ---------- PRINT STYLES ---------- */
@media print {
  .site-header,
  .toc-sidebar,
  .back-to-top,
  .reading-progress,
  .mobile-menu-btn,
  .site-footer {
    display: none !important;
  }

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

  .article-hero {
    background: none !important;
    color: #000 !important;
    padding: 20px 0;
  }

  body {
    font-size: 12pt;
    line-height: 1.6;
  }
}

/* ---------- SELECTION ---------- */
::selection {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

/* ---------- FOCUS STYLES ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- SMOOTH ENTRANCE ANIMATION ---------- */
.article-section {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
