/* Guides (G1) — shared stylesheet for awardwise.ai/guides/*.
 *
 * Dark brand skin: matches the redesigned landing page + the app shell —
 * dark --aw-ground surfaces, the --aw-brand violet two-tone wordmark, and
 * --aw-accent blue links. tokens.css (loaded FIRST on every guide) is the
 * single source of truth for the palette, so a guide can never drift a
 * design generation behind the product it sells. The live figures embed the
 * real app components, which are already dark — on a dark page they read as a
 * product surface that happens to be alive, no light-frame mismatch.
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--aw-font-sans);
    line-height: 1.7;
    color: var(--aw-ink);
    background:
        radial-gradient(1100px 620px at 78% -8%, rgba(139, 108, 240, 0.20), transparent 60%),
        radial-gradient(880px 520px at 8% 12%, rgba(90, 168, 255, 0.14), transparent 55%),
        var(--aw-ground);
    min-height: 100vh;
    padding: 24px 16px 64px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.guide-shell {
    max-width: 960px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--aw-surface), var(--aw-ground-2));
    border: 1px solid var(--aw-hairline-strong);
    border-radius: 20px;
    box-shadow: var(--aw-shadow);
    padding: 48px 40px;
}

/* Top header row: the wordmark (home link) + an explicit back affordance.
 * Both point at "/" so every guide has an obvious way back to the landing
 * page — the wordmark for recognition, the "← Back" link for clarity. */
.guide-topnav {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px 20px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.guide-brand {
    display: inline-block;
    font-size: 26px;
    font-weight: 800;
    color: var(--aw-ink);
    letter-spacing: -0.3px;
    text-decoration: none;
}

/* Two-tone wordmark, matching the landing page's Award<span>Wise</span>. */
.guide-brand .aw-wise {
    color: var(--aw-brand);
}

.guide-home {
    font-size: 14px;
    font-weight: 600;
    color: var(--aw-accent);
    text-decoration: none;
    white-space: nowrap;
}

.guide-home:hover {
    text-decoration: underline;
}

.guide-crumbs {
    font-size: 14px;
    color: var(--aw-muted);
    margin-bottom: 28px;
}

.guide-crumbs a {
    color: var(--aw-accent);
    text-decoration: none;
}

.guide-crumbs a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 34px;
    color: var(--aw-ink);
    font-weight: 780;
    line-height: 1.25;
    letter-spacing: -0.6px;
    margin-bottom: 10px;
}

.guide-dek {
    font-size: 18px;
    color: var(--aw-ink-dim);
    margin-bottom: 32px;
}

h2 {
    font-size: 24px;
    color: var(--aw-ink);
    letter-spacing: -0.3px;
    margin: 36px 0 12px;
}

h3 {
    font-size: 18px;
    color: var(--aw-ink);
    letter-spacing: -0.2px;
    margin: 26px 0 8px;
}

p,
ul,
ol {
    margin-bottom: 16px;
    color: var(--aw-ink-dim);
}

ul,
ol {
    padding-left: 24px;
}

a {
    color: var(--aw-accent);
}

strong {
    color: var(--aw-ink);
}

em {
    color: var(--aw-ink);
    font-style: italic;
}

code {
    font-family: var(--aw-font-mono);
    font-size: 0.9em;
    background: var(--aw-rail);
    border: 1px solid var(--aw-hairline);
    border-radius: var(--aw-radius-sm);
    padding: 1px 6px;
    color: var(--aw-ink);
}

/* Guide cards on the index page. */
.guide-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 14px;
}

.guide-card {
    display: block;
    background: var(--aw-surface);
    border: 1px solid var(--aw-hairline);
    border-radius: 14px;
    padding: 18px 20px;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.guide-card:hover {
    border-color: var(--aw-brand);
    box-shadow: 0 14px 34px -22px rgba(139, 108, 240, 0.75);
    transform: translateY(-2px);
}

.guide-card-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--aw-ink);
    margin-bottom: 4px;
}

.guide-card-sub {
    display: block;
    font-size: 15px;
    color: var(--aw-muted);
}

.guide-card.is-coming {
    opacity: 0.65;
    pointer-events: none;
}

.guide-card.is-coming .guide-card-title::after {
    content: " · coming soon";
    font-size: 13px;
    font-weight: 600;
    color: var(--aw-muted);
}

.guide-cta {
    display: inline-block;
    margin-top: 28px;
    background: var(--aw-accent-btn);
    color: var(--aw-on-accent);
    font-weight: 700;
    padding: 12px 22px;
    border-radius: var(--aw-radius-pill);
    text-decoration: none;
    box-shadow: 0 6px 18px -6px rgba(47, 111, 237, 0.7);
    transition: background 0.15s ease, transform 0.15s ease;
}

.guide-cta:hover {
    background: var(--aw-accent-btn-hover);
    transform: translateY(-1px);
}

.guide-footer {
    max-width: 960px;
    margin: 24px auto 0;
    text-align: center;
    font-size: 13px;
    color: var(--aw-muted);
}

.guide-footer a {
    color: var(--aw-accent);
    text-decoration: none;
}

/* Reassert document scroll on mobile. Guides borrow chat.css (for the live
 * figures' bubble/table styling), but chat.css's ≤700px app-shell rule locks
 * the whole document — `html, body { height: 100%; overflow: hidden }` — because
 * the chat app is a fixed 100dvh column that never page-scrolls. A guide is a
 * normal long article and MUST scroll. guides.css only ever loads on guide
 * pages, so this can't affect the app; !important is required because chat.css
 * is linked AFTER guides.css and would otherwise win the cascade. */
@media (max-width: 700px) {
    html,
    body {
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 480px) {
    .guide-shell {
        padding: 28px 18px;
        border-radius: 14px;
    }

    h1 {
        font-size: 26px;
    }
}

/* Static figure block (formula / worked-example math) — a monospace inset panel.
 * Distinct from .guide-figure-live, which embeds real app components. */
.guide-figure {
    border: 1px solid var(--aw-hairline);
    border-radius: var(--aw-radius);
    padding: 18px 20px;
    margin: 16px 0;
    font-family: var(--aw-font-mono);
    line-height: 1.75;
}

/* Live figures: the article embeds the REAL app components (dark theme) on
 * the dark page — the wrapper gives them a slightly distinct ground so the
 * live product surface reads as an inset panel, not part of the article body. */
.guide-figure-live {
    background: var(--aw-ground-2);
    border: 1px solid var(--aw-hairline-strong);
    border-radius: 14px;
    padding: 18px;
    margin: 24px 0;
    overflow-x: auto;
}

/* The app's table layout is VIEWPORT-responsive (≤700px = card layout),
 * not container-responsive: on a desktop viewport a narrow figure box
 * crushes the percentage-width table into overlapping text (owner
 * screenshots, 2026-07-23). Lay the component out at an app-like width and
 * let the figure scroll horizontally instead — the wrapper already has
 * overflow-x: auto. On mobile viewports the app's own card layout takes
 * over and needs no minimum. */
/* ONE scroll surface (copilot round 1): the table's own container scrolls;
 * the chat chain sizes naturally, so no nested horizontal scrollbars. The
 * bubble chain narrows at every level (.bubble caps at 95%), so the FLOOR
 * must sit on the table itself.
 *
 * NOTE: this 1000px floor is only for the percentage-width .flight-table. The
 * redesigned .shortlist-card-table is content-sized (table-layout:fixed with a
 * definite JS width) and MUST NOT get a floor — it would stretch the columns
 * back out and waste horizontal space (owner, 2026-08). It scrolls via its own
 * .shortlist-card-scroll wrapper. */
.guide-figure-live table.flight-table {
    min-width: 1000px;
}

.guide-figure-live .flight-table-container,
.guide-figure-live .shortlist-card-scroll {
    overflow-x: auto;
}

@media (max-width: 700px) {
    .guide-figure-live .chat-container {
        min-width: 0;
        max-width: 100%;
    }

    .guide-figure-live table.flight-table {
        min-width: 0;
    }
}

/* Screenshot figures. The live figures above embed real components; a few
 * surfaces (the Trips page) need a real trip's data to render at all, so those
 * articles ship captures instead. Each <img> carries its intrinsic width/height
 * attributes, so `max-width: 100%` caps a wide capture at the column while a
 * narrow one renders at its native size rather than being upscaled to mush —
 * and the reserved box means no layout shift as they lazy-load. */
.guide-shot {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px 0;
    border: 1px solid var(--aw-hairline-strong);
    border-radius: 14px;
    background: var(--aw-ground-2);
}

.guide-figure-caption {
    font-size: 13px;
    color: var(--aw-muted);
    margin: -14px 0 24px;
}

.guide-figure-fallback {
    color: var(--aw-muted);
    margin: 0;
}
