@import url('./telegram.css');
/* B integration: Swiss clarity, comfortable reading and shared design tokens. */
:root {
  color-scheme: light;
  --canvas: #f5f7fa; --surface: #fff; --subtle: #edf1f5; --text: #1b2a3d;
  --muted: #4d5e72; --line: #d5dde5; --accent: #15517f; --accent-soft: #e8f1f8;
  --accent-ink: #fff; --warn: #874823; --warn-bg: #fbefdf; --danger: #a63f3f; --shadow: 0 14px 40px #18334a12;
  --radius: 10px; --font-reader: 'Iowan Old Style', 'Palatino Linotype', 'Songti SC', 'Noto Serif CJK SC', Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px; line-height: 1.6;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --canvas: #111923; --surface: #182330; --subtle: #213041; --text: #edf2f7;
  --muted: #b6c4d3; --line: #354657; --accent: #a5d5fc; --accent-soft: #1e3449; --accent-ink: #112236;
  --warn: #f4c08e; --warn-bg: #463727; --danger: #ffb0ac; --shadow: 0 18px 60px #0004;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
svg { flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(25px, 2vw, 32px); line-height: 1.3; letter-spacing: -.035em; font-weight: 650; }
h2 { font-size: 19px; font-weight: 620; line-height: 1.5; }
h3 { font-size: 15px; font-weight: 620; }
small { font-size: 12px; }
input, select, textarea { min-width: 0; max-width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 12px; }
textarea { resize: vertical; width: 100%; }
input::placeholder { color: var(--muted); }
input[type=checkbox] { accent-color: var(--accent); width: 20px; height: 20px; cursor: pointer; flex-shrink: 0; margin: 12px 0; }
input[type=checkbox]::before { content: ''; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; top: -60px; left: 12px; padding: 12px; background: var(--surface); }
.skip-link:focus { top: 8px; }
.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 10px 15px; font-size: 13px; font-weight: 550; line-height: 1.5; flex-shrink: 0; white-space: nowrap; }
.button:not(:disabled):hover { background: var(--subtle); }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.primary:not(:disabled):hover { background: var(--accent); filter: brightness(.94); }
.quiet { background: transparent; border-color: transparent; }
.danger { color: var(--danger); }
.icon-button { width: 44px; padding: 10px; background: transparent; border: none; }
.compact { white-space: nowrap; }
.text-link { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.muted, .help { color: var(--muted); }
.help { font-size: 12px; line-height: 1.75; }
.eyebrow { display: block; font-size: 10px; font-weight: 650; letter-spacing: .14em; color: var(--muted); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 210px; border-right: 1px solid var(--line); padding: 28px 16px 20px; display: flex; flex-direction: column; background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 650; letter-spacing: -.04em; }
.brand small { display: block; font-size: 8px; letter-spacing: .08em; color: var(--muted); margin-top: 5px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 38px; border-radius: 7px; font-family: var(--font-mono); font-size: 20px; background: var(--accent); color: var(--accent-ink); }
.brand-mark span { font-family: sans-serif; font-size: 19px; margin-left: -5px; margin-top: -12px; }
.nav-label { color: var(--muted); font-size: 10px; letter-spacing: .1em; margin: 28px 12px 10px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; min-height: 46px; color: var(--muted); margin: 3px 0; border-radius: var(--radius); font-size: 13px; }
.nav-link:hover { background: var(--subtle); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.nav-count { margin-left: auto; font-size: 11px; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; padding: 20px 0 0; font-size: 12px; border-top: 1px solid var(--line); }
.sidebar-foot small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.status-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }
.shell { margin-left: 210px; min-width: 0; }
.topbar { height: 66px; display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.global-search { display: flex; align-items: center; gap: 10px; color: var(--muted); width: min(440px, 48%); }
.global-search input { background: transparent; border: 0; padding: 10px 0; width: 100%; font-size: 13px; }
.top-actions { display: flex; gap: 12px; align-items: center; }
.task-link { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; min-height: 44px; padding: 8px; }
.mobile-brand, .mobile-nav { display: none; }
.demo-strip { display: flex; justify-content: space-between; gap: 12px; padding: 7px 28px; border-bottom: 1px solid var(--line); background: var(--canvas); font-size: 10px; line-height: 16px; color: var(--muted); }
.demo-strip a { text-decoration: underline; text-underline-offset: 3px; }
.main { padding: 30px 28px; max-width: 1800px; margin: 0 auto; min-height: calc(100dvh - 200px); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.page-heading .eyebrow { margin-bottom: 10px; }
.page-heading p { color: var(--muted); font-size: 13px; margin-top: 10px; }
.footer { display: flex; justify-content: space-between; padding: 22px 36px; gap: 16px; color: var(--muted); font-size: 9px; letter-spacing: .06em; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-title > div { min-width: 0; }
.section-title p { font-size: 12px; margin-top: 4px; }
.library-layout { display: grid; grid-template-columns: minmax(320px, .95fr) minmax(340px, 1.05fr); gap: 26px; align-items: start; }
.library-list { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.list-tools { display: flex; gap: 10px; align-items: center; }
.local-search { display: flex; align-items: center; gap: 8px; background: var(--surface); padding: 0 6px 0 12px; border: 1px solid var(--line); border-radius: 11px; flex: 1; min-width: 0; }
.local-search input { border: 0; background: transparent; width: 100%; padding: 12px 0; font-size: 13px; }
.local-search .button { padding: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.chip { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 12px; border-radius: 24px; color: var(--muted); font-size: 12px; }
.chip.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.chip:hover { background: var(--subtle); }
.list-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; padding: 0 0 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.resource-row { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 20px 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.resource-row.current { background: var(--accent-soft); border-radius: 10px; padding-left: 12px; padding-right: 12px; }
.resource-icon { margin-top: 2px; width: 38px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--subtle); color: var(--accent); flex-shrink: 0; }
.kind-http { color: var(--warn); background: var(--warn-bg); }
.resource-main { flex: 1; min-width: 0; display: block; }
.resource-main h3 { overflow-wrap: anywhere; line-height: 1.6; }
.resource-excerpt { color: var(--muted); font-size: 12px; margin: 5px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resource-meta { display: flex; gap: 6px 12px; flex-wrap: wrap; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.row-state { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; margin-top: 5px; flex-shrink: 0; }
.row-state small { font-size: 9px; color: var(--muted); }
.mobile-row-state { display: none; }
.badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 5px; color: var(--muted); background: var(--subtle); font-size: 10px; white-space: nowrap; }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.badge.good { color: var(--accent); background: var(--accent-soft); }
.selection-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px; background: var(--accent-soft); border-radius: 12px; margin: 16px 0; }
.selection-bar strong { font-size: 12px; margin-right: auto; }
.selection-bar small { width: 100%; font-size: 10px; color: var(--muted); }
.selection-bar .button { font-size: 11px; padding: 8px 10px; }
.detail-panel { position: sticky; top: 86px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-height: calc(100dvh - 106px); overflow-y: auto; min-width: 0; overflow-wrap: anywhere; }
.detail-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -8px -8px 16px; }
.detail-panel > h2 { font-size: 24px; line-height: 1.55; }
.detail-meta { display: flex; gap: 12px; align-items: center; margin-top: 12px; color: var(--muted); font-size: 11px; }
.detail-actions, .inbox-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 22px 0; }
.reading-content { white-space: pre-wrap; font-size: 17px; font-family: var(--font-reader); line-height: 2; overflow-wrap: anywhere; max-width: 66ch; margin: 26px 0; }
.detail-section { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.detail-section h3 { font-size: 13px; margin-bottom: 14px; }
.detail-section p { font-size: 12px; margin-top: 10px; }
.file-download { display: flex; align-items: center; text-align: left; gap: 10px; width: 100%; background: var(--subtle); padding: 14px; border: none; border-radius: 10px; margin: 10px 0; overflow-wrap: anywhere; font-size: 12px; min-height: 48px; }
.file-download small { margin-left: auto; white-space: nowrap; }
.detail-placeholder { text-align: center; padding: 100px 24px; color: var(--muted); }
.detail-placeholder h2 { margin: 18px 0 10px; font-size: 17px; }
.detail-placeholder p { font-size: 12px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 24px; font-size: 12px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 64px 20px; gap: 14px; }
.empty h2 { font-size: 18px; }
.empty p { color: var(--muted); font-size: 13px; max-width: 34em; }
.empty-symbol { color: var(--accent); padding: 18px; background: var(--accent-soft); border-radius: 50%; margin-bottom: 8px; }
.home-layout { display: grid; gap: 28px; }
.welcome { border-radius: var(--radius); padding: 34px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.welcome h2 { white-space: pre-line; font-size: clamp(26px, 3vw, 38px); line-height: 1.5; letter-spacing: -.04em; margin: 20px 0 12px; max-width: 19em; position: relative; z-index: 1; }
.welcome p { color: var(--muted); font-size: 13px; margin: 12px 0 26px; position: relative; z-index: 1; }
.welcome-art { position: absolute; right: 9%; bottom: 0; transform: rotate(-12deg); display: flex; flex-direction: column; gap: 8px; opacity: .13; font-family: Georgia, serif; font-size: 50px; letter-spacing: -.07em; }
.overview-tiles { display: grid; grid-template-columns: repeat(3, 1fr); }
.metric { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; border-right: 1px solid var(--line); padding: 8px 24px; }
.metric:first-child { padding-left: 0; }
.metric:last-child { border-right: 0; }
.metric > span { font-size: 12px; color: var(--muted); }
.metric strong { font-weight: 500; font-size: 32px; line-height: 1.2; }
.metric small { color: var(--muted); font-size: 11px; }
.metric.attention strong { color: var(--warn); }
.recent { margin-top: 12px; }
.inbox-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 40px; }
.inbox-card { padding: 24px 0; border-bottom: 1px solid var(--line); }
.inbox-card h2 { margin: 12px 0; font-size: 20px; }
.inbox-text { font-size: 14px; color: var(--muted); line-height: 1.9; }
.context-note { border-left: 1px solid var(--line); padding: 28px 0 0 24px; }
.context-note h2 { margin: 20px 0; font-size: 22px; }
.context-note p { color: var(--muted); font-size: 13px; line-height: 1.9; margin-top: 20px; }
.collection-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; }
.collection-nav { min-width: 0; }
.collection-nav h2 { font-size: 14px; }
.collection-link { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border-radius: 10px; font-size: 13px; overflow-wrap: anywhere; }
.collection-link small { margin-left: auto; }
.collection-link.active { background: var(--accent-soft); color: var(--accent); }
.collection-content { min-width: 0; }
.snapshot-card { border-top: 1px solid var(--line); padding: 28px 0; }
.snapshot-card h3 { margin-top: 10px; }
.snapshot-card blockquote { border-left: 3px solid var(--accent); margin: 20px 0; padding: 12px 18px; background: var(--subtle); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.sharing-intro { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 24px 0; }
.sharing-intro > div { margin-right: auto; }
.sharing-intro p { font-size: 13px; color: var(--muted); margin-top: 10px; }
.notice { background: var(--subtle); border-radius: 10px; padding: 14px 18px; font-size: 12px; color: var(--muted); margin: 18px 0; }
.notice a { display: block; margin-top: 6px; }
.grant-row { display: flex; align-items: center; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.grant-row > div { flex: 1; min-width: 0; }
.grant-row p { font-size: 12px; margin-top: 8px; }
.grant-titles { color: var(--muted); overflow-wrap: anywhere; }
.task-card { padding: 24px 0; border-bottom: 1px solid var(--line); }
.task-card h2 { font-size: 16px; overflow-wrap: anywhere; }
.task-card p { font-size: 12px; margin-top: 10px; }
progress { display: block; appearance: none; height: 5px; border: none; border-radius: 8px; width: 100%; accent-color: var(--accent); background: var(--subtle); }
progress::-webkit-progress-bar { background: var(--subtle); border-radius: 8px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 8px; }
.activity-bar { position: sticky; bottom: 16px; z-index: 8; display: flex; align-items: center; gap: 12px; margin: 0 36px; width: fit-content; max-width: calc(100% - 72px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 24px; padding: 12px 20px; font-size: 12px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.settings-section { border-top: 1px solid var(--line); padding: 24px 0; min-width: 0; }
.settings-section h2 { margin-bottom: 18px; }
.settings-section p { margin: 12px 0; font-size: 13px; }
.setting-link { display: flex; align-items: center; gap: 12px; padding: 16px 0; width: 100%; border: none; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 14px; }
.setting-link svg:last-child:not(:first-child) { margin-left: auto; }
meter { width: 100%; height: 12px; accent-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; margin: 18px 0; min-width: 0; }
.field > small { font-size: 11px; line-height: 1.7; color: var(--muted); }
.field > input, .field > select { width: 100%; min-height: 46px; }
.error-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; color: var(--danger); border: 1px solid currentColor; border-radius: 12px; margin: 20px 0; font-size: 13px; }
.inline-error { color: var(--danger); font-size: 13px; margin: 16px 0; }
.skeleton { display: grid; gap: 16px; padding: 24px 0; }
.skeleton div { height: 80px; border-radius: 12px; background: var(--subtle); animation: breathe 1s ease-in-out infinite alternate; }
@keyframes breathe { to { opacity: .4; } }
dialog { color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 60px); box-shadow: var(--shadow); overscroll-behavior: contain; }
dialog::backdrop { background: #142c2759; backdrop-filter: blur(3px); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.dialog-head h2 { margin-top: 6px; font-size: 22px; }
.dialog-head .icon-button { margin: -10px -10px 0 0; flex-shrink: 0; }
.dialog-form, .dialog-body { overflow-wrap: anywhere; }
.dialog-body > p, .dialog-body > textarea { margin: 18px 0; }
.dialog-body > .button { margin: 6px 8px 6px 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.share-summary { background: var(--subtle); padding: 18px; border-radius: 12px; }
.share-summary p { font-size: 12px; margin: 8px 0; }
.share-summary small { display: block; color: var(--muted); margin-top: 14px; }
.source-row { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.source-row span { color: var(--muted); }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 32px; transform: translateX(-50%); max-width: min(520px, calc(100vw - 32px)); background: var(--text); color: var(--canvas); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 20px; font-size: 13px; width: max-content; }
.boot { padding: 80px; text-align: center; }
@media (min-width: 1500px) { .main { padding: 44px 50px; } .library-layout { gap: 42px; } .detail-panel { padding: 30px; } }
@media (max-width: 1199px) and (min-width: 761px) {
  .sidebar { width: 178px; padding: 24px 12px; }
  .brand { font-size: 17px; } .brand small { font-size: 6px; }
  .shell { margin-left: 178px; } .main { padding: 28px 24px; } .topbar { padding: 0 24px; }
  .library-layout { grid-template-columns: 1fr; } .detail-placeholder { display: none; }
  .library-layout.has-detail .library-list { display: none; }
  .detail-panel { position: static; max-height: none; }
  .inbox-layout { grid-template-columns: 1fr; } .context-note { display: none; }
  .collection-layout { grid-template-columns: 170px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 760px) {
  :root { font-size: 16px; }
  .sidebar { display: none; } .shell { margin-left: 0; }
  .topbar { padding: 0 14px; height: 60px; gap: 10px; }
  .mobile-brand { display: block; font-family: Georgia, serif; color: var(--accent); font-size: 25px; font-weight: bold; white-space: nowrap; }
  .global-search { width: auto; flex: 1; min-width: 0; gap: 7px; }
  .global-search input { font-size: 16px; }
  .global-search svg { display: none; }
  .top-actions { gap: 0; }
  .top-actions .icon-button { display: none; }
  .task-link { font-size: 11px; padding: 8px; } .task-link span { display: none; }
  .top-actions .button { padding: 9px 11px; }
  .demo-strip { font-size: 9px; padding: 5px 14px; gap: 8px; }
  .main { padding: 28px 18px 24px; min-height: calc(100dvh - 240px); }
  .page-heading { margin-bottom: 24px; }
  .page-heading .eyebrow { font-size: 8px; margin-bottom: 9px; }
  h1 { font-size: 28px; }
  .page-heading p { font-size: 12px; line-height: 1.8; }
  .mobile-nav { display: flex; justify-content: space-around; align-items: stretch; position: fixed; bottom: 0; left: 0; right: 0; padding: 6px 8px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); z-index: 20; }
  .mobile-nav .nav-link { flex-direction: column; gap: 4px; min-height: 52px; padding: 7px 8px; flex: 1; font-size: 10px; margin: 0 2px; }
  .mobile-nav .nav-link.active { background: transparent; }
  .mobile-nav .nav-link.active svg { stroke-width: 2.3; }
  .footer { padding: 20px 18px 110px; font-size: 8px; }
  .library-layout { display: block; }
  .detail-placeholder { display: none; }
  .library-layout.has-detail .library-list { display: none; }
  .detail-panel { padding: 0; border: none; background: none; position: static; max-height: none; border-radius: 0; }
  .detail-panel > h2 { font-size: 26px; }
  .detail-toolbar { margin: 0 -8px 22px; }
  .detail-actions { gap: 8px; }
  .detail-actions .button { flex-grow: 1; }
  .reading-content { font-size: 17px; line-height: 2; }
  .resource-row { padding: 20px 0; gap: 10px; }
  .resource-icon { width: 32px; height: 36px; }
  .resource-icon svg { width: 19px; }
  .resource-main h3 { font-size: 14px; }
  .resource-meta { font-size: 10px; gap: 3px 8px; }
  .resource-excerpt { font-size: 12px; }
  .row-state { display: none; }
  .mobile-row-state { display: inline-flex; }
  .resource-main::after { content: ''; }
  .resource-row input { margin: 4px 0; }
  .chips { gap: 3px; margin: 14px -4px; }
  .chip { min-height: 44px; font-size: 11px; padding: 8px 10px; }
  .local-search input { font-size: 16px; }
  .local-search .button { font-size: 12px; }
  .list-tools > .button { padding: 10px; }
  .selection-bar { position: sticky; top: 72px; z-index: 9; box-shadow: var(--shadow); }
  .welcome { padding: 26px 22px; border-radius: 15px; }
  .welcome h2 { font-size: 29px; margin-top: 18px; }
  .welcome p { max-width: 20em; line-height: 1.8; }
  .welcome-art { right: -12%; font-size: 42px; opacity: .07; }
  .overview-tiles { gap: 0; }
  .metric { padding: 5px 12px; } .metric strong { font-size: 28px; } .metric small { font-size: 9px; }
  .metric > span { font-size: 11px; }
  .section-title { gap: 12px; align-items: flex-start; }
  .section-title h2 { font-size: 18px; }
  .section-title .button { font-size: 12px; padding: 10px; flex-shrink: 0; }
  .inbox-layout { display: block; } .context-note { display: none; }
  .inbox-card h2 { font-size: 21px; }
  .inbox-text { font-size: 15px; }
  .inbox-actions { gap: 6px; }
  .inbox-actions .button { font-size: 12px; padding: 10px 12px; }
  .collection-layout { display: block; }
  .collection-nav { margin-bottom: 28px; display: flex; gap: 8px; flex-wrap: wrap; }
  .collection-nav > .section-title { flex-basis: 100%; margin-bottom: 0; align-items: center; }
  .collection-link { font-size: 12px; padding: 10px; background: var(--subtle); }
  .collection-link small { padding-left: 5px; }
  .collection-content > .section-title { flex-wrap: wrap; }
  .grant-row { flex-wrap: wrap; gap: 12px; }
  .grant-row > div { flex: 1 1 65%; }
  .grant-row .button { margin-left: auto; }
  .settings-grid { display: block; }
  .activity-bar { bottom: 88px; margin: 0 18px; max-width: calc(100% - 36px); padding: 11px 15px; font-size: 11px; }
  dialog { position: fixed; top: auto; bottom: 0; margin: 0; left: 0; right: 0; width: 100%; max-width: none; max-height: calc(100dvh - 30px); padding: 22px 20px max(24px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; border-bottom: 0; }
  .dialog-actions { position: sticky; bottom: -24px; padding: 16px 0; background: var(--surface); margin-bottom: -10px; }
  .dialog-actions .primary { flex: 1; }
  .dialog-head h2 { font-size: 23px; }
  .dialog-body .reading-content { font-size: 16px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .toast { bottom: 96px; font-size: 12px; padding: 13px 17px; }
}
@media (max-width: 359px) { .topbar { padding: 0 12px; gap: 7px; } .task-link { display: none; } .main { padding-left: 14px; padding-right: 14px; } .welcome h2 { font-size: 25px; } .resource-icon { display: none; } .mobile-nav .nav-link { padding-left: 4px; padding-right: 4px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; } }
