:root {
  --font-prism: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

html { overflow-y:scroll; scrollbar-gutter:stable; }
body, body *, button, input, select, textarea {
  font-family: var(--font-prism) !important;
}
code, pre, .mfa-secret { font-family:ui-monospace, "SFMono-Regular", Consolas, monospace !important; }

h1, h2, h3, h4, h5, h6 { letter-spacing: 0; }
.summary strong, .timeline-summary dd, .holding-choice strong,
.metric-row header strong, .settings-dl dd, time {
  font-variant-numeric: tabular-nums;
}

.prism-soft-loading main { opacity:.52; pointer-events:none; transition:opacity .14s ease; }
.prism-soft-loading::before { content:""; position:fixed; z-index:100; top:0; left:0; width:38%; height:2px; background:var(--blue); animation:prism-progress .8s ease-in-out infinite alternate; }
@keyframes prism-progress { from { transform:translateX(-25%); } to { transform:translateX(190%); } }
@media (prefers-reduced-motion:reduce) { .prism-soft-loading main { transition:none; } .prism-soft-loading::before { animation:none; width:100%; } }

.security img {
  grid-row: 1 / 3;
  width: 48px;
  height: 42px;
  object-fit: contain;
}

.security b,
.security small {
  grid-column: 2;
}

.mfa-card { width: min(460px, calc(100vw - 30px)); }
.mfa-card form,
.mfa-card label { width:100%; min-width:0; }
.mfa-card input,
.mfa-card button { display:block; width:100%; max-width:100%; min-width:0; }
.mfa-card .mfa-qr { width: 220px; height: 220px; margin: 12px auto; mix-blend-mode: normal; }
.mfa-card details { margin: 8px 0 18px; color: var(--muted); }
.mfa-secret { display: block; margin-top: 8px; padding: 10px; word-break: break-all; background: #fff; border: 1px solid var(--line); }
.mfa-code { text-align: center; font: 600 28px/1.2 ui-monospace, monospace; letter-spacing: .28em; }
.mfa-code.compact { width: 180px; font-size: 20px; }
.mfa-reveal-form { display:grid; gap:10px; }
.mfa-reveal-form>div { display:flex; gap:10px; align-items:center; }
.mfa-reveal-form small { color:var(--muted); }
.mfa-enrollment { display:grid; grid-template-columns:180px 1fr; gap:22px; align-items:center; }
.mfa-enrollment>img { width:180px; height:180px; background:#fff; }
.mfa-enrollment details { color:var(--muted); }

.summary strong,
.tr:not(.th) > span:not(.security),
.head-actions time,
.legend,
.section-head > span {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: 0;
}

.summary strong { font-weight: 500; }
.bar { display: flex; overflow: hidden; background: transparent; }
.bar i { display: block; height: 100%; }
.bar i.cash, .legend b.cash { background: #10233f; }
.bar i.lly, .legend b.lly { background: #356fbd; }
.bar i.dram, .legend b.dram { background: #8aaed8; }

.trend-toolbar { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 0 2px; }
.trend-periods { display:flex; align-items:center; gap:3px; padding:3px; border:1px solid var(--line); border-radius:7px; background:#eeebe4; }
.trend-periods button { min-width:50px; padding:6px 10px; border:0; border-radius:5px; background:transparent; color:var(--muted); font:inherit; font-size:12px; font-weight:650; cursor:pointer; white-space:nowrap; }
.trend-periods button:hover { color:var(--ink); }
.trend-periods button.active { background:var(--blue); color:#fff; }
.trend-status { color:var(--muted); font-size:11px; text-align:right; }
.chart-empty { gap:5px; align-content:center; text-align:center; }
.chart-empty strong { color:var(--ink); font-size:14px; }
.chart-empty span { color:var(--muted); font-size:11px; }

.masthead.no-nav { height:88px; padding:0 28px; grid-template-columns:220px minmax(280px,1fr) auto; }
.masthead.no-nav .desktop-nav { display:flex; order:initial; grid-column:auto; align-self:stretch; align-items:stretch; justify-content:center; gap:34px; min-width:0; overflow:visible; }
.masthead.no-nav .desktop-nav a { position:relative; display:flex; align-items:center; padding:0 7px; border:0; color:var(--muted); font-size:15px; font-weight:500; text-decoration:none; white-space:nowrap; transition:color .16s ease; }
.masthead.no-nav .desktop-nav a::after { content:""; position:absolute; left:7px; right:7px; bottom:-1px; height:2px; border-radius:2px 2px 0 0; background:transparent; transform:scaleX(.45); transition:background .16s ease,transform .16s ease; }
.masthead.no-nav .desktop-nav a:hover { color:var(--ink); }
.masthead.no-nav .desktop-nav a.active,
.masthead.no-nav .desktop-nav a[aria-current="page"] { color:var(--blue); font-weight:700; }
.masthead.no-nav .desktop-nav a.active::after,
.masthead.no-nav .desktop-nav a[aria-current="page"]::after { background:var(--blue); transform:scaleX(1); }
.utility-link { color: var(--muted); text-decoration: none; padding: 8px 2px; }
.utility-link:hover { color: var(--blue); }
.masthead.no-nav .head-actions { min-width:0; }
.masthead.no-nav .head-actions .primary { display:inline-flex; align-items:center; justify-content:center; min-width:88px; min-height:42px; white-space:nowrap; }
.masthead.no-nav .header-divider { width:1px; height:24px; margin:0 2px; background:var(--line); }
.masthead.no-nav .head-actions time { color:var(--ink); font-size:13px; white-space:nowrap; }
.masthead.no-nav .head-actions .text-button { transition:color .16s ease; }
.masthead.no-nav .head-actions .text-button:hover { color:var(--ink); }
.chatgpt-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; }
.ai-panel { display: block; }
.ai-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; }
.ai-panel-head .kicker { margin-top: 0; }
.ai-panel-head .ai-actions { flex: 0 0 auto; }
.report-tabs { display: inline-flex; gap: 4px; margin: 0 0 14px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #eeebe4; }
.report-tabs button { min-width: 78px; padding: 7px 13px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; text-align: center; font: inherit; font-weight: 650; cursor: pointer; }
.report-tabs button.active { color: white; background: var(--blue); }
[data-report-panel][hidden] { display: none; }
.review-unchanged { justify-self: start; border: 0; padding: 0; color: var(--blue); background: transparent; font: inherit; cursor: pointer; }
.review-saved { color: var(--muted); text-align: center; }
.review-saved a { color: var(--blue); }
.analysis { white-space: normal; width: 100%; max-width: none; max-height: 520px; overflow-y: auto; overscroll-behavior: contain; margin-top: 22px; padding: 22px 24px 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scrollbar-gutter: stable; }
.analysis::-webkit-scrollbar { width: 8px; }
.analysis::-webkit-scrollbar-track { background: #ebe7de; border-radius: 999px; }
.analysis::-webkit-scrollbar-thumb { background: #9ba8b9; border-radius: 999px; }
.analysis h1 { font-size: 28px; margin: 0 0 18px; }
.analysis h2 { font-size: 20px; margin: 28px 0 10px; }
.analysis h3 { font-size: 16px; margin: 20px 0 8px; }
.analysis p { color: var(--ink); margin: 8px 0; }
.analysis ul, .analysis ol { margin: 8px 0 14px; padding-left: 24px; }
.analysis li { margin: 5px 0; }
.analysis table { width: 100%; margin: 14px 0 20px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.analysis th, .analysis td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.analysis th { color: var(--muted); font-weight: 600; }
.analysis blockquote { margin: 12px 0; padding: 2px 0 2px 14px; border-left: 3px solid #8aaed8; color: var(--muted); }
.analysis-meta { padding-top: 14px; color: var(--muted); font-size: 11px; }

.settings-page {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 96px;
}

.settings-heading { margin-bottom: 32px; }
.settings-heading h1 { margin: 6px 0 12px; font-size: clamp(34px, 4vw, 54px); }
.settings-heading > p:last-child { color: var(--muted); }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.settings-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .2);
}

.settings-card h2 { margin: 0 0 22px; font-size: 25px; }
.settings-card h3 { margin: 0 0 6px; font-size: 19px; }
.settings-card p { color: var(--muted); }
.settings-card .section-head { align-items: start; }
.login-management-card { grid-column:1 / -1; }
.login-management-card .section-head form { flex:0 0 auto; }
.login-management-grid { display:grid; grid-template-columns:1fr 1fr; gap:32px; padding-top:22px; }
.login-management-grid h3 { padding-bottom:10px; border-bottom:1px solid var(--line); }
.session-list,.login-event-list { display:grid; }
.session-item,.login-event { min-height:64px; padding:12px 0; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; gap:12px; }
.session-item:last-child,.login-event:last-child { border-bottom:0; }
.session-item b,.login-event b { font-size:14px; }
.session-item small,.login-event small { display:block; color:var(--muted); margin-top:3px; font-size:11px; }
.current-badge,.event-success,.event-failed { display:inline-block; margin-left:8px; padding:2px 7px; border-radius:999px; font-size:10px; font-weight:700; }
.current-badge,.event-success { color:var(--green); background:#eaf4ee; }
.event-failed { margin:0; color:var(--red); background:#f8ecea; }
.login-event { justify-content:flex-start; }
.login-event>span { flex:0 0 auto; }
.privacy-note,.empty-copy { color:var(--muted); font-size:11px; }
.privacy-note { margin:16px 0 0 !important; padding-top:12px; border-top:1px solid var(--line); }
.chatgpt-link-form { display: grid; gap: 9px; margin-top: 20px; }
.chatgpt-link-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.chatgpt-link-form input { width: 100%; }
.chatgpt-link-form small { color: var(--muted); }

.metric-list { display: grid; gap: 22px; }
.metric-row header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.metric-row header b { font-size: 16px; }
.metric-row header strong { font: 600 22px/1 "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-variant-numeric: tabular-nums; }
.metric-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e5e1d8; }
.metric-track i { display: block; height: 100%; border-radius: inherit; background: #17488f; }
.metric-row small { display: block; margin-top: 7px; color: var(--muted); }

.settings-dl { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr); margin: 0; }
.settings-dl dt, .settings-dl dd { margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.settings-dl dt { color: var(--muted); }
.settings-dl dd { text-align: right; overflow-wrap: anywhere; }
.settings-dl dt:last-of-type, .settings-dl dd:last-of-type { border-bottom: 0; }

.connection-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.connection-row .secondary { white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; color: var(--muted); }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #167344; }
.status-pill.pending::before { background: #a66b16; }

.history-page { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 90px; }
.history-heading { margin-bottom: 28px; }
.history-heading h1 { margin: 5px 0 10px; }
.history-heading > p:last-of-type { color: var(--muted); }
.history-filters { display: flex; gap: 6px; margin-top: 22px; }
.history-filters a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); text-decoration: none; }
.history-filters a.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.history-grid { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 20px; align-items: start; }
.history-list,.history-detail { border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.23); }
.history-list { max-height: 720px; overflow-y: auto; }
.history-item { display: grid; gap: 3px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.history-item span,.history-item small,.review-history-item>span { color: var(--muted); font-size: 11px; }
.history-item.active { box-shadow: inset 3px 0 var(--blue); background: #eef2f7; }
.history-detail { min-height: 520px; padding: 25px; }
.history-grid.is-empty { grid-template-columns: minmax(0,720px); justify-content:center; }
.history-grid.is-empty .history-list { display:none; }
.history-grid.is-empty .history-detail { min-height:0; padding:34px; }
.history-grid.is-empty .history-placeholder { max-width:520px; margin:0 auto; padding:8px 0; text-align:center; }
.history-cta { display:inline-block; margin-top:14px; text-decoration:none; }
.history-analysis { max-height: 650px; }
.history-empty,.history-placeholder { padding: 24px; color: var(--muted); }
.review-history-item { padding: 18px; border-bottom: 1px solid var(--line); }
.review-history-item dl { margin: 12px 0 0; }
.review-history-item dt { margin-top: 8px; color: var(--muted); font-size: 11px; }
.review-history-item dd { margin: 2px 0 0; }

@media (max-width: 850px) {
  .masthead.no-nav { grid-template-columns: 1fr auto; height: 72px; padding-top: 0; }
  .settings-page { width: min(100% - 28px, 680px); padding-top: 36px; }
  .settings-grid { grid-template-columns: 1fr; }
  .login-management-grid { grid-template-columns:1fr; gap:18px; }
  .connection-row { align-items: flex-start; flex-direction: column; }
  .chatgpt-link-form > div { grid-template-columns: 1fr; }
  .ai-panel-head { flex-direction: column; }
  .ai-panel-head .ai-actions { width: 100%; display: flex; }
  .analysis { max-height: 460px; padding-right: 12px; }
  .history-page { width: min(100% - 28px, 680px); padding-top: 36px; }
  .history-grid { grid-template-columns: 1fr; }
  .history-list { max-height: 310px; }
}

/* Prism investment memory system */
.timeline-body { min-width: 0; }
.suite-header { min-height: 70px; padding: 0 26px; display: grid; grid-template-columns: 250px 1fr auto; align-items: center; border-bottom: 1px solid var(--line); background: var(--paper); }
.suite-header nav { display: flex; justify-content: center; gap: clamp(22px,3vw,48px); height: 70px; }
.suite-header nav a { display: grid; align-items: center; color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; }
.suite-header nav a.active { color: var(--blue); border-color: var(--blue); font-weight: 700; }
.suite-actions { display: flex; align-items: center; gap: 16px; }
.suite-actions .primary { padding: 9px 14px; }
.suite-actions time { font-variant-numeric: tabular-nums; font-size: 12px; }
.timeline-flash { width: calc(100% - 52px); margin: 14px auto 0; }
.timeline-shell { max-width: none; margin: 0; padding: 0; display: grid; grid-template-columns: 270px minmax(540px,1fr) 360px; min-height: calc(100vh - 70px); }
.holding-rail { padding: 28px 18px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.rail-title { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 8px; }
.rail-title h2 { margin: 0; font: 600 20px Georgia,"Noto Serif SC",serif; }
.holding-choice { display: grid; grid-template-columns: 52px 1fr; gap: 11px; padding: 16px 13px; border: 1px solid transparent; border-radius: 6px; color: var(--ink); text-decoration: none; }
.holding-choice.active { border-color: var(--blue); box-shadow: inset 3px 0 var(--blue); background: rgba(255,255,255,.28); }
.holding-choice img { width: 50px; height: 42px; object-fit: contain; }
.holding-choice div { display: grid; gap: 3px; }
.holding-choice b { font-size: 14px; }
.holding-choice span,.holding-choice small { font-size: 11px; color: var(--muted); }
.holding-choice strong { margin-top: 6px; font: 600 20px/1.2 "Segoe UI",sans-serif; font-variant-numeric: tabular-nums; }
.rail-collapse { margin-top: auto; padding: 10px; color: var(--muted); text-decoration: none; }
.timeline-main { min-width: 0; padding: 28px 28px 50px; border-right: 1px solid var(--line); }
.timeline-summary { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.timeline-summary p,.timeline-summary span { margin: 0; color: var(--muted); font-size: 12px; }
.timeline-summary h1 { margin: 3px 0 8px; font-size: 31px; }
.timeline-summary dl { display: grid; grid-template-columns: repeat(3,minmax(110px,1fr)); margin: 0; }
.timeline-summary dl div { min-width: 120px; padding: 0 20px; border-left: 1px solid var(--line); }
.timeline-summary dt { color: var(--muted); font-size: 11px; }
.timeline-summary dd { margin: 5px 0 1px; font: 600 20px "Segoe UI",sans-serif; font-variant-numeric: tabular-nums; }
.timeline-summary dl small { color: var(--muted); font-size: 10px; }
.timeline-tools { display: flex; align-items: center; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.timeline-tools select { width: 145px; }
.timeline-tools label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.timeline-tools input[type=search] { min-width: 150px; margin-left: auto; }
.decision-timeline { position: relative; }
.timeline-event { display: grid; grid-template-columns: 105px 34px minmax(0,1fr); min-height: 122px; padding-top: 18px; }
.timeline-event[hidden] { display: none; }
.timeline-event>time { display: grid; align-content: start; gap: 2px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline-event>time b { color: var(--ink); font-weight: 500; }
.timeline-event>time span { font-size: 10px; }
.event-track { position: relative; }
.event-track::after { content:""; position:absolute; top:18px; bottom:-18px; left:8px; width:1px; background:var(--line); }
.timeline-event:last-child .event-track::after { bottom: 35px; }
.event-dot { position: relative; z-index: 1; display: block; width: 13px; height: 13px; border: 3px solid var(--paper); border-radius: 50%; background: #6f7f92; box-shadow: 0 0 0 1px #6f7f92; }
.event-dot.ledger { margin:0!important;padding:0!important;background:#10233f;box-shadow:0 0 0 1px #10233f}.event-dot.judgment,.event-dot.review{background:#154a91;box-shadow:0 0 0 1px #154a91}.event-dot.evidence{background:#9a6822;box-shadow:0 0 0 1px #9a6822}.event-dot.ai{background:#7965a8;box-shadow:0 0 0 1px #7965a8}.event-dot.action{background:#177345;box-shadow:0 0 0 1px #177345}
.event-content { padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.event-kicker { display: flex; justify-content: space-between; gap: 15px; color: var(--blue); font-size: 11px; }
.event-kicker span { color: var(--muted); }
.event-content h3 { margin: 6px 0; font: 600 17px Georgia,"Noto Serif SC",serif; }
.event-content p { max-width: 720px; margin: 0; color: #485466; font-size: 12px; }
.event-content a { display: inline-block; margin-top: 7px; color: var(--blue); font-size: 11px; }
.decision-workbench { padding: 28px 24px; background: rgba(255,255,255,.12); }
.workbench-title { display:flex; justify-content:space-between; align-items:center; padding-bottom:14px; border-bottom:1px solid var(--line); }
.workbench-title h2 { margin:0; font:600 21px Georgia,"Noto Serif SC",serif; }.workbench-title span{color:var(--muted)}
.decision-workbench section { padding: 17px 0; border-bottom: 1px solid var(--line); }
.decision-workbench h3 { margin:0 0 10px; font:600 16px Georgia,"Noto Serif SC",serif; }.decision-workbench ul{margin:0;padding-left:19px}.decision-workbench li,.decision-workbench p{margin:6px 0;color:#485466;font-size:12px}
.decision-workbench h3.changed{color:#176a45}.decision-workbench h3.unchanged{color:#154a91}.decision-workbench h3.verify{color:#99651f}
.thesis-inspector>div { display:flex; justify-content:space-between; }.thesis-inspector button{border:0;background:none;color:var(--blue);cursor:pointer}.thesis-inspector dl{display:grid;grid-template-columns:72px 1fr;gap:10px 8px;margin:12px 0 0}.thesis-inspector dt{font-weight:700;font-size:11px}.thesis-inspector dd{margin:0;color:#485466;font-size:11px}
.workbench-actions { display:grid; gap:9px; padding-top:16px }.workbench-actions .secondary{background:transparent}.workbench-actions a{text-align:center;color:var(--blue);text-decoration:none;padding:7px}.decision-workbench>small{display:block;margin-top:12px;text-align:center;color:var(--muted);font-size:10px}
.decision-form { display:grid; gap:14px; margin-top:20px }.decision-form label{display:grid;gap:6px;color:var(--muted)}.decision-form textarea{resize:vertical}
.mobile-bottom-nav { display:none; }

@media (max-width: 1180px) {
  .suite-header { grid-template-columns: 190px 1fr auto; }.suite-header nav{gap:22px}.suite-actions time,.suite-actions .utility-link{display:none}
  .timeline-shell { grid-template-columns: minmax(0,1fr) 330px; }.holding-rail{grid-column:1/-1;flex-direction:row;overflow-x:auto;border-right:0;border-bottom:1px solid var(--line);padding:14px 20px}.rail-title,.rail-collapse{display:none}.holding-choice{min-width:250px}.timeline-main{grid-column:1}.decision-workbench{grid-column:2}.timeline-summary{display:block}.timeline-summary dl{margin-top:20px}.timeline-summary dl div:first-child{border-left:0;padding-left:0}
}
@media (max-width: 760px) {
  .suite-header { grid-template-columns:1fr auto;padding:0 15px;min-height:62px }.suite-header .brand{font-size:21px}.suite-header nav{position:fixed;z-index:5;left:0;right:0;bottom:0;height:58px;background:var(--paper);border-top:1px solid var(--line);justify-content:space-around;gap:0}.suite-header nav a{font-size:11px;padding:0 5px;border-bottom:0;border-top:3px solid transparent}.suite-header nav a.active{border-top-color:var(--blue)}.suite-header nav a:nth-child(2){display:none}.suite-actions .primary{font-size:11px;padding:8px}.timeline-shell{display:block;padding-bottom:60px}.holding-rail{padding:10px 14px}.holding-choice{min-width:220px;grid-template-columns:45px 1fr;padding:11px}.timeline-main{padding:22px 16px;border-right:0}.timeline-summary h1{font-size:27px}.timeline-summary dl{grid-template-columns:1fr 1fr}.timeline-summary dl div{padding:10px 12px}.timeline-summary dl div:nth-child(3){display:none}.timeline-tools{display:grid;grid-template-columns:1fr 1fr;gap:10px}.timeline-tools select,.timeline-tools input[type=search]{width:100%;margin:0}.timeline-event{grid-template-columns:82px 25px 1fr;min-height:130px}.event-content h3{font-size:15px}.decision-workbench{border-top:1px solid var(--line);padding:24px 17px}.workbench-actions{position:sticky;bottom:65px;background:var(--paper);padding:12px 0}.decision-workbench section{padding:15px 0}
  .mfa-enrollment{grid-template-columns:1fr}.mfa-enrollment>img{margin:auto}.mfa-reveal-form>div{align-items:stretch;flex-direction:column}.mfa-code.compact{width:100%}
}

@media (max-width: 680px) {
  html,body { max-width:100%; overflow-x:hidden; }
  body { padding-bottom:calc(68px + env(safe-area-inset-bottom)); }
  body.login-page { min-height:100svh; padding:max(22px,env(safe-area-inset-top)) 16px max(22px,env(safe-area-inset-bottom)); overflow-x:hidden; }

  .login-card.mfa-card { width:100%; max-width:430px; padding:28px 20px 24px; }
  .login-card.mfa-card>img { display:block; width:88px; height:88px; margin:0 auto; object-fit:cover; object-position:50% 29%; mix-blend-mode:normal; }
  .login-card.mfa-card .eyebrow { margin:16px 0 8px; font-size:12px; letter-spacing:.06em; }
  .login-card.mfa-card h1 { margin-bottom:12px; font-size:28px; line-height:1.2; }
  .login-card.mfa-card .muted { margin:0 auto; max-width:300px; font-size:14px; }
  .login-card.mfa-card form { width:100%; min-width:0; margin:22px 0 18px; gap:14px; }
  .login-card.mfa-card label { min-width:0; font-size:14px; }
  .login-card.mfa-card input { display:block; width:100%; min-width:0; max-width:100%; height:54px; font-size:16px; }
  .login-card.mfa-card .mfa-code { padding:10px 8px; font-size:25px; letter-spacing:.18em; }
  .login-card.mfa-card .primary { display:block; width:100%; min-height:52px; padding:12px 16px; }
  .login-card.mfa-card>small { display:block; line-height:1.6; }

  .masthead.no-nav { position:sticky; top:0; z-index:20; width:100%; height:64px; min-height:64px; padding:7px 16px; grid-template-columns:minmax(0,1fr) auto; border-bottom:1px solid var(--line); background:rgba(247,244,237,.97); backdrop-filter:blur(14px); }
  .masthead.no-nav .brand { min-width:0; gap:8px; font-size:23px; }
  .masthead.no-nav .brand img { width:36px; height:36px; flex:0 0 36px; }
  .masthead.no-nav .head-actions { gap:0; }
  .masthead.no-nav .desktop-nav,
  .masthead.no-nav .header-divider { display:none; }
  .masthead.no-nav .head-actions time,
  .masthead.no-nav .head-actions .utility-link,
  .masthead.no-nav .head-actions form { display:none; }
  .masthead.no-nav .head-actions .primary { min-height:42px; padding:9px 15px; font-size:14px; white-space:nowrap; }

  .mobile-bottom-nav { position:fixed; z-index:30; left:0; right:0; bottom:0; display:grid; grid-template-columns:repeat(4,1fr); min-height:calc(58px + env(safe-area-inset-bottom)); padding:0 8px env(safe-area-inset-bottom); border-top:1px solid var(--line); background:rgba(251,250,246,.97); backdrop-filter:blur(16px); }
  .mobile-bottom-nav a { display:grid; place-items:center; min-width:0; border-top:3px solid transparent; color:var(--muted); font-size:12px; font-weight:600; text-decoration:none; }
  .mobile-bottom-nav a.active { border-top-color:var(--blue); color:var(--blue); }

  main { padding:24px 18px 34px; }
  .opening { gap:22px; }
  .lead { padding-bottom:22px; }
  .lead h1 { max-width:340px; margin-bottom:12px; font-size:32px; line-height:1.24; }
  .lead p { font-size:14px; line-height:1.8; }
  .brief { padding-top:20px; }
  .brief h2 { font-size:22px; }
  .brief li { display:flex; align-items:flex-start; padding:8px 0; line-height:1.65; }
  .brief li::before { flex:0 0 25px; margin-top:0; }
  .summary { gap:0; margin:10px 0 26px; }
  .summary>div { min-width:0; padding:13px 12px; }
  .summary strong { font-size:25px; overflow-wrap:anywhere; }
  .trend,.review,.ledger,.ai-panel,.account-panel { border-radius:9px; }
  .section-head { gap:12px; }
  .section-head h2,.ledger h2,.ai-panel h2,.account-panel h2 { font-size:20px; }
  .section-head>span,.section-head>a { flex:0 0 auto; }
  .history-page,.settings-page { width:100%; padding:28px 18px 34px; }

  /* Mobile information density and navigation consistency */
  .suite-header { position:sticky; top:0; z-index:20; min-height:64px; padding:7px 16px; grid-template-columns:minmax(0,1fr) auto; background:rgba(247,244,237,.97); backdrop-filter:blur(14px); }
  .suite-header nav { display:none; }
  .suite-header .brand { font-size:23px; }
  .suite-header .brand img { width:36px; height:36px; }
  .suite-actions .primary { min-height:42px; padding:9px 12px; font-size:12px; }

  .trend-toolbar { display:grid; gap:8px; padding-top:12px; overflow:hidden; }
  .trend-periods { max-width:100%; overflow-x:auto; scrollbar-width:none; }
  .trend-periods::-webkit-scrollbar { display:none; }
  .trend-periods button { min-width:48px; padding:6px 8px; }
  .trend-status { text-align:left; }
  .chart-wrap { height:170px; }
  .chart-empty { background:none; font-size:12px; }
  .allocation { padding-top:14px; }

  .history-heading { margin-bottom:20px; }
  .history-heading h1 { font-size:34px; line-height:1.2; }
  .history-filters { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; }
  .history-filters a { min-width:0; padding:9px 4px; text-align:center; white-space:nowrap; }
  .history-grid { gap:12px; }
  .history-list.empty { display:none; }
  .history-detail { min-height:0; padding:20px; }
  .history-placeholder { padding:8px 2px; }
  .history-placeholder h2 { margin-top:0; font-size:22px; }

  .settings-heading { margin-bottom:20px; }
  .settings-heading h1 { font-size:34px; line-height:1.2; }
  .settings-grid { gap:14px; }
  .settings-card { padding:20px; border-radius:9px; }
  .settings-card h2 { margin-bottom:15px; font-size:22px; }
  .settings-card h3 { font-size:17px; }
  .login-management-card .section-head { gap:14px; }
  .settings-card p { margin:7px 0; font-size:12px; }
  .metric-list { gap:17px; }
  .metric-row header { margin-bottom:7px; }
  .metric-row header strong { font-size:20px; }
  .settings-dl dt,.settings-dl dd { padding:10px 0; }

  .timeline-shell { padding-bottom:18px; }
  .decision-workbench { padding:20px 17px 88px; }
  .decision-workbench section { padding:12px 0; }
  .decision-workbench h3 { margin-bottom:7px; font-size:15px; }
  .decision-workbench li,.decision-workbench p { margin:4px 0; line-height:1.55; }
  .thesis-inspector dl { grid-template-columns:64px minmax(0,1fr); gap:8px; }
  .thesis-inspector dd { overflow-wrap:anywhere; }
  .workbench-actions { bottom:calc(58px + env(safe-area-inset-bottom)); gap:8px; padding:10px 0; }
  .workbench-actions .primary,.workbench-actions .secondary { min-height:46px; }

  /* Second-pass mobile hierarchy: prioritize decisions over documentation. */
  body { font-size:13px; }
  main { padding:20px 16px 30px; }
  .masthead.no-nav,.suite-header { height:58px; min-height:58px; padding:5px 14px; }
  .masthead.no-nav .brand,.suite-header .brand { font-size:21px; }
  .masthead.no-nav .brand img,.suite-header .brand img { width:32px; height:32px; flex-basis:32px; }
  .masthead.no-nav .head-actions .primary,.suite-actions .primary { min-height:38px; padding:7px 12px; font-size:12px; }

  .lead h1 { font-size:29px; line-height:1.22; }
  .lead p { font-size:13px; line-height:1.7; }
  .brief { padding-top:16px; }
  .brief h2 { font-size:20px; }
  .brief li { padding:6px 0; font-size:12px; }
  .summary { margin-bottom:20px; }
  .summary>div { padding:10px; }
  .summary strong { font-size:23px; }
  .trend,.review,.ledger,.ai-panel,.account-panel { padding:14px; }
  .section-head h2,.ledger h2,.ai-panel h2,.account-panel h2 { font-size:19px; }

  .holding-rail { padding:8px 12px; scroll-snap-type:x proximity; }
  .holding-choice { min-width:205px; padding:9px; scroll-snap-align:start; }
  .holding-choice strong { font-size:18px; }
  .timeline-main { padding:18px 14px; }
  .timeline-summary h1 { font-size:25px; }
  .timeline-tools { grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-areas:"type search" "mine ai"; gap:8px; padding:13px 0; }
  #eventFilter { grid-area:type; }
  #eventSearch { grid-area:search; }
  .timeline-tools label:nth-of-type(1) { grid-area:mine; }
  .timeline-tools label:nth-of-type(2) { grid-area:ai; }
  .timeline-tools select,.timeline-tools input[type=search] { width:100%; min-width:0; min-height:40px; margin:0; padding:7px 9px; font-size:12px; }
  .timeline-tools label { display:flex; align-items:center; justify-content:center; gap:7px; min-height:38px; padding:7px 8px; border:1px solid var(--line); border-radius:5px; background:rgba(255,255,255,.28); color:var(--ink); font-size:11px; cursor:pointer; }
  .timeline-tools label input { width:15px; height:15px; margin:0; accent-color:var(--blue); }
  .timeline-event { grid-template-columns:76px 22px minmax(0,1fr); min-height:116px; }
  .event-content h3 { font-size:14px; }
  .event-content p { font-size:11px; line-height:1.6; }
  .decision-workbench { padding:18px 15px 82px; }
  .thesis-inspector dd:nth-of-type(2) { max-height:7.4em; overflow-y:auto; overscroll-behavior:contain; }

  .history-page,.settings-page { padding:22px 16px 30px; }
  .history-heading,.settings-heading { margin-bottom:16px; }
  .history-heading h1,.settings-heading h1 { font-size:30px; }
  .history-heading>p:last-of-type,.settings-heading>p:last-child { font-size:12px; line-height:1.65; }
  .history-filters { margin-top:16px; }
  .history-filters a { font-size:12px; }
  .history-list { max-height:205px; }
  .history-item { padding:12px 14px; }
  .history-detail { padding:16px; }
  main .history-detail .history-analysis { max-height:56svh !important; overflow-y:auto !important; padding:14px 10px 14px 0; }
  .history-analysis h1 { font-size:23px; }
  .history-analysis h2 { font-size:18px; margin-top:21px; }
  .history-analysis p,.history-analysis li,.history-analysis td,.history-analysis th { font-size:12px; }

  .settings-grid { gap:12px; }
  .settings-card { padding:16px; }
  .settings-card h2 { margin-bottom:12px; font-size:20px; }
  .login-management-card .section-head { display:grid; }
  .login-management-card .section-head form,.login-management-card .section-head button { width:100%; }
  .settings-grid .settings-card:nth-child(1) { order:1; }
  .settings-grid .settings-card:nth-child(5) { order:2; }
  .settings-grid .settings-card:nth-child(2) { order:3; }
  .settings-grid .settings-card:nth-child(3) { order:4; }
  .settings-grid .settings-card:nth-child(4) { order:5; }
  .settings-grid .settings-card:nth-child(6) { order:6; }
  .metric-list { gap:14px; }
  .metric-row header strong { font-size:18px; }
  .settings-dl dt,.settings-dl dd { padding:8px 0; font-size:12px; }
  .mfa-reveal-form input { min-height:44px; }
}
