:root {
  --blue: #1428a0;
  --blue-2: #2672ff;
  --ink: #111318;
  --muted: #6c727d;
  --soft: #9299a5;
  --line: #e5e8ed;
  --surface: #ffffff;
  --canvas: #f6f7f9;
  --cyan: #00838f;
  --green: #138a62;
  --orange: #e75222;
  --purple: #6e5ae6;
  --nav-height: 72px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, textarea { font: inherit; letter-spacing: 0; }
button { border: 0; cursor: pointer; color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }
svg { display: block; width: 1em; height: 1em; stroke-width: 1.85; }

.app-shell { min-height: 100dvh; background: var(--canvas); }
.topbar {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  height: calc(58px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247, 248, 250, .94);
  border-bottom: 1px solid rgba(229, 232, 237, .86);
  backdrop-filter: blur(18px);
}
.brand-button { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0; background: none; }
.wordmark { color: var(--blue); font-size: 17px; font-weight: 900; font-style: italic; line-height: 1; }
.work-label { padding-left: 8px; border-left: 1px solid #cfd3da; color: #5e6570; font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.top-actions { display: flex; gap: 6px; }
.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
}
.icon-button:active { background: #e7eaf0; }
.icon-button.has-dot::after { content: ""; position: absolute; top: 9px; right: 8px; width: 7px; height: 7px; border: 2px solid var(--canvas); border-radius: 50%; background: #ef4c51; }
.icon-button.small { width: 36px; height: 36px; font-size: 18px; background: #f0f2f5; }

.page-stack { padding-top: calc(58px + env(safe-area-inset-top)); }
.app-page { display: none; min-height: calc(100dvh - var(--nav-height)); padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 22px); }
.app-page.active { display: block; animation: pageIn .24s ease-out; }
@keyframes pageIn { from { opacity: .45; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

.viewing-zone { padding: 31px 20px 22px; background: var(--canvas); }
.viewing-zone.compact { padding-top: 26px; padding-bottom: 17px; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .1em; line-height: 1.2; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; max-width: 680px; font-size: 31px; line-height: 1.14; font-weight: 760; letter-spacing: 0; }
.viewing-zone.compact h1 { font-size: 28px; }
.lead { margin: 10px 0 0; max-width: 600px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.content-zone { padding: 0 14px 1px; }

.focus-hero {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(194px, 50vw, 250px);
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #cfd5dc;
  color: #fff;
  text-align: left;
}
.focus-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.focus-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,14,33,.88) 0%, rgba(8,14,33,.65) 43%, rgba(8,14,33,.08) 82%); }
.focus-copy { position: absolute; left: 18px; right: 66px; bottom: 18px; display: grid; gap: 5px; }
.focus-copy small { color: #b8c8ff; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.focus-copy strong { font-size: 22px; line-height: 1.18; }
.focus-copy span { color: rgba(255,255,255,.84); font-size: 12px; line-height: 1.35; }
.hero-arrow { position: absolute; right: 15px; bottom: 15px; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; font-size: 19px; }

.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 10px 0 18px; }
.metric-card { min-width: 0; padding: 11px 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); text-align: center; }
.metric-card .metric-icon { display: grid; place-items: center; width: 29px; height: 29px; margin: 0 auto 7px; border-radius: 7px; font-size: 16px; }
.metric-card strong { display: block; font-size: 18px; line-height: 1; }
.metric-card span:last-child { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tone-blue { color: var(--blue); background: #edf0ff; }
.tone-green { color: var(--green); background: #e9f7f1; }
.tone-purple { color: var(--purple); background: #f0edff; }
.tone-orange { color: var(--orange); background: #fff0eb; }
.tone-cyan { color: var(--cyan); background: #e8f5f6; }
.tone-gray { color: #5f6670; background: #eef0f3; }

.section-block { margin: 0 -14px 10px; padding: 18px 16px; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-kicker { margin: 0 0 3px; color: var(--soft); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.section-heading h2 { margin: 0; font-size: 19px; line-height: 1.2; }
.text-button { padding: 8px 0 8px 8px; background: none; color: var(--blue-2); font-size: 12px; font-weight: 650; }
.filter-button { display: flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 10px; border-radius: 7px; background: #f0f2f5; color: #4d535d; font-size: 12px; }
.filter-button svg { font-size: 15px; }

.agenda-list { display: grid; }
.agenda-item { display: grid; grid-template-columns: 48px 4px minmax(0,1fr) 22px; gap: 11px; align-items: center; width: 100%; min-height: 64px; padding: 8px 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.agenda-item:first-child { border-top: 0; }
.agenda-time { align-self: start; padding-top: 5px; }
.agenda-time strong, .agenda-time small { display: block; }
.agenda-time strong { font-size: 12px; }
.agenda-time small { margin-top: 3px; color: var(--soft); font-size: 9px; }
.agenda-line { width: 3px; height: 36px; border-radius: 2px; }
.agenda-copy { min-width: 0; }
.agenda-copy strong { display: block; font-size: 14px; line-height: 1.3; }
.agenda-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-item > svg { color: #a4aab2; font-size: 17px; }

.pulse-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.pulse-card { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fbfbfc; }
.pulse-card::before { content: ""; display: block; width: 26px; height: 3px; margin-bottom: 9px; border-radius: 2px; background: var(--pulse-color); }
.pulse-card span, .pulse-card small { display: block; }
.pulse-card span { color: var(--muted); font-size: 11px; }
.pulse-card strong { display: block; margin: 5px 0 2px; font-size: 19px; }
.pulse-card small { color: var(--soft); font-size: 9px; }

.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px 5px; }
.tool-button { display: grid; justify-items: center; gap: 7px; min-width: 0; padding: 0 2px; background: none; text-align: center; }
.tool-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; font-size: 21px; }
.tool-button span:last-child { width: 100%; color: #323740; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.segmented { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; margin-top: 18px; padding: 3px; border-radius: 8px; background: #e7e9ed; }
.segmented button { min-height: 34px; padding: 0 8px; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.work-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 11px; }
.summary-cell { padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.summary-cell strong, .summary-cell span { display: block; }
.summary-cell strong { font-size: 21px; }
.summary-cell span { margin-top: 4px; color: var(--muted); font-size: 10px; }

.action-list, .project-list, .division-list, .initiative-list, .mail-list, .service-list { display: grid; }
.action-item { display: grid; grid-template-columns: 38px minmax(0,1fr) 22px; gap: 11px; align-items: start; width: 100%; padding: 13px 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.action-item:first-child { border-top: 0; }
.action-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; font-size: 18px; }
.action-copy { min-width: 0; }
.action-copy strong { display: block; font-size: 14px; line-height: 1.3; }
.action-copy p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.action-meta { display: flex; align-items: center; gap: 7px; margin-top: 7px; color: var(--soft); font-size: 9px; }
.priority-pill { padding: 3px 6px; border-radius: 5px; color: var(--orange); background: #fff0eb; font-weight: 700; }
.action-item > svg { align-self: center; color: #b1b5bc; font-size: 17px; }

.project-card { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 11px; padding: 12px 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.project-card:first-child { border-top: 0; }
.project-code { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 800; }
.project-copy strong { display: block; font-size: 14px; }
.project-copy p { margin: 4px 0 8px; color: var(--muted); font-size: 10px; }
.progress-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: center; }
.progress-track { height: 5px; overflow: hidden; border-radius: 3px; background: #e8eaee; }
.progress-track i { display: block; height: 100%; border-radius: 3px; background: var(--progress-color); }
.progress-row span { color: var(--soft); font-size: 9px; }

.business-zone { background: #eff2fb; }
.business-highlight { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; padding: 16px; border-radius: 8px; background: #111a4c; color: #fff; }
.business-highlight small, .business-highlight strong, .business-highlight span { display: block; }
.business-highlight small { color: #aeb9f0; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.business-highlight strong { margin-top: 6px; font-size: 17px; }
.business-highlight span { margin-top: 5px; color: #c8cee7; font-size: 10px; }
.score-ring { flex: 0 0 62px; width: 62px; height: 62px; display: grid; place-content: center; border: 5px solid #4a68e8; border-radius: 50%; text-align: center; }
.score-ring strong { margin: 0; font-size: 17px; }
.score-ring span { margin: 0; font-size: 8px; }

.division-item { display: grid; grid-template-columns: 40px minmax(0,1fr) auto 18px; gap: 10px; align-items: center; width: 100%; padding: 12px 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.division-item:first-child { border-top: 0; }
.division-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: #fff; font-size: 19px; }
.division-copy { min-width: 0; }
.division-copy strong, .division-copy span { display: block; }
.division-copy strong { font-size: 13px; }
.division-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.division-metric { text-align: right; }
.division-metric strong, .division-metric span { display: block; }
.division-metric strong { font-size: 14px; }
.division-metric span { margin-top: 3px; color: var(--green); font-size: 9px; }
.division-item > svg { color: #b2b6bd; font-size: 16px; }
.initiative-card { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 11px; align-items: center; width: 100%; padding: 12px 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.initiative-card:first-child { border-top: 0; }
.initiative-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; font-size: 19px; }
.initiative-copy strong, .initiative-copy span { display: block; }
.initiative-copy strong { font-size: 13px; }
.initiative-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.initiative-date { color: var(--soft); font-size: 10px; }

.mail-zone { padding-bottom: 12px; background: #eff2fb; }
.mail-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.compose-button { display: flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 8px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; }
.compose-button svg { font-size: 16px; }
.search-field { display: flex; align-items: center; gap: 9px; height: 43px; margin-top: 16px; padding: 0 13px; border-radius: 8px; background: #fff; color: #8f96a1; }
.search-field svg { flex: 0 0 auto; font-size: 18px; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-field input::placeholder { color: #a0a6af; }
.mail-filters { display: flex; gap: 7px; margin-top: 11px; overflow-x: auto; scrollbar-width: none; }
.mail-filters::-webkit-scrollbar { display: none; }
.mail-filters button { flex: 0 0 auto; min-height: 31px; padding: 0 12px; border: 1px solid #d9dde5; border-radius: 7px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 650; }
.mail-filters button.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.mail-content { padding-top: 10px; }
.mail-list { margin: 0 -14px; border-top: 1px solid var(--line); background: #fff; }
.mail-item { position: relative; display: grid; grid-template-columns: 43px minmax(0,1fr) auto; gap: 11px; width: 100%; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.mail-item.unread::before { content: ""; position: absolute; left: 5px; top: 26px; width: 4px; height: 4px; border-radius: 50%; background: var(--blue-2); }
.sender-avatar { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; background: #edf0ff; color: var(--blue); font-size: 12px; font-weight: 800; }
.mail-copy { min-width: 0; }
.mail-copy strong, .mail-copy b, .mail-copy p { display: block; }
.mail-copy strong { font-size: 13px; font-weight: 650; }
.mail-item.unread .mail-copy strong, .mail-item.unread .mail-copy b { font-weight: 800; }
.mail-copy b { margin-top: 3px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-copy p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-tags { display: flex; gap: 5px; margin-top: 7px; }
.mail-tags span { padding: 3px 6px; border-radius: 5px; background: #f0f2f5; color: #6d737c; font-size: 8px; font-weight: 700; }
.mail-side { display: grid; align-content: start; justify-items: end; gap: 7px; color: var(--soft); font-size: 9px; }
.mail-side svg { font-size: 14px; }
.mail-side .starred { fill: #f0ad1e; color: #f0ad1e; }
.empty-state { padding: 42px 20px; color: var(--muted); text-align: center; }
.empty-state svg { width: 38px; height: 38px; margin: 0 auto 12px; color: #adb3bc; }
.empty-state strong { display: block; color: var(--ink); }
.empty-state p { margin: 6px 0 0; font-size: 12px; }

.profile-zone { background: #eef1fa; }
.profile-head { display: grid; grid-template-columns: 66px minmax(0,1fr) 42px; gap: 13px; align-items: center; }
.avatar { width: 66px; height: 66px; padding: 0; overflow: hidden; border-radius: 50%; background: var(--blue); color: #fff; font-size: 22px; font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-copy { min-width: 0; }
.profile-copy .eyebrow { margin-bottom: 5px; }
.profile-copy h1 { font-size: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-copy > p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-strip { display: grid; grid-template-columns: 24px minmax(0,1fr) 18px; gap: 10px; align-items: center; width: 100%; margin-top: 17px; padding: 12px; border: 1px solid #dce1ef; border-radius: 8px; background: rgba(255,255,255,.75); color: var(--blue); text-align: left; }
.badge-strip > svg:first-child { font-size: 23px; }
.badge-strip > svg:last-child { color: #a4aab5; font-size: 17px; }
.badge-strip strong, .badge-strip small { display: block; }
.badge-strip strong { font-size: 12px; }
.badge-strip small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.profile-content { padding-top: 10px; }
.profile-summary { padding-top: 4px; padding-bottom: 4px; }
.profile-data-row { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.profile-data-row:first-child { border-top: 0; }
.profile-data-row span { color: var(--muted); font-size: 11px; }
.profile-data-row strong { text-align: right; font-size: 11px; font-weight: 650; }
.service-item { display: grid; grid-template-columns: 38px minmax(0,1fr) 18px; gap: 11px; align-items: center; width: 100%; padding: 12px 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.service-item:first-child { border-top: 0; }
.service-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: #edf0ff; color: var(--blue); font-size: 18px; }
.service-copy strong, .service-copy span { display: block; }
.service-copy strong { font-size: 13px; }
.service-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.service-item > svg { color: #b0b5bd; font-size: 16px; }

.bottom-nav {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 5px 6px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.bottom-nav button { display: grid; align-content: center; justify-items: center; gap: 4px; min-width: 0; padding: 0; background: none; color: #777e88; font-size: 10px; font-weight: 600; }
.bottom-nav button.active { color: var(--blue); }
.nav-icon { position: relative; display: grid; place-items: center; width: 30px; height: 28px; font-size: 22px; }
.bottom-nav button.active .nav-icon { background: #edf0ff; border-radius: 7px; }
.nav-badge { position: absolute; top: -5px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 9px; background: #ef4c51; color: #fff; font-size: 8px; font-weight: 800; }

.detail-page { position: fixed; z-index: 80; inset: 0; display: flex; flex-direction: column; visibility: hidden; transform: translateX(100%); background: var(--canvas); transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s; }
.detail-page.open { visibility: visible; transform: translateX(0); transition-delay: 0s; }
.detail-header { flex: 0 0 calc(58px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0; display: grid; grid-template-columns: 46px minmax(0,1fr) 46px; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(18px); }
.detail-header strong { text-align: center; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-content { flex: 1 1 auto; overflow-y: auto; padding: 14px 14px calc(24px + env(safe-area-inset-bottom)); }
.detail-hero { margin: -14px -14px 14px; padding: 28px 20px 22px; background: #eff2fb; }
.detail-hero.dark { background: #111a4c; color: #fff; }
.detail-hero .detail-kicker { margin: 0 0 7px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.detail-hero.dark .detail-kicker { color: #aeb9f0; }
.detail-hero h2 { margin: 0; font-size: 25px; line-height: 1.17; }
.detail-hero p { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.detail-hero.dark p { color: #c8cee7; }
.detail-section { margin-bottom: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.detail-section h3 { margin: 0 0 12px; font-size: 15px; }
.detail-section > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.detail-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.detail-row:first-child { border-top: 0; padding-top: 0; }
.detail-row:last-child { padding-bottom: 0; }
.detail-row span { color: var(--muted); font-size: 11px; }
.detail-row strong { text-align: right; font-size: 11px; font-weight: 650; }
.detail-status { display: inline-flex; align-items: center; min-height: 26px; margin-top: 14px; padding: 0 8px; border-radius: 6px; background: #edf0ff; color: var(--blue); font-size: 10px; font-weight: 750; }
.timeline { display: grid; }
.timeline-row { position: relative; display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; padding: 0 0 17px; }
.timeline-row:last-child { padding-bottom: 0; }
.timeline-row::after { content: ""; position: absolute; left: 9px; top: 19px; bottom: 0; width: 1px; background: #dfe2e7; }
.timeline-row:last-child::after { display: none; }
.timeline-dot { z-index: 1; display: grid; place-items: center; width: 19px; height: 19px; border: 2px solid #b9bec6; border-radius: 50%; background: #fff; color: #fff; font-size: 11px; }
.timeline-row.done .timeline-dot { border-color: var(--green); background: var(--green); }
.timeline-row.current .timeline-dot { border-color: var(--blue-2); box-shadow: inset 0 0 0 4px #fff; background: var(--blue-2); }
.timeline-copy strong, .timeline-copy span { display: block; }
.timeline-copy strong { font-size: 12px; }
.timeline-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.attachment-row { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fafbfc; }
.attachment-row svg { flex: 0 0 auto; color: var(--blue); font-size: 20px; }
.attachment-row span { min-width: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-actions { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px; padding-top: 12px; background: linear-gradient(transparent, var(--canvas) 22%); }
.detail-actions button { min-height: 44px; border-radius: 8px; font-size: 13px; font-weight: 750; }
.secondary-action { border: 1px solid #d6dae1; background: #fff; color: #4d535c; }
.primary-action { background: var(--blue); color: #fff; }

.mail-detail-head { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 11px; align-items: center; margin-bottom: 18px; }
.mail-detail-head .sender-avatar { width: 48px; height: 48px; }
.mail-detail-head strong, .mail-detail-head span { display: block; }
.mail-detail-head strong { font-size: 14px; }
.mail-detail-head span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.mail-detail-head > span { align-self: start; margin-top: 3px; font-size: 9px; }
.mail-body { white-space: pre-line; color: #323740; font-size: 13px; line-height: 1.65; }
.reply-bar { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr 44px; gap: 8px; padding-top: 14px; background: linear-gradient(transparent, var(--canvas) 25%); }
.reply-bar button { min-height: 44px; border: 1px solid #d8dce3; border-radius: 8px; background: #fff; font-size: 12px; font-weight: 700; }
.reply-bar button:last-child { display: grid; place-items: center; padding: 0; font-size: 18px; }
.compose-form { display: grid; gap: 10px; }
.compose-field { display: grid; grid-template-columns: 55px minmax(0,1fr); align-items: center; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.compose-field span { color: var(--muted); font-size: 11px; }
.compose-field input { min-width: 0; border: 0; outline: 0; font-size: 12px; }
.compose-form textarea { min-height: 230px; padding: 14px; resize: none; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: #fff; color: var(--ink); font-size: 13px; line-height: 1.6; }
.profile-card { overflow: hidden; border-radius: 8px; background: #111a4c; color: #fff; }
.profile-card-top { padding: 22px; background: linear-gradient(135deg,#111a4c,#1937a7); }
.profile-card-top .avatar { width: 78px; height: 78px; margin-bottom: 17px; border: 3px solid rgba(255,255,255,.7); }
.profile-card-top h2 { margin: 0; font-size: 24px; }
.profile-card-top p { margin: 6px 0 0; color: #c9d2f2; font-size: 12px; }
.profile-card-bottom { display: grid; grid-template-columns: repeat(2,1fr); padding: 16px 22px; gap: 16px; background: #fff; color: var(--ink); }
.profile-card-bottom span, .profile-card-bottom strong { display: block; }
.profile-card-bottom span { color: var(--muted); font-size: 9px; }
.profile-card-bottom strong { margin-top: 4px; font-size: 11px; }

.toast { position: fixed; z-index: 120; left: 50%; bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 14px); max-width: calc(100% - 34px); padding: 10px 14px; transform: translate(-50%, 18px); border-radius: 8px; background: rgba(17,19,24,.92); color: #fff; font-size: 11px; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  body { background: #e8eaf0; }
  .app-shell { width: min(100%, 520px); margin: 0 auto; box-shadow: 0 0 0 1px rgba(17,19,24,.04); }
  .topbar, .bottom-nav { left: 50%; right: auto; width: min(100%, 520px); transform: translateX(-50%); }
  .detail-page { left: 50%; right: auto; width: min(100%, 520px); }
  .detail-page { transform: translateX(calc(-50% + 100%)); }
  .detail-page.open { transform: translateX(-50%); }
  .focus-hero { height: 248px; }
}

@media (max-width: 345px) {
  :root { --nav-height: 66px; }
  .viewing-zone { padding-left: 16px; padding-right: 16px; }
  .content-zone { padding-left: 10px; padding-right: 10px; }
  .section-block, .mail-list { margin-left: -10px; margin-right: -10px; }
  h1 { font-size: 27px; }
  .metric-card { padding-left: 3px; padding-right: 3px; }
  .metric-card span:last-child { font-size: 9px; }
  .focus-copy { left: 15px; right: 52px; }
  .focus-copy strong { font-size: 19px; }
  .tool-grid { gap-left: 2px; gap-right: 2px; }
  .profile-head { grid-template-columns: 58px minmax(0,1fr) 38px; gap: 10px; }
  .avatar { width: 58px; height: 58px; }
  .profile-copy h1 { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
