:root {
  --navy: #172a3a;
  --navy-2: #0f202e;
  --blue: #3f6d8b;
  --blue-light: #dce8ef;
  --teal: #2b8a8a;
  --green: #16845b;
  --red: #c83f4d;
  --gold: #9f7d35;
  --ink: #151b22;
  --muted: #687482;
  --line: #d7dde3;
  --soft: #eef1f4;
  --canvas: #f3f5f7;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { background: #e2e6ea; }
body { margin: 0; min-height: 100vh; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: #e2e6ea; letter-spacing: 0; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell, .detail-view { width: min(540px, 100%); min-height: 100vh; margin: 0 auto; background: var(--canvas); position: relative; border-inline: 1px solid #d4dae0; }
.app-shell { padding-bottom: calc(68px + var(--safe-bottom)); }
.top-bar { position: sticky; z-index: 20; top: 0; height: 60px; display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.wordmark { padding: 0; border: 0; background: transparent; display: flex; align-items: baseline; gap: 8px; }
.wordmark strong { font-family: Georgia, "Times New Roman", serif; font-size: 15px; color: var(--navy); }
.wordmark span { padding-left: 8px; border-left: 1px solid #aab2ba; color: var(--blue); font-size: 8px; font-weight: 800; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.top-actions button { width: 30px; height: 30px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; position: relative; }
.top-actions svg { width: 18px; height: 18px; }
.top-actions b, .nav-icon b { position: absolute; min-width: 16px; height: 16px; display: grid; place-items: center; border-radius: 16px; background: var(--red); color: white; font-size: 9px; line-height: 1; font-style: normal; }
.top-actions b { right: -5px; top: -4px; }
.mini-avatar { border-radius: 50%; background: var(--navy) !important; color: white; font-size: 9px; font-weight: 800; }
.page { display: none; min-height: calc(100vh - 128px); }
.page.active { display: block; }
.today-head { min-height: 100px; padding: 18px 16px 15px; background: var(--navy); color: white; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.today-head > div > span, .page-head > div > span, .section-title span, .profile-head span, .access-strip span { font-size: 8px; font-weight: 800; color: #81abc3; }
.today-head h1 { margin: 5px 0 4px; font-size: 24px; line-height: 1.15; }
.today-head h1 b { font-weight: inherit; }
.today-head p { margin: 0; color: #c8d4dd; font-size: 10px; line-height: 1.4; }
.focus-button { flex: 0 0 auto; height: 31px; display: flex; align-items: center; gap: 5px; border: 1px solid #5d7486; border-radius: 4px; background: transparent; color: white; padding: 0 8px; font-size: 8px; }
.focus-button svg { width: 14px; }
.focus-button.active { background: white; color: var(--navy); }
.market-tape { display: grid; grid-template-columns: repeat(3, 1fr); background: white; border-bottom: 1px solid var(--line); }
.tape-cell { min-width: 0; padding: 9px 8px; border-right: 1px solid var(--line); }
.tape-cell:nth-child(3n) { border-right: 0; }
.tape-cell:nth-child(n+4) { border-top: 1px solid var(--line); }
.tape-cell span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; }
.tape-cell strong { display: block; margin: 3px 0 2px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tape-cell small { color: var(--green); font-size: 9px; font-weight: 800; }
.tape-cell small.down { color: var(--red); }
.section-block { margin-top: 8px; background: white; border-block: 1px solid var(--line); }
.section-title { padding: 12px 14px 8px; display: flex; justify-content: space-between; align-items: end; }
.section-title h2 { margin: 3px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 17px; color: var(--navy); }
.section-title button, .desk-label { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 8px; }
.priority-row { width: 100%; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: start; padding: 10px 14px; border: 0; border-top: 1px solid var(--soft); background: white; text-align: left; }
.priority-row time { color: var(--navy); font-size: 9px; font-weight: 800; }
.priority-copy { min-width: 0; }
.priority-copy > span { color: var(--blue); font-size: 8px; font-weight: 800; }
.priority-copy strong { display: block; margin: 3px 0; font-size: 11px; line-height: 1.3; }
.priority-copy small { display: block; color: var(--muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.priority-row > b { padding: 3px 5px; border-radius: 3px; background: var(--blue-light); color: var(--blue); font-size: 7px; }
.priority-row > b.RISK { background: #fbeaec; color: var(--red); }
.priority-row > b.LIVE { background: #e5f4ee; color: var(--green); }
.schedule-row { display: grid; grid-template-columns: 40px 3px 1fr auto; gap: 9px; padding: 9px 14px; border-top: 1px solid var(--soft); align-items: stretch; }
.schedule-row time { color: var(--muted); font-size: 8px; font-weight: 700; }
.schedule-row > i { width: 3px; background: var(--teal); }
.schedule-row strong { display: block; font-size: 10px; }
.schedule-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.schedule-row > span { color: var(--blue); font-size: 7px; font-weight: 800; }
.page-head { padding: 16px 15px 12px; display: flex; justify-content: space-between; align-items: center; background: white; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 4px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 23px; color: var(--navy); }
.page-head button { border: 0; background: transparent; padding: 0; min-height: 30px; display: flex; align-items: center; gap: 5px; color: var(--blue); font-size: 9px; font-weight: 800; }
.page-head svg { width: 17px; }
.metric-grid, .profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: white; border-bottom: 1px solid var(--line); }
.metric-grid div, .profile-stats div { min-width: 0; padding: 9px 8px; border-right: 1px solid var(--line); }
.metric-grid div:last-child, .profile-stats div:last-child { border-right: 0; }
.metric-grid strong, .profile-stats strong { display: block; color: var(--navy); font-size: 12px; }
.metric-grid span, .profile-stats span { display: block; color: var(--muted); font-size: 7px; margin-top: 2px; line-height: 1.25; }
.filter-rail { padding: 9px 11px; display: flex; gap: 5px; overflow-x: auto; background: white; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.filter-rail::-webkit-scrollbar { display: none; }
.filter-rail button { flex: 0 0 auto; height: 27px; padding: 0 9px; border: 1px solid var(--line); border-radius: 3px; background: white; color: var(--muted); font-size: 8px; font-weight: 700; }
.filter-rail button.active { color: white; background: var(--navy); border-color: var(--navy); }
.deal-card { padding: 11px 14px; background: white; border-bottom: 1px solid var(--line); }
.deal-card > button { width: 100%; padding: 0; border: 0; background: transparent; text-align: left; }
.deal-top { display: grid; grid-template-columns: 33px 1fr auto; gap: 9px; align-items: start; }
.deal-code { width: 33px; height: 33px; display: grid; place-items: center; background: var(--navy); color: white; font-size: 7px; font-weight: 900; }
.deal-top h3 { margin: 0; color: var(--navy); font-size: 12px; }
.deal-top p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.deal-stage { padding: 3px 4px; background: var(--blue-light); color: var(--blue); font-size: 7px; font-weight: 800; }
.deal-foot { margin: 9px 0 0 42px; display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: center; }
.deal-foot div { height: 3px; background: var(--soft); }
.deal-foot i { display: block; height: 100%; background: var(--blue); }
.deal-foot small { color: var(--muted); font-size: 7px; }
.market-table { background: var(--navy-2); color: white; }
.market-row { display: grid; grid-template-columns: 1fr auto auto; gap: 13px; padding: 9px 14px; border-top: 1px solid #2d4151; align-items: center; }
.market-row:first-child { border-top: 0; }
.market-row strong { font-size: 10px; }
.market-row span { font-size: 11px; font-variant-numeric: tabular-nums; }
.market-row small { min-width: 52px; text-align: right; color: #6bd0a5; font-size: 8px; font-weight: 800; }
.market-row small.down { color: #ff7d8a; }
.research-block { margin-top: 0; }
.research-row { width: 100%; padding: 10px 14px; display: grid; grid-template-columns: 1fr auto; gap: 10px; border: 0; border-top: 1px solid var(--soft); background: white; text-align: left; }
.research-row > div > span { color: var(--blue); font-size: 7px; font-weight: 800; }
.research-row h3 { margin: 3px 0; font-size: 11px; line-height: 1.3; }
.research-row p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.research-meta { display: flex; flex-direction: column; align-items: end; gap: 13px; color: var(--muted); font-size: 7px; }
.research-meta svg { width: 14px; }
.research-meta svg.saved { color: var(--blue); fill: var(--blue); }
.compose { padding: 0 8px !important; border-radius: 3px; background: var(--navy) !important; color: white !important; }
.search-field { height: 37px; margin: 10px 11px 7px; padding: 0 9px; display: flex; align-items: center; gap: 7px; background: white; border: 1px solid var(--line); border-radius: 3px; }
.search-field svg { width: 15px; color: var(--muted); }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 10px; }
.mail-metrics { padding: 0 13px 9px; display: flex; gap: 16px; color: var(--muted); font-size: 8px; }
.mail-metrics b { color: var(--navy); }
.mail-row { width: 100%; padding: 10px 13px; display: grid; grid-template-columns: 30px 1fr auto; gap: 9px; border: 0; border-bottom: 1px solid var(--soft); background: white; text-align: left; }
.mail-avatar { width: 30px; height: 30px; display: grid; place-items: center; background: #e4e9ed; color: var(--navy); font-size: 8px; font-weight: 900; }
.mail-row.unread .mail-avatar { background: var(--navy); color: white; }
.mail-copy { min-width: 0; }
.mail-line { display: flex; justify-content: space-between; gap: 8px; }
.mail-line strong { font-size: 10px; }
.mail-line span { color: var(--muted); font-size: 7px; }
.mail-copy h3 { margin: 3px 0; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-copy p { margin: 0; color: var(--muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-tags { display: flex; gap: 6px; align-items: center; margin-top: 5px; }
.mail-tags span { color: var(--blue); background: var(--blue-light); padding: 2px 4px; font-size: 7px; }
.mail-tags small { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 7px; }
.mail-tags svg { width: 9px; }
.mail-star { border: 0; background: transparent; padding: 0; }
.mail-star svg { width: 14px; color: #98a3ad; }
.mail-star.active svg { color: var(--gold); fill: var(--gold); }
.profile-head { padding: 17px 15px; display: grid; grid-template-columns: 46px 1fr 28px; gap: 10px; align-items: center; color: white; background: var(--navy); }
.profile-avatar { width: 46px; height: 46px; display: grid; place-items: center; background: white; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 15px; font-weight: 700; }
.profile-head h1 { margin: 3px 0 2px; font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
.profile-head p { margin: 0; color: #c8d3dc; font-size: 9px; }
.profile-head button { width: 28px; height: 28px; border: 0; background: transparent; color: white; padding: 0; }
.profile-head svg { width: 17px; }
.access-strip { padding: 11px 13px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 9px; align-items: center; background: white; border-bottom: 1px solid var(--line); }
.access-strip span { color: var(--blue); display: block; }
.access-strip strong { display: block; margin-top: 3px; font-size: 9px; }
.access-strip svg { width: 24px; }
.profile-stats { grid-template-columns: repeat(3, 1fr); }
.profile-menu { margin-top: 8px; border-top: 1px solid var(--line); background: white; }
.profile-menu button { width: 100%; padding: 11px 13px; display: grid; grid-template-columns: 26px 1fr 14px; gap: 9px; align-items: center; border: 0; border-bottom: 1px solid var(--soft); background: white; text-align: left; }
.profile-menu button > svg:first-child { width: 17px; color: var(--blue); }
.profile-menu button > svg:last-child { width: 13px; color: #9ba5af; }
.profile-menu strong { display: block; font-size: 10px; }
.profile-menu small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: 0; transform: translateX(-50%); width: min(540px, 100%); height: calc(64px + var(--safe-bottom)); padding: 5px 4px var(--safe-bottom); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: rgba(255,255,255,.98); border-top: 1px solid var(--line); }
.bottom-nav button { min-width: 0; border: 0; background: transparent; color: #77828d; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; font-size: 8px; font-weight: 700; }
.bottom-nav button.active { color: var(--navy); }
.bottom-nav svg { width: 20px; height: 20px; stroke-width: 1.8; }
.nav-icon { height: 20px; position: relative; display: block; }
.nav-icon b { right: -10px; top: -8px; }
.detail-view { position: fixed; z-index: 50; inset: 0; overflow-y: auto; }
.detail-view[hidden], .sheet-layer[hidden] { display: none; }
.detail-view > header { position: sticky; z-index: 3; top: 0; height: 54px; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: 0 8px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.detail-view > header button { height: 40px; border: 0; background: transparent; padding: 0; }
.detail-view > header svg { width: 19px; }
.detail-view > header h2 { margin: 0; text-align: center; color: var(--navy); font-size: 13px; }
.detail-content { padding-bottom: 28px; }
.detail-hero { padding: 18px 15px; color: white; background: var(--navy); }
.detail-hero > span { color: #8fb5ca; font-size: 8px; font-weight: 800; }
.detail-hero h1 { margin: 6px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 21px; line-height: 1.25; }
.detail-hero p { margin: 0; color: #cbd5dd; font-size: 9px; line-height: 1.5; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); background: white; border-bottom: 1px solid var(--line); }
.detail-grid div { min-width: 0; padding: 10px 13px; border-right: 1px solid var(--line); border-top: 1px solid var(--soft); }
.detail-grid div:nth-child(2n) { border-right: 0; }
.detail-grid small { display: block; color: var(--muted); font-size: 7px; }
.detail-grid strong { display: block; margin-top: 3px; font-size: 9px; overflow-wrap: anywhere; }
.detail-block { padding: 13px 15px; background: white; border-bottom: 1px solid var(--line); }
.detail-block h3 { margin: 0 0 8px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 12px; }
.detail-block p { margin: 0; color: #4d5964; white-space: pre-line; font-size: 9px; line-height: 1.6; }
.detail-list { list-style: none; margin: 0; padding: 0; }
.detail-list li { position: relative; padding: 7px 0 7px 15px; border-top: 1px solid var(--soft); color: #495560; font-size: 9px; line-height: 1.4; }
.detail-list li:first-child { border-top: 0; }
.detail-list li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; background: var(--teal); }
.detail-action { width: calc(100% - 28px); min-height: 40px; margin: 14px; border: 0; border-radius: 3px; background: var(--navy); color: white; font-size: 9px; font-weight: 800; }
.attachment { width: 100%; margin-top: 6px; padding: 8px; display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 3px; background: #f7f9fa; text-align: left; }
.attachment svg { width: 15px; color: var(--blue); }
.attachment strong { font-size: 8px; }
.attachment small { display: block; margin-top: 2px; color: var(--muted); font-size: 7px; }
.sheet-layer { position: fixed; z-index: 70; inset: 0; display: flex; align-items: end; justify-content: center; }
.sheet-scrim { position: absolute; inset: 0; border: 0; background: rgba(15,32,46,.58); }
.action-sheet { position: relative; width: min(540px,100%); padding: 15px 14px calc(15px + var(--safe-bottom)); background: white; border-top: 1px solid var(--line); }
.action-sheet h2 { margin: 0 0 6px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.action-sheet p { margin: 0 0 9px; color: var(--muted); font-size: 8px; }
.action-sheet label { display: block; margin: 8px 0 4px; color: var(--muted); font-size: 7px; }
.action-sheet input, .action-sheet textarea { width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 3px; outline: 0; background: #f7f9fa; font-size: 9px; }
.action-sheet textarea { min-height: 86px; resize: none; }
.sheet-actions { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.sheet-actions button { height: 37px; border: 1px solid var(--line); border-radius: 3px; background: white; font-size: 9px; }
.sheet-actions button:last-child { padding: 0 17px; border: 0; background: var(--navy); color: white; font-weight: 800; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(76px + var(--safe-bottom)); max-width: calc(100% - 36px); transform: translate(-50%,12px); padding: 8px 11px; border-radius: 3px; background: var(--navy); color: white; font-size: 8px; opacity: 0; pointer-events: none; transition: .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (min-width: 541px) { .app-shell, .detail-view { box-shadow: 0 18px 60px rgba(27,40,52,.18); } }
