/* ============================================================================
   Sahi — long-form guide surface
   ----------------------------------------------------------------------------
   Shared by every page under /guides/. Extracted from the original inline
   <style> of open-interest.html so that a design change lands on all guides at
   once instead of being retyped twelve times.

   Guide pages link this file AND /learn.css. learn.css is fully namespaced under
   .sahi-learn / .sahi-foot / .sahi-learn-cue and declares no global selectors, so
   the two cannot collide — that is what lets a guide reuse the same compliance
   footer the tool pages carry.

   Palette is the shared Sahi static palette:
     bg 0    #15020B      accent  #A50F66
     cyan    #7FF6BC      up      #0CAD60      down  #E35650
   ========================================================================== */

@font-face {
    font-family: "SAHI Sans";
    src: url("/fonts/SAHISans-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "SAHI Sans";
    src: url("/fonts/SAHISans-SemiBold.woff2") format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: "SAHI Sans";
    src: url("/fonts/SAHISans-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
}
@font-face {
    font-family: "SAHI Season";
    src: url("/fonts/SAHISeason-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --font-display: "SAHI Season", "SAHI Sans", sans-serif;
    --font-sans: "SAHI Sans", sans-serif;
    --sahi-bg-0: #15020B;
    --sahi-bg-1: #15020B;
    --surface: rgba(21, 2, 11, 0.5);
    --surface-hover: rgba(61, 9, 32, 0.7);
    --border-soft: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(165, 15, 102, 0.4);

    --text-1: #FFFFFF;
    --text-2: rgba(255, 255, 255, 0.85);
    --text-3: rgba(255, 255, 255, 0.55);

    --sahi-accent: #A50F66;
    --sahi-positive: #0CAD60;
    --sahi-negative: #E35650;
    --sahi-cyan: #7FF6BC;

    --toast-positive-text: #7FF6BC;
    --toast-negative-text: #E35650;

    --bu-long-build: #40E897;
    --bu-short-build: #E35650;
    --bu-short-cover: #17D077;
    --bu-long-unwind: #C5AA84;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background-color: var(--sahi-bg-0);
    background-image: radial-gradient(circle at 15% 50%, rgba(165, 15, 102, 0.04), transparent 25%),
                      radial-gradient(circle at 85% 30%, rgba(127, 246, 188, 0.03), transparent 25%);
    color: var(--text-2);
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
}

/* ── Scroll reveal ──────────────────────────────────────────────────────────
   Replaces the AOS CDN bundle (two render-blocking requests to unpkg.com).
   Markup keeps the same data-aos / data-aos-delay attributes.

   Gated behind .js, which /guides/guide.js sets on <html> as its first act.
   Without that gate a JS failure would leave every revealed block at opacity 0
   — invisible to a reader and, worse, to anything that renders before it gives
   up on the script. Default state is therefore visible.
   ------------------------------------------------------------------------- */
.js [data-aos] {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.js [data-aos="fade-up"] { transform: translateY(24px); }
.js [data-aos="fade-right"] { transform: translateX(-24px); }
.js [data-aos="fade-left"] { transform: translateX(24px); }
.js [data-aos="zoom-in"] { transform: scale(0.94); }
.js [data-aos].aos-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto; }
    .js [data-aos] { opacity: 1; transform: none; transition: none; }
}

/* Jargon Tooltips */
.jargon {
    position: relative;
    border-bottom: 1px dotted var(--sahi-cyan);
    cursor: help;
    color: var(--sahi-cyan);
    font-weight: 600;
}
.jargon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%; left: 50%; transform: translateX(-50%) translateY(10px);
    background: var(--sahi-bg-1);
    color: var(--text-2);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    border: 1px solid var(--border-soft);
    z-index: 100;
}
.jargon:hover::after,
.jargon:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }

header {
    padding: 120px 20px 90px;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(165, 15, 102, 0.15) 0%, transparent 70%);
    border-bottom: 1px solid var(--border-soft);
}

.category-tag {
    display: inline-block;
    color: var(--sahi-cyan);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 24px;
    padding: 8px 18px;
    border-radius: 30px;
    background: rgba(127, 246, 188, 0.05);
    border: 1px solid rgba(127, 246, 188, 0.2);
    box-shadow: 0 0 20px rgba(127, 246, 188, 0.1);
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #FFFFFF, #FEA3E5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-3);
}

.layout-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 20px 120px;
}

/* Sticky TOC Navigation */
.toc-container {
    position: sticky;
    top: 40px;
    height: max-content;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding-right: 20px;
    border-right: 1px solid var(--border-soft);
}
.toc-title { font-size: 0.85rem; text-transform: uppercase; font-weight: 700; color: var(--text-3); letter-spacing: 0.1em; margin-bottom: 20px; }
.toc-nav { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.toc-nav a {
    text-decoration: none;
    color: var(--text-3);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}
.toc-nav a:hover { color: var(--text-1); }
.toc-nav a.active { color: var(--sahi-cyan); }
.toc-nav a.active::before {
    content: ''; position: absolute; left: -20px; top: 50%; transform: translateY(-50%);
    width: 6px; height: 6px; border-radius: 50%; background: var(--sahi-cyan);
    box-shadow: 0 0 10px var(--sahi-cyan);
}

/* Main Content */
.content-main { min-width: 0; }

h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--text-1);
    margin: 90px 0 32px;
    padding-top: 40px; /* Offset for anchor links */
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 20px;
}
h2 svg { color: var(--sahi-accent); flex-shrink: 0; }
p { margin-bottom: 24px; font-size: 1.15rem; }
strong { color: var(--text-1); font-weight: 600; }

/* Links in running prose. Without this an inline <a> falls back to the browser
   default blue, which on #15020B is close to unreadable — and the guides link
   to each other constantly, so this is most of the cross-linking on the site.
   Scoped to .content-main so it cannot reach the footer, which styles its own. */
.content-main a {
    color: var(--sahi-cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(127, 246, 188, 0.4);
    font-weight: 600;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.content-main a:hover { color: #FFFFFF; text-decoration-color: #FFFFFF; }
.content-main a:focus-visible { outline: 2px solid var(--sahi-cyan); outline-offset: 2px; border-radius: 2px; }

/* The card grids and the TOC are links too, but they are their own components
   and must not inherit the underline. */
.content-main .guide-card,
.content-main .btn-primary,
.content-main .btn-ghost,
.toc-nav a { text-decoration: none; font-weight: inherit; }
.content-main .guide-card { color: inherit; }

.divider { border: 0; height: 1px; background: var(--border-soft); margin: 60px 0; }

/* Beginner Callout - Glassmorphism */
.callout-beginner {
    background: rgba(12, 173, 96, 0.04);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(12, 173, 96, 0.15);

    border-radius: 12px;
    padding: 32px;
    margin: 48px 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.callout-beginner:hover { transform: translateY(-3px); box-shadow: 0 15px 50px rgba(12, 173, 96, 0.1); }
.callout-beginner h4 { color: var(--sahi-positive); margin-bottom: 16px; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }

/* Feature Cards - Glassmorphism */
.feature-card {
    background: var(--surface);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(165, 15, 102, 0.4);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 40px rgba(165, 15, 102, 0.1);
}

/* Trading Application */
.trading-example {
    background: rgba(165, 15, 102, 0.05);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(165, 15, 102, 0.15);
    border-left: 4px solid var(--sahi-accent);
    padding: 24px;
    margin: 32px 0;
    border-radius: 12px;
    font-size: 1.05rem;
    color: var(--text-2);
    transition: background 0.3s ease;
}
.trading-example:hover { background: rgba(165, 15, 102, 0.08); }
.trading-example strong { color: #FEA3E5; font-weight: 700; display: block; margin-bottom: 8px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Cells */
/* padding-top clears .annotation, which is absolutely positioned 35px above its
   cell and would otherwise sit on top of whatever precedes it. */
.cell-anatomy-container { display: flex; flex-direction: column; gap: 32px; align-items: center; margin: 20px 0; padding-top: 16px; width: 100%; }

.isolated-cell {
    background: rgba(21, 2, 11, 0.8);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    width: 100%; max-width: 200px; height: 64px;
    position: relative; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-sans); font-variant-numeric: tabular-nums; font-size: 1.3rem; font-weight: 700; color: #FFFFFF;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5), 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    isolation: isolate;
}
.isolated-cell:hover { transform: scale(1.05); box-shadow: inset 0 2px 10px rgba(0,0,0,0.5), 0 15px 30px rgba(0,0,0,0.4); }

.heatmap-ce::before { content: ''; position: absolute; top: 5px; bottom: 5px; right: 5px; background-color: var(--toast-negative-text); opacity: 0.35; width: 85%; border-radius: 6px; z-index: -1; }
.heatmap-pe::before { content: ''; position: absolute; top: 5px; bottom: 5px; left: 5px; background-color: var(--toast-positive-text); opacity: 0.35; width: 65%; border-radius: 6px; z-index: -1; }
.flow-up { color: var(--sahi-positive); }
.flow-down { color: var(--sahi-negative); }
.pct-cell { color: var(--sahi-positive); border: 1px dashed rgba(255,255,255,0.2); }
.vol-ce::before { content: ''; position: absolute; top: 5px; bottom: 5px; right: 5px; background-color: var(--toast-negative-text); opacity: 0.2; width: 45%; border-radius: 6px; z-index: -1; }
.ratio-cell { background: rgba(255,255,255,0.05); font-size: 1.5rem; }
.cell-neutral { color: var(--sahi-cyan); }
.cell-wide { max-width: 280px; }

.annotation {
    position: absolute; font-family: var(--font-sans); font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em;
    background: var(--sahi-bg-0); padding: 6px 10px; border: 1px solid var(--border-soft); border-radius: 6px; white-space: nowrap; font-weight: 700;
}
.anno-bg { top: -35px; left: 10px; border-color: var(--toast-negative-text); color: var(--toast-negative-text); }
.anno-pos { top: -35px; left: 10px; border-color: var(--toast-positive-text); color: var(--toast-positive-text); }

.cell-caption { text-align: center; margin-top: 16px; font-size: 0.85rem; color: var(--text-3); line-height: 1.5; }
.cell-col { flex: 1; min-width: 200px; display: flex; flex-direction: column; align-items: center; }
/* row-gap is larger than column-gap on purpose: when the row wraps (narrow
   viewport, or three cells in a two-up grid) an .annotation on a cell in the
   second row needs clearance from the caption of the row above it. */
.cell-row { display: flex; column-gap: 24px; row-gap: 56px; flex-wrap: wrap; justify-content: center; width: 100%; }

/* Scenarios */
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin: 40px 0; }
.sc {
    background: var(--surface); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
    transition: transform 0.3s ease;
}
.sc:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.15); }
.sc-head { padding: 20px; background: rgba(0,0,0,0.3); border-bottom: 1px solid rgba(255, 255, 255, 0.05); display: flex; align-items: center; justify-content: center; }
.sc-body { padding: 24px; flex-grow: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.logic-req { font-size: 0.85rem; font-family: var(--font-sans); font-variant-numeric: tabular-nums; background: rgba(255,255,255,0.05); padding: 8px 16px; border-radius: 6px; display: inline-block; margin-bottom: 16px; border: 1px solid rgba(255,255,255,0.1); }

.sentiment-tags { display: flex; gap: 12px; margin-top: auto; padding-top: 16px; width: 100%; justify-content: center; flex-wrap: wrap; }
.badge { font-size: 10px; font-weight: 700; padding: 8px 14px; border-radius: 6px; letter-spacing: 0.1em; text-transform: uppercase; flex: 1; min-width: 100px; text-align: center; }
.bg-bull { background: rgba(12, 173, 96, 0.1); color: var(--sahi-positive); border: 1px solid rgba(12, 173, 96, 0.3); }
.bg-bear { background: rgba(227, 86, 80, 0.1); color: var(--sahi-negative); border: 1px solid rgba(227, 86, 80, 0.3); }
.bg-flat { background: rgba(255, 255, 255, 0.06); color: var(--text-3); border: 1px solid rgba(255, 255, 255, 0.14); }

.signal-badge { padding: 10px 24px; border-radius: 8px; font-size: 1.1rem; font-weight: 700; text-align: center; letter-spacing: 0.05em; text-transform: uppercase; }
.sb-long { background: rgba(64, 232, 151, 0.15); color: var(--bu-long-build); border: 1px solid rgba(64, 232, 151, 0.4); }
.sb-short { background: rgba(227, 86, 80, 0.15); color: var(--bu-short-build); border: 1px solid rgba(227, 86, 80, 0.4); }
.sb-cover { background: rgba(23, 208, 119, 0.15); color: var(--bu-short-cover); border: 1px solid rgba(23, 208, 119, 0.4); }
.sb-unwind { background: rgba(197, 170, 132, 0.15); color: var(--bu-long-unwind); border: 1px solid rgba(197, 170, 132, 0.4); }
.sb-neutral { background: rgba(127, 246, 188, 0.12); color: var(--sahi-cyan); border: 1px solid rgba(127, 246, 188, 0.35); }

/* Data tables inside guides */
.guide-table-wrap { overflow-x: auto; margin: 40px 0; border: 1px solid var(--border-soft); border-radius: 16px; background: var(--surface); }
.guide-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; min-width: 520px; }
.guide-table th,
.guide-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.guide-table thead th { color: var(--text-1); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; background: rgba(0,0,0,0.3); }
.guide-table tbody tr:last-child td { border-bottom: 0; }
.guide-table td { color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Quiz Section */
.quiz-section { margin-top: 100px; padding: 48px; background: rgba(165, 15, 102, 0.05); border: 1px solid var(--border-glow); border-radius: 24px; }
.quiz-section h2 { margin: 0 0 16px 0; padding: 0; border: none; font-size: 2rem; }
.quiz-section > p { margin-bottom: 40px; font-size: 1.1rem; color: var(--text-3); }
.quiz-q { margin-bottom: 24px; }
.quiz-q h4 { font-size: 1.2rem; margin-bottom: 16px; color: var(--text-1); }
.quiz-opts { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 500px; }
.quiz-btn { display: flex; align-items: center; background: var(--surface); color: var(--text-2); border: 1px solid var(--border-soft); border-radius: 40px; cursor: pointer; font-size: 1.1rem; font-weight: 600; transition: all 0.2s ease; padding: 0; overflow: hidden; font-family: inherit; text-align: left; }
.quiz-btn:hover { background: var(--surface-hover); border-color: rgba(165, 15, 102, 0.4); }
.quiz-btn:focus-visible { outline: 2px solid var(--sahi-cyan); outline-offset: 2px; }
.quiz-btn-letter { display: flex; align-items: center; justify-content: center; background: rgba(165, 15, 102, 0.15); color: #FEA3E5; font-weight: 700; font-size: 1.2rem; width: 60px; height: 60px; border-right: 1px solid var(--border-soft); flex-shrink: 0; transition: all 0.2s ease; }
.quiz-btn-text { padding: 0 24px; flex-grow: 1; text-align: left; }
.quiz-btn.correct { background: rgba(12, 173, 96, 0.1); border-color: var(--sahi-positive); color: var(--sahi-positive); }
.quiz-btn.correct .quiz-btn-letter { background: var(--sahi-positive); color: #0F0F0F; border-right-color: var(--sahi-positive); }
.quiz-btn.incorrect { background: rgba(227, 86, 80, 0.1); border-color: var(--sahi-negative); color: var(--sahi-negative); }
.quiz-btn.incorrect .quiz-btn-letter { background: var(--sahi-negative); color: #FFFFFF; border-right-color: var(--sahi-negative); }
.quiz-btn.reveal { border-style: dashed; border-color: var(--sahi-positive); }
.quiz-feedback { margin-top: 12px; font-size: 0.95rem; font-weight: 600; min-height: 24px; }

/* ── Furniture added for the generated guides ─────────────────────────────── */

/* Breadcrumb, directly under the header */
.guide-crumbs {
    max-width: 1300px;
    margin: 0 auto;
    padding: 28px 20px 0;
    font-size: 0.85rem;
    color: var(--text-3);
}
.guide-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.guide-crumbs a { color: var(--text-3); text-decoration: none; font-weight: 600; }
.guide-crumbs a:hover { color: var(--sahi-cyan); }
.guide-crumbs [aria-current="page"] { color: var(--text-2); }
.guide-crumbs .sep { color: rgba(255,255,255,0.25); }

/* Hero actions — the link back to the live tool is the whole point of a guide */
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 36px; }
.btn-primary,
.btn-ghost {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 26px; border-radius: 40px;
    font-size: 0.95rem; font-weight: 700; text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary { background: var(--sahi-accent); color: #FFFFFF; border: 1px solid var(--sahi-accent); box-shadow: 0 10px 30px rgba(165, 15, 102, 0.35); }
.btn-primary:hover { background: #C80E7D; transform: translateY(-2px); box-shadow: 0 14px 36px rgba(165, 15, 102, 0.45); }
.btn-ghost { background: rgba(255,255,255,0.04); color: var(--text-2); border: 1px solid var(--border-soft); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text-1); border-color: var(--border-glow); }
.btn-primary:focus-visible,
.btn-ghost:focus-visible { outline: 2px solid var(--sahi-cyan); outline-offset: 3px; }

.hero-meta { margin-top: 26px; font-size: 0.82rem; color: rgba(255,255,255,0.4); letter-spacing: 0.04em; }

/* FAQ block on a guide page — same six questions the tool page carries */
.guide-faq { margin-top: 90px; }
.guide-faq h2 { margin-top: 0; }
.guide-q {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--surface);
    margin-bottom: 14px;
    overflow: hidden;
}
.guide-q summary {
    cursor: pointer; list-style: none;
    padding: 20px 24px;
    font-size: 1.05rem; font-weight: 700; color: var(--text-1);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.guide-q summary::-webkit-details-marker { display: none; }
.guide-q summary::after {
    content: '+'; font-size: 1.5rem; font-weight: 400; color: var(--sahi-cyan);
    flex-shrink: 0; line-height: 1; transition: transform 0.2s ease;
}
.guide-q[open] summary::after { transform: rotate(45deg); }
.guide-q summary:hover { background: rgba(255,255,255,0.03); }
.guide-q summary:focus-visible { outline: 2px solid var(--sahi-cyan); outline-offset: -2px; }
.guide-q .guide-a { padding: 0 24px 22px; font-size: 1.02rem; color: var(--text-2); margin: 0; }

/* Card grid — used for "other guides" and for the /guides index */
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 36px 0; }
.guide-card {
    display: flex; flex-direction: column; gap: 10px;
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.guide-card:hover,
.guide-card:focus-visible {
    transform: translateY(-1px);
    border-color: var(--border-glow);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 30px rgba(165, 15, 102, 0.08);
}
.guide-card:focus-visible { outline: 2px solid var(--sahi-cyan); outline-offset: 3px; }
.guide-card__eyebrow { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--sahi-cyan); }
.guide-card__title { font-size: 1.12rem; font-weight: 700; color: var(--text-1); line-height: 1.35; }
.guide-card__desc { font-size: 0.92rem; color: var(--text-3); line-height: 1.6; margin: 0; }
.guide-card__tool { margin-top: auto; padding-top: 12px; font-size: 0.8rem; font-weight: 700; color: rgba(255,255,255,0.4); }
.guide-card[aria-current="page"] { border-color: var(--border-glow); background: rgba(165, 15, 102, 0.08); }

/* "Every guide" strip that closes each guide page */
.guide-more { margin-top: 90px; padding-top: 50px; border-top: 1px solid var(--border-soft); }
.guide-more h2 { margin-top: 0; }
.guide-more__lede { color: var(--text-3); font-size: 1.05rem; }

/* Index / FAQ hub pages use the single-column variant of the layout */
.layout-wrapper--wide { grid-template-columns: 1fr; max-width: 1180px; }
.hub-section { margin-bottom: 20px; }
.hub-section h2 { margin-top: 70px; }
.hub-section:first-of-type h2 { margin-top: 20px; }
.hub-toolline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: -12px 0 26px; font-size: 0.9rem; color: var(--text-3); }
.hub-toolline a { color: var(--sahi-cyan); text-decoration: none; font-weight: 700; }
.hub-toolline a:hover { text-decoration: underline; }

/* ── Blocks borrowed from learn.css ──────────────────────────────────────────
   The "About the tool" spec card, the explore-tools lists and (on the four
   hubs with symbol pages) the live table and A-Z directory all moved here from
   under the dashboard. Their structural CSS is in learn.css, which guide pages
   also link; these rules only reconcile the two type scales — learn.css is built
   for a 15px block, the guides run at 1.15rem.
   ------------------------------------------------------------------------- */
.content-main .sahi-learn__card { margin: 40px 0; padding: 28px; }
.content-main .sahi-learn__cardhead { margin-bottom: 18px; font-size: 0.78rem; }
.content-main .sahi-learn__spec dt { font-size: 0.8rem; }
.content-main .sahi-learn__spec dd { font-size: 0.92rem; }
.content-main .sahi-learn__cardlink { font-size: 0.9rem; }
.content-main .sahi-learn__group { margin: 26px 0 0; }
.content-main .sahi-learn__grouphead {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--text-3); font-weight: 700; margin-bottom: 12px;
}
.content-main .sahi-learn__explore {
    list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0;
}
.content-main .sahi-learn__explore a {
    display: inline-block; padding: 8px 16px; border-radius: 30px;
    border: 1px solid var(--border-soft); background: var(--surface);
    font-size: 0.88rem; font-weight: 600; text-decoration: none; color: var(--text-2);
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.content-main .sahi-learn__explore a:hover { border-color: var(--border-glow); color: var(--text-1); background: var(--surface-hover); }
.content-main .sahi-learn__explore a[aria-current="page"] { border-color: var(--border-glow); color: var(--sahi-cyan); }
.content-main .sahi-learn__block { margin-top: 36px; }
.content-main .sahi-learn__sub { font-size: 0.98rem; color: var(--text-3); }
/* The symbol table and directory are wide; never let them push the page sideways. */
.content-main .sahi-learn__tablewrap { overflow-x: auto; }
.content-main .sahi-learn__table { font-size: 0.95rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   OPTION-CHAIN VISUALS
   Diagrams that carry an explanation the prose alone was making the reader
   assemble in their head: the shape of the board, OI against volume, and what
   each Greek actually responds to.

   All three are real HTML — a <table> and a couple of lists — not images and
   not canvas. The pages are prerendered and read by crawlers with JavaScript
   off, so a diagram that only exists once a script runs is a diagram that is
   invisible to exactly the audience these pages were built for.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Table captions describe the diagram for screen readers and for anyone reading
   the source; they are not part of the visual design. */
.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;
}

/* ── 1. The annotated chain board ───────────────────────────────────────── */

.oc-board {
    margin: 40px 0;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden;
}

.oc-board__head {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px;
    padding: 16px 20px; border-bottom: 1px solid var(--border-soft);
    background: rgba(0, 0, 0, 0.28);
}
.oc-board__title { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-1); }
.oc-board__sub { font-size: 0.85rem; color: var(--text-3); }

/* The board is genuinely wide. Scroll it rather than dropping columns: every
   column is part of what the section is teaching. */
.oc-board__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.oc-board table { width: 100%; border-collapse: collapse; min-width: 660px; font-variant-numeric: tabular-nums; }
.oc-board th, .oc-board td { padding: 9px 12px; text-align: right; font-size: 0.9rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.oc-board tbody tr:last-child td { border-bottom: 0; }

/* Two header rows: the CE / STRIKE / PE banner, then the column names. */
.oc-board__side { text-align: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 12px; }
.oc-board__side--ce { color: var(--toast-negative-text); background: rgba(238, 128, 123, 0.07); }
.oc-board__side--pe { color: var(--toast-positive-text); background: rgba(23, 208, 119, 0.07); }
.oc-board__side--k  { color: var(--text-3); background: rgba(255, 255, 255, 0.04); }
.oc-board thead th { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); background: rgba(0, 0, 0, 0.2); }

/* Strike sits in the middle and is the only column that never moves. */
.oc-board .k {
    text-align: center; font-weight: 700; color: var(--text-1);
    background: rgba(255, 255, 255, 0.04);
    border-left: 1px solid var(--border-soft); border-right: 1px solid var(--border-soft);
}

/* The in-the-money staircase — the whole point of the diagram. */
.oc-board .itm { background: rgba(255, 255, 255, 0.045); color: var(--text-1); }
.oc-board .otm { color: var(--text-3); }

/* The at-the-money row, where the staircase breaks. */
.oc-board tr.is-atm td { background: rgba(165, 15, 102, 0.14); }
.oc-board tr.is-atm .k { background: rgba(165, 15, 102, 0.26); color: #fff; }

/* Spot marker, drawn as a row rather than an overlay so it survives reflow. */
.oc-board tr.oc-spot td {
    padding: 0; border-bottom: 0;
    background: linear-gradient(90deg, transparent, var(--sahi-cyan), transparent);
    height: 2px;
}
.oc-board__spotlabel {
    display: block; padding: 6px 12px; text-align: center;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--sahi-cyan);
}

.oc-board__legend {
    display: flex; flex-wrap: wrap; gap: 10px 20px;
    padding: 14px 20px; border-top: 1px solid var(--border-soft);
    background: rgba(0, 0, 0, 0.18);
    font-size: 0.8rem; color: var(--text-3);
}
.oc-board__key { display: inline-flex; align-items: center; gap: 8px; }
.oc-board__swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border-soft); flex-shrink: 0; }
.oc-board__swatch--itm { background: rgba(255, 255, 255, 0.14); }
.oc-board__swatch--atm { background: rgba(165, 15, 102, 0.5); }
.oc-board__swatch--spot { background: var(--sahi-cyan); height: 3px; border-radius: 2px; }

/* OI bars.
   The real terminal draws a proportional bar behind every open-interest figure,
   and it is the reason "the heaviest strikes stand out at once" is true rather
   than an instruction to squint at seven numbers. The board reproduces it: bars
   grow inward from each side toward the strike column, so the two OI profiles
   face each other and the biggest rungs are visible without reading a digit.

   Width comes from --bar on the cell, so the number and its bar can never
   disagree — there is one source for both. */
.oc-board td.oi { position: relative; isolation: isolate; }
.oc-board td.oi::before {
    content: ''; position: absolute; top: 4px; bottom: 4px;
    width: var(--bar, 0%); border-radius: 4px; z-index: -1;
}
.oc-board td.oi--ce::before { right: 0; background: linear-gradient(270deg, rgba(238, 128, 123, 0.42), rgba(238, 128, 123, 0.10)); }
.oc-board td.oi--pe::before { left: 0;  background: linear-gradient(90deg,  rgba(23, 208, 119, 0.42), rgba(23, 208, 119, 0.10)); }
/* The wall on each side — the single heaviest strike. */
.oc-board td.oi.is-wall { font-weight: 700; color: var(--text-1); }
.oc-board td.oi.is-wall::before { opacity: 1; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }

/* ── 2. Open interest against volume ────────────────────────────────────── */

.oc-compare {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 18px;
    margin: 36px 0;
}
.oc-compare__card {
    padding: 22px; border: 1px solid var(--border-soft); border-radius: 16px; background: var(--surface);
}
.oc-compare__label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--sahi-cyan); }
.oc-compare__card h4 { margin: 10px 0 6px; font-size: 1.08rem; color: var(--text-1); }
.oc-compare__card p { margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--text-3); }

/* Three sessions, so the reader can see one measure carry over and the other reset. */
.oc-days { display: flex; gap: 10px; margin: 18px 0 14px; align-items: flex-end; height: 112px; }
.oc-day { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 100%; }
.oc-day__bar { border-radius: 5px 5px 0 0; min-height: 3px; position: relative; }
/* The figure sits on top of its own bar. A bar whose value you cannot read is a
   shape, not a measurement, and the whole point of the pair is comparing them. */
.oc-day__val { display: block; text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--text-1); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.oc-day__bar--oi { background: linear-gradient(180deg, var(--sahi-cyan), rgba(23, 208, 119, 0.35)); }
.oc-day__bar--vol { background: linear-gradient(180deg, var(--toast-negative-text), rgba(238, 128, 123, 0.3)); }
.oc-day__tick { text-align: center; font-size: 0.68rem; color: var(--text-3); letter-spacing: 0.06em; }

/* ── 3. What each Greek responds to ─────────────────────────────────────── */

.oc-greeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: 16px; margin: 36px 0; }
.oc-greek {
    padding: 20px; border: 1px solid var(--border-soft); border-radius: 16px; background: var(--surface);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.oc-greek:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.oc-greek__sym { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--sahi-cyan); }
.oc-greek__name { margin: 8px 0 2px; font-size: 1rem; font-weight: 700; color: var(--text-1); }
.oc-greek__q { font-size: 0.78rem; color: var(--text-3); font-style: italic; }
.oc-greek__body { margin: 12px 0 0; font-size: 0.9rem; line-height: 1.55; color: var(--text-2); }

/* A meter, not a chart: it shows which strikes a Greek is largest at. */
.oc-greek__meter { display: flex; gap: 3px; align-items: flex-end; height: 34px; margin: 14px 0 8px; }
.oc-greek__meter span { flex: 1; border-radius: 3px 3px 0 0; background: var(--sahi-cyan); opacity: 0.75; min-height: 3px; }
.oc-greek__scale { display: flex; justify-content: space-between; font-size: 0.66rem; color: var(--text-3); letter-spacing: 0.05em; }

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE READING SURFACE

   The desktop contents rail previously kept its 280px column on phones. That
   forced the article into a narrow second column and widened the document to
   almost twice the viewport. On compact screens the contents become a sticky,
   horizontally scrollable chapter rail and the article owns the full width.
   Wide teaching tables keep their own internal scrollers.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    html,
    body { width: 100%; max-width: 100%; overflow-x: clip; }

    header {
        padding: 64px 18px 48px;
        text-align: left;
    }

    .category-tag { margin-bottom: 18px; padding: 6px 13px; font-size: 0.72rem; }
    h1 { max-width: 15ch; margin-bottom: 18px; font-size: clamp(2.15rem, 10vw, 3rem); }
    .hero-subtitle { max-width: 42ch; margin: 0; font-size: 1rem; line-height: 1.65; }
    .hero-actions { justify-content: flex-start; margin-top: 26px; }
    .btn-primary,
    .btn-ghost { min-height: 44px; justify-content: center; padding: 10px 18px; }
    .hero-meta { margin-top: 20px; font-size: 0.72rem; line-height: 1.55; }

    .guide-crumbs { padding: 18px 16px 0; font-size: 0.78rem; }
    .guide-crumbs ol { flex-wrap: nowrap; gap: 7px; overflow-x: auto; scrollbar-width: none; }
    .guide-crumbs ol::-webkit-scrollbar { display: none; }
    .guide-crumbs li { flex: none; }

    .layout-wrapper,
    .layout-wrapper--wide {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        width: 100%;
        max-width: none;
        padding: 24px 16px 80px;
    }

    .toc-container {
        position: sticky;
        z-index: 20;
        top: 0;
        width: calc(100% + 32px);
        max-width: none;
        max-height: none;
        margin: 0 -16px 20px;
        padding: 10px 16px 11px;
        overflow: hidden;
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
        background: color-mix(in srgb, var(--sahi-bg-0) 94%, transparent);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }

    .toc-title { margin: 0 0 7px; font-size: 0.68rem; }
    .toc-nav {
        display: flex;
        flex-direction: row;
        gap: 6px;
        width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: inline proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .toc-nav::-webkit-scrollbar { display: none; }
    .toc-nav a {
        display: inline-flex;
        flex: none;
        align-items: center;
        min-height: 44px;
        padding: 0 13px;
        scroll-snap-align: start;
        border: 1px solid var(--border-soft);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.025);
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .toc-nav a.active { border-color: rgba(127, 246, 188, 0.35); background: rgba(127, 246, 188, 0.08); }
    .toc-nav a.active::before { display: none; }

    .content-main { width: 100%; max-width: 680px; margin: 0 auto; }
    .section-block { scroll-margin-top: 86px; }
    h2 {
        display: block;
        margin: 48px 0 22px;
        padding: 24px 0 14px;
        font-size: clamp(1.65rem, 7.5vw, 2.1rem);
        line-height: 1.18;
        text-wrap: balance;
    }
    .section-block:first-child h2 { margin-top: 0; }
    p { margin-bottom: 20px; font-size: 1rem; line-height: 1.72; }

    .callout-beginner,
    .feature-card,
    .quiz-section,
    .content-main .sahi-learn__card { margin: 28px 0; padding: 20px; border-radius: 14px; }
    .trading-example { margin: 24px 0; padding: 18px; }
    .scenario-grid,
    .guide-cards { grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 26px 0; }
    .guide-card { padding: 20px; }
    .quiz-section { margin-top: 56px; }
    .quiz-section h2 { font-size: 1.65rem; }
    .quiz-btn { min-height: 52px; border-radius: 14px; font-size: 0.95rem; }
    .quiz-btn-letter { width: 50px; height: 50px; font-size: 1rem; }
    .quiz-btn-text { padding: 10px 14px; }

    .jargon::after {
        position: fixed;
        right: 16px;
        bottom: 20px;
        left: 16px;
        max-width: none;
        padding: 12px 14px;
        transform: translateY(8px);
        white-space: normal;
    }
    .jargon:hover::after,
    .jargon:focus-visible::after { transform: translateY(0); }

    .guide-table-wrap,
    .oc-board { max-width: 100%; margin: 28px 0; }
    .guide-table-wrap,
    .oc-board__scroll { overscroll-behavior-x: contain; scroll-snap-type: inline proximity; }
    .oc-board__head { padding: 14px 16px; }
    .oc-board__legend { padding: 12px 16px; }
    .guide-q summary { min-height: 52px; padding: 15px 17px; font-size: 0.96rem; }
    .guide-q .guide-a { padding: 0 17px 18px; font-size: 0.95rem; }
}

@media (max-width: 380px) {
    header { padding-inline: 14px; }
    .layout-wrapper,
    .layout-wrapper--wide { padding-inline: 14px; }
    .toc-container { width: calc(100% + 28px); margin-inline: -14px; padding-inline: 14px; }
    .hero-actions > a { width: 100%; }
    .cell-col { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .oc-greek:hover { transform: none; }
}
