/* Blackbook mobile workspace. Presentation only; trading rules stay in the engine. */
:root {
  color-scheme: dark;
  --bg: #0e100f;
  --panel: #141716;
  --raised: #1a1e1c;
  --line: #272d2a;
  --text: #f3f0e8;
  --muted: #9ca39d;
  --accent: #4ecfa1;
  --teal: #4ecfa1;
  --warn: #f1cb94;
  --bad: #f1aaa8;
  --radius: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a, summary, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button:disabled { opacity: .48; cursor: not-allowed; }
[hidden] { display: none !important; }
p, h1, h2, h3, h4 { margin: 0; }
ul { margin: 0; padding-left: 20px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
svg { display: block; }
.skip-link { position: absolute; left: 12px; top: -80px; padding: 10px 16px; background: var(--accent); color: var(--bg); z-index: 50; }
.skip-link:focus { top: 12px; }
.site-header { max-width: 1280px; margin: auto; height: calc(88px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; justify-content: space-between; padding: env(safe-area-inset-top, 0px) 40px 0; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 12px; font-weight: 750; letter-spacing: 1.8px; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 38px; font-size: 30px; font-weight: 850; letter-spacing: -3px; position: relative; padding-right: 5px; }
.brand-mark span { color: var(--accent); position: absolute; right: 2px; bottom: -1px; }
.early-label { color: var(--muted); font-size: 9px; font-weight: 500; letter-spacing: 1px; border: 1px solid var(--line); padding: 5px 8px; border-radius: 5px; margin-left: 9px; }
.site-header nav { display: flex; gap: 24px; align-items: center; font-size: 13px; color: var(--muted); }
.site-header nav a { min-height: 44px; display: flex; align-items: center; }
.site-header nav a:last-child { color: var(--text); gap: 10px; }
.app-nav { max-width: 1200px; margin: 0 auto; border-bottom: 1px solid var(--line); padding: 0 0 14px; }
.app-nav > div { display: flex; gap: 7px; }
.app-nav button { border: 1px solid transparent; background: transparent; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 22px; color: var(--muted); font-size: 13px; border-radius: 10px; font-weight: 600; }
.app-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-nav button[aria-selected=true] { color: var(--accent); background: #1a2c26; border-color: #2d493d; }
.app-nav button:hover { background: var(--raised); }
main { max-width: 1280px; margin: auto; padding: 36px 40px 0; }
.page-intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.5px; color: var(--muted); line-height: 1.6; }
.page-intro h1 { font-size: 36px; letter-spacing: -1.3px; line-height: 1.2; font-weight: 600; margin-top: 7px; }
.intro-copy { font-size: 14px; color: var(--muted); margin-top: 9px; }
.advanced-link { font-size: 13px; color: var(--muted); min-height: 44px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; }
.advanced-link:hover { text-decoration: none; color: var(--text); background: var(--raised); }
.admin-quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 24px; }
.admin-quick-links a { font-size: 13px; color: var(--muted); min-height: 36px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; background: var(--panel); }
.admin-quick-links a:hover { text-decoration: none; color: var(--text); border-color: var(--accent); background: var(--raised); }
.admin-quick-links a.admin-quick-primary { color: var(--accent); border-color: #2d493d; background: #1a2c26; }
.overview-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: stretch; }
.market-card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; min-width: 0; }
.market-card { border-color: #2e3834; position: relative; background: var(--panel); }
.market-top, .market-label, .market-value, .market-meta { display: flex; align-items: center; }
.market-top, .market-meta { justify-content: space-between; gap: 14px; }
.market-label { gap: 11px; min-width: 0; }
.coin-mark { color: var(--accent); font-size: 25px; display: grid; place-items: center; border-radius: 50%; width: 42px; height: 42px; flex-shrink: 0; background: #263a31; border: 1px solid #395246; }
.market-label h2 { font-size: 16px; font-weight: 650; }
.market-label h2 span { font-size: 12px; color: var(--muted); font-weight: 450; margin-left: 6px; }
.market-label p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 11px; font-weight: 550; border-radius: 30px; padding: 6px 10px; background: #252c32; color: #c2cbd3; }
.status-pill:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill[data-state=fresh] { background: #23392e; color: var(--accent); }
.status-pill[data-state=stale] { background: #3a3023; color: var(--warn); }
.market-value { flex-wrap: wrap; gap: 8px 12px; margin-top: 28px; align-items: baseline; }
.price { font-size: clamp(32px, 3.8vw, 52px); font-weight: 550; line-height: 1.1; letter-spacing: -1.6px; font-variant-numeric: tabular-nums; }
.quote-unit { font-size: 12px; color: var(--muted); font-weight: 550; letter-spacing: .5px; }
.market-meta { margin-top: 8px; font-size: 11px; color: var(--muted); align-items: center; }
.quiet-button { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 10px 0; min-height: 44px; }
.quiet-button:hover { color: var(--text); }
.quiet-button span { margin-left: 6px; }
.brief { border-top: 1px solid #33403c; padding-top: 21px; margin-top: 9px; }
.brief .eyebrow { color: var(--accent); }
.brief h2 { font-size: 28px; line-height: 1.25; font-weight: 550; letter-spacing: -.65px; margin-top: 8px; text-wrap: balance; }
.brief > p:last-child { font-size: 14px; color: #bfcbc7; margin-top: 12px; }
.text-action { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--accent); font-size: 13px; font-weight: 550; min-height: 44px; padding: 10px 0; }
.market-card > .text-action { margin-top: 17px; width: 100%; border-top: 1px solid #33403c; padding-top: 15px; }
.panel h2 { font-size: 26px; font-weight: 550; letter-spacing: -.7px; margin-top: 8px; line-height: 1.3; }
.section-copy { font-size: 14px; color: var(--muted); margin-top: 12px; }
.setup-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.setup-top .status-pill { margin-top: 2px; }
.setup-top > div { min-width: 0; }
.setup-reasons { font-size: 13px; color: #c4cdd4; margin: 8px 0 12px; }
.setup-reasons li + li { margin-top: 6px; }
.setup-reasons:empty { display: none; }
.setup-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.setup-levels span { display: block; font-size: 12px; color: var(--muted); }
.setup-levels strong { display: block; font-size: 16px; font-weight: 550; margin-top: 5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.5; }
.setup-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.setup-actions .button { flex: 1; }
.setup-panel > .small-note { margin-top: 9px; }
.own-plan-panel { display: flex; flex-direction: column; justify-content: center; }
.own-plan-panel > .eyebrow { color: var(--accent); }
.own-plan-panel > .setup-actions { margin-top: 22px; }
.alerted-setup { margin-bottom: 24px; border-color: #3b5349; background: var(--raised); scroll-margin-top: 20px; }
.alerted-setup .setup-actions .button { flex: 0 1 auto; }
.alerted-setup .setup-actions { margin-bottom: 18px; }
.alerted-setup .setup-reasons:empty { display: none; }
.setup-alert-settings { margin: 26px 0; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.setup-alert-settings h3, .price-watch-heading h3 { margin: 8px 0 12px; font-size: 22px; line-height: 1.3; font-weight: 550; letter-spacing: -.4px; }
.setup-alert-settings .button { margin: 12px 0 8px; width: 100%; }
.setup-alert-settings .button[aria-pressed="true"] { background: var(--panel); border-color: var(--line); color: var(--text); }
.price-watch-heading { margin-top: 22px; }
.inline-details { font-size: 12px; color: var(--muted); margin-top: 10px; }
.inline-details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #c5ced5; list-style: none; }
.inline-details > summary:after { content: ""; width: 8px; height: 8px; flex-shrink: 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-right: 4px; margin-top: -4px; }
.inline-details[open] > summary:after { transform: rotate(225deg); margin-top: 4px; }
.inline-details > summary::-webkit-details-marker { display: none; }
.inline-details .small-note { margin-top: 0; }
.setup-limits { border-top: 1px solid var(--line); margin-top: 12px; }
.small-note { font-size: 12px; color: var(--muted); line-height: 1.65; margin-top: 16px; }
.small-note a { text-decoration: underline; text-underline-offset: 3px; }
.insight-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.evidence-section { padding: 0; overflow: hidden; }
.evidence-section > summary, .details-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; list-style: none; padding: 22px 28px; cursor: pointer; min-height: 80px; }
.evidence-section > summary::-webkit-details-marker, .details-panel > summary::-webkit-details-marker { display: none; }
.evidence-section summary strong { display: block; font-size: 17px; font-weight: 550; letter-spacing: -.25px; margin-top: 4px; }
.expand-mark { font-size: 24px; font-weight: 300; color: var(--muted); line-height: 1; }
details[open] > summary .expand-mark { transform: rotate(45deg); }
.evidence-content { padding: 0 28px 24px; }
.evidence-grid { display: grid; grid-template-columns: 1fr; }
.evidence-card { padding: 18px 0; border-top: 1px solid var(--line); min-width: 0; }
.evidence-card h3 { font-size: 13px; font-weight: 500; color: var(--muted); }
.evidence-value { font-size: 25px; font-weight: 550; letter-spacing: -.5px; line-height: 1.35; margin: 7px 0; color: var(--text); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.evidence-card > p:not(.evidence-value) { font-size: 13px; color: var(--muted); }
.source-note { display: block; font-size: 12px; color: #9caaa5; margin-top: 8px; }
.evidence-card[data-state=unavailable] .evidence-value { font-size: 18px; color: var(--muted); }
.conflict-box { border-left: 2px solid var(--warn); background: #29251e; padding: 14px 16px; border-radius: 0 10px 10px 0; margin-top: 12px; }
.conflict-box h3 { font-size: 13px; color: var(--warn); margin-bottom: 6px; }
.conflict-box li { font-size: 13px; color: #dacdbb; }
.panel form { margin-top: 22px; }
label { display: block; font-size: 13px; color: #c7d0d7; margin-bottom: 9px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row select { flex: 1; min-width: 150px; }
select, input, textarea { min-height: 50px; width: 100%; max-width: 100%; border: 1px solid #3b454d; border-radius: 11px; background: #0d1217; color: var(--text); padding: 12px 14px; font-size: 16px; }
input::placeholder, textarea::placeholder { color: #8f9da7; }
select { appearance: auto; }
textarea { resize: vertical; min-height: 90px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid transparent; padding: 11px 18px; border-radius: 11px; font-size: 13px; font-weight: 650; line-height: 1.5; text-decoration: none; }
.button:hover { text-decoration: none; filter: brightness(1.06); }
.primary { background: var(--accent); color: #10251b; }
.secondary { background: #1d272c; border-color: #3b4b50; color: #e1eae8; }
.form-message { font-size: 13px; line-height: 1.6; margin-top: 14px; color: var(--teal); overflow-wrap: anywhere; }
.form-message:empty { display: none; }
.form-message[data-error=true] { color: var(--warn); }
.idea-result { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 22px; }
.idea-result .small-note { margin: 0 0 10px; }
.idea-result h3 { font-size: 17px; font-weight: 550; margin-bottom: 18px; line-height: 1.45; }
.review-group + .review-group { margin-top: 17px; }
.review-group h4 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.review-group.supporting h4 { color: var(--teal); }
.review-group.conflicting h4 { color: var(--warn); }
.review-group ul { font-size: 13px; color: #c4ced4; }
.alerts-layout { display: grid; grid-template-columns: 1.2fr .85fr; gap: 28px; align-items: start; }
.alerts-panel h2 { font-size: 32px; }
.alert-state { font-size: 14px; line-height: 1.65; color: var(--muted); margin-top: 22px; }
.phone-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.phone-actions .quiet-button { min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 11px; }
.stop-button { color: #d7aaa9; }
.phone-install-help { margin-top: 16px; }
.alert-inputs { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 10px; }
.price-input { position: relative; }
.price-input input { padding-right: 58px; }
.price-input span { position: absolute; right: 14px; top: 15px; color: var(--muted); font-size: 12px; pointer-events: none; }
#alert-form { border-top: 1px solid var(--line); padding-top: 22px; }
#alert-form .primary { margin-top: 12px; width: 100%; }
.alert-list { list-style: none; padding: 0; margin-top: 22px; }
.alert-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 17px 0; border-top: 1px solid var(--line); }
.alert-item strong { display: block; font-size: 16px; font-weight: 550; font-variant-numeric: tabular-nums; }
.alert-item span { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.alert-item button { align-self: center; color: var(--muted); border: 1px solid var(--line); background: transparent; border-radius: 9px; font-size: 12px; padding: 9px 12px; min-height: 44px; }
.empty-watches { border: 1px dashed #435047; border-radius: 12px; padding: 22px; text-align: center; font-size: 13px; color: var(--muted); }
.attention-card { padding: 28px 24px; color: var(--muted); }
.attention-symbol { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid #3e5148; border-radius: 18px; font-size: 30px; color: var(--accent); margin-bottom: 24px; }
.attention-card h2 { font-size: 37px; line-height: 1.18; letter-spacing: -1.1px; font-weight: 500; color: var(--text); margin-top: 10px; }
.attention-card > p:not(.eyebrow) { font-size: 14px; margin-top: 17px; }
.attention-card ol { list-style: none; padding: 0; margin: 25px 0 0; }
.attention-card li { display: flex; align-items: center; gap: 12px; margin-top: 15px; font-size: 13px; }
.attention-card li span { border: 1px solid var(--line); border-radius: 50%; width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; color: var(--accent); font-size: 12px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.details-panel { padding: 0; align-self: start; border-radius: 15px; }
.details-panel summary strong { font-size: 14px; font-weight: 550; display: block; margin-top: 4px; }
.details-panel summary .eyebrow { display: block; }
.details-content { padding: 0 28px 24px; font-size: 13px; color: var(--muted); }
.details-content p + p, .details-content ul + p, .details-content .button { margin-top: 15px; }
.details-content strong { color: var(--text); font-weight: 550; }
.details-content a { color: var(--teal); display: inline-block; margin-top: 14px; min-height: 44px; }
.journal-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.plan-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 12px; margin-top: 18px; }
.plan-inputs > div { min-width: 0; }
.plan-inputs label { margin-bottom: 7px; }
.plan-inputs input { font-variant-numeric: tabular-nums; }
.plan-estimate { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: #1b2c25; border: 1px solid #3a5146; border-radius: 13px; padding: 18px; margin-top: 18px; }
.plan-estimate span { display: block; font-size: 12px; color: var(--muted); }
.plan-estimate strong { display: block; font-size: 19px; font-weight: 550; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; margin-top: 5px; }
.plan-limits { margin-top: 14px; }
.note-label { margin-top: 22px; }
.note-label span { font-size: 12px; margin-left: 7px; color: var(--muted); }
.decision-help { margin-top: 14px; }
.decision-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.decision-actions .button { flex: 1; padding-left: 10px; padding-right: 10px; }
.decision-list { list-style: none; padding: 0; margin: 22px 0 0; }
.decision-more { padding: 14px 0 0; }
.decision-entry { border-top: 1px solid var(--line); padding: 20px 0; overflow-wrap: anywhere; }
.decision-entry:first-child { padding-top: 0; border-top: 0; }
.decision-entry-heading { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.decision-entry-heading strong { font-size: 14px; font-weight: 600; color: var(--teal); }
.decision-entry-heading span { font-size: 12px; color: var(--muted); }
.decision-entry p { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.65; }
.decision-entry .decision-note { color: #d6dfdc; white-space: pre-wrap; }
.decision-entry .decision-snapshot { color: #c0d0c8; }
.decision-evidence { font-size: 13px; color: var(--muted); margin-top: 14px; }
.decision-evidence summary { cursor: pointer; color: var(--teal); min-height: 44px; padding: 10px 0; }
.decision-evidence h4 { font-size: 12px; font-weight: 600; margin-top: 12px; margin-bottom: 6px; }
.decision-evidence ul { font-size: 13px; }
.plan-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 20px; padding: 0 0 14px; }
.plan-details:not([open]) { padding-bottom: 0; }
.plan-details > summary { cursor: pointer; min-height: 52px; padding: 15px 0; font-size: 13px; color: var(--text); }
.plan-details > summary span { font-size: 12px; color: var(--muted); margin-left: 8px; }
.plan-details > .small-note:first-of-type { margin-top: 0; }
.welcome-card { border: 1px solid #2e3834; border-radius: 18px; padding: 36px; background: var(--panel); }
.bb-venues { display: grid; gap: 6px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.bb-venue-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12px; color: var(--muted); }
.bb-venue-row strong { color: var(--text); font-weight: 550; font-variant-numeric: tabular-nums; }
.bb-venue-basis { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; }
.bb-subhead { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 8px; font-weight: 600; }
.bb-changes { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.bb-changes li { border: 1px solid var(--line); background: var(--raised); border-radius: 10px; padding: 10px 12px; font-size: 12px; }
.bb-changes p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }
.bb-change-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bb-change-top strong { color: var(--text); font-size: 12px; font-weight: 600; }
.bb-change-link { color: var(--accent); text-decoration: none; font-size: 11px; white-space: nowrap; }
.bb-change-link:hover { text-decoration: underline; }
.bb-draft-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #2e4c41; background: rgba(78, 207, 161, 0.08); border-radius: 10px; margin: 12px 0; font-size: 12px; color: var(--text); }
.bb-draft-banner[hidden] { display: none; }
.welcome-card h2 { font-size: clamp(44px, 6vw, 76px); font-weight: 550; letter-spacing: -2.8px; line-height: 1.06; margin-top: 18px; }
.welcome-card h2 em { font-style: normal; color: var(--accent); }
.welcome-card > p:not(.eyebrow) { font-size: 16px; max-width: 560px; color: #bfccc5; margin-top: 22px; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.value-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; border-top: 1px solid #33443d; margin-top: 40px; padding-top: 28px; }
.value-steps span { display: block; font-size: 12px; color: var(--accent); margin-bottom: 13px; }
.value-steps strong { display: block; font-size: 16px; font-weight: 550; }
.value-steps p { font-size: 13px; color: var(--muted); margin-top: 8px; }
.welcome-card > .welcome-limit { font-size: 12px; margin-top: 30px; }
.notice { background: #2a271f; color: #edddbf; border: 1px solid #504732; border-radius: 12px; padding: 15px 18px; margin-bottom: 20px; font-size: 13px; }
.notice a { text-decoration: underline; margin-left: 5px; }
footer { display: flex; justify-content: space-between; gap: 18px; padding: 28px 0 35px; color: var(--muted); font-size: 12px; }
footer > span { align-self: center; }
.footer-dot { padding: 0 7px; }
footer a { min-height: 44px; display: flex; align-items: center; }
@media (hover: hover) { .button, .app-nav button, .advanced-link { transition: background-color .15s ease, border-color .15s ease, color .15s ease; } }
@media (max-width: 1080px) {
  .site-header { padding-left: 24px; padding-right: 24px; }
  .app-nav { margin: 0 24px; }
  main { padding: 28px 24px 0; }
  .overview-grid, .insight-grid { grid-template-columns: 1fr 1fr; }
  .market-top { flex-wrap: wrap; }
  .setup-top { display: block; }
  .setup-top .status-pill { margin-top: 12px; }
  .setup-actions .button { flex-basis: 100%; }
  .market-label h2 span { display: block; margin-left: 0; }
  .setup-levels { gap: 9px; }
  .setup-levels strong { font-size: 14px; }
  .form-row { flex-direction: column; }
  .form-row select { width: 100%; }
  .attention-card { padding: 24px 10px; }
}
@media (max-width: 760px) {
  .site-header { height: calc(66px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid #232c33; }
  .brand { font-size: 11px; letter-spacing: 1.4px; gap: 8px; }
  .brand-mark { width: 29px; font-size: 27px; }
  .early-label { display: none; }
  .site-header nav { gap: 16px; font-size: 12px; }
  .site-header .app-link { display: none; }
  .app-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; max-width: none; margin: 0; background: #10161cf5; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid #38424a; border-bottom: 0; padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); box-shadow: 0 -8px 25px #00000024; }
  .app-nav > div { gap: 8px; max-width: 460px; margin: auto; }
  .app-nav button { flex: 1; flex-direction: column; gap: 3px; font-size: 11px; padding: 6px 12px; min-height: 56px; border-radius: 12px; }
  .app-nav svg { width: 20px; height: 20px; stroke-width: 1.7; }
  .app-nav button[aria-selected=true] { background: #21342c; border-color: #365143; color: var(--accent); }
  html { scroll-padding-bottom: 112px; }
  main { padding: 22px max(16px, env(safe-area-inset-right, 0px)) calc(120px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  footer.bb-public-disclaimer { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important; }
  .page-intro { margin-bottom: 20px; align-items: center; gap: 12px; }
  .page-intro h1 { font-size: 28px; letter-spacing: -.9px; margin-top: 3px; }
  .page-intro .eyebrow { display: none; }
  .intro-copy { font-size: 13px; max-width: 260px; margin-top: 6px; }
  .advanced-link { font-size: 12px; flex-shrink: 0; width: auto; min-width: 44px; height: 40px; min-height: 40px; justify-content: center; padding: 0 12px; border-radius: 10px; white-space: nowrap; }
  .advanced-link span { font-size: 14px; }
  .overview-grid, .insight-grid, .alerts-layout, .journal-layout { grid-template-columns: 1fr; gap: 16px; }
  .market-card, .panel { padding: 21px; border-radius: 18px; }
  .market-top { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .market-label { gap: 9px; }
  .market-label h2 { font-size: 15px; }
  .market-label h2 span { display: inline; font-size: 11px; margin-left: 4px; }
  .market-label p { font-size: 11px; }
  .coin-mark { width: 36px; height: 36px; font-size: 23px; }
  .status-pill { font-size: 10px; padding: 5px 8px; }
  .market-value { margin-top: 20px; gap: 8px 10px; }
  .price { font-size: clamp(39px, 11vw, 48px); letter-spacing: -1.9px; }
  .quote-unit { font-size: 11px; }
  .market-meta { gap: 8px; margin-top: 7px; font-size: 11px; }
  .market-meta p { max-width: 220px; }
  .quiet-button { font-size: 12px; }
  .brief { padding-top: 18px; margin-top: 6px; }
  .brief h2 { font-size: 25px; line-height: 1.25; }
  .brief > p:last-child { font-size: 13px; line-height: 1.65; }
  .market-card > .text-action { margin-top: 16px; }
  .setup-top { display: flex; gap: 12px; }
  .setup-top .status-pill { margin-top: 0; }
  .setup-panel h2 { font-size: 23px; }
  .setup-top .eyebrow { font-size: 9px; letter-spacing: 1.1px; }
  .setup-panel .section-copy { font-size: 13px; }
  .setup-levels { gap: 10px; margin-top: 14px; padding: 14px 0; }
  .setup-levels strong { font-size: 14px; }
  .setup-levels span { font-size: 11px; }
  .setup-actions { margin-top: 10px; }
  .setup-actions .button { flex-basis: auto; font-size: 12px; padding: 11px 12px; }
  .small-note, .setup-panel > .small-note { font-size: 12px; }
  .insight-grid { margin-top: 16px; }
  .evidence-section, .details-panel { padding: 0; }
  .evidence-section > summary, .details-panel > summary { padding: 20px 21px; }
  .evidence-section summary strong { font-size: 16px; }
  .evidence-content, .details-content { padding: 0 21px 21px; }
  .second-look h2 { font-size: 24px; }
  .section-copy { font-size: 13px; }
  .panel form { margin-top: 20px; }
  .form-row { gap: 11px; }
  .form-row .button { width: 100%; }
  .attention-card { padding: 12px 6px; }
  .attention-symbol { display: none; }
  .attention-card h2 { font-size: 28px; line-height: 1.2; letter-spacing: -.7px; }
  .attention-card h2 br { display: none; }
  .attention-card > p:not(.eyebrow) { font-size: 13px; }
  .attention-card ol { margin-top: 20px; }
  .alerts-panel h2 { font-size: 28px; }
  .alert-state { font-size: 13px; }
  .phone-actions .secondary, .phone-install-help { width: 100%; }
  .phone-actions .quiet-button { flex: 1; font-size: 12px; }
  .alert-inputs { grid-template-columns: 102px minmax(0, 1fr); }
  .help-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
  .plan-inputs { gap: 14px 10px; }
  .plan-inputs label { font-size: 12px; }
  .plan-inputs input { padding: 11px 10px; }
  .plan-details > summary span { display: block; margin: 4px 0 0 16px; }
  .decision-actions { gap: 7px; }
  .decision-actions .button { font-size: 12px; padding: 10px 8px; }
  .plan-estimate { gap: 15px; padding: 15px; }
  .plan-estimate strong { font-size: 17px; }
  .decision-entry-heading { display: block; }
  .decision-entry-heading span { display: block; margin-top: 5px; }
  .decision-list { max-height: none; overflow: visible; }
  .welcome-card { padding: 27px 22px; border-radius: 20px; }
  .welcome-card h2 { font-size: 46px; letter-spacing: -1.9px; }
  .welcome-card > p:not(.eyebrow) { font-size: 14px; line-height: 1.7; }
  .welcome-actions { flex-direction: column; gap: 10px; margin-top: 23px; }
  .value-steps { grid-template-columns: 1fr; gap: 22px; margin-top: 28px; padding-top: 24px; }
  .value-steps > div { padding-left: 33px; position: relative; }
  .value-steps span { position: absolute; left: 0; top: 3px; }
  .value-steps p { margin-top: 5px; }
  .welcome-card > .welcome-limit { font-size: 12px; }
  footer { flex-wrap: wrap; justify-content: flex-start; gap: 0 20px; font-size: 11px; padding: 24px 3px 0; }
  footer > span { flex-basis: 100%; margin-bottom: 6px; }
  footer a { font-size: 12px; }
}
@media (max-width: 899px) {
  main { padding-bottom: 88px; }
}
@media (max-width: 560px) {
  .site-header { height: auto; min-height: 90px; flex-wrap: wrap; gap: 0; padding-top: max(12px, env(safe-area-inset-top, 0px)); }
  .site-header nav { width: 100%; justify-content: space-between; gap: 10px; }
}
@media (max-width: 380px) {
  .market-card, .panel { padding: 18px; }
  .market-top { gap: 10px; }
  .market-label h2 span { display: block; margin-left: 0; }
  .market-meta { flex-wrap: wrap; gap: 0 10px; }
  .market-meta p { max-width: 100%; }
  .setup-top { display: block; }
  .setup-top .status-pill { margin-top: 12px; }
  .setup-actions .button { flex-basis: 100%; }
  .setup-levels strong { font-size: 13px; }
  .evidence-section, .details-panel { padding: 0; }
  .decision-actions .button { min-width: 78px; }
  .welcome-card h2 { font-size: 40px; }
  .alert-inputs { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition: none !important; animation: none !important; }
}

.inbox-panel { margin-bottom: 20px; }
.inbox-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.inbox-heading .quiet-button { flex-shrink: 0; min-height: 44px; }
.inbox-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0; margin: 20px 0; list-style: none; }
.inbox-entry { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 11px; padding: 19px; border: 1px solid #293137; border-radius: 14px; background: #10161b; }
.inbox-entry-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; width: 100%; }
.inbox-entry h3, .inbox-entry p { margin: 0; }
.inbox-entry h3 { font-size: 16px; line-height: 1.5; }
.inbox-entry .eyebrow { font-size: 9px; letter-spacing: 1px; }
.inbox-entry .inbox-levels { color: #e1e7e9; font-size: 13px; line-height: 1.8; font-variant-numeric: tabular-nums; }
.inbox-entry .small-note { overflow-wrap: anywhere; font-size: 12px; }
.inbox-entry .text-action { margin-top: auto; min-height: 44px; align-items: center; }
.inbox-empty { grid-column: 1 / -1; padding: 24px; border: 1px dashed #354047; border-radius: 14px; color: #acb8bf; font-size: 14px; line-height: 1.7; }
.preferences-panel { margin-bottom: 24px; }
.preferences-panel > summary strong { display: block; margin-top: 5px; }
.preferences-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.preferences-grid > div { min-width: 0; }
.preferences-grid input { width: 100%; min-width: 0; }
.preferences-grid label { margin-top: 0; }
.preferences-grid .small-note { margin-bottom: 0; }
.delivery-preferences { min-width: 0; margin: 22px 0; padding: 18px; border: 1px solid #354047; border-radius: 12px; }
.delivery-preferences legend { padding: 0 8px; color: #e1e7e9; font-size: 14px; font-weight: 600; }
.delivery-preferences > .small-note:first-of-type { margin-top: 0; }
.checkbox-label { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 10px 0 14px; cursor: pointer; }
.checkbox-label input { width: 20px; min-height: 20px; height: 20px; margin: 0; accent-color: #bcebd6; }
.preferences-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.preferences-actions .quiet-button { min-height: 44px; }
.risk-reminder { padding: 12px 14px; border: 1px solid #695331; border-radius: 10px; background: #252019; color: #efd5aa; font-size: 13px; line-height: 1.6; }
@media (max-width: 700px) {
  .inbox-list { grid-template-columns: 1fr; gap: 12px; }
  .inbox-entry { padding: 16px; }
  .inbox-heading h2 { font-size: 24px; }
  .inbox-heading .eyebrow { font-size: 9px; }
  .preferences-panel { padding: 0; }
  .preferences-grid { grid-template-columns: 1fr; gap: 18px; }
  .delivery-preferences { padding: 14px; }
  .delivery-preferences .preferences-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .delivery-preferences .preferences-grid > div:last-child { grid-column: 1 / -1; }
  .preferences-actions .button { width: 100%; }
}

/* In-app confirm (TAPE.confirm) for Remove and Unlink. BTC Watch doesn't load ui.css, so the dialog is styled here. */
dialog.ui-confirm { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; width: min(420px, calc(100vw - 32px)); }
dialog.ui-confirm::backdrop { background: rgba(0, 0, 0, .6); }
dialog.ui-confirm h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.3; }
dialog.ui-confirm .ui-confirm-target { margin: 0 0 8px; overflow-wrap: anywhere; }
dialog.ui-confirm .note { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
dialog.ui-confirm .row { display: flex; justify-content: flex-end; gap: 8px; }
dialog.ui-confirm .ui-btn { min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font: inherit; cursor: pointer; }
dialog.ui-confirm .ui-btn.danger { background: var(--bad); border-color: transparent; color: #1a0f0f; }

/* Below 900px the header links fold into one Menu button; the list opens under the header. */
.site-header { position: relative; }
.site-menu-button, .site-header > .desk-link-bar { display: none; }
@media (max-width: 899px) {
  .site-header, .site-header nav { flex-wrap: nowrap; }
  .site-menu-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
  .site-menu-button::after { content: "▾"; font-size: 11px; color: var(--muted); }
  .site-menu-button[aria-expanded="true"]::after { content: "▴"; }
  .site-nav { display: none; position: absolute; z-index: 30; top: 100%; right: max(20px, env(safe-area-inset-right, 0px)); width: min(300px, calc(100vw - 40px)); padding: 8px; background: var(--panel); border: 1px solid #35414b; border-radius: 16px; box-shadow: 0 20px 56px rgba(0, 0, 0, .72); }
  .site-header.menu-open .site-nav { display: block; }
  .site-header .site-nav nav { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: auto; font-size: 15px; }
  .site-header .site-nav nav a { min-height: 46px; padding: 0 12px; border-radius: 10px; border-bottom: 1px solid #1e262e; color: var(--text); }
  .site-header .site-nav nav a:last-child { border-bottom: 0; }
  .site-header .site-nav nav a:hover { background: var(--raised); text-decoration: none; }
  .site-header .site-nav .app-link { display: flex; }
  .site-header > .desk-link-bar { display: flex; align-items: center; min-height: 44px; padding: 0 8px; margin-left: auto; font-size: 14px; color: var(--muted); }
  .site-header .site-nav .desk-link { display: none; }
  .site-header { min-height: 0; }
}
@media (max-width: 380px) {
  .site-header { height: calc(66px + env(safe-area-inset-top, 0px)); flex-wrap: nowrap; }
}

/* Market evidence spans the row with its readings side by side, so neither column ends early. */
.insight-grid > .evidence-section, .insight-grid > .second-look { grid-column: 1 / -1; }
.evidence-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); column-gap: 28px; }
.second-look #idea-form { max-width: 640px; }

/* Touch targets: at least 44px tall on touch screens. */
@media (pointer: coarse) {
  .brand { min-height: 44px; }
  .site-header nav a { min-width: 44px; }
}

/* ==========================================================================
   Page 2 Terminal Density Override (/btc Overview, Alerts & Decision Journal)
   Bloomberg brief density: compact masthead, crisp tabular cards, zero wasted void
   ========================================================================== */
body {
  font-feature-settings: "tnum" 1, "cv05" 1;
}

.site-header {
  min-height: 52px;
  padding-top: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #242a27;
}

main {
  max-width: 1380px;
  padding-top: 10px;
}

/* Compact page/section header strip instead of oversized landing hero */
main h1,
.view-head h1,
.section-head h1,
.page-head h1 {
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.view-head,
.section-head,
.page-head,
.overview-head,
.hero-head {
  padding-top: 6px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  gap: 8px 16px;
}

.view-head p,
.section-head p,
.page-head p {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

/* Public demo / delayed banner kept compact */
.public-banner,
.demo-banner,
[data-public-banner] {
  padding: 8px 12px;
  margin-bottom: 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
}

/* Cards & panels: matte graphite, hairline borders, 8px corners, tight density */
.market-card,
.panel,
.second-look,
.evidence-section,
.details-panel,
.inbox-entry {
  background: #141716;
  border: 1px solid #242a27;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: none;
}

.market-card h2,
.panel h2,
.details-panel h2,
.inbox-heading h2 {
  font-size: 16px;
  line-height: 1.28;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}

.panel h3,
.market-card h3 {
  font-size: 14px;
  line-height: 1.3;
  margin: 0 0 4px;
}

/* 3-column desktop Market Brief layout with compact BTC readout (no vertical void) */
@media (min-width: 1120px) {
  .overview-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.85fr) minmax(380px, 1.25fr) minmax(300px, 0.9fr);
    gap: 12px;
    align-items: start;
  }
  .overview-grid > .insight-grid,
  .overview-grid > #advanced-charts {
    grid-column: 1 / -1;
  }
}

@media (min-width: 780px) and (max-width: 1119px) {
  .overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }
}

.market-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.market-price,
#btc-price {
  font-size: clamp(28px, 2.5vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.market-meta {
  padding-top: 8px;
  border-top: 1px solid #202522;
  font-size: 12px;
  gap: 6px 12px;
}

#btc-overview-intel {
  padding: 14px 16px;
}

#btc-overview-intel h2 {
  font-size: 16px;
  margin-bottom: 6px;
}

#btc-overview-intel > div:first-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 10px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.evidence-grid {
  gap: 10px 18px;
}

/* Dense Alerts & Decision Journal 2-column split */
@media (min-width: 960px) {
  .alerts-layout {
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
    gap: 12px;
    align-items: start;
  }
  .journal-layout {
    display: grid;
    grid-template-columns: minmax(400px, 0.92fr) minmax(0, 1.18fr);
    gap: 12px;
    align-items: start;
  }
}

.inbox-list {
  gap: 10px;
  margin: 12px 0;
}

.inbox-entry {
  gap: 6px;
  padding: 12px 14px;
}

.inbox-entry h3 {
  font-size: 14px;
  line-height: 1.35;
}

.delivery-preferences {
  margin: 14px 0;
  padding: 12px 14px;
  border-color: #262c29;
  border-radius: 8px;
}

#btc-draft-banner {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(78, 207, 161, 0.08);
  border: 1px solid rgba(78, 207, 161, 0.28);
  font-size: 12.5px;
  line-height: 1.45;
}

.form-grid,
.decision-form,
#idea-form {
  gap: 10px;
}

input,
select,
textarea,
button.button,
.quiet-button {
  border-radius: 6px;
}

/* Preserve touch targets >= 44px on coarse / mobile while compacting desktop controls */
@media (min-width: 900px) and (pointer: fine) {
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  .button,
  .quiet-button {
    min-height: 36px;
  }
}

@media (max-width: 899px) {
  .insight-grid {
    grid-template-columns: 1fr;
  }
  .market-card,
  .panel,
  #btc-overview-intel {
    padding: 14px;
  }
  .welcome-card h2 {
    font-size: 26px;
  }
}
