/* =========================================================
   Calma Inbox — Calm Direction
   Cream light (--theme-light) / Indigo dark (--theme-dark)
   Typography: Fraunces (display) + Inter (body)
   ========================================================= */

/* ---- Design Tokens ---- */
:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Light theme (Cream) */
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #1f1b15;
  --ink2: #746c60;
  --accent: #c06a48;
  --rule: #ebe3d3;
  --tile: #f0e9db;
  --shadow: rgba(31, 27, 21, 0.06);
}

[data-theme="dark"] {
  --bg: #0a0e1a;
  --surface: #121828;
  --ink: #e8ecf5;
  --ink2: #8a93a8;
  --accent: #7aa2ff;
  --rule: #1a2238;
  --tile: #161e30;
  --shadow: rgba(0, 0, 0, 0.3);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

/* ---- App Shell ---- */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
  width: 272px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.2s, border-color 0.2s;
}

.sidebar-inner {
  flex: 1;
  overflow-y: auto;
  padding: 28px 20px 24px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.sidebar-logo-img {
  width: 36px;
  height: 36px;
  display: block;
  flex-shrink: 0;
}

.sidebar-logo-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ---- Folder Buttons ---- */
.sidebar-folders {
  margin-bottom: 28px;
}

.folder-btn {
  width: 100%;
  text-align: left;
  border: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background 0.15s;
}

.folder-btn:hover { background: var(--tile); }
.folder-btn.active {
  background: var(--tile);
  font-weight: 600;
}

.folder-btn-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.folder-glyph { font-size: 16px; }

.folder-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

/* ---- Sidebar Subscriptions ---- */
.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 12px 10px;
  margin-bottom: 4px;
}

.subscription-item {
  width: 100%;
  text-align: left;
  border: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  margin-bottom: 1px;
  transition: background 0.15s;
}

.subscription-item:hover { background: var(--tile); }
.subscription-item.active { background: var(--tile); }

.subscription-badge {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
}

.subscription-name-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subscription-unread {
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---- Sidebar Footer (Theme Toggle) ---- */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-toggle-btn {
  background: var(--tile);
  border: 1px solid var(--rule);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.theme-toggle-btn:hover { background: var(--rule); }

.sidebar-footer-text {
  font-size: 12px;
  color: var(--ink2);
}

/* ---- Sidebar sync indicator ---- */
.sync-indicator {
  font-size: 12px;
  color: var(--accent);
  padding: 8px 12px;
  display: none;
  align-items: center;
  gap: 6px;
}
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.main-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 52px 56px 80px;
  width: 100%;
}

/* ---- Greeting ---- */
.greeting-date {
  font-size: 13px;
  color: var(--ink2);
  font-weight: 500;
  margin-bottom: 6px;
}

.greeting-headline {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 8px 0;
}

.greeting-sub {
  font-size: 17px;
  color: var(--ink2);
  margin: 0;
  line-height: 1.5;
}

/* ---- Folder Tabs ---- */
.folder-tabs {
  display: flex;
  gap: 20px;
  margin-top: 40px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 12px;
}

.folder-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
  padding-bottom: 12px;
  margin-bottom: -13px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  padding-left: 0;
  padding-right: 0;
  font-family: var(--font-body);
  transition: color 0.15s;
  user-select: none;
}

.folder-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.tab-badge {
  background: var(--tile);
  color: var(--ink2);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}

.folder-tab.active .tab-badge {
  background: var(--accent);
  color: #fff;
}

/* ---- Newsletter Cards (desktop/iPad) ---- */
.newsletter-list { display: flex; flex-direction: column; gap: 12px; }

.newsletter-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 20px 22px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  color: var(--ink);
}

.newsletter-item:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 2px 12px var(--shadow);
}

.newsletter-item.unread {
  border-left: 3px solid var(--accent);
}

.newsletter-item.unread .newsletter-subject {
  font-weight: 600;
}

.newsletter-sender-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sender-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.sender-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.newsletter-time {
  font-size: 12px;
  color: var(--ink2);
  flex-shrink: 0;
}

.newsletter-subject {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px 0;
}

.newsletter-preview {
  font-size: 14px;
  color: var(--ink2);
  line-height: 1.55;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Newsletter List States ---- */
.newsletter-list-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink2);
  font-size: 15px;
}

.newsletter-list-loading {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink2);
  font-size: 15px;
}

.newsletter-list-error {
  padding: 48px 24px;
  text-align: center;
  color: var(--accent);
  font-size: 15px;
}

/* ---- Sender Detail Panel ---- */
.sender-detail {
  display: none;
}
.sender-detail.visible {
  display: block;
}

.sender-detail-back {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  margin-bottom: 28px;
  transition: color 0.15s;
}
.sender-detail-back:hover { color: var(--accent); }

.sender-masthead-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.sender-badge-lg {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sender-masthead-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px 0;
}

.sender-colophon {
  display: inline-flex;
  gap: 16px;
  padding: 8px 16px;
  background: var(--tile);
  border-radius: 10px;
  font-size: 12px;
  color: var(--ink2);
}

.sender-colophon strong { color: var(--ink); }

.sender-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sender-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sender-issues-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0;
  padding: 0 4px;
}

.sender-unread-toggle {
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--ink2);
  background: var(--tile);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.sender-unread-toggle:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.sender-unread-toggle.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sender-mark-all-btn {
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.sender-mark-all-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ---- Skeleton Loaders ---- */
.skeleton {
  background: linear-gradient(90deg, var(--tile) 25%, var(--rule) 50%, var(--tile) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.skeleton-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 2px;
}
.skeleton-badge { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; }
.skeleton-name { flex: 1; height: 13px; border-radius: 4px; }

/* ---- Toast ---- */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--surface);
  color: var(--ink);
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--shadow), 0 0 0 1px var(--rule);
  z-index: 2000;
  display: none;
  min-width: 280px;
  border-left: 3px solid var(--accent);
  font-size: 14px;
  transition: opacity 0.3s;
}

/* ---- Confirmation Dialog ---- */
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}
.confirm-overlay.visible { display: flex; }

.confirm-dialog {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 28px;
  max-width: 400px;
  margin: 16px;
  box-shadow: 0 20px 48px var(--shadow);
}

.confirm-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 12px;
}

.confirm-message {
  color: var(--ink2);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.confirm-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-ghost {
  background: var(--tile);
  color: var(--ink);
  border: 0;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.btn-ghost:hover { background: var(--rule); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-body);
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Reader ---- */
.reading-pane {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  overflow-y: auto;
}
.reading-pane.visible { display: block; }

.reader-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
  padding: 14px 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.reader-topbar.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.reader-back-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  padding: 0;
  font-family: var(--font-body);
  transition: color 0.15s;
}
.reader-back-btn:hover { color: var(--accent); }
.reader-back-arrow { font-size: 18px; line-height: 1; }

.reader-sender-name {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
}

.reader-article {
  max-width: 680px;
  margin: 0 auto;
  padding: 72px 24px 140px;
}

.reader-headline {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 22px 0;
  text-wrap: balance;
}

.reader-dek {
  font-family: var(--font-display);
  font-size: 21px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink2);
  margin: 0 0 36px 0;
  text-wrap: pretty;
}

.reader-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 44px;
  font-size: 12px;
  color: var(--ink2);
}

.reader-body-content {
  width: 100%;
  border: none;
  min-height: 600px;
  background: transparent;
  display: block;
}

/* ---- Mobile ---- */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 14px 22px;
  align-items: center;
  justify-content: space-between;
}

.mobile-hamburger {
  background: transparent;
  border: 0;
  color: var(--ink2);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.mobile-logo-img {
  width: 28px;
  height: 28px;
  display: block;
}

.mobile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 40;
}
.sidebar-backdrop.active { display: block; }

/* ---- Mobile Newsletter List (Tight layout) ---- */
.newsletter-item-mobile {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  color: var(--ink);
}

.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: transparent;
  flex-shrink: 0;
  margin-top: 8px;
}
.unread-dot.active { background: var(--accent); }

.newsletter-mobile-content { flex: 1; min-width: 0; }

.newsletter-mobile-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--ink2);
  margin-bottom: 3px;
  font-weight: 500;
  line-height: 1.2;
}

.newsletter-mobile-sender {
  color: var(--ink);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.newsletter-mobile-time { flex-shrink: 0; }

.newsletter-mobile-subject {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.newsletter-mobile-subject.read { color: var(--ink2); font-weight: 400; }

.newsletter-mobile-readtime {
  font-size: 10px;
  color: var(--ink2);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ---- Login Page ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  text-align: center;
  max-width: 440px;
  width: 100%;
}

.login-logo-img {
  width: 80px;
  height: 80px;
  display: block;
  margin: 0 auto 12px;
}

.login-logo {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.login-tagline {
  font-size: 16px;
  color: var(--ink2);
  line-height: 1.6;
  margin-bottom: 40px;
}

.login-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-body);
  transition: opacity 0.15s;
}
.login-connect-btn:hover { opacity: 0.9; }

.login-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.login-footer a {
  color: var(--ink2);
  font-size: 13px;
  text-decoration: underline;
  transition: color 0.15s;
}
.login-footer a:hover { color: var(--ink); }

/* ---- Spin animation ---- */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ---- Responsive: iPad ---- */
@media (min-width: 641px) and (max-width: 1024px) {
  .sidebar { width: 240px; }

  .main-inner { padding: 40px 40px; }

  .greeting-headline { font-size: 36px; }
  .greeting-sub { font-size: 15px; }

  .newsletter-subject { font-size: 20px; }

  .reader-article { max-width: 640px; padding: 56px 48px 120px; }
  .reader-headline { font-size: 40px; }
  .reader-dek { font-size: 19px; }

  .reader-topbar { padding: 12px 20px; }
}

/* ---- Responsive: Tablet portrait — collapsible off-canvas sidebar ----
   On tablets held in portrait (e.g. iPad, 768px wide) the sidebar would
   otherwise stay permanently visible and crowd the reading area. Match the
   mobile behaviour: hide the sidebar off-canvas and reveal it via the
   hamburger menu, while keeping the roomier tablet content layout. */
@media (min-width: 641px) and (max-width: 1024px) and (orientation: portrait) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 320px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }
  .sidebar.active { transform: translateX(0); }

  .mobile-header { display: flex; }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 640px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 288px;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }
  .sidebar.active { transform: translateX(0); }

  .mobile-header { display: flex; }

  .main-inner { padding: 24px 22px 60px; }

  .greeting-headline { font-size: 32px; }
  .greeting-sub { font-size: 14px; }

  .folder-tabs { margin-top: 24px; margin-bottom: 16px; gap: 14px; }

  /* Hide desktop cards, show mobile list */
  .newsletter-item { display: none; }
  .newsletter-item-mobile { display: flex; }

  .sender-masthead-card { padding: 20px; gap: 14px; }
  .sender-badge-lg { width: 48px; height: 48px; font-size: 22px; border-radius: 12px; }
  .sender-masthead-name { font-size: 22px; }

  .reader-topbar {
    padding: 12px 16px;
    grid-template-columns: 1fr auto;
  }
  .reader-sender-name { display: none; }
  .reader-article { padding: 36px 24px 100px; }
  .reader-headline { font-size: 32px; }
  .reader-dek { font-size: 18px; }
}

/* ---- Desktop only ---- */
@media (min-width: 641px) {
  /* Show desktop cards, hide mobile list */
  .newsletter-item-mobile { display: none; }
}
