:root {
  --bg: #fbfcf7;
  --surface: #ffffff;
  --surface-soft: #f7faf6;
  --ink: #111a16;
  --muted: #637068;
  --faint: #eef3ee;
  --line: #dce5de;
  --green: #1f8c68;
  --green-deep: #0c684b;
  --green-soft: #eaf6f1;
  --amber: #c57914;
  --rose: #bd3f54;
  --blue: #286aa2;
  --shadow: 0 24px 72px rgba(28, 44, 36, 0.12);
  color-scheme: light;
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% 0%, rgba(31, 140, 104, 0.08), transparent 36rem),
    linear-gradient(180deg, #fff 0%, var(--bg) 42rem);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: 28px clamp(18px, 3vw, 56px) 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 900;
  font-size: clamp(1.18rem, 1.55vw, 1.75rem);
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: clamp(44px, 4vw, 58px);
  height: clamp(44px, 4vw, 58px);
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: clamp(1.2rem, 1.7vw, 1.85rem);
  font-weight: 900;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 46px);
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.38rem);
  font-weight: 500;
}

.top-actions a {
  padding: 8px 0;
}

.top-actions a:hover {
  color: var(--green-deep);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr) minmax(210px, 260px);
  gap: clamp(16px, 1.8vw, 28px);
  align-items: stretch;
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: 22px clamp(18px, 3vw, 56px) 64px;
}

.rail {
  min-height: 560px;
  padding: clamp(22px, 2vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
}

.rail-label,
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--green-deep);
  font-size: clamp(0.78rem, 0.92vw, 1rem);
  font-weight: 900;
}

.ad-unit {
  position: relative;
  display: grid;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(31, 140, 104, 0.08), transparent 42%),
    #fff;
}

.ad-unit::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(220, 229, 222, 0.52) 1px, transparent 1px),
    linear-gradient(0deg, rgba(220, 229, 222, 0.52) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.28;
  pointer-events: none;
}

.ad-unit[data-ad-configured="true"]::after {
  opacity: 0;
}

.ad-label {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.adsbygoogle {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: inherit;
}

.ad-unit-rail {
  min-height: 300px;
  margin-top: 28px;
}

.ad-unit-leaderboard {
  min-height: 96px;
  margin-top: clamp(20px, 2.2vw, 34px);
}

.ad-strip {
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 56px) 48px;
}

.ad-unit-wide {
  min-height: 118px;
}

.product-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.address-panel {
  padding: clamp(28px, 3vw, 46px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(31, 140, 104, 0.12), transparent 34%),
    linear-gradient(90deg, #fff 0%, #f5fbf8 100%);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.25rem, 4.4vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 1.6vw, 2rem);
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.1rem, 1.3vw, 1.55rem);
  letter-spacing: -0.035em;
}

.status-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid #bfd9cf;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: clamp(0.92rem, 1vw, 1.15rem);
  font-weight: 900;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(31, 140, 104, 0.5);
  animation: live-pulse 1.6s ease-out infinite;
}

@keyframes live-pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(31, 140, 104, 0);
  }
}

.address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(72px, 6vw, 92px);
  gap: clamp(12px, 1.5vw, 18px);
}

#emailAddress {
  width: 100%;
  min-height: clamp(66px, 6.4vw, 92px);
  padding: 0 clamp(18px, 2vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: clamp(1.28rem, 2.35vw, 2.9rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-button,
.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.icon-button {
  width: clamp(72px, 6vw, 92px);
  min-height: clamp(66px, 6.4vw, 92px);
}

.icon-button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  flex: 0 0 auto;
}

.mailbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(18px, 2vw, 28px);
}

.tool-button {
  min-width: 112px;
  padding: 0 18px;
  font-size: clamp(0.98rem, 1.1vw, 1.35rem);
}

.tool-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: #bdd0c5;
}

.tool-button.danger {
  color: var(--rose);
}

.tool-button.muted {
  color: var(--blue);
}

.claim-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 14px;
}

#claimAddress {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-weight: 650;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
  margin-top: clamp(20px, 2.3vw, 32px);
}

.metrics div {
  min-height: clamp(86px, 8vw, 124px);
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

.metrics span,
.metrics small {
  display: block;
}

.metrics span {
  font-size: clamp(1.65rem, 3vw, 3.4rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.metrics small {
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.15vw, 1.35rem);
}

.inbox-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.46fr) minmax(0, 0.54fr);
  min-height: clamp(520px, 52vw, 780px);
}

.inbox-list-panel {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #fbfcfa;
}

.inbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: clamp(70px, 7vw, 108px);
  padding: 0 clamp(18px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.15vw, 1.28rem);
  font-weight: 900;
}

.switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.message-list {
  display: grid;
  max-height: 680px;
  overflow: auto;
}

.message-row {
  position: relative;
  width: 100%;
  padding: 18px clamp(18px, 2vw, 28px);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.message-row:hover,
.message-row.active {
  background: var(--surface-soft);
}

.message-row.new {
  animation: new-mail 1.1s ease both;
}

.message-row.new::after {
  content: "new";
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

@keyframes new-mail {
  0% {
    background: rgba(31, 140, 104, 0.18);
    transform: translateY(-8px);
  }
  100% {
    background: transparent;
    transform: translateY(0);
  }
}

.message-row.unread .message-subject {
  font-weight: 950;
}

.message-row.unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--green);
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.sender,
.message-subject,
.message-preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sender {
  min-width: 0;
}

.message-subject {
  color: var(--ink);
  font-size: 1rem;
}

.message-preview {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.92rem;
}

.message-detail {
  display: grid;
  min-width: 0;
  background: var(--surface);
}

.empty-state {
  align-self: center;
  justify-self: center;
  width: min(420px, 86%);
  text-align: center;
  color: var(--muted);
}

.empty-state img {
  display: block;
  width: min(280px, 76%);
  height: auto;
  margin: 0 auto 18px;
}

.empty-state h2 {
  color: var(--ink);
  font-size: clamp(1.4rem, 2vw, 2.45rem);
}

.empty-state p {
  font-size: clamp(1rem, 1.3vw, 1.48rem);
  line-height: 1.38;
}

.detail-inner {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100%;
}

.detail-header {
  padding: clamp(18px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
}

.detail-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-subject {
  margin: 8px 0 12px;
  font-size: clamp(1.35rem, 2vw, 2.35rem);
  line-height: 1.12;
}

.detail-meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.95rem;
}

.delete-message {
  width: 44px;
  height: 44px;
  min-height: 44px;
  color: var(--rose);
}

.detail-body {
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.email-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  background: #fff;
}

.business-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 0.68fr);
  gap: clamp(20px, 3vw, 46px);
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 56px) 76px;
}

.business-strip h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 3.6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.revenue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.revenue-grid article {
  min-height: 180px;
  padding: clamp(20px, 2vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.revenue-grid span {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--amber);
  font-size: clamp(1.2rem, 1.7vw, 2rem);
  font-weight: 950;
}

.revenue-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.35rem);
  line-height: 1.55;
}

.seo-section,
.faq-section {
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 56px) 54px;
}

.seo-heading {
  max-width: 820px;
  margin-bottom: 22px;
}

.seo-heading h2 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 3.4vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.seo-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.32rem);
  line-height: 1.58;
}

.topic-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.topic-grid article,
.faq-grid article {
  min-height: 188px;
  padding: clamp(20px, 2vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.topic-grid a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(31, 140, 104, 0.35);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.topic-grid p,
.faq-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 56px) 42px;
  color: var(--muted);
  font-weight: 800;
}

.site-footer a:hover {
  color: var(--green-deep);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 44px));
  padding: 13px 15px;
  border: 1px solid rgba(17, 26, 22, 0.12);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    min-height: unset;
  }

  .ad-unit-rail {
    min-height: 118px;
    margin-top: 18px;
  }

  .rail-left {
    order: 2;
  }

  .product-panel {
    order: 1;
  }

  .rail-right {
    order: 3;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 18px;
  }

  .top-actions {
    width: 100%;
    overflow-x: auto;
  }

  .address-panel {
    padding: 20px;
  }

  .section-heading,
  .business-strip {
    grid-template-columns: 1fr;
  }

  .section-heading {
    flex-direction: column;
  }

  .address-row {
    grid-template-columns: minmax(0, 1fr) 60px;
  }

  #emailAddress,
  .icon-button {
    min-height: 60px;
  }

  .icon-button {
    width: 60px;
  }

  .claim-form {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .inbox-layout {
    grid-template-columns: 1fr;
  }

  .inbox-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .message-list {
    max-height: 330px;
  }

  .message-detail {
    min-height: 360px;
  }

  .ad-strip {
    padding-bottom: 34px;
  }

  .revenue-grid {
    grid-template-columns: 1fr;
  }

  .topic-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}
