/* ==========================================================================
   AF7 — the guided experience (/app)

   A second, deliberately different design language from the Terminal Design
   System in styles.css. "Module": every agent is a well-made device. Brushed
   aluminium panels that stand on a hard bottom edge, a dark screen for the
   moments that matter (the hero, the price), keys that sink when pressed,
   segmented LED meters, a wide grotesque (Archivo) and monospaced readouts
   (DM Mono). It is used ONLY by templates/guided/* and static/js/guided/*,
   every class is prefixed `g-`, and nothing here may be used on a terminal
   page (nor may a guided page load styles.css). See CLAUDE.md §4.

   Colour has jobs, and they do not overlap:
     orange  (--g-action)   the key to press, the selected thing, progress
     cobalt  (--g-accent)   the focus ring, small "brand" tags
     kinds   (--g-kind-*)   expert cobalt · council orange · team yellow —
                            the identity of an agent, nothing else
     green / red / amber    up / down / needs attention — never decoration

   Theming is attribute-based: light is the default, [data-g-theme="dark"] on
   <html> overrides it (set before first paint by the inline script in
   templates/guided/base.html).
   ========================================================================== */

:root {
    --g-bg: #E2E3DE;                 /* aluminium */
    --g-surface: #F5F5F2;            /* a panel */
    --g-sunken: #ECEDE8;             /* a key at rest, a well */
    --g-ink: #141513;
    --g-muted: #575A52;
    --g-line: #CDCFC7;
    --g-line-strong: #B4B7AE;
    --g-edge: #B4B7AE;               /* the hard bottom edge things stand on */
    --g-screw: #D3D5CE;

    --g-action: #FF5B1F;
    --g-action-ink: #141513;         /* text on an orange fill */
    --g-action-edge: #B53A0D;        /* the edge an orange key stands on */
    --g-action-soft: #FFE5D9;

    --g-accent: #2549E8;             /* as TEXT on a panel it is >= 4.5:1 */
    --g-accent-ink: #FFFFFF;
    --g-accent-soft: #E3E8FF;
    --g-focus: #2549E8;

    --g-kind-expert: #2D5BFF;
    --g-kind-expert-ink: #FFFFFF;
    --g-kind-council: #FF5B1F;
    --g-kind-council-ink: #141513;
    --g-kind-team: #FFC21A;
    --g-kind-team-ink: #141513;
    --g-kind-grid: #7B3FF2;          /* a grid is not an agent: violet, white ink */

    /* The screen: hero, price panel, toasts, the wallet readout. */
    --g-screen: #171915;
    --g-screen-bezel: #22251F;
    --g-screen-ink: #F0F0EA;
    --g-screen-muted: #A4A79C;
    --g-screen-line: #3A3D35;

    --g-up: #0F7B45;
    --g-up-soft: #DDF2E4;
    --g-down: #C42B1C;
    --g-down-soft: #FBE3DF;
    --g-warn: #7A5200;
    --g-warn-soft: #FFEDC2;
    --g-chart-line: #141513;

    --g-scrim: rgba(20, 21, 19, 0.5);

    --g-radius: 20px;
    --g-radius-sm: 14px;
    --g-radius-xs: 9px;
    --g-font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --g-font-num: 'DM Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --g-wide: 125%;                  /* font-stretch of a headline */
    color-scheme: light;
}

:root[data-g-theme="dark"] {
    --g-bg: #121311;
    --g-surface: #1C1D1A;
    --g-sunken: #262824;
    --g-ink: #F0F0EA;
    --g-muted: #A4A79C;
    --g-line: #2E302B;
    --g-line-strong: #43463F;
    --g-edge: #0A0B09;
    --g-screw: #33362F;

    --g-action-edge: #8F2C07;
    --g-action-soft: #3A1C10;

    --g-accent: #8BA3FF;
    --g-accent-ink: #141513;
    --g-accent-soft: #1E2647;
    --g-focus: #8BA3FF;

    --g-kind-grid: #8F5CFF;

    --g-screen: #0A0B09;
    --g-screen-bezel: #1C1D1A;

    --g-up: #5BD68F;
    --g-up-soft: #12301F;
    --g-down: #FF8A78;
    --g-down-soft: #3A1915;
    --g-warn: #F5C563;
    --g-warn-soft: #33280D;
    --g-chart-line: #F0F0EA;

    --g-scrim: rgba(0, 0, 0, 0.65);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

.g-body {
    margin: 0;
    min-height: 100vh;
    background: var(--g-bg);
    color: var(--g-ink);
    font-family: var(--g-font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: 92px;            /* room for the mobile tab bar */
}

/* :where() keeps these resets at element specificity, so any class below
   that sets a colour or a font wins over them. */
:where(.g-body) a { color: inherit; }
:where(.g-body) button { font: inherit; color: inherit; }
.g-body :focus-visible { outline: 3px solid var(--g-focus); outline-offset: 2px; border-radius: 8px; }

.g-hidden { display: none !important; }
.g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Top bar ------------------------------------------------------------ */

.g-top {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--g-surface);
    color: var(--g-ink);
    border-bottom: 1px solid var(--g-line);
    box-shadow: 0 3px 0 var(--g-line);
}
.g-top-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.g-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.g-brand img { width: 32px; height: 32px; display: block; border-radius: 9px; }
.g-brand-name { font-size: 18px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; }
/* The nav is a segmented switch: one key is up, the rest sit in the well. */
.g-nav { display: none; gap: 3px; margin-left: 10px; padding: 4px; border-radius: 13px; background: var(--g-bg); }
.g-nav-link {
    padding: 7px 15px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--g-muted);
    font-weight: 600;
    font-size: 14.5px;
}
.g-nav-link:hover { color: var(--g-ink); }
.g-nav-link.is-active { color: var(--g-ink); background: var(--g-surface); box-shadow: 0 2px 0 var(--g-line-strong); }
.g-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
/* The wallet is a little screen. */
.g-wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 14px;
    border-radius: 11px;
    background: var(--g-screen);
    box-shadow: inset 0 0 0 3px var(--g-screen-bezel);
    color: var(--g-screen-ink);
    text-decoration: none;
    font-family: var(--g-font-num);
    font-weight: 500;
    font-size: 14px;
}
.g-wallet-pill:hover { box-shadow: inset 0 0 0 3px var(--g-action); }
.g-wallet-pill-label { color: var(--g-screen-muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
/* A phone has no room for the word; the amount and the Wallet tab say it. */
@media (max-width: 440px) {
    .g-top-inner { gap: 8px; padding: 10px 16px; }
    .g-top-right { gap: 8px; }
    .g-wallet-pill { padding: 6px 11px; }
    .g-wallet-pill-label { display: none; }
}
/* The narrowest phones: the mark alone is the brand (the link keeps its name). */
@media (max-width: 380px) {
    .g-brand-name { display: none; }
}
.g-icon-btn {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--g-line-strong);
    border-radius: 11px;
    background: var(--g-sunken);
    box-shadow: 0 3px 0 var(--g-edge);
    color: var(--g-ink);
    cursor: pointer;
    transition: transform 0.07s ease, box-shadow 0.07s ease;
}
.g-icon-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--g-edge); }
.g-menu-wrap { position: relative; }
.g-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    min-width: 240px;
    padding: 8px;
    background: var(--g-surface);
    color: var(--g-ink);
    border: 1px solid var(--g-line-strong);
    border-radius: var(--g-radius-sm);
    box-shadow: 0 5px 0 var(--g-edge), 0 18px 40px rgba(0, 0, 0, 0.14);
}
.g-menu-user { padding: 8px 12px 10px; color: var(--g-muted); font-family: var(--g-font-num); font-size: 12px; border-bottom: 1px solid var(--g-line); margin-bottom: 6px; }
.g-menu-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 0;
    border-radius: var(--g-radius-xs);
    background: none;
    text-align: left;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.g-menu-item:hover { background: var(--g-sunken); }
.g-menu-note { display: block; color: var(--g-muted); font-size: 12px; font-weight: 400; }
.g-menu-item-stack { flex-direction: column; align-items: flex-start; gap: 2px; }
.g-menu-wrap form { margin: 0; }

/* ---- Bottom tab bar (mobile) ------------------------------------------- */

.g-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--g-surface);
    border-top: 1px solid var(--g-line-strong);
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
}
.g-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 0;
    text-decoration: none;
    color: var(--g-muted);
    font-size: 12px;
    font-weight: 600;
}
.g-tab.is-active { color: var(--g-ink); }
.g-tab.is-active .g-tab-icon { background: var(--g-action); color: var(--g-action-ink); box-shadow: 0 3px 0 var(--g-action-edge); }
.g-tab-icon { width: 48px; height: 30px; display: grid; place-items: center; border-radius: 10px; }

@media (min-width: 760px) {
    .g-body { padding-bottom: 40px; }
    .g-nav { display: flex; }
    .g-tabs { display: none; }
}

/* ---- Page scaffolding ---------------------------------------------------- */

.g-main { max-width: 1080px; margin: 0 auto; padding: 32px 20px 40px; }
.g-narrow { max-width: 720px; margin: 0 auto; }
.g-section { margin-top: 42px; }
.g-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.g-section-head > a, .g-section-head > .g-link { white-space: nowrap; flex: none; }

.g-h1 { font-weight: 900; font-stretch: var(--g-wide); font-size: clamp(28px, 5vw, 44px); line-height: 1.04; letter-spacing: -0.04em; margin: 0; text-wrap: balance; }
.g-h2 { font-weight: 800; font-stretch: var(--g-wide); font-size: clamp(20px, 4.8vw, 23px); line-height: 1.2; letter-spacing: -0.03em; margin: 0; }
.g-h3 { font-size: 17px; font-weight: 800; font-stretch: 112%; line-height: 1.35; margin: 0; }
.g-h3.g-section { margin-top: 32px; }
.g-lede { font-size: 18px; color: var(--g-muted); margin: 12px 0 0; max-width: 60ch; }
.g-muted { color: var(--g-muted); }
.g-small { font-size: 14px; }
.g-eyebrow { font-family: var(--g-font-num); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--g-muted); margin: 0 0 8px; }
.g-num { font-family: var(--g-font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.g-up { color: var(--g-up); }
.g-down { color: var(--g-down); }
.g-link { color: var(--g-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--g-action); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.g-link:hover { text-decoration-thickness: 3px; }

/* ---- Buttons -------------------------------------------------------------
   A button is a key: it stands on a hard edge and sinks onto it when pressed. */

.g-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 9px 20px;
    border: 1px solid var(--g-line-strong);
    border-radius: var(--g-radius-sm);
    background: var(--g-sunken);
    box-shadow: 0 4px 0 var(--g-edge);
    color: var(--g-ink);
    font-weight: 800;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.07s ease, box-shadow 0.07s ease, background 0.12s ease;
}
.g-btn:hover { background: var(--g-surface); }
.g-btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--g-edge); }
.g-btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 var(--g-edge); }
.g-btn-primary { background: var(--g-action); border-color: var(--g-action-edge); box-shadow: 0 4px 0 var(--g-action-edge); color: var(--g-action-ink); }
.g-btn-primary:hover { background: #FF6A33; }
.g-btn-primary:active { box-shadow: 0 0 0 var(--g-action-edge); }
.g-btn-primary[disabled] { box-shadow: 0 4px 0 var(--g-action-edge); }
.g-btn-quiet { border-color: transparent; background: transparent; box-shadow: none; color: var(--g-muted); }
.g-btn-quiet:hover { background: var(--g-sunken); color: var(--g-ink); }
.g-btn-quiet:active { transform: none; box-shadow: none; }
.g-btn-sm { min-height: 36px; padding: 5px 14px; font-size: 14px; border-radius: 11px; box-shadow: 0 3px 0 var(--g-edge); }
.g-btn-sm.g-btn-primary { box-shadow: 0 3px 0 var(--g-action-edge); }
.g-btn-sm:active { transform: translateY(3px); }
.g-btn-block { width: 100%; margin-top: 16px; }
.g-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- Panels (cards) ------------------------------------------------------ */

.g-card {
    background: var(--g-surface);
    border: 1px solid var(--g-line);
    border-radius: var(--g-radius);
    box-shadow: 0 4px 0 var(--g-line-strong);
    padding: 22px;
}
.g-card-flat { box-shadow: none; }
.g-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .g-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .g-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* The screen: the hero, the price panel, a call to action. Inside it the
   panel tokens are re-pointed at the screen's own, so text, lines, keys and
   links read correctly on the dark glass without a second set of rules. */
.g-hero, .g-card-tint {
    --g-ink: var(--g-screen-ink);
    --g-muted: var(--g-screen-muted);
    --g-line: var(--g-screen-line);
    --g-line-strong: var(--g-screen-line);
    --g-surface: var(--g-screen-bezel);
    --g-sunken: var(--g-screen-bezel);
    --g-edge: #000000;
    --g-focus: var(--g-action);
    background: var(--g-screen);
    border: 1px solid var(--g-screen);
    box-shadow: inset 0 0 0 6px var(--g-screen-bezel), 0 4px 0 var(--g-line-strong);
    color: var(--g-ink);
}
:root[data-g-theme="dark"] .g-hero, :root[data-g-theme="dark"] .g-card-tint { border-color: #2E302B; box-shadow: inset 0 0 0 6px var(--g-screen-bezel); }
.g-card-tint { padding: 26px; }
.g-card-tint > * + * { margin-top: 10px; margin-bottom: 0; }
.g-card-tint > .g-actions { margin-top: 18px; }

/* ---- Chips & badges ------------------------------------------------------ */

.g-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--g-sunken);
    color: var(--g-ink);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.g-chip-up { background: var(--g-up-soft); color: var(--g-up); }
.g-chip-down { background: var(--g-down-soft); color: var(--g-down); }
.g-chip-warn { background: var(--g-warn-soft); color: var(--g-warn); }
.g-chip-brand { background: var(--g-accent-soft); color: var(--g-accent); }
/* A status light. */
.g-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 22%, transparent); }
.g-dot-live { animation: g-pulse 1.8s ease-in-out infinite; }
@keyframes g-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.g-filter { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: var(--g-sunken); }
.g-filter-btn { border: 0; background: transparent; border-radius: 10px; padding: 7px 15px; font-size: 14px; font-weight: 700; color: var(--g-muted); cursor: pointer; }
.g-filter-btn:hover { color: var(--g-ink); }
.g-filter-btn.is-active { background: var(--g-surface); color: var(--g-ink); box-shadow: 0 2px 0 var(--g-line-strong); }

/* ---- Agent card: a module ------------------------------------------------ */

.g-agent { position: relative; display: flex; flex-direction: column; gap: 14px; text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease; }
/* A grid of agent cards lines up PART BY PART: each card spans the same nine
   row tracks (subgrid), so the price screens, stories, open trades, stats and
   footers of cards side by side sit on the same lines, however long a name is.
   Every part has a fixed track; a part a card does not have leaves its track
   empty. Spacing between parts is a margin, never a gap, so an empty track is
   zero high. */
.g-cards { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 20px; margin-bottom: -20px; }
@media (min-width: 700px) { .g-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .g-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.g-cards > * { margin-bottom: 20px; }
.g-cards > .g-agent { display: grid; grid-row: span 9; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
.g-cards > .g-agent > * { margin-top: 14px; min-width: 0; }
.g-cards > .g-agent > .g-agent-head { grid-row: 1; margin-top: 0; }
.g-cards > .g-agent > .g-ticker { grid-row: 2; align-self: start; }
.g-cards > .g-agent > .g-session { grid-row: 3; }
.g-cards > .g-agent > .g-agent-story { grid-row: 4; }
.g-cards > .g-agent > .g-live-trade { grid-row: 5; align-self: start; }
.g-cards > .g-agent > .g-stats { grid-row: 6; align-self: start; }
.g-cards > .g-agent > .g-yours { grid-row: 7; align-self: start; }
.g-cards > .g-agent > .g-agent-foot { grid-row: 8; align-self: end; }
.g-cards > .g-agent > .g-actions { grid-row: 9; }
/* Two screws hold the panel on. */
.g-agent::before, .g-agent::after { content: ''; position: absolute; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--g-screw); border: 1px solid var(--g-line-strong); }
.g-agent::before { left: 9px; }
.g-agent::after { right: 9px; }
a.g-agent:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--g-line-strong); }
a.g-agent:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--g-line-strong); }
/* The name keeps a readable width; in a narrow card the mood chip drops to
   its own line instead of squeezing the name into one-letter rows. */
.g-agent-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; }
/* Each kind of agent has its own colour — its identity, nothing else. */
.g-glyph {
    width: 48px;
    height: 48px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--g-sunken);
    color: var(--g-ink);
}
.g-glyph-expert { background: var(--g-kind-expert); color: var(--g-kind-expert-ink); }
.g-glyph-council { background: var(--g-kind-council); color: var(--g-kind-council-ink); }
.g-glyph-team { background: var(--g-kind-team); color: var(--g-kind-team-ink); }
.g-glyph-lg { width: 68px; height: 68px; border-radius: 18px; }
.g-agent-id { min-width: 0; flex: 1 1 150px; }
.g-agent-name { font-weight: 800; font-stretch: 112%; font-size: 17px; line-height: 1.3; overflow-wrap: break-word; }
a.g-agent-name { text-decoration: none; }
a.g-agent-name:hover { text-decoration: underline; text-decoration-color: var(--g-action); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.g-agent-meta { color: var(--g-muted); font-size: 13.5px; }
.g-agent-headline { font-size: 19px; font-weight: 800; font-stretch: 112%; line-height: 1.25; letter-spacing: -0.02em; margin: 0; }
.g-agent-summary { color: var(--g-muted); font-size: 14.5px; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.g-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--g-sunken); }
.g-stat-label { font-size: 12px; color: var(--g-muted); white-space: nowrap; }
.g-stat-value { font-family: var(--g-font-num); font-weight: 500; font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
/* A follower's own practice copy, set apart from the agent's record above it. */
.g-yours { display: grid; gap: 8px; }
.g-yours-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 14px; }
.g-yours-card { display: grid; gap: 18px 28px; align-items: start; margin-top: 24px; }
@media (min-width: 860px) { .g-yours-card { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); } }
.g-yours-summary { display: grid; gap: 14px; }
.g-yours-summary .g-section-head { margin-bottom: 0; }
.g-agent-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--g-muted); font-size: 13px; margin-top: auto; }
.g-agent-foot-right { margin-left: auto; }

/* ---- Getting-started journey -------------------------------------------- */

.g-journey-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
/* Meters are segmented, like an LED bar. */
.g-progress { height: 12px; border-radius: 4px; background: var(--g-sunken); overflow: hidden; margin: 14px 0 6px; }
.g-progress-bar { height: 100%; background: repeating-linear-gradient(90deg, var(--g-action) 0 10px, transparent 10px 13px); transition: width 0.4s ease; }
.g-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; }
.g-step { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: var(--g-radius-sm); text-decoration: none; }
a.g-step:hover { background: var(--g-sunken); }
.g-step-mark { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 1px solid var(--g-line-strong); background: var(--g-sunken); box-shadow: 0 2px 0 var(--g-edge); display: grid; place-items: center; margin-top: 1px; }
.g-step.is-done .g-step-mark { background: var(--g-up); border-color: var(--g-up); color: var(--g-surface); box-shadow: none; }
.g-step.is-done .g-step-title { color: var(--g-muted); text-decoration: line-through; }
.g-step.is-next .g-step-mark { border-color: var(--g-action-edge); background: var(--g-action); box-shadow: 0 2px 0 var(--g-action-edge); }
.g-step-title { font-weight: 700; }
.g-step-hint { color: var(--g-muted); font-size: 14px; }

/* ---- Feed / timeline ----------------------------------------------------- */

.g-day { font-family: var(--g-font-num); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--g-muted); margin: 24px 0 10px; }
.g-day:first-child { margin-top: 0; }
.g-feed { display: grid; gap: 10px; }
.g-event { display: flex; gap: 14px; padding: 16px 18px; background: var(--g-surface); border: 1px solid var(--g-line); border-radius: 16px; box-shadow: 0 3px 0 var(--g-line); text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease; }
a.g-event:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--g-line-strong); }
.g-event-icon { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--g-sunken); color: var(--g-muted); }
.g-event-icon.is-up { background: var(--g-up-soft); color: var(--g-up); }
.g-event-icon.is-down { background: var(--g-down-soft); color: var(--g-down); }
.g-event-icon.is-warn { background: var(--g-warn-soft); color: var(--g-warn); }
.g-event-main { min-width: 0; flex: 1; }
.g-event-headline { font-weight: 700; line-height: 1.4; }
.g-event-body { color: var(--g-muted); font-size: 14.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.g-event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--g-muted); font-size: 13px; margin-top: 6px; }
.g-new { background: var(--g-action); color: var(--g-action-ink); font-family: var(--g-font-num); font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 5px; }

/* ---- Hero / empty states ------------------------------------------------- */

.g-hero { padding: 44px 28px; text-align: center; border-radius: 24px; }
.g-hero > .g-glyph { margin: 0 auto 18px; }
.g-hero .g-lede { margin-left: auto; margin-right: auto; }
.g-hero .g-actions { justify-content: center; margin-top: 24px; }
.g-empty { padding: 28px; text-align: center; color: var(--g-muted); border: 1.5px dashed var(--g-line-strong); border-radius: var(--g-radius); }
.g-note { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--g-radius-sm); background: var(--g-sunken); font-size: 14.5px; }
.g-list + .g-note { margin-top: 16px; }
.g-note-warn { background: var(--g-warn-soft); color: var(--g-warn); }
.g-note-good { background: var(--g-up-soft); color: var(--g-up); }
.g-note-bad { background: var(--g-down-soft); color: var(--g-down); }
.g-note strong { color: inherit; }
.g-skeleton { border-radius: var(--g-radius); min-height: 150px; background: linear-gradient(90deg, var(--g-sunken) 25%, var(--g-surface) 50%, var(--g-sunken) 75%); background-size: 200% 100%; animation: g-shimmer 1.4s linear infinite; }
@keyframes g-shimmer { to { background-position: -200% 0; } }

/* ---- Agent page ---------------------------------------------------------- */

.g-agent-hero { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.g-agent-hero-main { flex: 1; min-width: 240px; }
/* What the agent is doing (chips) and what you can do with it (small keys) are
   two things, so they do not share a row: the keys sit to the right of the
   title, or under it on a narrow screen. */
.g-agent-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.g-agent-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; padding-top: 4px; }
.g-back { display: inline-flex; align-items: center; gap: 6px; color: var(--g-muted); text-decoration: none; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.g-back:hover { color: var(--g-ink); }
/* Agent page board. The columns are halves on the same 20px gap as the four
   result tiles above, so the column edge continues a tile edge. Cards sit in
   rows of neighbours and stretch to the row: each card shares its top or its
   bottom edge with the card beside it. The areas follow which cards are shown
   (an open trade, the voices, a team's chat come and go with the story). */
.g-board { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
.g-board + .g-board { margin-top: 20px; }
.g-b-decision { grid-area: decision; }
.g-b-chart { grid-area: chart; }
.g-b-open { grid-area: open; }
.g-b-voices { grid-area: voices; }
.g-b-chat { grid-area: chat; }
.g-b-trades { grid-area: trades; }
.g-b-about { grid-area: about; }
@media (max-width: 899.98px) { .g-board > .g-card { grid-area: auto; } }
/* A card stretched to its row keeps its waiting message filling the space. */
.g-b-chart { display: flex; flex-direction: column; }
.g-b-chart > .g-empty { flex: 1; display: grid; place-items: center; }
@media (min-width: 900px) {
    .g-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-board-top { grid-template-areas: "decision chart" "decision open"; grid-template-rows: auto 1fr; }
    .g-board-top:has(> .g-b-open.g-hidden) { grid-template-areas: "decision chart"; grid-template-rows: auto; }
    .g-board-rest { grid-template-areas: "voices trades" "chat about"; }
    .g-board-rest:has(> .g-b-chat.g-hidden) { grid-template-areas: "voices trades" "voices about"; grid-template-rows: auto 1fr; }
    .g-board-rest:has(> .g-b-voices.g-hidden) { grid-template-areas: "chat trades" "chat about"; grid-template-rows: auto 1fr; }
    .g-board-rest:has(> .g-b-voices.g-hidden):has(> .g-b-chat.g-hidden) { grid-template-areas: "trades about"; grid-template-rows: auto; }
}
.g-decision { font-size: 38px; font-weight: 900; font-stretch: var(--g-wide); line-height: 1.02; letter-spacing: -0.04em; margin: 4px 0 0; }
.g-meter { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--g-muted); }
.g-meter-track { flex: 1; max-width: 200px; height: 14px; border-radius: 4px; background: var(--g-sunken); overflow: hidden; }
.g-meter-fill { height: 100%; background: repeating-linear-gradient(90deg, var(--g-action) 0 6px, transparent 6px 9px); }
.g-plan { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; }
.g-plan-row { display: flex; gap: 12px; align-items: baseline; }
.g-plan-row dt { flex: none; width: 110px; color: var(--g-muted); font-size: 14px; }
.g-plan-row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.g-list { margin: 10px 0 0; padding-left: 20px; color: var(--g-muted); font-size: 14.5px; }
.g-list li + li { margin-top: 4px; }
.g-list li::marker { color: var(--g-action); }
/* A sub-heading inside a card, after the plan rows or a paragraph. */
.g-subhead { margin-top: 22px; }
.g-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (min-width: 560px) { .g-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.g-tile { padding: 14px 16px; border-radius: 16px; background: var(--g-surface); border: 1px solid var(--g-line); box-shadow: 0 4px 0 var(--g-line-strong); }
.g-tile-label { font-family: var(--g-font-num); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--g-muted); }
.g-tile-value { font-family: var(--g-font-num); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; line-height: 1.35; }

.g-voices { display: grid; gap: 14px; margin-top: 14px; }
.g-voice { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; }
/* The avatar stands beside the bubble (not the name line above it), so the two
   boxes share their top edge. */
.g-voice-main { display: contents; }
.g-voice > .g-avatar { grid-column: 1; grid-row: 2; margin-top: 4px; }
.g-voice-main > * { grid-column: 2; }
.g-avatar { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--g-sunken); border: 1px solid var(--g-line); font-family: var(--g-font-num); font-weight: 500; font-size: 13px; }
.g-voice.is-decider .g-avatar { background: var(--g-action); border-color: var(--g-action-edge); color: var(--g-action-ink); }
.g-voice-name { font-weight: 800; font-size: 14.5px; }
.g-voice-job { color: var(--g-muted); font-weight: 400; font-size: 13px; }
.g-bubble { margin-top: 4px; padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: var(--g-sunken); font-size: 14.5px; overflow-wrap: anywhere; }
.g-voice.is-decider .g-bubble { background: var(--g-action-soft); }
.g-more { border: 0; background: none; padding: 0; margin-top: 6px; color: var(--g-ink); font-weight: 700; font-size: 13.5px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--g-action); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.g-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.g-chart { position: relative; margin-top: 12px; }
.g-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.g-chart-grid { stroke: var(--g-line); stroke-width: 1; }
.g-chart-zero { stroke: var(--g-muted); stroke-width: 1; stroke-dasharray: 3 4; }
.g-chart-line { fill: none; stroke: var(--g-chart-line); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.g-chart-area { fill: var(--g-chart-line); opacity: 0.06; }
.g-chart-axis { fill: var(--g-muted); font-size: 10.5px; font-family: var(--g-font-num); font-variant-numeric: tabular-nums; }
.g-chart-cross { stroke: var(--g-muted); stroke-width: 1; }
.g-chart-point { fill: var(--g-action); stroke: var(--g-chart-line); stroke-width: 2; }
.g-chart-tip { position: absolute; top: 0; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: var(--g-screen); box-shadow: inset 0 0 0 2px var(--g-screen-bezel); color: var(--g-screen-ink); font-size: 13px; line-height: 1.35; white-space: nowrap; transform: translateX(-50%); }
.g-chart-tip strong { display: block; font-family: var(--g-font-num); font-weight: 500; font-variant-numeric: tabular-nums; }

.g-rows { display: grid; }
.g-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--g-line); font-size: 14.5px; }
.g-row:first-child { border-top: 0; }
.g-row-main { flex: 1; min-width: 0; }
.g-row-sub { color: var(--g-muted); font-size: 13px; }
.g-row-value { font-family: var(--g-font-num); font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; text-align: right; }

.g-chat { display: grid; gap: 12px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.g-chat-msg { padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--g-sunken); font-size: 14.5px; overflow-wrap: anywhere; }
.g-chat-author { font-weight: 800; font-size: 13.5px; }
.g-chat-time { color: var(--g-muted); font-family: var(--g-font-num); font-weight: 400; font-size: 12px; margin-left: 6px; }

/* ---- Forms & choices ----------------------------------------------------- */

.g-field { display: grid; gap: 6px; margin-top: 16px; }
.g-label { font-weight: 700; font-size: 14.5px; }
.g-help { color: var(--g-muted); font-size: 13.5px; }
.g-input {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--g-line-strong);
    border-radius: var(--g-radius-sm);
    background: var(--g-surface);
    box-shadow: inset 0 2px 0 var(--g-line);
    color: var(--g-ink);
    font: inherit;
}
.g-input:focus { outline: 3px solid var(--g-focus); outline-offset: 1px; border-color: var(--g-focus); }
.g-choices { display: grid; gap: 14px; margin-top: 16px; }
@media (min-width: 640px) { .g-choices-3 { grid-template-columns: repeat(3, 1fr); } .g-choices-2 { grid-template-columns: repeat(2, 1fr); } }
/* A choice is a big key: selecting it lights it orange-soft and seats it. */
.g-choice {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--g-line-strong);
    border-radius: 16px;
    background: var(--g-surface);
    box-shadow: 0 4px 0 var(--g-edge);
    text-align: left;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease, border-color 0.12s ease;
}
.g-choice:hover { border-color: var(--g-ink); }
.g-choice:active { transform: translateY(4px); box-shadow: 0 0 0 var(--g-edge); }
.g-choice.is-selected { border-color: var(--g-action-edge); background: var(--g-action-soft); box-shadow: 0 4px 0 var(--g-action-edge), inset 0 0 0 1px var(--g-action-edge); }
.g-choice-row { flex-direction: row; align-items: center; gap: 12px; }
.g-choice-title { font-weight: 800; }
/* The schedule (or text) in force right now — a label, not a state: it stays on its key whichever one is pressed. */
.g-now { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 6px; background: var(--g-ink); color: var(--g-surface); font-family: var(--g-font-num); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 2px; }
.g-choice-sub { color: var(--g-muted); font-size: 14px; }
.g-choice-price { margin-top: auto; padding-top: 6px; font-family: var(--g-font-num); font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.g-choice-row .g-choice-price { margin: 0 0 0 auto; padding: 0; text-align: right; white-space: nowrap; }
.g-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; border: 0; background: none; padding: 0; font-weight: 700; font-size: 14.5px; }
.g-switch-track { width: 50px; height: 28px; border-radius: 9px; background: var(--g-line-strong); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.12); position: relative; transition: background 0.15s ease; flex: none; }
.g-switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 7px; background: #F5F5F2; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); transition: transform 0.15s ease, background 0.15s ease; }
.g-switch[aria-checked="true"] .g-switch-track { background: var(--g-ink); }
.g-switch[aria-checked="true"] .g-switch-track::after { transform: translateX(22px); background: var(--g-action); }
:root[data-g-theme="dark"] .g-switch[aria-checked="true"] .g-switch-track { background: #3A3D35; }

/* ---- Create wizard ------------------------------------------------------- */

.g-stepper { display: flex; gap: 6px; margin: 20px 0 26px; }
.g-stepper-seg { flex: 1; height: 10px; border-radius: 3px; background: var(--g-line); }
.g-stepper-seg.is-done { background: var(--g-action); }
.g-wizard-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.g-wizard-foot .g-actions { justify-content: flex-end; }
.g-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.g-price-big { font-size: 40px; font-weight: 900; font-stretch: var(--g-wide); font-variant-numeric: tabular-nums; letter-spacing: -0.04em; line-height: 1.05; }
.g-card-tint .g-price-big { color: var(--g-action); }
.g-summary { display: grid; gap: 0; margin: 0; }
.g-summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--g-line); }
.g-summary-row:first-child { border-top: 0; }
.g-summary-row dt { color: var(--g-muted); }
.g-summary-row dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.g-names { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ---- Wallet -------------------------------------------------------------- */

.g-balance { font-family: var(--g-font-num); font-size: clamp(48px, 10vw, 76px); font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.06em; }
.g-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.g-amount { min-height: 56px; border: 1px solid var(--g-line-strong); border-radius: var(--g-radius-sm); background: var(--g-sunken); box-shadow: 0 4px 0 var(--g-edge); font-family: var(--g-font-num); font-weight: 500; font-size: 18px; letter-spacing: -0.03em; cursor: pointer; font-variant-numeric: tabular-nums; transition: transform 0.07s ease, box-shadow 0.07s ease; }
.g-amount:hover { background: var(--g-surface); }
.g-amount:active { transform: translateY(4px); box-shadow: 0 0 0 var(--g-edge); }
.g-amount.is-selected { border-color: var(--g-action-edge); background: var(--g-action); color: var(--g-action-ink); box-shadow: 0 4px 0 var(--g-action-edge); }

/* ---- Dialog & toast ------------------------------------------------------ */

.g-dialog { width: min(520px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--g-line-strong); border-radius: 24px; background: var(--g-surface); color: var(--g-ink); box-shadow: 0 6px 0 var(--g-edge), 0 30px 60px rgba(0, 0, 0, 0.2); }
.g-dialog::backdrop { background: var(--g-scrim); }
.g-dialog-body { margin-top: 10px; }
.g-dialog-body > * + * { margin-top: 12px; }
.g-dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.g-toasts { position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.g-toast { padding: 13px 16px; border-radius: var(--g-radius-sm); background: var(--g-screen); box-shadow: inset 0 0 0 3px var(--g-screen-bezel); color: var(--g-screen-ink); font-size: 14.5px; font-weight: 600; animation: g-rise 0.2s ease; }
.g-toast.is-error { background: var(--g-down); box-shadow: none; color: #FFFFFF; }
:root[data-g-theme="dark"] .g-toast.is-error { color: #141513; }
@keyframes g-rise { from { opacity: 0; transform: translateY(8px); } }
@media (min-width: 760px) { .g-toasts { bottom: 32px; } }

/* "It worked": the one moment the action colour is a whole panel. */
.g-celebrate { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border: 1px solid var(--g-action-edge); border-radius: var(--g-radius); background: var(--g-action); color: var(--g-action-ink); box-shadow: 0 4px 0 var(--g-action-edge); margin-bottom: 24px; }
.g-celebrate strong { display: block; font-size: 19px; font-weight: 900; font-stretch: var(--g-wide); letter-spacing: -0.03em; }
.g-celebrate .g-link { color: inherit; text-decoration-color: currentColor; }

.g-foot { max-width: 1080px; margin: 0 auto; padding: 0 20px 24px; color: var(--g-muted); font-size: 13px; text-align: center; }

/* ---- Live ----------------------------------------------------------------
   The pages move: static/js/guided/core.js (AF7G.live) asks the server every
   few seconds what changed and paints it into these pieces. A number that
   changed flashes once (is-tick-up / is-tick-down); a countdown in its last
   minute is is-urgent; a meeting in progress scans. */

/* On the dark glass, up/down/attention use the bright (dark-theme) values in
   both themes — the light theme's are tuned for an aluminium panel. */
.g-hero, .g-card-tint, .g-ticker, .g-tape {
    --g-up: #5BD68F;
    --g-up-soft: #12301F;
    --g-down: #FF8A78;
    --g-down-soft: #3A1915;
    --g-warn: #F5C563;
    --g-warn-soft: #33280D;
    --g-action-soft: #3A1C10;
}

/* The lamp in the top bar: green while updates arrive, amber when one failed. */
.g-live-lamp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 12px;
    border-radius: 11px;
    background: var(--g-screen);
    box-shadow: inset 0 0 0 3px var(--g-screen-bezel);
    color: #5BD68F;
    font-family: var(--g-font-num);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.g-live-lamp.is-down { color: #F5C563; }
.g-live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: g-beat 1.6s ease-out infinite; }
.g-live-lamp.is-down .g-live-dot { animation: g-pulse 0.8s ease-in-out infinite; }
@keyframes g-beat { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 70%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
@media (max-width: 560px) {
    .g-live-lamp { padding: 6px 10px; }
    .g-live-lamp > span + span { display: none; }
}

.is-tick-up, .is-tick-down { border-radius: 4px; }
.is-tick-up { animation: g-tick-up 1s ease-out; }
.is-tick-down { animation: g-tick-down 1s ease-out; }
@keyframes g-tick-up {
    0% { background: color-mix(in srgb, var(--g-up) 38%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g-up) 38%, transparent); }
    100% { background: transparent; box-shadow: 0 0 0 3px transparent; }
}
@keyframes g-tick-down {
    0% { background: color-mix(in srgb, var(--g-down) 38%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g-down) 38%, transparent); }
    100% { background: transparent; box-shadow: 0 0 0 3px transparent; }
}

/* Every agent card carries a small screen with its market's price. */
.g-ticker {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--g-screen);
    box-shadow: inset 0 0 0 3px var(--g-screen-bezel);
    color: var(--g-screen-ink);
    font-family: var(--g-font-num);
    font-variant-numeric: tabular-nums;
}
.g-ticker-symbol, .g-tape-symbol { color: var(--g-screen-muted); font-size: 12px; letter-spacing: 0.1em; }
.g-ticker-price { font-size: 18px; font-weight: 500; letter-spacing: -0.03em; }
.g-ticker-change { margin-left: auto; font-size: 13px; color: var(--g-screen-muted); }
.g-ticker-change.g-up, .g-tape-change.g-up { color: var(--g-up); }
.g-ticker-change.g-down, .g-tape-change.g-down { color: var(--g-down); }

/* Home: the markets your agents trade, side by side. */
.g-tape {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    margin-top: 22px;
    border-radius: 14px;
    background: var(--g-screen);
    box-shadow: inset 0 0 0 4px var(--g-screen-bezel), 0 4px 0 var(--g-line-strong);
    color: var(--g-screen-ink);
    font-family: var(--g-font-num);
    font-variant-numeric: tabular-nums;
}
.g-tape::-webkit-scrollbar { display: none; }
.g-tape-cell { display: inline-flex; align-items: baseline; gap: 10px; padding: 13px 20px; border-right: 1px solid var(--g-screen-line); white-space: nowrap; }
.g-tape-cell:last-child { border-right: 0; }
.g-tape-price { font-size: 15.5px; font-weight: 500; letter-spacing: -0.03em; }
.g-tape-change { font-size: 12.5px; color: var(--g-screen-muted); }

/* A meeting or check-in that is happening right now. */
.g-session {
    display: grid;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid var(--g-action-edge);
    border-radius: 12px;
    background: var(--g-action-soft);
    font-size: 13.5px;
}
.g-card-tint .g-session, .g-hero .g-session { border-color: var(--g-action); }
.g-session-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; }
.g-session-line strong { font-family: var(--g-font-num); font-size: 12px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; }
.g-session-text { flex: 1 1 150px; color: var(--g-muted); }
.g-session-clock { margin-left: auto; font-weight: 500; }
.g-scan-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--g-action); color: var(--g-action); animation: g-beat 1.2s ease-out infinite; }
.g-session-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.g-session-step { flex: 1; min-width: 0; padding-top: 8px; border-top: 4px solid var(--g-line-strong); color: var(--g-muted); font-family: var(--g-font-num); font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; overflow-wrap: anywhere; }
.g-session-step.is-done { border-top-color: var(--g-action); color: var(--g-ink); }
.g-session-step.is-now { border-top-color: var(--g-action); color: var(--g-ink); font-weight: 500; animation: g-pulse 1.2s ease-in-out infinite; }
.g-scan { position: relative; height: 6px; border-radius: 3px; background: var(--g-line); overflow: hidden; }
.g-scan::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: repeating-linear-gradient(90deg, var(--g-action) 0 6px, transparent 6px 9px); animation: g-scan 1.7s linear infinite; }
@keyframes g-scan { from { transform: translateX(-100%); } to { transform: translateX(334%); } }

/* An open trade: its result moves with the price. */
.g-live-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--g-up); font-family: var(--g-font-num); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.g-live-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: g-pulse 1.4s ease-in-out infinite; }
.g-live-trade { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 14px; border: 1px solid var(--g-line); border-radius: 12px; font-size: 13.5px; }
.g-trade-label { font-weight: 700; }
.g-trade-path { color: var(--g-muted); }
.g-trade-result { font-weight: 500; font-variant-numeric: tabular-nums; }
.g-live-trade .g-trade-result { margin-left: auto; font-size: 16px; }
.g-trade { display: grid; gap: 14px; }
.g-trade-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.g-trade-big .g-trade-result { font-size: 40px; letter-spacing: -0.05em; line-height: 1.05; }
.g-trade .g-plan { margin-top: 0; }
.g-track-wrap { display: grid; gap: 9px; margin-top: 4px; }
.g-track { position: relative; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--g-down-soft), var(--g-sunken) 50%, var(--g-up-soft)); box-shadow: inset 0 0 0 1px var(--g-line); }
.g-track-entry { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--g-muted); }
.g-track-marker { position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; border: 3px solid var(--g-surface); border-radius: 50%; background: var(--g-action); box-shadow: 0 2px 0 var(--g-action-edge); transform: translate(-50%, -50%); transition: left 0.9s ease; }
.g-track-ends { display: flex; justify-content: space-between; gap: 12px; color: var(--g-muted); font-size: 13px; }

/* Countdowns. On a card it is a line of text; on the agent page, a clock. */
.g-countdown.is-urgent { color: var(--g-ink); font-weight: 700; animation: g-pulse 1s ease-in-out infinite; }
.g-live-panel { display: grid; gap: 18px; margin-top: 20px; }
.g-live-panel > * + * { margin-top: 0; }
.g-live-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; }
.g-live-price { display: block; font-family: var(--g-font-num); font-size: clamp(40px, 9vw, 62px); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.06em; line-height: 1; }
.g-live-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 8px; color: var(--g-muted); font-family: var(--g-font-num); font-size: 13.5px; }
.g-clocks { display: flex; flex-wrap: wrap; gap: 10px; }
.g-clock { min-width: 132px; padding: 11px 14px; border-radius: 12px; background: var(--g-screen-bezel); }
.g-clock-label { color: var(--g-muted); font-family: var(--g-font-num); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.g-clock-value { font-family: var(--g-font-num); font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; line-height: 1.25; }
.g-clock-value.is-urgent { color: var(--g-action); animation: g-pulse 1s ease-in-out infinite; }
.g-live-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }

/* A decision that just arrived. */
.g-reveal { animation: g-reveal 1.6s ease-out; }
@keyframes g-reveal {
    0% { transform: translateY(10px); opacity: 0.3; box-shadow: 0 0 0 4px var(--g-action), 0 4px 0 var(--g-line-strong); }
    45% { transform: none; opacity: 1; box-shadow: 0 0 0 4px var(--g-action), 0 4px 0 var(--g-line-strong); }
    100% { box-shadow: 0 0 0 0 transparent, 0 4px 0 var(--g-line-strong); }
}

/* ---- Settings & account --------------------------------------------------- */

.g-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 42px;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--g-muted) 50%), linear-gradient(135deg, var(--g-muted) 50%, transparent 50%);
    background-position: calc(100% - 22px) 54%, calc(100% - 16px) 54%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
}
.g-seats { display: grid; margin-top: 12px; }
.g-seat { display: grid; grid-template-columns: 1fr; gap: 8px 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--g-line); }
.g-seat:first-child { border-top: 0; }
@media (min-width: 640px) { .g-seat { grid-template-columns: 1fr minmax(200px, 280px); } }
.g-seat-name { font-weight: 800; }
.g-seat-job { color: var(--g-muted); font-size: 13.5px; }
.g-setting-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 14px 0; border-top: 1px solid var(--g-line); }
.g-setting-row:first-child { border-top: 0; }
.g-setting-main { flex: 1 1 240px; min-width: 0; }
.g-setting-title { font-weight: 700; }
.g-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.g-inline .g-input { flex: 1 1 200px; width: auto; }
/* What saving will do, and the key that does it — in reach while you scroll. */
.g-savebar { position: sticky; bottom: 96px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; }
@media (min-width: 760px) { .g-savebar { bottom: 20px; } }
.g-btn-danger { border-color: var(--g-down); color: var(--g-down); }

/* ---- Folds, word-for-word text, meetings and instructions ----------------- */

/* A fold: a key that opens a part of the page in place. */
.g-fold { border: 1px solid var(--g-line); border-radius: var(--g-radius-sm); background: var(--g-surface); }
.g-fold + .g-fold { margin-top: 10px; }
.g-fold-head { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: inherit; }
.g-fold-head:hover { background: var(--g-sunken); }
.g-fold-head:focus-visible { outline: 3px solid var(--g-focus); outline-offset: 1px; }
.g-fold-label { flex: 1; min-width: 0; font-weight: 700; }
.g-fold-mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: var(--g-muted); transition: transform 0.15s ease; }
.g-fold.is-open > .g-fold-head .g-fold-mark { transform: rotate(180deg); }
.g-fold.is-open > .g-fold-head { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.g-fold-body { padding: 4px 14px 16px; }
.g-fold-body > :first-child { margin-top: 0; }
/* "How this works" sits in a card of its own, so its fold has no box. */
.g-guide { border: 0; background: none; }
.g-guide > .g-fold-head { padding: 0; align-items: center; }
.g-guide > .g-fold-head:hover { background: none; }
.g-guide > .g-fold-body { padding: 0; }
/* One meeting, or one AI's text: a fold that stands on the page like a card. */
.g-record { border-radius: 16px; box-shadow: 0 3px 0 var(--g-line); }
.g-record + .g-record { margin-top: 14px; }
.g-record > .g-fold-head { padding: 16px 18px; }
.g-record > .g-fold-body { padding: 16px 18px 20px; border-top: 1px solid var(--g-line); }
.g-record-top { margin-bottom: 8px; }
.g-record-lede { margin: 0 0 4px; font-size: 15.5px; }
.g-record-detail > .g-skeleton { min-height: 90px; }
/* Text exactly as it was written: a prompt, an answer. */
.g-text { margin: 8px 0 0; padding: 12px 14px; max-height: 420px; overflow: auto; border-radius: var(--g-radius-xs); background: var(--g-sunken); border: 1px solid var(--g-line); font-family: var(--g-font-num); font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.g-text:focus-visible { outline: 3px solid var(--g-focus); outline-offset: 1px; }
.g-textarea { display: block; margin-top: 10px; min-height: 280px; resize: vertical; font-family: var(--g-font-num); font-size: 13px; line-height: 1.55; }
.g-text-actions { margin-top: 12px; }
.g-text-actions + .g-fold { margin-top: 14px; }
.g-prose { margin: 6px 0 0; font-size: 14.5px; overflow-wrap: anywhere; }
/* An answer, point by point. */
.g-fields { margin: 8px 0 0; display: grid; gap: 10px; }
.g-fields-row dt { font-family: var(--g-font-num); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--g-muted); }
.g-fields-row dd { margin: 2px 0 0; font-size: 14.5px; overflow-wrap: anywhere; }
.g-fields .g-fields { margin: 4px 0 0; padding-left: 12px; border-left: 2px solid var(--g-line); }
.g-points { margin: 0; padding-left: 18px; }
.g-points li + li { margin-top: 4px; }
/* One AI's part in a meeting. */
.g-call-note { margin-top: 8px; }
.g-call-meta { margin-top: 6px; font-size: 12.5px; }
.g-call-folds { margin-top: 10px; }
.g-call + .g-call { padding-top: 14px; border-top: 1px solid var(--g-line); }
/* A teammate's earlier versions. */
.g-history { margin-top: 4px; }
.g-version { padding: 14px 0; border-top: 1px solid var(--g-line); }
.g-version > .g-fold, .g-version > .g-actions { margin-top: 10px; }
.g-version-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---- Signing in and signing up (templates/guided/auth/) ------------------
   One narrow column: what the page is for, then one panel to fill in. */
.g-auth { max-width: 460px; margin: 0 auto; }
.g-auth-note { margin-top: 18px; }
.g-auth-card { margin-top: 22px; }
.g-auth-card > form > .g-field:first-of-type { margin-top: 0; }
.g-auth-provider { margin-top: 0; }
.g-auth-provider + .g-auth-provider { margin-top: 10px; }
/* Apple's own rule for its button: black or white, its mark, nothing else. */
.g-auth-provider-apple, .g-auth-provider-apple:hover { background: #000; border-color: #000; color: #fff; }
[data-g-theme="dark"] .g-auth-provider-apple, [data-g-theme="dark"] .g-auth-provider-apple:hover { background: #fff; border-color: #fff; color: #000; }
.g-auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--g-muted); font-size: 13.5px; }
.g-auth-or::before, .g-auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--g-line); }
.g-auth-code { font-size: 26px; letter-spacing: 0.4em; text-align: center; }
.g-auth-check { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14.5px; cursor: pointer; }
.g-auth-check input { width: 18px; height: 18px; accent-color: var(--g-action); }
.g-auth-after { margin: 18px 0 0; }
.g-auth-after .g-btn { margin-top: 8px; }
.g-auth-switch { margin: 22px 0 0; text-align: center; color: var(--g-muted); }
/* The reminder every /app page carries until the address is confirmed. */
.g-confirm-email { flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.g-confirm-email .g-link { color: inherit; white-space: nowrap; }
/* Off-screen, not display:none — the bots it is for skip hidden fields. */
.g-auth-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Public site (templates/guided/public/) ----
   The pages a logged-out visitor reads — the landing page, how it works,
   pricing, the free-signals index, a free agent's or grid's page, the blog,
   contact, the legal texts — in the same language as the pages they sign up
   into. Every class here is prefixed `g-pub-`; everything else on those
   pages is the vocabulary above. */

/* No tab bar under a public page, so no room is kept for one. */
.g-pub-body { padding-bottom: 0; }
/* The landing page and the free-signals index stand four things side by side. */
.g-pub-wide .g-top-inner, .g-pub-wide .g-main, .g-pub-wide .g-pub-foot-inner { max-width: 1240px; }

/* Header: on a phone the nav is a second row that scrolls sideways. */
.g-pub-top-inner { flex-wrap: wrap; row-gap: 8px; }
.g-pub-nav { display: flex; order: 3; flex: 1 0 100%; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
.g-pub-nav::-webkit-scrollbar { display: none; }
.g-pub-nav .g-nav-link { flex: 1 0 auto; text-align: center; white-space: nowrap; }
@media (min-width: 900px) {
    .g-pub-top-inner { flex-wrap: nowrap; }
    .g-pub-nav { order: 0; flex: 0 1 auto; margin-left: 10px; }
}
@media (max-width: 559.98px) { .g-pub-brand .g-brand-name { display: none; } }
.g-pub-theme-dark, :root[data-g-theme="dark"] .g-pub-theme-light { display: none; }
:root[data-g-theme="dark"] .g-pub-theme-dark { display: block; }

/* Landing hero: the screen, with the live markets on a strip inside it. */
.g-pub-hero { padding: 56px 24px 40px; }
.g-pub-hero .g-h1 { font-size: clamp(32px, 6.4vw, 58px); max-width: 18ch; margin: 0 auto; }
.g-pub-hero .g-lede { max-width: 56ch; }
.g-pub-hero .g-tape { justify-content: safe center; margin-top: 32px; background: var(--g-screen-bezel); box-shadow: none; }
.g-pub-fine { margin: 18px 0 0; color: var(--g-muted); font-size: 13.5px; }
.g-pub-sub { margin: 6px 0 0; color: var(--g-muted); max-width: 64ch; }
.g-pub-head { margin-bottom: 20px; }

/* Four ways to trade, side by side and part by part: every tile spans the
   same nine row tracks (subgrid), so what each one is, who it suits, its live
   example and its Follow key sit on the same lines in all four. Spacing is a
   margin, never a gap, so a part a tile does not have leaves no hole. */
.g-pub-kinds { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 20px; margin-bottom: -20px; }
@media (min-width: 640px) { .g-pub-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1120px) { .g-pub-kinds { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.g-pub-kinds > * { margin-bottom: 20px; }
.g-pub-kind { display: grid; grid-row: span 9; grid-template-rows: subgrid; row-gap: 0; align-content: start; padding: 20px; }
.g-pub-kind > * { margin: 14px 0 0; min-width: 0; }
.g-pub-kind > .g-pub-kind-head { grid-row: 1; margin-top: 0; }
.g-pub-kind > .g-pub-kind-what { grid-row: 2; }
.g-pub-kind > .g-pub-kind-suits { grid-row: 3; }
.g-pub-kind > .g-pub-live { grid-row: 4; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--g-line); }
.g-pub-kind > .g-ticker { grid-row: 5; align-self: start; }
.g-pub-kind > .g-agent-story { grid-row: 6; }
.g-pub-kind > .g-stats { grid-row: 7; align-self: end; }
.g-pub-kind > .g-actions { grid-row: 8; }
.g-pub-kind > .g-pub-kind-more { grid-row: 9; }
.g-pub-kind > .g-pub-none { grid-row: 4 / span 4; margin-top: 18px; display: grid; align-content: center; }
.g-pub-kind-head { display: flex; align-items: center; gap: 12px; }
.g-pub-kind-name { font-size: 20px; font-weight: 900; font-stretch: var(--g-wide); line-height: 1.15; letter-spacing: -0.03em; margin: 0; }
.g-pub-kind-tag { color: var(--g-muted); font-size: 13.5px; }
.g-pub-kind-what { font-size: 15px; }
.g-pub-kind-suits { color: var(--g-muted); font-size: 14px; }
.g-pub-kind-suits strong { color: var(--g-ink); }
.g-pub-kind-more { font-size: 14px; }
.g-pub-live-name { display: block; margin-top: 6px; font-weight: 800; font-stretch: 112%; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; text-decoration: none; }
a.g-pub-live-name:hover { text-decoration: underline; text-decoration-color: var(--g-action); text-decoration-thickness: 2px; text-underline-offset: 4px; }
/* In a narrow tile the price screen wraps and the result takes the room left. */
.g-pub-kind .g-ticker, .g-pub-pick .g-ticker { flex-wrap: wrap; row-gap: 2px; }
.g-pub-kind .g-stats { grid-template-columns: auto auto minmax(0, 1fr); column-gap: 14px; }
.g-pub-kind .g-stat-value { font-size: 15.5px; }
.g-pub-kind .g-actions .g-btn { flex: 1 1 auto; }
.g-pub-kind .g-agent-headline { font-size: 17px; }

/* A section of the free-signals index: one kind, its cards. */
.g-pub-kind-section { scroll-margin-top: 120px; }
.g-pub-kind-title { display: flex; align-items: center; gap: 14px; }
.g-pub-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Three steps, and four explanations, as rows of equal panels. */
.g-pub-steps { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .g-pub-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.g-pub-step { display: flex; flex-direction: column; gap: 10px; }
.g-pub-step > * { margin: 0; }
.g-pub-step-num { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--g-ink); color: var(--g-surface); font-family: var(--g-font-num); font-size: 18px; font-weight: 500; }
.g-pub-explains { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 20px; margin-bottom: -20px; }
@media (min-width: 860px) { .g-pub-explains { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.g-pub-explains > * { margin-bottom: 20px; }
.g-pub-explain { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; align-content: start; scroll-margin-top: 120px; }
.g-pub-explain > * { margin: 16px 0 0; min-width: 0; }
.g-pub-explain > :first-child { margin-top: 0; }
.g-pub-explain > :last-child { align-self: end; }
.g-pub-explain p { margin: 6px 0 0; font-size: 15px; }
.g-pub-explain .g-list { margin-top: 6px; color: var(--g-ink); font-size: 15px; }

/* The closing call to action: the same live examples, one key each. */
.g-pub-picks { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
@media (min-width: 640px) { .g-pub-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1120px) { .g-pub-picks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.g-pub-pick { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; border: 1px solid var(--g-line); border-radius: 16px; background: var(--g-surface); }
.g-pub-pick > * { margin: 0; }
.g-pub-pick-head { display: flex; align-items: center; gap: 10px; }
.g-pub-pick-name { font-weight: 800; font-stretch: 112%; overflow-wrap: anywhere; }
.g-pub-pick .g-btn { margin-top: auto; }

/* A featured head-to-head. */
.g-pub-battle { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; margin-top: 16px; }
.g-pub-battle-side { display: grid; gap: 2px; min-width: 0; }
.g-pub-battle-side.is-b { text-align: right; }
.g-pub-battle-name { font-weight: 800; font-stretch: 112%; overflow-wrap: anywhere; }
.g-pub-battle-pnl { font-family: var(--g-font-num); font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.g-pub-battle-vs { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--g-sunken); font-family: var(--g-font-num); font-size: 12px; letter-spacing: 0.08em; }
.g-pub-spark { margin-top: 14px; }
.g-pub-spark svg { display: block; width: 100%; height: 72px; }
.g-pub-spark-a, .g-pub-spark-b { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.g-pub-spark-a { stroke: var(--g-kind-expert); }
.g-pub-spark-b { stroke: var(--g-action); }
.g-pub-key-a, .g-pub-key-b { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; }
.g-pub-key-a { background: var(--g-kind-expert); }
.g-pub-key-b { background: var(--g-action); }

/* Long-form text: a legal page, a blog post, the glossary. */
.g-pub-prose { max-width: 72ch; font-size: 16.5px; line-height: 1.65; overflow-wrap: break-word; }
.g-pub-prose > :first-child { margin-top: 0; }
.g-pub-prose h2 { margin: 36px 0 10px; font-size: 22px; font-weight: 800; font-stretch: var(--g-wide); line-height: 1.2; letter-spacing: -0.03em; }
.g-pub-prose h3 { margin: 26px 0 8px; font-size: 17.5px; font-weight: 800; font-stretch: 112%; line-height: 1.3; }
.g-pub-prose p, .g-pub-prose ul, .g-pub-prose ol, .g-pub-prose dl, .g-pub-prose pre, .g-pub-prose blockquote, .g-pub-prose table { margin: 0 0 16px; }
.g-pub-prose ul, .g-pub-prose ol { padding-left: 22px; }
.g-pub-prose li + li { margin-top: 6px; }
.g-pub-prose li::marker { color: var(--g-action); }
.g-pub-prose a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--g-action); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.g-pub-prose dt { margin-top: 18px; font-weight: 800; font-stretch: 112%; }
.g-pub-prose dd { margin: 4px 0 0; color: var(--g-muted); }
.g-pub-prose code { padding: 0.1em 0.35em; border-radius: 6px; background: var(--g-sunken); font-family: var(--g-font-num); font-size: 0.88em; }
.g-pub-prose pre { padding: 14px 16px; overflow-x: auto; border: 1px solid var(--g-line); border-radius: var(--g-radius-xs); background: var(--g-sunken); font-family: var(--g-font-num); font-size: 13.5px; line-height: 1.55; }
.g-pub-prose pre code { padding: 0; background: none; font-size: inherit; }
.g-pub-prose blockquote { padding: 4px 0 4px 16px; border-left: 4px solid var(--g-action); }
.g-pub-prose img { max-width: 100%; height: auto; border-radius: var(--g-radius-xs); }
.g-pub-prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 14.5px; }
.g-pub-prose th, .g-pub-prose td { padding: 8px 12px; border-bottom: 1px solid var(--g-line); text-align: left; }
.g-pub-meta { margin: 10px 0 0; color: var(--g-muted); font-family: var(--g-font-num); font-size: 13px; }
.g-pub-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; color: var(--g-muted); font-size: 14px; }
.g-pub-crumbs a { font-weight: 600; }
.g-pub-qa > * + * { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--g-line); }
.g-pub-qa p { margin: 8px 0 0; color: var(--g-muted); }

/* A table of dated rows: recent decisions, recent trades. */
.g-pub-body .g-grid > * { min-width: 0; }   /* a wide table scrolls inside its card */
.g-pub-table-wrap { margin-top: 14px; overflow-x: auto; }
.g-pub-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.g-pub-table th { padding: 0 14px 8px 0; color: var(--g-muted); font-family: var(--g-font-num); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.g-pub-table td { padding: 10px 14px 10px 0; border-top: 1px solid var(--g-line); white-space: nowrap; }
.g-pub-table th:last-child, .g-pub-table td:last-child { padding-right: 0; }

/* A blog post on a list. */
.g-pub-post { display: flex; flex-direction: column; gap: 8px; text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.g-pub-post > * { margin: 0; }
.g-pub-post > .g-chip { align-self: flex-start; }
.g-pub-post > .g-pub-meta { margin-top: auto; padding-top: 6px; }
a.g-pub-post:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--g-line-strong); }
.g-pub-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; }

/* The contact form's message, and an empty state that offers a way on. */
.g-pub-message { min-height: 180px; resize: vertical; }
.g-pub-body .g-empty > p { margin: 0; }
.g-pub-body .g-empty > .g-actions { justify-content: center; margin-top: 14px; }

/* Footer. */
.g-pub-foot { margin-top: 64px; border-top: 1px solid var(--g-line-strong); background: var(--g-surface); }
.g-pub-foot-inner { max-width: 1080px; margin: 0 auto; padding: 36px 20px 28px; display: grid; gap: 28px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .g-pub-foot-inner { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); } }
.g-pub-foot-brand { grid-column: 1 / -1; }
@media (min-width: 760px) { .g-pub-foot-brand { grid-column: auto; } }
.g-pub-foot-brand p { margin: 12px 0 0; max-width: 34ch; color: var(--g-muted); font-size: 14px; }
.g-pub-foot-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.g-pub-foot-links a { color: var(--g-muted); font-weight: 600; text-decoration: none; }
.g-pub-foot-links a:hover { color: var(--g-ink); text-decoration: underline; text-decoration-color: var(--g-action); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.g-pub-foot-note { grid-column: 1 / -1; margin: 0; padding-top: 18px; border-top: 1px solid var(--g-line); color: var(--g-muted); font-size: 13px; }

/* ---- Grids (templates/guided/grid.html, grid cards) ----
   The fourth thing a user runs, beside the three kinds of agent. A grid is
   not an agent, so it has an identity colour of its own (--g-kind-grid) and
   where an agent's card shows a meeting, a grid's shows its price range. */

.g-glyph-grid { background: var(--g-kind-grid); color: #FFFFFF; }
/* Four things explained side by side (Discover). */
@media (min-width: 1000px) { .g-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* A grid card's range: a bar from the bottom of the range to the top, a tick
   per level, and a mark the pulse moves with the price. In a row of cards it
   takes the track an agent's meeting-in-progress takes — a grid never has
   one — so every other part still lines up with its neighbours. */
.g-cards > .g-agent > .g-grid-range { grid-row: 3; align-self: start; }
.g-grid-range { display: flex; align-items: center; gap: 10px; color: var(--g-muted); font-size: 12.5px; }
.g-grid-range-none { font-size: 13.5px; }
.g-grid-track { position: relative; flex: 1; min-width: 40px; height: 14px; border-radius: 4px; background: var(--g-sunken); box-shadow: inset 0 0 0 1px var(--g-line); }
.g-grid-tick { position: absolute; top: 2px; bottom: 2px; width: 2px; margin-left: -1px; background: var(--g-line-strong); }
.g-grid-tick.is-anchor { top: -3px; bottom: -3px; background: var(--g-muted); }
.g-grid-tick.is-used { background: var(--g-kind-grid); }
.g-grid-mark { position: absolute; top: 50%; width: 16px; height: 16px; border: 3px solid var(--g-surface); border-radius: 50%; background: var(--g-action); box-shadow: 0 2px 0 var(--g-action-edge); transform: translate(-50%, -50%); transition: left 0.9s ease; }
.g-grid-mark.is-outside { background: var(--g-warn); box-shadow: none; }

/* The grid's page. What it is doing right now, on the screen under the price. */
.g-grid-state > * { margin: 0; }
.g-grid-state > * + * { margin-top: 6px; }
.g-grid-state-label { font-size: 24px; font-weight: 900; font-stretch: var(--g-wide); line-height: 1.15; letter-spacing: -0.03em; }
.g-grid-page { margin-top: 24px; }
.g-grid-page > * { min-width: 0; }
.g-grid-page > .g-card > * + * { margin-top: 12px; margin-bottom: 0; }
.g-grid-page > .g-card > .g-section-head { margin-bottom: 0; }
.g-grid-wide { grid-column: 1 / -1; }
/* The range as a ladder: every level a rung at its own height, the price a
   line that climbs and falls between them. */
.g-ladder { position: relative; margin: 30px 0 26px; }
.g-ladder-level { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 10px; transform: translateY(50%); font-size: 13px; line-height: 1.2; }
.g-ladder-what { flex: none; width: 104px; color: var(--g-muted); }
.g-ladder-line { flex: 1; border-top: 1px dashed var(--g-line-strong); }
.g-ladder-price { flex: none; width: 88px; text-align: right; }
.g-ladder-level.is-anchor .g-ladder-line { border-top: 1px solid var(--g-muted); }
.g-ladder-level.is-used .g-ladder-line { border-top: 3px solid var(--g-kind-grid); }
.g-ladder-level.is-used .g-ladder-what { color: var(--g-ink); font-weight: 700; }
.g-ladder-mark { position: absolute; left: 0; right: 0; z-index: 1; height: 0; border-top: 2px solid var(--g-action); transition: bottom 0.9s ease; }
.g-ladder-now { position: absolute; left: 50%; top: 0; padding: 2px 9px; border-radius: 6px; background: var(--g-action); color: var(--g-action-ink); font-size: 12.5px; font-weight: 500; white-space: nowrap; transform: translate(-50%, -50%); }
.g-ladder-mark.is-outside { border-top-style: dashed; border-top-color: var(--g-warn); }
.g-ladder-mark.is-outside .g-ladder-now { background: var(--g-warn-soft); color: var(--g-warn); }

@media (prefers-reduced-motion: reduce) {
    .g-body *, .g-body *::before, .g-body *::after { animation: none !important; transition: none !important; }
}
