/* nextentry.app guides: the home page's palette and type, set for reading.
   Neutrals carry the page, blue is the one action colour, no red. Geist for words, Geist Mono for numbers. */
@font-face { font-family: 'Geist'; src: url('fonts/Geist_400Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('fonts/Geist_500Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('fonts/Geist_600SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/GeistMono_400Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/GeistMono_500Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }

:root {
  --bg: #0B0F17; --surface: #121821; --line: #232C3A; --text: #EEF2F7; --strong: #FFFFFF;
  --muted: #9AA6B6; --faint: #7A8699; --blue: #2196F3; --on-blue: #FFFFFF; --win: #4CC48C; --loss: #94A3B8;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F5F7FA; --surface: #FFFFFF; --line: #DDE3EB; --text: #0E1520; --strong: #0E1520;
    --muted: #4F5B6B; --faint: #5F6D80; --blue: #0D47A1; --on-blue: #FFFFFF; --win: #17764A; --loss: #5A6677;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding-inline: 20px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Top bar, as on the home page */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: max(18px, env(safe-area-inset-top)) 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--strong); font-weight: 600; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.top nav { display: flex; gap: 20px; font-size: 0.95rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }

/* Breadcrumb */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.9rem; color: var(--faint); margin-top: 12px; }
.crumbs li + li::before { content: '›'; margin-right: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

/* The article */
article { padding-block: 20px 56px; }
h1, h2, h3 { color: var(--strong); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.4vw, 2.9rem); line-height: 1.08; letter-spacing: -0.03em; margin-top: 18px; }
h2 { font-size: 1.4rem; line-height: 1.25; letter-spacing: -0.015em; margin-top: 44px; }
h3 { font-size: 1.05rem; margin-top: 24px; }
article p, article li { color: var(--muted); }
article p { margin-top: 14px; }
article p b, article li b { color: var(--text); font-weight: 600; }
article ul, article ol { margin-top: 14px; padding-left: 1.25em; display: grid; gap: 8px; }
.updated { margin-top: 12px; font-size: 0.9rem; color: var(--faint); }

/* The one-sentence answer, first thing under the heading */
.answer { margin-top: 24px; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--line)); border-radius: 12px; background: var(--surface); }
.answer p { margin: 0; color: var(--text); font-size: 1.1rem; line-height: 1.55; }

/* A worked formula */
.formula { margin-top: 18px; padding: 14px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font: 500 1rem var(--mono); color: var(--text); overflow-x: auto; }

/* Calculators */
.calc { margin-top: 28px; padding: 22px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.calc h2 { margin-top: 0; font-size: 1.15rem; }
.calc .hint { margin-top: 6px; font-size: 0.95rem; }
.fields { display: grid; gap: 14px; margin-top: 18px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9rem; color: var(--muted); }
.field input[type="number"] { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 500 1.05rem var(--mono); font-variant-numeric: tabular-nums; }
.field input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--blue); }
.result { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.result .big { font: 500 clamp(2.2rem, 8vw, 3rem) var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1.05; color: var(--strong); }
.result .big.win { color: var(--win); }
.result .big.loss { color: var(--loss); }
.result p { margin-top: 8px; color: var(--muted); }

/* Example checklist (pre-trade checklist guide) */
.checks { list-style: none; padding: 0; margin-top: 16px; display: grid; gap: 6px; }
.checks label { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); cursor: pointer; }
.checks input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.checks .must { margin-left: auto; font-size: 0.8rem; color: var(--faint); white-space: nowrap; }

/* Table of examples */
.table-wrap { margin-top: 18px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--text); font-weight: 600; }
td { color: var(--muted); }
td.num, th.num { text-align: right; }

/* Try it in the app */
.cta { margin-top: 48px; padding: 24px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.cta h2 { margin-top: 0; font-size: 1.25rem; }
.cta p { margin-top: 8px; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 12px; font: 600 1rem var(--sans); text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--blue); color: var(--on-blue); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { color: var(--text); border-color: var(--line); background: var(--bg); }
.btn-secondary:hover { border-color: var(--faint); }

/* More guides */
.more { margin-top: 44px; }
.more h2 { margin-top: 0; font-size: 1.1rem; }
.more ul { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.more li { border-bottom: 1px solid var(--line); }
.more a { display: block; padding: 14px 0; text-decoration: none; color: var(--text); font-weight: 500; }
.more a span { display: block; color: var(--muted); font-weight: 400; font-size: 0.95rem; }
.more a:hover { color: var(--blue); }

.disclaimer { margin-top: 40px; font-size: 0.9rem; color: var(--faint); }

footer { border-top: 1px solid var(--line); padding-block: 28px max(32px, env(safe-area-inset-bottom)); color: var(--faint); font-size: 0.9rem; }
footer .row2 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
