/* Mailweight website: the homepage and the privacy policy.
   No web fonts, no scripts, no trackers. A privacy page that pinged Google
   Fonts on load would undercut the thing it's promising. */

:root {
  --ink: #1b2420;
  --paper: #f4f6f4;
  --bg: #f6f8f6;
  --surface: #ffffff;
  --text: #1b2420;
  --muted: #5d6b64;
  --line: rgba(27, 36, 32, 0.1);
  --wash: #e9eee9;
  --gold: #b79a3e;
  --gold-hi: #c9ad4d;
  --accent-text: #8a7020;
  --shadow: 0 1px 2px rgba(27, 36, 32, 0.06), 0 16px 40px rgba(27, 36, 32, 0.1);
  --radius: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1311;
    --surface: #151c19;
    --text: #e8ede9;
    --muted: #97a59d;
    --line: rgba(232, 237, 233, 0.1);
    --wash: #1e2723;
    --accent-text: #d4b95e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 24px;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo img {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
}

.nav-links a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s,
    border-color 0.15s;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-gold {
  background: var(--gold);
  color: #1b2420;
  box-shadow: 0 1px 2px rgba(27, 36, 32, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-gold:hover {
  background: var(--gold-hi);
  box-shadow: 0 8px 20px rgba(183, 154, 62, 0.35);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--text) 28%, transparent);
}

.btn:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 72px 96px;
}

.hero::before {
  content: "";
  position: absolute;
  top: -320px;
  right: -260px;
  width: 900px;
  height: 900px;
  background: radial-gradient(closest-side, rgba(183, 154, 62, 0.2), transparent);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(40px, 6vw, 66px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.lede {
  max-width: 34em;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 20px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.fineprint {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* The real extension panel (panel.css), pinned in place as a live preview. */
.showcase {
  position: relative;
  padding-block: 24px;
}

.inbox {
  position: absolute;
  inset: 0 0 0 -40px;
  overflow: hidden;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.inbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.inbox-search {
  flex: 1;
  max-width: 240px;
  height: 34px;
  border-radius: 999px;
  background: var(--wash);
}

.inbox-range {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.inbox-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.inbox-row i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--wash);
}

.inbox-row i:first-child {
  width: 84px;
  background: color-mix(in srgb, var(--text) 16%, transparent);
}

.inbox-row i:nth-child(2) {
  flex: 1;
}

.inbox-row i:last-child {
  width: 34px;
}

.showcase .mw-panel {
  position: relative;
  top: auto;
  right: auto;
  z-index: 1;
  width: min(330px, 100%);
  height: 620px;
  max-height: none;
  margin: 0 20px 0 auto;
}

/* ---------- sections ---------- */

section {
  padding-block: 88px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

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

.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card .ic {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--wash);
  color: var(--accent-text);
}

.card .ic svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

/* How it works */
.steps {
  counter-reset: step;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}

/* The searches, spelled out */
.searches {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px 24px;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}

.search:first-child {
  border-top: 0;
}

.search b {
  display: block;
  font-size: 16px;
}

.search span {
  color: var(--muted);
  font-size: 14px;
}

.search code {
  overflow-x: auto;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--wash);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

/* Privacy band: dark in both themes */
.band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 56px;
  border: 1px solid rgba(232, 237, 233, 0.08);
  border-radius: 28px;
  background: #1b2420;
  color: #e8ede9;
}

.band .eyebrow {
  color: #d4b95e;
}

.band p {
  margin: 0 0 24px;
  color: #b3c0b8;
  font-size: 18px;
}

.band ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.band li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 16px;
}

.band li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: #b79a3e
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231b2420' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}

.band .btn-ghost {
  border-color: rgba(232, 237, 233, 0.2);
  background: transparent;
  color: #e8ede9;
}

.band .btn-ghost:hover {
  border-color: rgba(232, 237, 233, 0.45);
}

/* FAQ */
.faq {
  max-width: 760px;
}

.faq details {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--muted);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 12px 0 0;
  color: var(--muted);
}

/* Closing call to action */
.closer {
  padding: 64px 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  text-align: center;
}

.closer p {
  max-width: 30em;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 18px;
}

/* ---------- footer ---------- */

footer {
  padding-block: 40px 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
}

.legal {
  flex-basis: 100%;
  margin: 0;
  font-size: 13px;
}

/* ---------- privacy policy ---------- */

.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.article h1 {
  margin: 16px 0 8px;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.article .date {
  margin: 0 0 32px;
  color: var(--muted);
}

.article h2 {
  margin: 48px 0 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  scroll-margin-top: 88px;
}

.article p,
.article li {
  margin: 0 0 12px;
}

.article ul {
  padding-left: 22px;
}

.article code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--wash);
  font: 0.88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tldr {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tldr p {
  margin: 0;
  font-size: 18px;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.toc a:hover {
  border-color: color-mix(in srgb, var(--text) 28%, transparent);
  color: var(--text);
}

.quote {
  padding: 16px 20px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
}

/* ---------- narrow screens ---------- */

@media (max-width: 900px) {
  .hero .wrap,
  .band {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .showcase .mw-panel {
    margin-inline: auto;
  }

  .inbox {
    inset-inline: 0;
  }

  .band {
    padding: 36px 28px;
  }

  .search {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-links a:not(.btn) {
    display: none;
  }

  section {
    padding-block: 64px;
  }

  .hero {
    padding-block: 48px 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
  }
}
