/* imap-notifier.com: one style sheet for every page. The colours follow the visitor's light or dark mode. */
:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --glow: rgba(59, 90, 140, 0.11);
  --text: #18202B;
  --muted: #5E6A79;
  --line: rgba(24, 32, 43, 0.14);
  --tile: #3B4A5E;
  --link: #1F5FBF;
  --dot: #3B82F6;
  --shadow: 0 18px 44px -18px rgba(15, 23, 42, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1216;
    --surface: #171B21;
    --glow: rgba(120, 144, 176, 0.18);
    --text: #E7EAEE;
    --muted: #98A3B1;
    --line: rgba(231, 234, 238, 0.16);
    --link: #7DB3FF;
    --dot: #60A5FA;
    --shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.8);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(56rem 34rem at 50% 0%, var(--glow), transparent 70%), var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }

/* Header and footer */
.top, .bottom {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}

.top { justify-content: space-between; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.brand img { border-radius: 7px; }

.top nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.top nav a, .bottom a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .bottom a:hover { color: var(--text); text-decoration: underline; }

.bottom {
  margin-top: auto;
  justify-content: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

main {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 16px 56px;
}

/* The front page */
.hero {
  padding: 40px 0 8px;
  text-align: center;
}

.logo {
  display: block;
  width: clamp(72px, 16vw, 96px);
  height: auto;
  margin: 0 auto 24px;
  border-radius: 22%;
  box-shadow: var(--shadow);
}

h1 {
  margin: 0;
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(2.1rem, 7vw, 3.2rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.tagline {
  max-width: 34rem;
  margin: 14px auto 0;
  text-wrap: balance;
  color: var(--muted);
  font-size: clamp(1.05rem, 3.4vw, 1.2rem);
}

.store, .soon { margin-top: 28px; }
.store { display: inline-block; }
.store img { display: block; width: 182px; height: auto; }

.soon {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot);
  animation: pulse 2.4s ease-in-out infinite;
}

.trial { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; }

.shot {
  margin: 44px auto 0;
  max-width: 440px;
}

/* The notifications lie on top of each other, as tall as the tallest, their bottoms in line as in the corner of the
   screen; site.js shows them in turn (class "current"). Without it the first shows, or the second (dark) in dark mode. */
.slides {
  display: grid;
  align-items: end;
}

.slides img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.7s ease;
  filter: drop-shadow(0 14px 24px rgba(15, 23, 42, 0.22));
}

.slides img:first-child { opacity: 1; }

@media (prefers-color-scheme: dark) {
  .slides img:first-child { opacity: 0; }
  .slides img:nth-child(2) { opacity: 1; }
}

.shot.js .slides img { opacity: 0; }
.shot.js .slides img.current { opacity: 1; }

.dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
}

.dots[hidden] { display: none; }

.dots button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.dots button[data-slide]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s, transform 0.2s;
}

.dots button[data-slide]:hover::before { background: var(--muted); }
.dots button[aria-current="true"]::before { background: var(--text); transform: scale(1.25); }
.dots button:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }

.dots .pause { margin-left: 6px; }
.dots .pause:hover { color: var(--text); }
.dots .pause svg { width: 12px; height: 12px; fill: currentColor; }
.dots .pause .icon-play, .dots .pause.paused .icon-pause { display: none; }
.dots .pause.paused .icon-play { display: block; }

.shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.shot figcaption .theme-line { display: block; }
.shot figcaption .theme-line[hidden] { display: none; }
.shot figcaption b { color: var(--text); font-weight: 600; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 16px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.features li {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.features h2 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 600; }
.features p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.more {
  max-width: 40rem;
  margin: 48px auto 0;
  text-align: center;
  color: var(--muted);
}

.more h2 { margin: 0 0 8px; color: var(--text); font-size: 1.15rem; font-weight: 600; }
.more p { margin: 0 0 12px; text-wrap: balance; }

/* Text pages: the privacy policy */
.prose {
  max-width: 44rem;
  margin: 0 auto;
  padding-top: 24px;
}

.prose h1 { font-size: clamp(1.9rem, 6vw, 2.5rem); }
.prose .updated { margin: 8px 0 32px; color: var(--muted); }
.prose h2 { margin: 40px 0 8px; font-size: 1.3rem; font-weight: 600; }
.prose h3 { margin: 28px 0 6px; font-size: 1.05rem; font-weight: 600; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }

.prose .summary {
  margin: 0 0 8px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.prose .summary ul { margin: 0; }

/* The open-source licenses: the app's THIRD-PARTY-NOTICES.txt as it is, wrapped to the page. */
.prose .notices {
  margin: 24px 0 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: 0.8rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Buttons, forms and notices: the buy, download and lost-key pages */
.button {
  display: inline-block;
  padding: 10px 22px;
  border: 0;
  border-radius: 8px;
  background: var(--link);
  color: #FFFFFF;
  font: inherit;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { filter: brightness(1.08); }
.button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.hero .button.download { margin: 28px 0 0 12px; vertical-align: top; padding: 11px 22px; }

.buy {
  margin: 28px 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}

.buy .price { margin: 0; font-size: 2rem; font-weight: 650; line-height: 1.2; }
.buy .price-note { margin: 6px auto 18px; max-width: 30rem; color: var(--muted); font-size: 0.9rem; text-wrap: balance; }
.buy .soon { margin-top: 0; }
.buy .notice { text-align: left; }

.notice {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--dot);
  border-radius: 8px;
}

.problem { color: #C42B1C; font-weight: 600; }

.form { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0 0 18px; }
.form label { font-weight: 600; }
.form input[type="email"] {
  width: 100%;
  max-width: 24rem;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

/* The admin page (admin/index.php): the licenses */
.admin { padding-top: 24px; }
.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.admin-head h1 { font-size: clamp(1.9rem, 6vw, 2.5rem); }
.admin .updated { margin: 8px 0 24px; max-width: 44rem; color: var(--muted); }
.admin-search { display: flex; gap: 8px; margin: 0 0 20px; }
.admin-search input {
  flex: 1;
  min-width: 0;
  max-width: 30rem;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
/* Never a scroll bar: the table fits by wrapping long addresses and order numbers, and "More" opens as a panel above it */
.admin-table { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.admin-table table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.admin-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr.changed td { background: var(--glow); }
.admin-table .number { text-align: right; white-space: nowrap; }
.admin-table td:nth-child(1), .admin-table td:nth-child(5) { white-space: nowrap; } /* the dates whole */
.admin-table form { margin: 0; }
.admin .small, .admin-table .small { color: var(--muted); font-size: 0.85rem; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.badge.active { background: rgba(22, 163, 74, 0.15); color: #15803D; }
.badge.blocked { background: rgba(196, 43, 28, 0.15); color: #C42B1C; }
.button.danger { background: #C42B1C; color: #FFFFFF; }
.button.quiet { background: transparent; border: 1px solid var(--line); color: var(--text); }
.admin-table .button { padding: 5px 14px; font-size: 0.9rem; }
button.link { padding: 0; border: 0; background: none; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; }
.admin-table details.more { position: relative; margin-top: 6px; text-align: right; }
.admin-table details.more summary { cursor: pointer; color: var(--link); font-size: 0.9rem; }
.admin-table .more-actions {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 20rem;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: left;
  white-space: normal;
}
.admin-table .more-actions p { margin: 0; }
.admin-table .more-actions .button { width: 100%; }
.admin-table .change-email { display: flex; gap: 6px; }
.admin-table .change-email input { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 0.9rem; }
.admin-table .change-email .button { width: auto; white-space: nowrap; }

@media (prefers-color-scheme: dark) {
  .badge.active { color: #4ADE80; }
  .badge.blocked { color: #FF99A4; }
}

/* The lost-key form's field for robots: out of sight and out of reach, but not display:none, which robots skip. */
.unseen { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.sums code { word-break: break-all; }

@media (prefers-color-scheme: dark) {
  .button { color: #0F1216; }
  .problem { color: #FF99A4; }
}

code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--line);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .soon::before { animation: none; }
  .slides img { transition: none; }
}
