/* Edge Meta AI — the chat, shared by client-assistant.html (inside EdgeLead) and ai/ (its own app). phase 47 */
body { padding-bottom: 0; }
.oa-wrap { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
@media (max-width: 940px) { .oa-wrap { grid-template-columns: 1fr; } .oa-side { display: none; } .oa-side.is-open { display: block; } }

/* ---- the rail: new chat + recent chats ---- */
.oa-side { position: sticky; top: 96px; }
.oa-side-h { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin: 18px 4px 8px; }
.oa-new { width: 100%; }
.conv-item { position: relative; display: flex; align-items: stretch; gap: 2px; margin-bottom: 2px; }
.conv-row { flex: 1; min-width: 0; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent;
    background: transparent; color: var(--text-secondary); font-family: inherit; font-size: 0.84rem; cursor: pointer; }
.conv-row:hover { background: rgba(255,255,255,0.04); }
.conv-row.on { background: rgba(24,106,255,0.14); border-color: rgba(181,255,59,0.35); color: var(--text-primary); }
.conv-row [data-name] { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-row .conv-when { display: block; font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.conv-more { width: 30px; border: 0; background: transparent; color: var(--text-muted); border-radius: 8px; cursor: pointer; opacity: 0; }
.conv-item:hover .conv-more, .conv-more[aria-expanded="true"], .conv-item:focus-within .conv-more { opacity: 1; }
.conv-more:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.conv-item.editing .conv-row, .conv-item.editing .conv-more { display: none; }
.conv-edit { width: 100%; padding: 8px 10px; border-radius: 10px; font: inherit; font-size: 0.84rem; }
/* Above the app's chats drawer (70) and scrim (65), below the Updates sheets (90). */
.oa-menu { position: fixed; z-index: 80; width: 160px; padding: 6px; border-radius: 12px; background: #0f0f10; border: 1px solid rgba(24,106,255,0.35); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.oa-menu button { display: block; width: 100%; text-align: left; padding: 9px 11px; border: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 0.84rem; border-radius: 8px; cursor: pointer; }
.oa-menu button:hover { background: rgba(255,255,255,0.06); }
.oa-menu button.danger { color: #fda4af; }
.hidden { display: none !important; }

/* ---- the chat column ---- */
.oa-main { position: relative; min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - 150px); }
.oa-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.oa-brand { font-weight: 800; font-size: 1rem; letter-spacing: -0.01em; }
.oa-brand .oa-a { color: var(--accent-solid); }
.oa-brand .oa-by { font-weight: 500; color: var(--text-muted); font-size: 0.82rem; margin-left: 6px; }
.oa-state { margin-left: auto; font-size: 0.76rem; color: var(--text-muted); }
.oa-side-toggle { display: none; }
@media (max-width: 940px) { .oa-side-toggle { display: inline-flex; } }
.icon-btn { border: 1px solid var(--card-border); background: rgba(255,255,255,0.03); color: var(--text-secondary); border-radius: 9px; padding: 6px 10px; font: inherit; cursor: pointer; }
.oa-scroll { flex: 1; overflow-y: auto; padding: 4px 2px 12px; }
.oa-box { max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.oa-box > * { min-width: 0; }   /* a grid item never widens the column past the phone: the starters' auto-fit then resolves against the real width */
.rise { animation: oa-rise .28s ease-out both; }
@keyframes oa-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.oa-user { display: flex; justify-content: flex-end; }
.user-bubble { max-width: 78%; padding: 11px 16px; border-radius: 20px; background: rgba(24,106,255,0.2); border: 1px solid rgba(181,255,59,0.3); color: var(--text-primary); font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.oa-turn { display: flex; gap: 14px; }
.oa-avatar { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; background: rgba(24,106,255,0.14); font-size: 1rem; margin-top: 3px; }
.oa-avatar.oa-thinking { animation: oa-breathe 1.4s ease-in-out infinite; }
@keyframes oa-breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.oa-body { flex: 1; min-width: 0; }
.shimmer-text { color: var(--text-muted); font-size: 0.9rem; }
.answer { font-size: 0.96rem; line-height: 1.7; color: var(--text-primary); }
.answer p { margin: 0 0 10px; }
.answer p:last-child { margin-bottom: 0; }
.answer strong { color: #fff; font-weight: 800; }
.answer ul, .answer ol { padding-left: 22px; margin: 6px 0 10px; }
.answer li { margin-bottom: 3px; }
.answer h1, .answer h2, .answer h3 { font-size: 1rem; margin: 12px 0 6px; }
.answer a { color: var(--accent-solid); }
.answer code { font-family: 'JetBrains Mono', monospace; font-size: 0.85em; background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 5px; }
.table-wrap { overflow-x: auto; margin: 8px 0 12px; }
.answer table { border-collapse: collapse; font-size: 0.86rem; min-width: 320px; }
.answer th, .answer td { padding: 6px 10px 6px 0; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: left; }
.answer th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.answer td { font-variant-numeric: tabular-nums; }
.oa-stopped { margin-top: 8px; font-size: 0.78rem; color: var(--text-muted); }
.oa-error { display: flex; gap: 12px; align-items: flex-start; color: #fecaca; font-size: 0.9rem; }
.oa-error .mark { width: 28px; height: 28px; border-radius: 8px; background: rgba(244,63,94,0.15); color: #fda4af; display: grid; place-items: center; font-weight: 800; flex: none; }
.oa-error button { background: none; border: 0; color: var(--text-secondary); text-decoration: underline; font: inherit; cursor: pointer; margin-left: 8px; }

/* ---- follow-up chips and starters ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { font-size: 0.8rem; padding: 8px 13px; border-radius: 999px; cursor: pointer; background: rgba(255,255,255,0.045); border: 1px solid var(--card-border); color: var(--text-primary); font-family: inherit; }
.chip:hover { border-color: var(--accent-solid); background: rgba(24,106,255,0.1); }
.oa-welcome { text-align: center; padding: 6vh 0 10px; }
.oa-welcome h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin: 14px 0 8px; }
.oa-welcome p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; max-width: 520px; margin: 0 auto; }
.oa-welcome .mark { font-size: 2.4rem; }
.starters { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; max-width: 640px; margin: 28px auto 0; }
.starter { text-align: left; padding: 13px 15px; border-radius: 13px; background: rgba(255,255,255,0.035); border: 1px solid var(--card-border); color: var(--text-primary); font-family: inherit; cursor: pointer; }
.starter:hover { border-color: var(--accent-solid); }
.starter b { display: block; font-size: 0.9rem; font-weight: 700; }
.starter span { display: block; font-size: 0.77rem; color: var(--text-muted); margin-top: 3px; }
.oa-connect { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px; padding: 18px 20px; max-width: 560px; margin: 4vh auto 0; }
.oa-connect p { font-size: 0.9rem; line-height: 1.65; color: var(--text-secondary); margin: 0 0 12px; }
.oa-connect b { color: var(--text-primary); }
.oa-note { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin-top: 10px; }

/* ---- figure panels (portal.css, in EdgeLead tokens) ---- */
.panel { background: rgba(255,255,255,0.03); border: 1px solid var(--card-border); border-radius: 14px; padding: 16px 18px; margin-top: 16px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-title { font-size: 0.94rem; font-weight: 800; color: #fff; }
.panel-sub { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }
.panel-right { display: flex; align-items: center; gap: 8px; flex: none; }
.sec { margin-top: 18px; }
.sec:first-of-type { margin-top: 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.plat { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.plat i { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.tiles.compare { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tile { padding: 11px 12px; border-radius: 11px; background: rgba(255,255,255,0.035); border: 1px solid var(--card-border); min-width: 0; }
.tile-label { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.tile-value { font-size: 1.3rem; font-weight: 800; margin-top: 3px; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.tile-value .dim { color: var(--text-muted); }
.tile-foot { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }
.up { color: #6ee7b7; } .down { color: #fda4af; } .warn { color: #fcd34d; }
.badge-est { display: inline-block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 5px; border-radius: 4px; margin-left: 6px; background: rgba(252,211,77,0.15); color: #fcd34d; vertical-align: middle; }
.sec-note { margin-top: 8px; font-size: 0.76rem; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,0.06); color: var(--text-secondary); white-space: nowrap; }
.pill-up { background: rgba(52,211,153,0.15); color: #6ee7b7; }
.pill-down { background: rgba(251,113,133,0.15); color: #fda4af; }
.pill-flat { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.pill-live { background: rgba(24,106,255,0.14); color: var(--accent-solid); }
.live-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; animation: oa-breathe 1.4s ease-in-out infinite; }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile-mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 6px; }
.candles { display: flex; align-items: flex-end; gap: 4px; height: 38px; flex: none; }
.candle { width: 9px; border-radius: 3px 3px 1px 1px; min-height: 2px; }
.c-prev { background: rgba(255,255,255,0.22); }
.c-up { background: #34d399; } .c-down { background: #fb7185; } .c-flat { background: rgba(255,255,255,0.45); } .c-none { background: transparent; border: 1px dashed rgba(255,255,255,0.2); height: 12px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.legend { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--text-muted); }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rank-list li { display: flex; gap: 12px; }
.rank { width: 24px; height: 24px; border-radius: 7px; background: rgba(255,255,255,0.06); display: grid; place-items: center; font-size: 0.74rem; font-weight: 800; color: var(--text-secondary); flex: none; }
.rank-body { flex: 1; min-width: 0; }
.rank-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rank-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.86rem; color: var(--text-primary); }
.rank-text a { color: inherit; text-decoration: none; }
.rank-text a:hover { text-decoration: underline; }
.rank-val { font-size: 0.86rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; flex: none; }
.rank-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.05); overflow: hidden; margin-top: 6px; }
.rank-bar i { display: block; height: 100%; border-radius: 999px; }
.rank-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.seg { display: inline-flex; gap: 2px; background: rgba(255,255,255,0.05); border-radius: 999px; padding: 2px; }
.seg button { font: inherit; font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.seg button.on { background: rgba(24,106,255,0.18); color: var(--text-primary); }
.chart-box { position: relative; height: 200px; }
.fallback-bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.fallback-bars i { flex: 1; border-radius: 3px 3px 0 0; display: block; }
.panel-note { margin-top: 10px; font-size: 0.74rem; color: var(--text-muted); }

/* ---- composer ---- */
.oa-form { position: sticky; bottom: 0; padding: 10px 0 14px; background: linear-gradient(to top, var(--bg-color) 70%, transparent); }
.composer { display: flex; align-items: flex-end; gap: 8px; max-width: 860px; margin: 0 auto; padding: 8px 8px 8px 18px; border-radius: 24px; background: var(--card-bg); border: 1px solid var(--card-border); }
.composer:focus-within { border-color: var(--accent-solid); }
.composer textarea { flex: 1; min-width: 0; resize: none; background: transparent; border: 0; padding: 8px 0; color: var(--text-primary); font: inherit; font-size: 0.95rem; line-height: 1.5; outline: none; max-height: 208px; }
.send-btn { width: 38px; height: 38px; flex: none; border-radius: 999px; border: 0; background: var(--accent-solid); color: #000000; display: grid; place-items: center; cursor: pointer; font-weight: 900; }
.send-btn:disabled { opacity: 0.4; cursor: default; }
.send-btn svg { width: 18px; height: 18px; }
.oa-hint { text-align: center; font-size: 0.72rem; color: var(--text-muted); margin: 8px 0 0; }
.oa-hint.warn { color: #fcd34d; }
.oa-to-bottom { position: sticky; bottom: 110px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--card-border); background: #0f0f10; color: var(--text-primary); cursor: pointer; z-index: 5; }
body.el-has-plan .oa-side { top: 132px; }

/* ---- phase 47: the state line, the first read, the fine print ---- */
.oa-state.is-ok::before, .oa-state.is-live::before, .oa-state.is-warn::before, .oa-state.is-bad::before {
    content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: #34d399; }
.oa-state.is-live::before { background: var(--accent-solid); animation: oa-breathe 1.4s ease-in-out infinite; }
.oa-state.is-warn::before { background: #fcd34d; }
.oa-state.is-bad { color: #fda4af; } .oa-state.is-bad::before { background: #fb7185; }
.oa-fine { font-size: 0.76rem !important; color: var(--text-muted) !important; margin: 12px 0 0 !important; }
.oa-reading { text-align: center; }
.oa-pulse { display: inline-flex; gap: 6px; margin: 4px 0 14px; }
.oa-pulse i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-solid); animation: oa-breathe 1.2s ease-in-out infinite; }
.oa-pulse i:nth-child(2) { animation-delay: .2s; } .oa-pulse i:nth-child(3) { animation-delay: .4s; }
.composer textarea:disabled { cursor: not-allowed; opacity: 0.6; }
.oa-app-link { text-decoration: none; font-size: 0.76rem; white-space: nowrap; }
.composer textarea { min-height: 0; }       /* app.css gives every textarea 90px; the composer grows as you type */
.oa-connect .btn-primary { margin-top: 4px; }
/* the gold Edge mark stands for the assistant (phase 47), not an emoji */
.oa-welcome .mark img { height: 64px; width: auto; display: block; margin: 0 auto; filter: drop-shadow(0 8px 22px rgba(24,106,255,0.25)); }
.oa-avatar img { height: 20px; width: auto; display: block; }
.composer textarea:focus { box-shadow: none; border: 0; }   /* the composer draws the focus ring, not the field */

/* ---- phase 49: the owner's Updates — chips under the app bar, each a sheet ---- */
.hub-host:empty { display: none; }
.hub-row { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; max-width: 860px; margin: 0 auto;
    /* Phase 57: the last chip fades out, so a row that scrolls looks like one. */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 24px; }
.hub-row::-webkit-scrollbar { display: none; }
.hub-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.82rem; font-weight: 700;
    color: var(--text-secondary); background: rgba(255,255,255,0.03); border: 1px solid var(--card-border); white-space: nowrap; }
.hub-chip:hover { color: var(--text-primary); border-color: rgba(24,106,255,0.4); }
.hub-chip b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 0.7rem; background: rgba(255,255,255,0.08); color: var(--text-primary); }
.hub-chip.is-hot { color: var(--text-primary); border-color: rgba(24,106,255,0.55); background: rgba(24,106,255,0.1); }
.hub-chip.is-hot b { background: var(--accent-solid); color: #000000; }
.hub-wrap { position: fixed; inset: 0; z-index: 90; }
.hub-scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.55); opacity: 0; transition: opacity .2s; }
.hub-wrap.is-in .hub-scrim { opacity: 1; }
.hub-sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); display: flex; flex-direction: column; background: var(--bg-color, #000000);
    border-left: 1px solid var(--card-border); box-shadow: -20px 0 60px rgba(0,0,0,0.5); transform: translateX(30px); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
.hub-wrap.is-in .hub-sheet { transform: none; opacity: 1; }
.hub-h { display: flex; align-items: center; gap: 10px; padding: max(12px, env(safe-area-inset-top)) 16px 12px; border-bottom: 1px solid var(--card-border); }
.hub-ht { flex: 1; min-width: 0; }
.hub-ht h2 { margin: 0; font-size: 1.05rem; font-weight: 800; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hub-ht p { margin: 2px 0 0; font-size: 0.78rem; color: var(--text-muted); }
.hub-back { display: none; }
/* A sheet opened from another (a task from the to-do list) has a way back on every screen size (phase 57). */
.hub-wrap.has-back .hub-back { display: inline-flex; }
.hub-b { flex: 1; overflow-y: auto; padding: 16px 16px max(24px, env(safe-area-inset-bottom)); }
.hub-b.is-frame { padding: 0; overflow: hidden; }
.hub-frame { width: 100%; height: 100%; border: 0; display: block; background: var(--bg-color, #000000); }
.hub-list { display: flex; flex-direction: column; gap: 8px; }
.hub-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.02); text-align: left; color: var(--text-primary); font: inherit; }
.hub-item.is-btn { cursor: pointer; }
.hub-item.is-btn:hover { border-color: rgba(24,106,255,0.45); }
.hub-item .ws-check { grid-column: 1 / -1; }
.hub-it { font-weight: 700; font-size: 0.92rem; }
.hub-im { grid-column: 2; font-size: 0.78rem; color: var(--text-muted); }
.hub-item .ws-check + .hub-im { grid-column: 1 / -1; padding-left: 30px; }
.hub-more { grid-column: 1 / -1; justify-self: start; margin: 4px 0 0 30px; border: 0; background: none; color: var(--accent-solid); font: inherit; font-size: 0.8rem; cursor: pointer; padding: 0; }
.hub-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; grid-row: span 2; background: var(--text-muted); }
.hub-dot.is-doing { background: var(--accent-solid); } .hub-dot.is-waiting { background: #fcd34d; } .hub-dot.is-done { background: #34d399; }
.hub-item.is-done .hub-it { color: var(--text-secondary); }
.hub-late { color: #fda4af; font-weight: 700; }
.hub-sub { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); margin: 22px 0 10px; }
.hub-empty { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.hub-meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }
.hub-desc { font-size: 0.94rem; line-height: 1.65; color: var(--text-primary); overflow-wrap: anywhere; }
.hub-desc a, .hub-cm a { color: var(--accent-solid); }
.hub-img { display: block; max-width: 100%; max-height: 380px; border-radius: 10px; border: 1px solid var(--card-border); margin: 10px 0; }
.hub-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.9rem; }
.hub-steps li.is-done { color: var(--text-muted); text-decoration: line-through; }
.hub-comments { display: flex; flex-direction: column; gap: 10px; }
.hub-cm { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--card-border); font-size: 0.9rem; line-height: 1.55; overflow-wrap: anywhere; max-width: 92%; }
.hub-cm.is-mine { align-self: flex-end; background: rgba(24,106,255,0.16); border-color: rgba(181,255,59,0.3); }
.hub-cmh { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.hub-cform { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.hub-cform textarea { flex: 1; min-height: 0 !important; }
.hub-cform .btn-primary { width: auto; margin: 0; padding: 10px 16px; }
.hub-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.hub-tile { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.03); }
.hub-tile span { display: block; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.hub-tile b { display: block; font-size: 1.4rem; margin-top: 4px; }
.hub-tile small { color: var(--text-secondary); font-size: 0.74rem; }
.hub-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; margin-bottom: 14px; }
.hub-table th { text-align: left; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); padding: 0 6px 8px 0; border-bottom: 1px solid var(--card-border); }
.hub-table td { padding: 7px 6px 7px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    /* 16px stops iPhone zooming into every field it focuses (phase 57). */
    input, textarea, select, .composer textarea { font-size: 16px !important; }
    .hub-sheet { width: 100vw; border-left: 0; }
    .hub-back { display: inline-flex; }
    .hub-h > .icon-btn:last-child { display: none; }
}
/* phase 50: the check-up form inside the app */
.hub-form { display: flex; flex-direction: column; gap: 8px; }
.hub-form label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-top: 10px; }
.hub-opt { text-transform: none; letter-spacing: 0; font-weight: 500; }
.hub-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .hub-two { grid-template-columns: 1fr; } }
.hub-tip { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; margin: 2px 0 0; }
.hub-form .btn-primary { margin-top: 14px; }
.hub-err { min-height: 18px; font-size: 0.86rem; color: var(--danger); margin: 6px 0 0; }
.hub-err.is-quota { color: #fcd34d; }
.hub-prog { margin-top: 8px; }
.hub-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.09); overflow: hidden; }
.hub-track i { display: block; height: 100%; width: 0; background: var(--accent-glow, var(--accent-solid)); transition: width .3s; }
.hub-step { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; }

/* Phase 52: Meta stopped letting us read; stays under the header once the welcome is gone. */
.oa-strip { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 9px 12px; border-radius: 12px;
    border: 1px solid rgba(253,164,175,0.35); background: rgba(253,164,175,0.08); font-size: 0.84rem; line-height: 1.45; }
.oa-strip span { flex: 1; min-width: 0; }
.oa-strip .btn-primary { flex: none; width: auto; margin: 0; padding: 8px 14px; font-size: 0.82rem; white-space: nowrap; }

/* Phase 57: a long placeholder stays on one line in the one-row composer instead of being cut in half. */
.composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Phase 60: the agreement, signed before anything else, and billing. */
.hub-wrap.is-locked [data-hub-close], .hub-wrap.is-locked .hub-back { display: none !important; }
.hub-wrap.is-locked .hub-scrim { cursor: default; }
.hub-agr { display: grid; gap: 12px; margin-bottom: 18px; }
.hub-agr-i { border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 12px 14px; }
.hub-agr-h { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.hub-agr-h b { color: var(--text-primary); }
.hub-agr-h span { color: #b5ff3b; font-weight: 800; white-space: nowrap; }
.hub-agr-i p { margin: 6px 0 0; color: var(--text-secondary); font-size: 0.88rem; }
.hub-agr-i ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }
.hub-agr-t { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; color: var(--text-secondary); }
.hub-agr-t b { color: var(--text-primary); }
.hub-agr-s { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 18px 0 8px; }
.hub-agr-terms { white-space: pre-line; color: var(--text-secondary); font-size: 0.86rem; line-height: 1.6; margin: 0; }
.hub-note { border: 1px solid rgba(24,106,255,0.4); background: rgba(24,106,255,0.08); border-radius: 12px; padding: 10px 12px; color: #b5ff3b; font-size: 0.86rem; }
.hub-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--text-secondary); margin: 6px 0 4px; cursor: pointer; }
.hub-check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.hub-agr { grid-template-columns: minmax(0, 1fr); }
.hub-agr-m { color: var(--text-muted); font-size: 0.82rem; margin: 0; }
.hub-form .hub-check { text-transform: none; letter-spacing: 0; font-size: 0.88rem; font-weight: 600; color: var(--text-secondary); }

/* ===========================================================================
   The site's look (phase 63), the same as the workspace's (app.css, phase 62):
   uppercase Space Grotesk for the name and the section labels, Inter for the
   chat, blue for sending and for what you wrote, lime for "AI". The app's
   icon is its own and unchanged.
   =========================================================================== */
.oa-brand, .ai-card h1 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .02em; font-weight: 700; }
.oa-brand .oa-a, .ai-card h1 .a { color: var(--lime); }
.ai-card h1 { font-size: 2rem; line-height: 1; }
.oa-side-h, .ai-form label { font-family: var(--font-display); letter-spacing: .14em; font-weight: 700; }
.user-bubble { background: var(--accent-solid); border-color: transparent; color: #fff; border-radius: 14px 14px 4px 14px; }
.send-btn { color: #fff; border-radius: 8px; }
.send-btn:hover:not([disabled]) { background: #2f7bff; }
.composer { border-radius: 10px; background: var(--surface-1); border-color: rgba(255,255,255,.16); }
.starter { border-radius: 8px; background: var(--surface-1); }
.starter b { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; font-size: .84rem; }
.oa-menu { border-radius: 8px; border-color: rgba(255,255,255,.16); background: var(--surface-2); }
.oa-menu button { border-radius: 5px; }
.ai-page .oa-head { background: rgba(0,0,0,.92); }
.ai-page .oa-side { background: #000; }
.oa-welcome h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .01em; line-height: 1; font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.oa-welcome .mark img { filter: none; }
