@font-face {
  font-family: "Inbox Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/noto-sans-latin-ext-1c6ab14c.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inbox Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/noto-sans-latin-e39f3e64.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* One inbox layout. Each row carries a heading so streamed inserts/removals
   and page boundaries retain the correct date groups without JavaScript. */
body:has(.inbox-page) { background: #f5f7fb; }
main:has(.inbox-page) { width: 100%; max-width: none; }
.inbox-page { max-width: 1136px; margin: 0 auto; padding-left: 24px; padding-right: 22px; }
.inbox-list { font-family: "Inbox Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 13px; line-height: 20px; color: #383a3d; }
.inbox-date-heading { margin: 0; padding: 20px 0 8px 40px; color: #999b9f; font-size: 13px; font-weight: 400; line-height: 16px; }
.inbox-row:first-child .inbox-date-heading { padding-top: 16px; }
.inbox-row[data-date-group="Today"] + .inbox-row[data-date-group="Today"] .inbox-date-heading,
.inbox-row[data-date-group="Yesterday"] + .inbox-row[data-date-group="Yesterday"] .inbox-date-heading,
.inbox-row[data-date-group="This week"] + .inbox-row[data-date-group="This week"] .inbox-date-heading,
.inbox-row[data-date-group="Last week"] + .inbox-row[data-date-group="Last week"] .inbox-date-heading,
.inbox-row[data-date-group="This month"] + .inbox-row[data-date-group="This month"] .inbox-date-heading,
.inbox-row[data-date-group="Earlier"] + .inbox-row[data-date-group="Earlier"] .inbox-date-heading { display: none; }
.inbox-row-body { position: relative; overflow: hidden; touch-action: pan-y; }
.inbox-row-body::after { content: ""; position: absolute; bottom: 0; left: 27px; right: 0; height: 1px; background: #dedfe2; pointer-events: none; }
.inbox-row-content { position: relative; min-width: 0; }
.inbox-message { display: grid; grid-template-columns: 26px 26px 188px minmax(0, 1fr) 76px; gap: 14px; align-items: center; height: 48px; padding-right: 14px; text-decoration: none; color: inherit; }
.inbox-message:hover { background: #e9edf480; }
.inbox-message:focus-visible { outline: 2px solid var(--color-accent-500); outline-offset: -2px; }
.inbox-unread-slot { display: flex; justify-content: center; }
.inbox-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent-500); }
.inbox-avatar { width: 26px; height: 26px; border: 1.5px solid var(--color-accent-400); border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.inbox-avatar > * { flex-shrink: 0; }
.inbox-avatar > div { background: var(--color-accent-500); }
.inbox-avatar > div span { color: white; font-size: 14px !important; }
.inbox-avatar > .bg-purple-100 { background: #bb39b0; }
.inbox-avatar > .bg-emerald-100 { background: #30a46c; }
.inbox-avatar > .bg-amber-100 { background: #d3aa09; }
.inbox-avatar > .bg-rose-100 { background: #e95062; }
.inbox-sender { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 500; }
.inbox-sender-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-count { flex-shrink: 0; background: #dedee0; color: #828387; border-radius: 10px; padding: 1px 7px; font-size: 12px; line-height: 16px; font-weight: 400; }
.inbox-attachment { flex-shrink: 0; width: 16px; height: 16px; color: #96989a; }
.inbox-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.inbox-subject { font-weight: 500; }
.inbox-snippet, .inbox-time { color: #929498; font-weight: 400; }
.inbox-time { text-align: right; white-space: nowrap; font-size: 13px; }
.inbox-done { position: absolute; right: 8px; top: 10px; opacity: 0; pointer-events: none; }
.inbox-row-body:hover .inbox-done, .inbox-row-body:focus-within .inbox-done { opacity: 1; pointer-events: auto; }
.inbox-row-body:hover .inbox-time, .inbox-row-body:focus-within .inbox-time { visibility: hidden; }
.inbox-done-button { display: grid; place-items: center; width: 28px; height: 28px; color: var(--color-accent-500); background: var(--color-accent-100); border-radius: 50%; cursor: pointer; }
.inbox-swipe-action { color: white; }
.inbox-view-switch { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid #dedfe6; border-radius: 9px; background: #eceef4; }
.inbox-view-option { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 6px; color: #767780; font-size: 13px; font-weight: 500; }
.inbox-view-option:hover { color: var(--color-accent-500); }
.inbox-view-option[aria-current="page"] { background: white; color: var(--color-accent-500); box-shadow: 0 1px 3px #24203d14; }
.inbox-view-option:focus-visible { outline: 2px solid var(--color-accent-500); outline-offset: 2px; }
.inbox-toolbar, .mail-feed-card { font-family: "Inbox Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.inbox-toolbar .inbox-view-switch { gap: 4px; padding: 0; border: 0; background: transparent; }
.inbox-toolbar .inbox-view-option { position: relative; isolation: isolate; justify-content: center; width: 32px; min-height: 32px; padding: 8px; }
/* The selected surface stays 32px even when mobile hit targets grow to 44px. */
.inbox-toolbar .inbox-view-option::before { content: ""; position: absolute; z-index: -1; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 8px; }
.inbox-toolbar .inbox-view-option[aria-current="page"] { background: transparent; box-shadow: none; }
.inbox-toolbar .inbox-view-option[aria-current="page"]::before { background: var(--color-accent-50); }
.inbox-sync-control { position: fixed; right: calc(var(--inbox-sync-offset, 20px) + env(safe-area-inset-right, 0px)); bottom: calc(var(--inbox-sync-offset, 20px) + env(safe-area-inset-bottom, 0px)); z-index: 15; margin: 0; }
.inbox-sync-control .inbox-sync-button { width: 44px; height: 44px; padding: 14px; border: 0; background: transparent; color: var(--mail-muted); box-shadow: none; }
.inbox-sync-control .inbox-sync-button svg { width: 16px; height: 16px; }
.inbox-sync-control .inbox-sync-button:hover, .inbox-sync-control .inbox-sync-button:focus-visible { background: transparent; color: var(--color-accent-500); }
@media (any-pointer: coarse), (max-width: 639px) {
  .inbox-toolbar .inbox-view-option { width: 44px; min-height: 44px; }
  .inbox-sync-control { --inbox-sync-offset: 12px; }
}
.inbox-feed-cards { display: grid; gap: 20px; }
.mail-feed-card { background: white; border-color: #dedfe6; border-radius: 12px; }
.mail-feed-card-header { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; gap: 3px 12px; padding: 16px; background: #f5f7fb; border-bottom: 1px solid #e5e7ed; }
.mail-feed-avatar { width: 32px; height: 32px; grid-column: 1; grid-row: 1 / 3; align-self: center; }
.mail-feed-sender { grid-column: 2; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; font-weight: 500; color: #62656e; }
.mail-feed-subject { grid-column: 2 / -1; grid-row: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 22px; font-weight: 500; color: #303238; }
.mail-feed-card-header:has(.mail-feed-meta-completable) .mail-feed-subject { padding-right: 40px; }
.mail-feed-count { font-size: 12px; font-weight: 400; color: #858892; }
.mail-feed-sender:hover, .mail-feed-subject:hover { color: var(--color-accent-500); }
.mail-feed-meta { grid-column: 3; grid-row: 1; position: relative; display: flex; justify-content: flex-end; min-width: 80px; font-size: 12px; line-height: 20px; color: #858892; white-space: nowrap; }
.mail-feed-done { position: absolute; top: -10px; right: -6px; width: 40px; height: 40px; display: grid; place-items: center; opacity: 0; pointer-events: none; }
.mail-feed-done .inbox-done-button { position: relative; }
/* Keep the same 28px circle as the list, with a 40px pointer target. */
.mail-feed-done .inbox-done-button::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
.mail-feed-card:hover .mail-feed-done, .mail-feed-card:focus-within .mail-feed-done { opacity: 1; pointer-events: auto; }
.mail-feed-card:hover .mail-feed-meta-completable time, .mail-feed-card:focus-within .mail-feed-meta-completable time { visibility: hidden; }
.mail-feed-sender:focus-visible, .mail-feed-subject:focus-visible, .mail-feed-done .inbox-done-button:focus-visible { outline: 2px solid var(--color-accent-500); outline-offset: 3px; }
.mail-feed-card footer { background: #f5f7fb; }
.mail-feed-card:focus-within { border-color: var(--color-accent-400); }
@media (hover: none), (pointer: coarse), (max-width: 639px) {
  .mail-feed-done { opacity: 1; pointer-events: auto; }
  .mail-feed-meta-completable { min-width: 110px; padding-right: 40px; }
  .mail-feed-card:hover .mail-feed-meta-completable time, .mail-feed-card:focus-within .mail-feed-meta-completable time { visibility: visible; }
}
@media (max-width: 639px) {
  .mail-feed-subject { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; overflow-wrap: anywhere; }
  .inbox-page { padding: 0; }
  .inbox-date-heading { padding-left: 28px; }
  .inbox-message { grid-template-columns: 12px 26px minmax(0, 1fr) 65px; gap: 4px 10px; height: 68px; padding: 10px 4px 10px 0; }
  .inbox-unread-slot, .inbox-avatar { grid-row: 1 / 3; }
  .inbox-sender { grid-column: 3; grid-row: 1; }
  .inbox-time { grid-column: 4; grid-row: 1; font-size: 11px; }
  .inbox-preview { grid-column: 3 / 5; grid-row: 2; }
  .inbox-page .inbox-message { grid-template-columns: 12px minmax(0, 1fr) 65px; height: auto; min-height: 88px; }
  .inbox-page .inbox-avatar { display: none; }
  .inbox-page .inbox-unread-slot { grid-row: 1 / 4; }
  .inbox-page .inbox-sender { grid-column: 2; }
  .inbox-page .inbox-time { grid-column: 3; }
  .inbox-page .inbox-preview { grid-column: 2 / 4; display: grid; gap: 2px; }
  .inbox-page .inbox-subject, .inbox-page .inbox-snippet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .inbox-page .inbox-snippet-separator { display: none; }
  .inbox-done { display: none; }
  .inbox-row-body:hover .inbox-time, .inbox-row-body:focus-within .inbox-time { visibility: visible; }
  .inbox-row-body::after { left: 22px; }
  .inbox-row-content { background: #f5f7fb; }
}
@media (prefers-color-scheme: dark) {
  body:has(.inbox-page) { background: #1c1917; }
  .inbox-list { color: #e7e5e4; }
  .inbox-date-heading, .inbox-snippet, .inbox-time { color: #a8a29e; }
  .inbox-row-body::after { background: #383431; }
  .inbox-message:hover { background: #292524; }
  .inbox-count { background: #44403c; color: #d6d3d1; }
  .inbox-unread { background: var(--color-accent-400); }
  .inbox-message:focus-visible, .inbox-view-option:focus-visible { outline-color: var(--color-accent-400); }
  .inbox-view-switch { background: #292524; border-color: #44403c; }
  .inbox-view-option { color: #a8a29e; }
  .inbox-view-option:hover, .inbox-view-option[aria-current="page"] { color: var(--color-accent-300); }
  .inbox-view-option[aria-current="page"] { background: #44403c; }
  .inbox-toolbar .inbox-view-option[aria-current="page"]::before { background: var(--color-accent-950); }
  .inbox-sync-control .inbox-sync-button:hover, .inbox-sync-control .inbox-sync-button:focus-visible { color: var(--color-accent-300); }
  .mail-feed-card { background: #1c1917; border-color: #44403c; }
  .mail-feed-card-header, .mail-feed-card footer { background: #292524; }
  .mail-feed-card-header { border-bottom-color: #383431; }
  .mail-feed-sender { color: #c7c3c0; }
  .mail-feed-subject { color: #f0eeec; }
  .mail-feed-meta, .mail-feed-count { color: #a8a29e; }
  .mail-feed-sender:hover, .mail-feed-subject:hover { color: var(--color-accent-300); }
  .mail-feed-sender:focus-visible, .mail-feed-subject:focus-visible, .mail-feed-done .inbox-done-button:focus-visible { outline-color: var(--color-accent-400); }
  .inbox-done-button { color: var(--color-accent-300); background: var(--color-accent-950); }
  .inbox-row-content { background: #1c1917; }
}
