:root {
  min-height: 0;
  padding: 0;
  color: inherit;
  --ink: #202725;
  background: transparent;
  border: 0;
  border-radius: 0;
  --green-soft: #e7f2ed;
  --orange: #e39b4a;
  --yellow: #e4c95b;
  --red: #b94c3d;
  background: transparent;
  border-color: transparent;
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background-image: radial-gradient(circle at 12% 9%, rgba(227, 155, 74, .11), transparent 25%), linear-gradient(90deg, rgba(38, 118, 92, .025) 1px, transparent 1px);
  background-size: auto, 36px 36px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: flex;
  width: min(100% - 56px, 1440px);
  min-height: 100vh;
  flex-direction: column;
  margin: 0 auto;
}

.app-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 600;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 18px;
  background: var(--green);
  border-radius: 4px;
}

.service-label,
.eyebrow,
.app-footer {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.service-label,
.app-footer {
  color: var(--muted);
}

.workspace {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .62fr);
  align-items: center;
  gap: 48px;
  padding: 72px 0;
}

.workspace-copy {
  padding: clamp(28px, 6vw, 76px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 24px 60px rgba(37, 45, 41, .08);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
}

h1 {
  margin: 0 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 7vw, 74px);
  font-weight: 500;
  line-height: 1;
}

.session-message {
  min-height: 28px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.session-message[data-state="authenticated"] {
  color: var(--green);
}

.session-message[data-state="error"] {
  color: var(--red);
}

.session-panel {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: 28px;
  color: #f8faf4;
  background-color: var(--green-dark);
  background-image: linear-gradient(135deg, transparent 70%, rgba(228, 201, 91, .12) 70%);
  border-radius: 4px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: var(--yellow);
  border-radius: 50%;
}

.status-line[data-state="authenticated"] .status-dot {
  background: #9ed1a8;
}

.status-line[data-state="error"] .status-dot {
  background: #ef8c78;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-secondary {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, .55);
}

.button-secondary:hover {
  color: var(--green-dark);
  background: #fff;
  border-color: #fff;
}

.app-footer {
  min-height: 56px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  font-size: 10px;
}

@media (max-width: 720px) {
  .workspace {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 40px 0;
  }

  .workspace-copy {
    padding: 32px 24px;
  }

  .session-panel {
    min-height: 150px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: min(100% - 32px, 1080px);
  }

  .service-label {
    font-size: 9px;
  }
}

@media (max-width: 360px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
  }
}

.header-tools { display: flex; align-items: center; gap: 18px; }
.privacy-label { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; color: var(--green-dark); font-size: 11px; font-weight: 700; background: var(--green-soft); border-radius: 3px; }
.privacy-label span { width: 7px; aspect-ratio: 1; background: var(--green); border-radius: 50%; }
.session-message { max-width: 190px; overflow: hidden; margin: 0; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.session-message[data-state="error"] { color: var(--red); }
.button-link { padding: 7px 0; color: var(--green-dark); font-size: 12px; font-weight: 700; background: transparent; border: 0; cursor: pointer; }
.button-link:hover { color: var(--green); text-decoration: underline; }
.button-link[hidden] { display: none; }
.mail-layout { display: grid; min-height: calc(100vh - 128px); flex: 1; grid-template-columns: 248px minmax(340px, 1fr) 286px; background: rgba(255, 255, 255, .76); border-right: 1px solid var(--line); border-left: 1px solid var(--line); }
.sidebar { display: flex; flex-direction: column; padding: 26px 14px 20px; border-right: 1px solid var(--line); }
.sidebar-section + .sidebar-section { margin-top: 30px; }
.section-label, .eyebrow { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.section-label { padding: 0 10px; }
.folder-nav { display: grid; gap: 3px; margin-top: 12px; }
.folder-button { display: grid; min-height: 40px; grid-template-columns: 23px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 10px; color: #535e59; text-align: left; background: transparent; border: 0; border-radius: 3px; cursor: pointer; }
.folder-button:hover { background: #f2f5f2; }
.folder-button.is-active { color: var(--green-dark); font-weight: 700; background: var(--green-soft); }
.folder-icon { color: #7d8983; font-size: 17px; text-align: center; }
.folder-count { color: #849089; font-size: 11px; font-variant-numeric: tabular-nums; }
.account-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 11px 8px; border-bottom: 1px solid var(--line); }
.account-row:first-of-type { margin-top: 7px; }
.provider-mark { display: grid; width: 27px; aspect-ratio: 1; place-items: center; font-size: 13px; font-weight: 700; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.gmail-mark { color: #c74634; }
.outlook-mark { color: #176ea8; }
.account-copy { display: grid; min-width: 0; gap: 3px; }
.account-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { color: var(--muted); font-size: 10px; }
.connect-button { padding: 5px 6px; color: var(--green-dark); font-size: 10px; font-weight: 700; background: transparent; border: 0; border-radius: 3px; cursor: pointer; }
.connect-button:hover { background: var(--green-soft); }
.sidebar-note { display: flex; gap: 11px; margin: auto 8px 0; padding-top: 22px; }
.note-rule { width: 2px; flex: 0 0 2px; background: var(--orange); }
.sidebar-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.inbox-panel { min-width: 0; padding: 20px 26px 30px; }
.inbox-toolbar { display: flex; align-items: center; gap: 10px; }
.search-box { display: flex; height: 40px; min-width: 0; flex: 1; align-items: center; gap: 9px; padding: 0 11px; color: #7e8983; background: #f5f6f3; border: 1px solid #eaede9; border-radius: 3px; }
.search-box > span { font-size: 22px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; padding: 0; color: var(--ink); font-size: 12px; background: transparent; border: 0; outline: 0; }
.search-box input::placeholder { color: #929b96; }
.search-box kbd { padding: 2px 6px; color: #7e8983; font: inherit; font-size: 10px; background: #fff; border: 1px solid var(--line); border-radius: 2px; }
.icon-button { display: grid; width: 38px; aspect-ratio: 1; place-items: center; color: #68736d; font-size: 21px; background: #fff; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }
.icon-button:hover { color: var(--green-dark); background: var(--green-soft); }
.inbox-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: 34px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.eyebrow { margin-bottom: 8px; color: var(--green); }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 500; line-height: 1.15; }
.message-total { padding-bottom: 3px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.empty-inbox { display: flex; min-height: 400px; flex-direction: column; align-items: center; justify-content: center; padding: 42px 18px; text-align: center; animation: appear .35s ease-out both; }
.empty-mark { position: relative; display: grid; width: 58px; aspect-ratio: 1; place-items: center; margin-bottom: 23px; background: #f2f6f3; border: 1px solid #e1ebe4; border-radius: 50%; }
.empty-mark::before { width: 23px; height: 16px; content: ""; border: 1.5px solid var(--green); border-radius: 2px; }
.empty-mark span { position: absolute; top: 21px; width: 12px; height: 9px; border-right: 1.5px solid var(--green); border-bottom: 1.5px solid var(--green); transform: rotate(45deg) translate(-2px, -2px); }
.empty-kicker { margin: 0 0 8px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.empty-inbox h2 { max-width: 100%; margin: 0 0 9px; font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 500; }
.empty-inbox > p:not(.empty-kicker) { max-width: 330px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-inbox .setup-hint { margin-top: 15px; color: #909a94; font-size: 10px; }
.object-panel { display: flex; flex-direction: column; padding: 26px 20px; background: rgba(250, 251, 249, .85); border-left: 1px solid var(--line); }
.object-panel-heading { display: flex; align-items: center; justify-content: space-between; }
.object-panel-heading .section-label { padding: 0; }
.object-index { color: #9aa39e; font-family: Georgia, serif; font-size: 14px; }
.object-empty { margin-top: 56px; }
.object-empty h2 { max-width: 210px; margin: 0 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 500; line-height: 1.22; }
.object-empty p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.object-fields { display: grid; gap: 0; margin: 30px 0 0; border-top: 1px solid var(--line); }
.object-fields div { display: flex; min-height: 51px; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; border-bottom: 1px solid var(--line); }
.object-fields dt, .object-fields dd { margin: 0; font-size: 11px; }
.object-fields dt { color: var(--muted); }
.object-fields dd { display: inline-flex; align-items: center; gap: 6px; color: #3a4540; text-align: right; }
.field-swatch { width: 7px; aspect-ratio: 1; border-radius: 50%; }
.swatch-green { background: var(--green); }
.swatch-orange { background: var(--orange); }
.object-footnote { margin: auto 0 0; padding-top: 20px; color: #8a948e; font-size: 10px; line-height: 1.6; }
.app-footer { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 10px; border-top: 0; border-bottom: 0; letter-spacing: 0; text-transform: none; }
.app-footer i { display: inline-block; width: 4px; aspect-ratio: 1; margin: 0 5px 2px; background: var(--orange); border-radius: 50%; }
.notice { position: fixed; right: 24px; bottom: 20px; z-index: 1; max-width: min(420px, calc(100vw - 32px)); margin: 0; padding: 13px 16px; color: #fff; font-size: 12px; line-height: 1.5; background: var(--green-dark); border-left: 3px solid var(--orange); box-shadow: 0 8px 24px rgba(22, 75, 59, .18); }
.notice[hidden] { display: none; }
@keyframes appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1080px) {
  .mail-layout { grid-template-columns: 220px minmax(300px, 1fr); }
  .object-panel { grid-column: 2; min-height: 280px; border-top: 1px solid var(--line); border-left: 0; }
  .object-empty { margin-top: 30px; }
  .object-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .object-fields div { align-content: center; justify-content: flex-start; }
  .object-fields dd { text-align: left; }
}

@media (max-width: 700px) {
  .app-shell { width: 100%; }
  .app-header { min-height: 62px; padding: 0 16px; }
  .header-tools { gap: 10px; }
  .privacy-label { padding: 6px 7px; font-size: 10px; }
  .session-message { max-width: 100px; font-size: 10px; }
  .mail-layout { min-height: auto; grid-template-columns: minmax(0, 1fr); border: 0; }
  .sidebar { padding: 13px 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-section:first-child { display: flex; align-items: center; gap: 12px; }
  .sidebar-section:first-child .section-label { display: none; }
  .folder-nav { display: flex; min-width: 0; gap: 3px; margin: 0; overflow-x: auto; }
  .folder-button { min-height: 36px; grid-template-columns: auto auto; flex: 0 0 auto; gap: 6px; padding: 0 9px; font-size: 11px; }
  .folder-icon, .folder-count { display: none; }
  .accounts-section { display: flex; align-items: center; gap: 7px; margin-top: 12px !important; }
  .accounts-section .section-label { padding: 0 4px 0 0; white-space: nowrap; }
  .account-row { min-width: 0; flex: 1; gap: 5px; padding: 0 4px; border: 0; }
  .account-row:first-of-type { margin-top: 0; }
  .provider-mark { width: 23px; }
  .account-copy strong { font-size: 10px; }
  .account-copy small, .sidebar-note { display: none; }
  .connect-button { font-size: 9px; }
  .inbox-panel { min-height: 420px; padding: 16px; }
  .inbox-heading { margin-top: 25px; }
  h1 { font-size: 25px; }
  .empty-inbox { min-height: 340px; }
  .object-panel { grid-column: 1; min-height: 0; padding: 22px 18px; border-top: 1px solid var(--line); }
  .object-empty h2 { max-width: 300px; }
  .object-fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .object-fields div { justify-content: space-between; }
  .app-footer { padding: 0 16px; }
}

@media (max-width: 420px) {
  .wordmark { gap: 7px; font-size: 20px; }
  .wordmark-mark { width: 30px; }
  .session-message { display: none; }
  .accounts-section .section-label { display: none; }
  .account-copy strong { max-width: 62px; }
  .search-box kbd { display: none; }
}

.empty-inbox[hidden],
.mail-list[hidden] { display: none; }
.mail-list { display: grid; align-content: start; }
.mail-row { display: grid; min-height: 76px; grid-template-columns: minmax(100px, .34fr) minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 12px 8px; color: var(--ink); text-align: left; border-bottom: 1px solid var(--line); cursor: pointer; }
.mail-row:hover { background: #f7f9f7; }
.mail-row.is-selected { background: var(--green-soft); }
.mail-sender, .mail-subject { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mail-row-details { display: grid; min-width: 0; gap: 5px; }
.mail-snippet { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mail-date { align-self: start; padding-top: 3px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.message-body { min-height: 180px; margin-top: 18px; padding: 15px 0 0; color: #3a4540; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; border-top: 1px solid var(--line); }

@media (max-width: 700px) {
  .mail-row { grid-template-columns: minmax(75px, .34fr) minmax(0, 1fr) auto; gap: 8px; padding: 12px 3px; }
  .mail-sender, .mail-subject, .mail-snippet { font-size: 10px; }
}