/* Temp Mail site: home page, Welcome Page, 404. Same palette as the extension popup (src/styles.css).
   System fonts only (they cover Latin and Cyrillic); nothing is loaded from other sites. */
:root {
  color-scheme: light dark;
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #eef2f8; --fg: #0f172a; --muted: #475569; --placeholder: #64748b;
  --border: #d9e0ea; --primary: #2563eb; --primary-hover: #1d4ed8; --on-primary: #ffffff; --ring: #2563eb;
  --tint: #e7eeff; --accent: #0f766e; --accent-soft: #dcf5f1;
  --chrome: #e2e8f0; --chrome-fg: #334155; --omni: #ffffff;
  --brand: linear-gradient(135deg, #14b8a6 0%, #2563eb 100%);
  --shadow: 0 1px 2px rgb(15 23 42 / .06), 0 8px 24px rgb(15 23 42 / .08);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Roboto Mono", monospace;
  --hand: "Segoe Print", "Ink Free", "Bradley Hand", "Noteworthy", "Comic Sans MS", cursive;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120; --surface: #131b2c; --surface-2: #1a2438; --fg: #e7ecf5; --muted: #a3aec4; --placeholder: #8f9bb3;
    --border: #253149; --primary: #60a5fa; --primary-hover: #93c5fd; --on-primary: #0b1120; --ring: #93c5fd;
    --tint: #1b2a4b; --accent: #5eead4; --accent-soft: #113a38;
    --chrome: #222e46; --chrome-fg: #c3cddd; --omni: #131b2c;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
figure, picture { margin: 0; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
a:focus-visible, button:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }
kbd { font: 600 .85em/1 var(--mono); padding: 3px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 1px 0 var(--border); white-space: nowrap; }
.ico { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 20px 0; font-weight: 650; font-size: 18px; color: var(--fg); text-decoration: none; }
.brand:hover { color: var(--fg); }
.brand img { width: 32px; height: 32px; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 4px 12px 4px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; line-height: 20px; }
h1 { margin: 0 0 16px; font-size: clamp(28px, 5vw, 42px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.lead { margin: 0 0 28px; max-width: 620px; color: var(--muted); font-size: 18px; }

.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 10px; font-weight: 650;
  text-decoration: none; background: var(--primary); color: var(--on-primary); }
.btn:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn.ghost { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px var(--border); }
.btn.ghost:hover { background: var(--surface-2); color: var(--fg); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
[hidden] { display: none !important; }

/* ===== Popup screenshots ===== */
.popup-shot { display: block; width: 300px; max-width: 100%; height: auto; aspect-ratio: 380 / 580; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); }

/* ===== Home page ===== */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: center; padding: 24px 0 48px; }
.features { list-style: none; margin: 0 0 56px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.features li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; }
.features h2 { margin: 0 0 6px; font-size: 18px; line-height: 1.35; }
.features p { margin: 0; color: var(--muted); }
.features .ico { width: 28px; height: 28px; margin-bottom: 10px; color: var(--primary); }

/* ===== Welcome Page: two modes on one page, pin (default, works without JavaScript) and usage =====
   The script sets body[data-mode]; without it, #usage in the address (the switch link) still works via :target. */
.mode { padding: 16px 0 48px; }
[data-mode="pin"] .mode.usage, [data-mode="usage"] .mode.pin { display: none; }
body:not(.js):has(#usage:target) .mode.pin { display: none; }
body:not(.js):has(#usage:target) .mode.usage { display: block; }
.mode h1 { margin-bottom: 12px; }
.mode .lead { margin-bottom: 28px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { counter-increment: step; position: relative; padding-left: 48px; }
.step::before { content: counter(step); position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 650; font-size: 16px; }
.step h2 { margin: 0; font-size: 20px; line-height: 32px; font-weight: 650; }
.step p { margin: 6px 0 0; color: var(--muted); }
.pin .steps { display: grid; gap: 20px; margin-top: 28px; }
.usage .step { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px 40px; align-items: start;
  padding-top: 32px; padding-bottom: 32px; border-top: 1px solid var(--border); }
.usage .step:first-child { border-top: 0; padding-top: 0; }
.usage .step::before { top: 32px; }
.usage .step:first-child::before { top: 0; }
.usage .step-shot { justify-self: center; }
.note { display: flex; gap: 12px; margin: 8px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 15px; }
.note .ico { color: var(--accent); margin-top: 2px; }

/* ===== The drawn Chrome toolbar and extensions menu (not a screenshot: stays sharp, follows the theme and the language) ===== */
.browser { position: relative; max-width: 560px; border: 1px solid var(--border); border-radius: 12px; background: var(--chrome);
  box-shadow: var(--shadow); color: var(--chrome-fg); }
.tb { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.tb-nav { display: flex; gap: 2px; }
.tb-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; }
.tb-omni { flex: 1; min-width: 0; height: 32px; margin: 0 6px; border-radius: 16px; background: var(--omni); display: flex; align-items: center;
  padding: 0 14px; font-size: 14px; color: var(--placeholder); white-space: nowrap; overflow: hidden; }
.tb-avatar { width: 24px; height: 24px; margin: 0 4px; border-radius: 50%; background: var(--placeholder); opacity: .5; }
.tb-btn img { width: 20px; height: 20px; }
.menu { position: relative; margin: 0 10px 12px auto; width: min(300px, calc(100% - 20px)); border-radius: 8px; background: var(--surface);
  color: var(--fg); box-shadow: var(--shadow); border: 1px solid var(--border); font-size: 14px; line-height: 20px; }
.menu-title { padding: 12px 16px 8px; font-weight: 650; }
.menu-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; }
.menu-row img { width: 20px; height: 20px; }
.menu-name { flex: 1; }
.menu-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); }
.menu-foot { padding: 10px 16px 12px; border-top: 1px solid var(--border); color: var(--muted); }
.dots { width: 4px; height: 16px; background: radial-gradient(circle, currentColor 1.6px, transparent 2px) 0 0 / 4px 6px repeat-y; }
.usage .browser { width: 100%; }

/* highlighted target: a ring with a breathing wave */
.hl { background: var(--tint); color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.hl::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--primary); opacity: 0;
  animation: wave 2.4s ease-out infinite; pointer-events: none; }
.mark { position: absolute; top: -10px; right: -10px; z-index: 1; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: 50%; background: var(--primary); color: var(--on-primary); font: 650 13px/1 var(--font); box-shadow: 0 0 0 2px var(--surface); }
@keyframes wave { 0% { opacity: .6; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.6); } }
/* the icon to look for: radar waves running out of it */
.radar::before, .radar::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid var(--primary); opacity: 0;
  animation: radar 2s ease-out infinite; pointer-events: none; }
.radar::after { animation-delay: 1s; }
@keyframes radar { 0% { opacity: 0; transform: scale(1); } 20% { opacity: .7; } 100% { opacity: 0; transform: scale(2); } }

/* ===== A pencil note "Click here" with an arrow up to the real Chrome toolbar (top right of the window) ===== */
.to-toolbar { position: absolute; top: 6px; right: 150px; width: 180px; height: 110px; color: var(--primary); pointer-events: none; }
.to-toolbar svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round;
  stroke-linejoin: round; filter: url(#pencil); animation: nudge 1.8s ease-in-out 1.6s infinite; }
.to-toolbar path { stroke-dasharray: 1 2; stroke-dashoffset: 1; animation: draw .6s ease-in-out .5s forwards; }
.to-toolbar .head { animation-duration: .25s; animation-delay: 1.1s; }
.to-toolbar span { position: absolute; top: 24px; right: calc(100% - 58px); font: 600 24px/1 var(--hand); white-space: nowrap;
  transform: rotate(-5deg); clip-path: inset(-30% 100% -30% -10%); animation: write .5s ease-out forwards; }
[data-mode="usage"] .to-toolbar { display: none; }
@keyframes write { to { clip-path: inset(-30% -10% -30% -10%); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes nudge { 50% { transform: translate(4px, -4px); } }
.defs { position: absolute; }

.switch { margin: 40px 0 0; font-size: 15px; }
.switch a { color: var(--muted); }
.switch a:hover { color: var(--primary); }
.switch .ico { width: 16px; height: 16px; margin-left: 6px; vertical-align: -3px; }

/* ===== 404 ===== */
.notfound { padding: 48px 0 80px; }

/* ===== Footer and language switch ===== */
footer { border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: 14px; line-height: 1.6; }
footer p { margin: 0 0 10px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--primary); }
.langs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 10px; padding: 0; list-style: none; }
.langs a[aria-current="true"] { color: var(--fg); font-weight: 650; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .to-toolbar path { stroke-dasharray: none; }
  .to-toolbar span { clip-path: none; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero .popup-shot { margin: 0 auto; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .usage .step { grid-template-columns: minmax(0, 1fr); }
  .usage .step-shot { justify-self: start; }
  .tb-nav { display: none; }
  .to-toolbar { display: none; }
}
@media (max-width: 420px) {
  .step { padding-left: 44px; }
  .menu { width: calc(100% - 20px); }
}
