/* EmailSort — shared site styles
   Extends the extension's own identity: Syne for display, DM Sans for body,
   DM Mono for utility, and the green→blue gradient used on product headings. */

:root {
  --ink:      #0f1419;
  --ink-soft: #46555f;
  --ink-mute: #7b8a93;
  --paper:    #ffffff;
  --wash:     #f6f9f8;
  --line:     rgba(15, 20, 25, 0.10);
  --green:    #17914f;
  --green-lt: #42c07a;
  --blue:     #1a6fd4;
  --blue-lt:  #4a9bf0;
  --r:        14px;
  --measure:  68ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Syne', sans-serif; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; font-weight: 700; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green); }

.gradient {
  background: linear-gradient(115deg, var(--green) 0%, var(--blue) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--measure); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--green-lt), var(--blue-lt));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 15px;
}
.brand-name { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: linear-gradient(115deg, var(--green) 0%, var(--blue) 100%);
  color: #fff; box-shadow: 0 6px 18px rgba(26, 111, 212, 0.22);
}
.btn-primary:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 9px 24px rgba(26, 111, 212, 0.28); }
.btn-quiet { background: var(--wash); color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--green); color: var(--ink); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; }
.eyebrow {
  font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 14px;
}
.hero p.lede { font-size: 1.1rem; color: var(--ink-soft); margin: 18px 0 28px; max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--ink-mute); }

/* Signature: an inbox resolving itself into labelled tabs */
.sorter {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
  box-shadow: 0 18px 50px rgba(15, 20, 25, 0.08); overflow: hidden;
}
.sorter-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--wash); }
.sorter-tab {
  font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .4px;
  padding: 4px 10px; border-radius: 20px; border: 1px solid var(--line); color: var(--ink-mute);
  white-space: nowrap; opacity: 0; animation: tabIn .5s ease forwards;
}
.sorter-tab.on { border-color: var(--green); color: var(--green); background: rgba(23, 145, 79, 0.08); }
.sorter-tab:nth-child(1) { animation-delay: .1s; }
.sorter-tab:nth-child(2) { animation-delay: .3s; }
.sorter-tab:nth-child(3) { animation-delay: .5s; }
.sorter-tab:nth-child(4) { animation-delay: .7s; }
@keyframes tabIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.sorter-row {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  opacity: 0; animation: rowIn .55s ease forwards;
}
.sorter-row:nth-child(1) { animation-delay: .85s; }
.sorter-row:nth-child(2) { animation-delay: 1.0s; }
.sorter-row:nth-child(3) { animation-delay: 1.15s; }
.sorter-row:nth-child(4) { animation-delay: 1.3s; }
.sorter-row:last-child { border-bottom: none; }
@keyframes rowIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.dot { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.sorter-txt { flex: 1; min-width: 0; }
.sorter-from { font-size: 12.5px; font-weight: 600; }
.sorter-sub { font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip {
  font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .5px;
  padding: 3px 8px; border-radius: 20px; flex-shrink: 0;
  background: rgba(26, 111, 212, 0.08); color: var(--blue); border: 1px solid rgba(26, 111, 212, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .sorter-tab, .sorter-row { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ── Sections ───────────────────────────────────────────────────────────── */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section-lede { color: var(--ink-soft); margin-top: 10px; max-width: 52ch; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.card { padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--wash); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* ── Legal document pages ───────────────────────────────────────────────── */
.doc { padding: 48px 0 80px; }
.doc h1 { margin-bottom: 8px; }
.doc .updated { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--ink-mute); margin-bottom: 34px; }
.doc h2 { margin: 38px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.doc h3 { margin: 22px 0 6px; }
.doc p, .doc li { color: var(--ink-soft); }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 7px; }
.doc strong { color: var(--ink); }
.callout {
  padding: 16px 18px; border-radius: var(--r); margin: 20px 0;
  background: linear-gradient(115deg, rgba(23,145,79,.06), rgba(26,111,212,.06));
  border: 1px solid var(--line);
}
.callout p { margin: 0; font-size: 14.5px; }
.toc { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--wash); margin-bottom: 34px; }
.toc ol { margin: 8px 0 0; padding-left: 20px; }
.toc li { margin-bottom: 4px; font-size: 14.5px; }
table.terms { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; }
table.terms th, table.terms td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.terms th { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--ink-mute); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); padding: 30px 24px 48px; margin-top: 40px; }
.foot-inner { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-soft); font-size: 14px; text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-note { font-size: 13px; color: var(--ink-mute); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .cards { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
  .nav a.hide-sm { display: none; }
}
