:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #20342e;
  background: #f4f5ef;
  font-synthesis: none;
  --sidebar: #192d27;
  --paper: #fcfcf8;
  --border: #e0e5dc;
  --muted: #576861;
  --sage: #e2eee5;
  --clay: #f5e6df;
  --sand: #f4edd8;
  --lavender: #ebe8f3;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; font-size: 15px; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #417660; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
.skip { position: absolute; top: -100px; left: 12px; padding: 12px; background: white; z-index: 2; }
.skip:focus { top: 12px; }
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); color: #f5fbf1; display: flex; flex-direction: column; padding: 30px 18px 22px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; font-weight: 700; font-size: 22px; letter-spacing: -.7px; }
.brand-mark { display: inline-grid; place-items: center; color: #19372b; background: #d1e4d5; border-radius: 11px; width: 35px; height: 35px; font-size: 24px; flex: 0 0 35px; }
.nav { display: grid; gap: 5px; margin-top: 48px; }
.nav a, .settings-link { display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 10px 12px; color: #d0ded4; border-radius: 9px; font-weight: 500; white-space: nowrap; }
.nav a:hover, .settings-link:hover { background: #223d34; color: white; }
.nav [aria-current], .settings-link[aria-current] { color: #f5fcf7; background: #2d4a3f; font-weight: 650; }
.nav-icon { font-size: 20px; line-height: 1; min-width: 20px; text-align: center; }
.settings-link { margin-top: 19px; }
.sidebar-foot { margin-top: auto; color: #d0ded4; display: flex; align-items: center; gap: 8px; padding: 24px 10px 3px; font-size: 13px; }
.status-dot, .account-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #59866d; flex: 0 0 8px; }
.status-dot { background: #b9cf9b; }
.account-dot.personal { background: #8a70a1; }
.workspace { width: 100%; max-width: 1500px; margin: 0 auto; padding: 39px clamp(24px, 3.6vw, 63px) 55px; min-width: 0; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 25px; }
.day { font-size: 13px; font-weight: 650; color: #5b6c62; margin-bottom: 7px; letter-spacing: .035em; }
h1 { font-size: clamp(30px, 3.3vw, 49px); line-height: 1.04; letter-spacing: -.065em; font-weight: 730; }
.role-tag { color: #45624f; font-size: 12px; font-weight: 650; white-space: nowrap; border: 1px solid #d7e1d5; border-radius: 20px; background: #edf2e9; padding: 6px 10px; margin-bottom: 3px; }
.account-bar { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.account-chip { display: inline-flex; align-items: center; min-height: 36px; gap: 7px; padding: 5px 10px; background: var(--paper); border: 1px solid var(--border); border-radius: 20px; color: #40584b; font-size: 13px; font-weight: 600; }
.account-chip.chosen { background: #e3eee5; color: #284437; border-color: #b9cdbd; }
.account-chip:hover { border-color: #879f90; }
.account-count { border-radius: 9px; background: #edf1e9; color: #425b4e; font-size: 11px; padding: 1px 5px; min-width: 16px; text-align: center; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 20px; }
.clay { background: var(--clay); color: #633d32; }
.sage { background: var(--sage); color: #2f5646; }
.sand { background: var(--sand); color: #5d4b24; }
.lavender { background: var(--lavender); color: #55436b; }
.metric { display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #29463413; border-radius: 14px; min-height: 120px; padding: 13px 15px 12px; }
.metric:hover { border-color: currentColor; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; font-weight: 650; font-size: 13px; }
.metric-symbol { display: grid; place-items: center; font-size: 20px; width: 29px; height: 29px; border-radius: 9px; background: #ffffff80; flex: 0 0 auto; line-height: 1; }
.metric strong { font-size: 32px; letter-spacing: -.05em; line-height: 1.1; color: #243931; }
.metric-hint { font-size: 12px; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(250px, 1fr); gap: 16px; align-items: start; }
.feed, .detail-column { display: grid; gap: 14px; min-width: 0; }
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: 14px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px 13px; }
.panel-label { display: flex; align-items: center; gap: 9px; }
h2 { font-size: 17px; line-height: 1.2; letter-spacing: -.025em; }
.section-mark { display: inline-grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; font-size: 18px; font-weight: 650; }
.text-link { font-size: 12px; color: #405d4d; font-weight: 650; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.mail-row { display: flex; align-items: center; gap: 11px; min-height: 64px; border-top: 1px solid var(--border); padding: 9px 15px 10px; }
.mail-row:last-child { border-radius: 0 0 13px 13px; }
.mail-row:hover, .mail-row.active { background: #edf3ec; }
.mail-row.active { box-shadow: inset 3px 0 #597d64; }
.avatar { flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; }
.mail-copy { display: grid; gap: 3px; min-width: 0; flex: 1; }
.mail-copy strong { font-size: 14px; font-weight: 660; overflow-wrap: anywhere; }
.mail-copy > span, .detail-meta { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.row-dot { color: #677e70; margin: 0 1px; }
.row-end { flex-shrink: 0; }
.tag { display: inline-flex; align-items: center; width: max-content; white-space: nowrap; border-radius: 6px; font-size: 11px; font-weight: 650; padding: 4px 6px; }
.row-arrow { color: #4c6655; font-size: 22px; padding-left: 3px; }
.detail-panel { padding: 17px; }
.detail-kicker { color: #54675b; font-size: 12px; font-weight: 650; margin-bottom: 9px; }
.detail-panel h2 { font-size: clamp(19px, 2vw, 25px); line-height: 1.13; margin-bottom: 8px; overflow-wrap: anywhere; }
.detail-meta + .detail-meta { margin-top: 4px; }
.explanation { background: #edf3eb; border: 1px solid #e0e9df; border-radius: 9px; padding: 11px 10px; margin: 15px 0 13px; }
.detail-panel h3 { font-size: 13px; margin-bottom: 5px; }
.detail-panel p:not(.detail-meta) { font-size: 13px; line-height: 1.43; color: #3e5348; overflow-wrap: anywhere; }
.detail-date, .excerpt + .excerpt { margin-top: 7px; }
.label-preview { margin: 15px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; gap: 6px; padding: 7px 10px; border-radius: 8px; border: 1px solid #d8e2d8; background: #fcfcf8; color: #2e4d3d; font-weight: 650; font-size: 12px; text-align: center; }
.button:hover, .button.selected { border-color: #799984; background: #edf4ee; }
.button.primary { color: #fff; background: #2d5140; border-color: #2d5140; }
.button.primary:hover { background: #214133; }
.open-mail { width: 100%; justify-content: space-between; }
.open-mail + .open-mail { margin-top: 6px; }
.feedback { display: flex; gap: 5px; margin-top: 13px; flex-wrap: wrap; }
.feedback form { margin: 0; }
.feedback .button { min-height: 31px; padding: 5px 7px; font-size: 11px; }
.write-controls { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; }
.write-controls summary { cursor: pointer; font-weight: 650; font-size: 13px; }
.draft-label { display: block; margin: 8px 0 5px; font-size: 12px; }
.write-controls textarea { resize: vertical; }
.sync-panel { padding: 15px 17px; }
.sync-panel h2 { font-size: 14px; padding-bottom: 8px; }
.sync-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; font-size: 12px; border-top: 1px solid var(--border); }
.sync-row small { color: var(--muted); text-align: right; font-size: 11px; }
.sync-row > span { overflow-wrap: anywhere; }
.empty, .muted { color: var(--muted); }
.empty { padding: 13px 16px 17px; font-size: 13px; }
.notice { border: 1px solid #c9dacd; background: #e7f0e6; color: #345642; border-radius: 9px; padding: 12px 14px; margin: 0 0 17px; font-size: 14px; }
.notice a { text-decoration: underline; }
.subscriptions-panel { max-width: 830px; }
.subscription-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 5px 11px; padding: 13px 16px; border-top: 1px solid var(--border); }
.subscription-row p, .settings-account p { color: var(--muted); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.subscription-count { text-align: right; }
.subscription-row .subscription-why { grid-column: 2/-1; margin-top: 1px; }
.settings-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); max-width: 920px; gap: 15px; margin-bottom: 17px; }
.settings-panel { padding: 18px; }
.settings-panel h2 { margin-bottom: 16px; }
.settings-panel label, .muted { display: block; font-size: 13px; margin-bottom: 6px; margin-top: 11px; }
.text-input { width: 100%; padding: 10px; margin-bottom: 11px; border: 1px solid #bfcec3; background: #fff; border-radius: 8px; color: #273e33; }
.settings-account { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding: 10px 0; }
.connect-form { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(100%, 450px); background: var(--paper); border: 1px solid var(--border); border-radius: 18px; padding: 36px; }
.login-card h1 { margin-top: 18px; }
.login-card p { margin: 12px 0 20px; color: var(--muted); }
.mobile-detail-link { display: none; }
@media (max-width: 1150px) {
  .shell { grid-template-columns: 187px minmax(0,1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .workspace { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 970px) {
  .shell { display: block; }
  .sidebar { padding: 10px 16px 8px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px 12px; }
  .brand { padding: 0; font-size: 20px; }
  .brand-mark { width: 31px; height: 31px; flex-basis: 31px; font-size: 20px; }
  .nav { grid-column: 1/-1; grid-row: 2; display: flex; overflow-x: auto; margin-top: 0; gap: 4px; }
  .nav a, .settings-link { min-height: 39px; padding: 7px 9px; font-size: 13px; gap: 6px; }
  .nav-icon { min-width: 16px; font-size: 17px; }
  .settings-link { margin: 0; }
  .sidebar-foot { display: none; }
  .workspace { padding-top: 26px; }
}
@media (max-width: 690px) {
  .workspace { padding: 23px 15px 40px; }
  .topbar { margin-bottom: 18px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 13px; }
  .metric { min-height: 102px; padding: 10px; }
  .metric strong { font-size: 29px; }
  .metric-symbol { width: 24px; height: 24px; font-size: 16px; }
  .account-bar { margin-bottom: 14px; }
  .dashboard-columns, .settings-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .detail-panel { display: none; }
  .selection-open .detail-panel { display: block; }
  .selection-open .detail-column { grid-row: 1; }
  .selection-open .sync-panel { display: none; }
  .mobile-detail-link { display: inline-block; font-size: 12px; margin: 0 0 8px; color: #416350; }
  .mail-row { padding-left: 12px; padding-right: 12px; gap: 7px; }
  .mail-copy strong { font-size: 13px; }
  .role-tag { font-size: 11px; padding: 5px 7px; }
  .panel-heading { padding: 12px; }
  .subscription-row { padding: 11px 9px; gap: 5px 6px; }
  .subscription-row .tag { font-size: 10px; }
}
