/* ============================================================
   FX TRADING JOURNAL — warm editorial, serif, cream
   #FAFAF7 cream · Lora serif headings · forest green accent.
   The ONLY utility with a warm light bg + serif headings.
   Light default, warm-dark toggle.
   ============================================================ */

:root {
  --bg: #FAFAF7;
  --bg-2: #F4F4EF;
  --card: #FFFFFF;
  --line: #E7E5E0;
  --line-strong: #D8D5CE;
  --accent: #16A34A;
  --accent-deep: #15803D;
  --accent-soft: rgba(22,163,74,0.08);
  --accent-border: rgba(22,163,74,0.30);
  --win: #16A34A;
  --loss: #DC2626;
  --loss-soft: rgba(220,38,38,0.07);
  --neutral: #78716C;
  --text: #1C1917;
  --text-2: #78716C;
  --ink: #292524;
  --card-shadow: 0 2px 8px rgba(28,25,23,0.08);
  --card-shadow-lg: 0 12px 36px -12px rgba(28,25,23,0.16);
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-theme="dark"] {
  --bg: #1C1917;
  --bg-2: #211D1B;
  --card: #262220;
  --line: #3A3531;
  --line-strong: #4A443F;
  --accent: #4ADE80;
  --accent-deep: #22C55E;
  --accent-soft: rgba(74,222,128,0.10);
  --accent-border: rgba(74,222,128,0.30);
  --win: #4ADE80;
  --loss: #F87171;
  --loss-soft: rgba(248,113,113,0.10);
  --neutral: #A8A29E;
  --text: #F5F0E8;
  --text-2: #A8A29E;
  --ink: #EDE8E0;
  --card-shadow: 0 2px 10px rgba(0,0,0,0.30);
  --card-shadow-lg: 0 16px 40px -14px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text); font-family: var(--sans);
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.article { max-width: 760px; margin: 0 auto; }

.nav, .card, .jcard, .theme-btn, .stat-num, .fxstrip, .cta-band { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }

/* ============ NAV (blends into page) ============ */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 26px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--serif); font-weight: 600; font-size: 19px; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; color: var(--accent); }
.brand-mark svg { width: 26px; height: 26px; }
.brand .jr { font-style: italic; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav-links a { font-family: var(--serif); color: var(--text-2); font-size: 15.5px; padding: 8px 13px; border-radius: 8px; transition: color .15s, background .15s; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.theme-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card); display: grid; place-items: center; color: var(--text-2); flex: 0 0 auto; }
.theme-btn:hover { color: var(--accent); border-color: var(--accent-border); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun, .theme-btn .i-moon { display: none; }
html[data-theme="dark"] .theme-btn .i-sun { display: block; }
html:not([data-theme="dark"]) .theme-btn .i-moon { display: block; }
.btn-accent { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14.5px; padding: 11px 20px; border-radius: 999px; border: 0; white-space: nowrap; transition: background .15s, transform .15s; }
.btn-accent:hover { background: var(--accent-deep); transform: translateY(-1px); }
.nav-burger { display: none; width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); place-items: center; }

/* ============ HERO ============ */
.hero { padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.hero-eyebrow { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--accent); margin-bottom: 18px; }
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(40px, 5.5vw, 64px); line-height: 1.04; letter-spacing: -0.015em; color: var(--text); }
.hero .subhead { font-size: 19px; color: var(--text-2); line-height: 1.6; margin-top: 22px; max-width: 460px; }
.hero-links { display: flex; gap: 24px; margin-top: 28px; flex-wrap: wrap; }
.hero-links a { font-family: var(--serif); font-size: 16px; color: var(--accent); border-bottom: 1px solid var(--accent-border); padding-bottom: 2px; transition: border-color .15s; }
.hero-links a:hover { border-color: var(--accent); }

/* ============ JOURNAL CARD ============ */
.jcard { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; box-shadow: var(--card-shadow-lg); padding: 28px 30px; }
.jcard hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.jcard-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.jcard-no { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--text); white-space: nowrap; }
.jcard-date { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.jdata { font-family: var(--mono); font-size: 13.5px; line-height: 1.9; color: var(--text); }
.jdata .k { color: var(--text-2); }
.jdata .dir { color: var(--accent); font-weight: 700; }
.jresult { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--accent); margin: 2px 0; }
.jnote { margin: 12px 0; }
.jnote .label { font-family: var(--sans); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-2); margin-bottom: 4px; }
.jnote .body { font-family: var(--serif); font-style: italic; font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.jcheck { display: flex; gap: 10px; align-items: flex-start; font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.55; color: var(--ink); margin: 11px 0; }
.jcheck .mk { font-style: normal; font-family: var(--sans); font-weight: 700; flex: 0 0 auto; }
.jcheck.good .mk { color: var(--win); }
.jcheck.bad .mk { color: var(--loss); }
.jlesson { font-family: var(--serif); font-size: 15.5px; color: var(--ink); margin-top: 6px; }
.jlesson b { font-weight: 700; }

/* ============ FxPro inline strip ============ */
.fxstrip { max-width: 760px; margin: 0 auto; padding: 18px 24px; background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.fxstrip p { font-size: 15px; color: var(--text); }
.fxstrip a { font-weight: 600; color: var(--accent); white-space: nowrap; border-bottom: 1px solid var(--accent-border); }

/* ============ SECTIONS ============ */
.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(24px, 3vw, 36px); line-height: 1.15; letter-spacing: -0.01em; color: var(--text); }
.section .intro { font-size: 18px; color: var(--text-2); line-height: 1.6; margin-top: 14px; max-width: 620px; }

/* numbered list (5 fields) */
.numbered { margin-top: 40px; display: flex; flex-direction: column; gap: 34px; max-width: 820px; }
.numbered .item { display: grid; grid-template-columns: 60px 1fr; gap: 22px; align-items: start; }
.numbered .n { font-family: var(--serif); font-weight: 700; font-size: 44px; line-height: 1; color: var(--accent); }
.numbered .item h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--text); margin-bottom: 6px; }
.numbered .item p { font-size: 16px; color: var(--text-2); line-height: 1.65; }

/* two column prose */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 36px; }
.two-col .col h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin-bottom: 12px; color: var(--text); }
.two-col .col p { font-size: 16px; color: var(--text-2); line-height: 1.7; margin-bottom: 12px; }
.two-col .col ul { list-style: none; padding: 0; margin: 0; }
.two-col .col li { font-size: 16px; color: var(--text-2); line-height: 1.6; padding: 7px 0 7px 22px; position: relative; }
.two-col .col li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* editorial stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 44px; }
.stat-block .stat-num { font-family: var(--mono); font-weight: 700; font-size: clamp(34px, 4vw, 46px); line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.stat-block .stat-cap { font-family: var(--serif); font-style: italic; font-size: 14.5px; color: var(--text-2); line-height: 1.5; margin-top: 14px; }

/* ============ PULL QUOTE ============ */
.pullquote { max-width: 760px; margin: 0 auto; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.4; color: var(--ink); text-align: center; }
.pullquote .by { display: block; font-style: normal; font-family: var(--sans); font-size: 14px; color: var(--text-2); margin-top: 18px; }

/* ============ BOTTOM CTA (cream/green band) ============ */
.cta-band { background: var(--accent-soft); border-top: 1px solid var(--accent-border); border-bottom: 1px solid var(--accent-border); }
.cta-band-inner { padding: 64px 0; text-align: center; }
.cta-band h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; color: var(--text); }
.cta-band p { font-size: 17px; color: var(--text-2); margin-top: 14px; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-band .btn-accent { margin-top: 26px; font-size: 15.5px; padding: 14px 28px; }
.cta-band .cb-disc { font-size: 12px; color: var(--text-2); margin-top: 20px; max-width: 640px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* ============ ARTICLE / PROSE PAGES ============ */
.page { padding: 56px 0 72px; }
.page-hd { max-width: 760px; margin: 0 auto 8px; }
.page-hd .eyebrow { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--accent); margin-bottom: 14px; }
.page-hd h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(32px, 4.5vw, 50px); line-height: 1.08; letter-spacing: -0.015em; }
.page-hd .lede { font-size: 19px; color: var(--text-2); margin-top: 18px; line-height: 1.6; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-family: var(--serif); font-weight: 700; font-size: 27px; margin: 40px 0 14px; line-height: 1.2; }
.prose h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin: 28px 0 10px; }
.prose p { font-size: 17px; color: var(--text-2); line-height: 1.75; margin-bottom: 18px; }
.prose ul { list-style: none; padding: 0; margin: 0 0 18px; }
.prose li { font-size: 17px; color: var(--text-2); line-height: 1.65; padding: 8px 0 8px 26px; position: relative; }
.prose li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { font-style: italic; }
.prose a.inline { color: var(--accent); border-bottom: 1px solid var(--accent-border); font-weight: 500; }
.callout { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 22px 24px; margin: 26px 0; box-shadow: var(--card-shadow); }
.callout p { margin: 0; font-size: 16px; }
.callout .ct { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--accent); margin-bottom: 8px; }

/* template fields table */
.tmpl { max-width: 760px; margin: 28px auto 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--card-shadow); }
.tmpl .row { display: grid; grid-template-columns: 200px 1fr; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--card); }
.tmpl .row:last-child { border-bottom: 0; }
.tmpl .row .f { font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--text); }
.tmpl .row .d { font-size: 15px; color: var(--text-2); line-height: 1.55; }
@media (max-width: 600px){ .tmpl .row { grid-template-columns: 1fr; gap: 4px; } }

/* blank template block */
.template-block { max-width: 760px; margin: 26px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--card-shadow); padding: 26px 28px; font-family: var(--mono); font-size: 13.5px; line-height: 2; color: var(--text-2); white-space: pre-wrap; }
.copy-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-family: var(--sans); font-weight: 600; font-size: 14px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 999px; padding: 9px 18px; }

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--line); padding: 48px 0 32px; background: var(--bg-2); }
.footer-top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--text-2); font-size: 14px; line-height: 1.6; max-width: 280px; }
.fcol h4 { font-family: var(--serif); font-size: 15px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.fcol a { display: block; color: var(--text-2); font-size: 14.5px; padding: 5px 0; transition: color .15s; }
.fcol a:hover { color: var(--accent); }
.footer-disc { margin-top: 24px; }
.footer-disc p { font-size: 12px; color: var(--text-2); line-height: 1.6; max-width: 940px; margin-bottom: 9px; }
.footer-disc b { color: var(--text); font-weight: 600; }
.footer-bottom { margin-top: 20px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; }

/* ============ MOBILE STICKY BANNER ============ */
.mobile-banner { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--card); border-top: 1px solid var(--line); padding: 7px 12px; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 -6px 20px -12px rgba(28,25,23,0.18); }
.mobile-banner img { display: block; max-width: 100%; height: 50px; border-radius: 4px; }
.mobile-banner .mb-fallback { display: none; align-items: center; gap: 10px; width: 100%; max-width: 320px; height: 50px; background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 6px; padding: 0 14px; }
.mobile-banner .mb-fallback.show { display: flex; }
.mobile-banner .mb-fallback .l { font-family: var(--serif); font-weight: 700; color: var(--accent); font-size: 15px; }
.mobile-banner .mb-fallback .r { margin-left: auto; font-size: 12px; font-weight: 600; color: #fff; background: var(--accent); padding: 7px 13px; border-radius: 999px; }
.mb-close { position: absolute; top: -10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); border: 1px solid var(--line-strong); color: var(--text-2); display: grid; place-items: center; font-size: 13px; line-height: 1; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .mobile-banner { display: flex; }
  body { padding-bottom: 72px; }
  .hero { padding: 48px 0 44px; }
  .section { padding: 56px 0; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  .stats { grid-template-columns: 1fr; }
  .numbered .item { grid-template-columns: 44px 1fr; gap: 16px; }
  .footer-top { grid-template-columns: 1fr; gap: 22px; }
  .nav-right .btn-accent span.full { display: none; }
}

/* scrollbar */
html { overflow-y: scroll; scrollbar-gutter: stable; }
html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: var(--bg-2, #F4F4EF); }
html::-webkit-scrollbar-thumb { background: var(--line-strong, #D8D5CE); border-radius: 4px; }

/* ============ PROSE CONTENT STYLES ============ */
.prose-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 64px;
}
.prose h1 { font-size: clamp(26px,3.5vw,40px); font-weight:700; letter-spacing:-0.02em; line-height:1.1; margin-bottom:14px; }
.prose h2 { font-size: clamp(18px,2.2vw,24px); font-weight:700; letter-spacing:-0.01em; margin:40px 0 12px; }
.prose h2:first-child { margin-top:0; }
.prose h3 { font-size:16px; font-weight:700; margin:24px 0 8px; }
.prose p { color:var(--text-2); font-size:15px; line-height:1.75; margin-bottom:14px; }
.prose p:last-child { margin-bottom:0; }
.prose strong { color:var(--text); font-weight:600; }
.prose em { font-style:italic; }
.prose a { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
.prose hr { border:0; border-top:1px solid var(--line); margin:28px 0; }
.prose ul { color:var(--text-2); font-size:15px; line-height:1.75; margin:0 0 16px 22px; display:flex; flex-direction:column; gap:6px; }
.prose ol { color:var(--text-2); font-size:15px; line-height:1.75; margin:0 0 16px 22px; display:flex; flex-direction:column; gap:6px; }
.prose li { }
/* Tables */
.prose-table-wrap { overflow-x:auto; margin:24px 0; }
.prose table { width:100%; border-collapse:collapse; min-width:400px; }
.prose th { text-align:left; font-family:var(--mono); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; color:var(--text-3); padding:10px 16px; border-bottom:1px solid var(--line); white-space:nowrap; }
.prose td { padding:11px 16px; font-size:14px; border-bottom:1px solid var(--line); color:var(--text-2); vertical-align:top; line-height:1.55; }
.prose tbody tr:last-child td { border-bottom:0; }
.prose tbody tr:hover td { background:var(--hover, rgba(255,255,255,0.02)); }
/* Page hero */
.page-hero { padding:48px 0 40px; border-bottom:1px solid var(--line); margin-bottom:0; }
.page-hero h1 { font-size:clamp(28px,4vw,42px); font-weight:700; letter-spacing:-0.02em; line-height:1.1; margin-bottom:14px; }
.page-hero .lede { color:var(--text-2); font-size:16px; max-width:620px; line-height:1.6; }
/* Section eyebrow */
.eyebrow-label { font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:0.12em; color:var(--accent); margin-bottom:12px; }
/* Callout box */
.prose-callout { padding:16px 20px; background:var(--accent-soft); border:1px solid var(--accent-border); border-radius:6px; margin:22px 0; }
.prose-callout p { font-size:14px; color:var(--text-2); margin:0; }

