/* Gannbot theme. Colors come from the Gannbot logo: midnight navy and antique gold. */
:root {
    --bg: #020B1F;
    --bg-alt: #010714;
    --surface: #061A3B;
    --line: #183563;
    --line-strong: #2B4D80;
    --gold: #CFA453;
    --gold-hi: #E6C67A;
    --text: #EEF1F7;
    --text-2: #C6D0E0;
    --text-3: #B4C2D8;
    --muted: #97A9C4;
    --up: #7FD1B9;
    --down: #E8A07A;
    /* Ghost admin can swap these in Settings > Design > Typography; the defaults are the Gannbot fonts. */
    --font-display: var(--gh-font-heading, "Josefin Sans", "Century Gothic", sans-serif);
    --font-body: var(--gh-font-body, "IBM Plex Sans", system-ui, sans-serif);
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
    --radius: 10px;
    --wrap: 1240px;
    --wrap-wide: 1480px;
    --wrap-text: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: 0.2px; margin: 0; color: var(--text); }
h2 { font-size: clamp(30px, 4vw, 42px); }
h3 { font-size: 21px; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--gold); color: var(--bg); padding: 10px 16px; border-radius: 6px; font-weight: 600; }
.skip-link:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.wrap-wide { max-width: var(--wrap-wide); margin: 0 auto; padding: 0 32px; }
.wrap-text { max-width: var(--wrap-text); margin-left: auto; margin-right: auto; padding: 0 24px; }
.section { padding-top: 88px; padding-bottom: 88px; }
.section-tight { padding-top: 0; }
.band { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.chip { font-family: var(--font-mono); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; }
.example-tag { margin-left: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 6px; font-weight: 400; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 6px; font: 600 16px/1 var(--font-body); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s; }
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-hi); color: var(--bg); }
.btn-line { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--gold); color: var(--text); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 17px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-plain { color: var(--text); text-decoration: none; padding: 12px 10px; }
.link-plain:hover { color: var(--gold-hi); }
.link-gold { color: var(--gold); text-decoration: none; font-weight: 500; padding: 10px 0; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 32px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: block; width: 40px; height: 40px; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: 3.5px; text-transform: uppercase; color: var(--gold); padding-top: 3px; }
.site-nav { flex: 1 1 320px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 26px; }
.nav-list a { display: inline-block; color: var(--text); text-decoration: none; padding: 10px 0; font-size: 15.5px; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--gold-hi); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 48px; padding-top: 44px; padding-bottom: 44px; }
.footer-about { flex: 1 1 320px; display: flex; flex-direction: column; gap: 14px; }
.disclaimer { color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 520px; }
.copyright { color: var(--muted); font-size: 13px; }
.footer-nav .nav-list { gap: 0 28px; }
.footer-nav .nav-list a { font-size: 14px; color: var(--text-2); padding: 8px 0; }

/* Homepage */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 72px; padding-bottom: 96px; }
.hero-copy { flex: 1 1 440px; display: flex; flex-direction: column; gap: 24px; }
.hero-title { font-size: clamp(40px, 5.4vw, 64px); line-height: 1.06; }
.hero-sub { color: var(--text-3); font-size: 19px; max-width: 560px; }
.hero-note { color: var(--muted); font-size: 14px; }
.hero-visual { flex: 1 1 520px; min-width: 0; position: relative; }
.hero-chart { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); }
.hero-chart-bar { background: var(--surface); padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; color: var(--text-2); }
.hero-chart-name { font-weight: 600; color: var(--text); }
.hero-chart-svg { display: block; width: 100%; height: auto; background: #fff; }
.hero-bot-card { position: absolute; right: -8px; bottom: -40px; width: min(320px, 72%); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 16px; box-shadow: 0 16px 36px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.bot-card-head, .chat-head, .bot-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.section-head p { color: var(--text-3); font-size: 17px; }
.section-head.centered { margin: 0 auto; text-align: center; align-items: center; }
.section-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
#tools .section, #research .section { display: flex; flex-direction: column; gap: 44px; }
.card-row { display: flex; flex-wrap: wrap; gap: 24px; }
.card-row > * { flex: 1 1 300px; min-width: 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-top: 40px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.feature p { color: var(--text-3); font-size: 15.5px; }
.feature-icon { width: 44px; height: 44px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; color: var(--gold); }
.dot-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: 14.5px; }
.dot-list li { position: relative; padding-left: 18px; }
.dot-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.bot-section { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.bot-story { flex: 1 1 380px; display: flex; flex-direction: column; gap: 32px; }
.bot-portrait { width: 208px; height: auto; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.steps li { display: flex; flex-direction: column; gap: 8px; padding-top: 18px; border-top: 2px solid var(--gold); }
.steps h3 { font-family: var(--font-body); font-weight: 600; font-size: 19px; }
.steps p { color: var(--text-3); font-size: 15.5px; }
.step-num { font-family: var(--font-mono); font-size: 13px; color: var(--gold); }
.chat-demo { flex: 1 1 420px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-context { margin-left: auto; font-size: 12px; font-weight: 400; }
.chat-body { padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 86%; padding: 12px 14px; font-size: 15px; line-height: 1.55; }
.msg-user { align-self: flex-end; background: var(--line); color: var(--text); border-radius: 10px 10px 2px 10px; }
.msg-bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); color: var(--text-2); border-radius: 10px 10px 10px 2px; }
.chat-cta { margin: 0 18px 18px; }

/* Post cards and lists */
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.post-card-link:hover .post-card-title { color: var(--gold-hi); }
.post-card-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #fff; border-bottom: 1px solid var(--line); }
.post-card-image-empty { background: var(--bg); display: grid; place-items: center; }
.post-card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.post-card-tags { display: flex; gap: 10px; align-items: center; }
.badge { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--bg); background: var(--gold); border-radius: 4px; padding: 2px 7px; }
.post-card-title { font-size: 22px; line-height: 1.25; }
.post-card-excerpt { color: var(--text-3); font-size: 15px; }
.post-card-meta { color: var(--muted); font-size: 13px; }
.page-title { font-size: clamp(34px, 4.6vw, 52px); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 48px; color: var(--muted); }
.pagination a { color: var(--gold); text-decoration: none; padding: 10px 0; }

/* Pricing */
.pricing { display: flex; flex-direction: column; gap: 44px; }
.plan-row { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.plan { flex: 1 1 320px; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.plan-featured { border: 2px solid var(--gold); }
.plan h3 { font-family: var(--font-body); font-weight: 600; font-size: 18px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; }
.plan-amount { font-family: var(--font-display); font-weight: 700; font-size: 44px; }
.plan-desc { color: var(--text-3); font-size: 15px; }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; color: var(--text-2); font-size: 15px; flex: 1; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.icon-check { flex: none; margin-top: 3px; color: var(--gold); }

/* Articles */
.article { padding-bottom: 72px; }
.article-head { display: flex; flex-direction: column; gap: 16px; padding-top: 72px; padding-bottom: 36px; }
.article-title { font-size: clamp(36px, 5vw, 56px); }
.article-excerpt { color: var(--text-3); font-size: 20px; }
.article-meta { color: var(--muted); font-size: 14.5px; }
.article-image { margin: 0 auto 48px; }
.article-image img { display: block; width: 100%; border-radius: var(--radius); }
.article-image figcaption { color: var(--muted); font-size: 14px; text-align: center; padding-top: 10px; }
.article-disclaimer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.article-comments { margin-top: 48px; }

/* Post content: Ghost's editor cards */
.gh-content { display: grid; grid-template-columns: [full-start] minmax(24px, 1fr) [wide-start] minmax(0, 240px) [main-start] min(var(--wrap-text), calc(100% - 48px)) [main-end] minmax(0, 240px) [wide-end] minmax(24px, 1fr) [full-end]; row-gap: 0; font-size: 18px; color: var(--text-2); }
.gh-content > * { grid-column: main-start / main-end; margin-top: 0; margin-bottom: 0; }
.gh-content > * + * { margin-top: 1.4em; }
.gh-content > h2 { margin-top: 1.8em; font-size: 32px; }
.gh-content > h3 { margin-top: 1.6em; font-size: 24px; }
.gh-content a { color: var(--gold); }
.gh-content strong { color: var(--text); }
.gh-content blockquote { border-left: 3px solid var(--gold); padding-left: 20px; margin-left: 0; color: var(--text); font-style: italic; }
.gh-content ul, .gh-content ol { padding-left: 1.3em; }
.gh-content hr { border: 0; border-top: 1px solid var(--line); }
.gh-content code { font-family: var(--font-mono); font-size: .9em; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.gh-content pre { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px; padding: 16px; overflow-x: auto; }
.gh-content pre code { background: none; border: 0; padding: 0; }
.gh-content table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.gh-content th, .gh-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.gh-content figure { margin-left: 0; margin-right: 0; }
.gh-content figcaption { color: var(--muted); font-size: 14px; text-align: center; padding-top: 10px; }
.gh-content img { border-radius: 6px; }
.gh-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.gh-content > .kg-width-full { grid-column: full-start / full-end; }
.kg-width-full img { border-radius: 0; width: 100%; }
.gh-content > .kg-card.kg-html-card { grid-column: wide-start / wide-end; }

/* Gann Lab page */
.lab-head { padding-top: 32px; padding-bottom: 18px; }
.lab-title { font-size: 36px; }
.lab-intro { color: var(--text-3); margin-top: 6px; }
.lab { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; padding-bottom: 56px; }
.lab-chart { flex: 999 1 680px; min-width: 0; }
.lab-chart .kg-card { margin: 0; }
.lab-chart #gl-bubBot, .lab-chart #gl-popBot { display: none !important; }   /* the panel beside the chart is Gann Bot here */
.bot-panel { flex: 1 1 320px; min-width: 0; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; position: sticky; top: 16px; max-height: calc(100vh - 32px); }
.bot-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.bot-context { margin-left: auto; font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted); }
.bot-levels { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.bot-between { font-size: 14.5px; color: var(--text-2); }
.bot-between b { color: var(--text); }
.bot-level-list { list-style: none; margin: 0; padding: 0; }
.bot-level-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto 58px; column-gap: 10px; align-items: end; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.bot-level-list .lv-label { display: flex; flex-direction: column; min-width: 0; }
.bot-level-list .role-resistance, .bot-level-list .role-support { font-family: var(--font-mono); font-size: 11px; letter-spacing: .8px; text-transform: uppercase; }
.bot-level-list .role-resistance { color: var(--down); }
.bot-level-list .role-support { color: var(--up); }
.bot-level-list .lv-name { color: var(--text-2); }
.bot-level-list .lv-price, .bot-level-list .lv-dist { font-family: var(--font-mono); text-align: right; }
.bot-level-list .lv-dist { color: var(--muted); }
.bot-log { flex: 1; min-height: 120px; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.bot-ask { display: flex; gap: 10px; padding: 14px 18px 6px; border-top: 1px solid var(--line); }
.bot-ask input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 15px var(--font-body); }
.bot-ask input:disabled { opacity: .6; }
.bot-note { padding: 0 18px 14px; font-size: 12.5px; color: var(--muted); }
.bot-join { padding: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; color: var(--text-2); font-size: 15px; }
.read-row h3 { font-family: var(--font-body); font-weight: 600; font-size: 18px; margin-bottom: 8px; }
.read-row p { color: var(--text-3); font-size: 15.5px; }
.band .section > h2 { margin-bottom: 32px; }
.band .section > .disclaimer { margin-top: 40px; }

/* Error page */
.error-wrap { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }

@media (max-width: 900px) {
    .bot-panel { position: static; max-height: none; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .wrap, .wrap-wide { padding: 0 18px; }
    .section { padding-top: 64px; padding-bottom: 64px; }
    .hero { padding-top: 40px; gap: 40px; padding-bottom: 72px; }
    .hero-bot-card { position: static; width: 100%; margin-top: 14px; }
    .header-actions { margin-left: auto; gap: 4px; }
    .header-actions .btn { min-height: 40px; padding: 0 14px; font-size: 15px; }
    .header-actions .link-plain { padding: 10px 8px; font-size: 15px; }
    .wordmark { font-size: 16px; letter-spacing: 2px; }
    .header-row { column-gap: 12px; }
    .brand { gap: 8px; }
    .brand-mark { width: 34px; height: 34px; }
    .lab-head { padding-top: 24px; }
    .site-nav { order: 3; flex-basis: 100%; }
    .msg { max-width: 94%; }
    .bot-level-list li { grid-template-columns: minmax(0, 1fr) auto; }
    .bot-level-list .lv-dist { display: none; }
}
@media (max-width: 380px) {
    .header-actions .link-plain { display: none; }   /* Ghost's sign-up window has its own "Sign in" link */
}
