/* New Tabs at End — site styles. The palette and type come from brand/README.md. */

:root {
  --ink: #0F172A;
  --ink-2: #1E293B;
  --ink-3: #273449;
  --slate-1: #334155;
  --slate-2: #475569;
  --slate-3: #64748B;
  --slate-4: #94A3B8;
  --slate-5: #CBD5E1;
  --mist: #E2E8F0;
  --snow: #F8FAFC;
  --mint: #2DD4BF;
  --violet: #A78BFA;
  --violet-ink: #2E1065;

  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --card: #FFFFFF;
  --text: #0F172A;
  --text-2: #475569;
  --line: #E2E8F0;
  --accent-text: #0F766E;
  --accent-soft: #CCFBF1;
  --kbd-bg: #F1F5F9;

  --font: Inter, "Adwaita Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --wrap: 1080px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1120;
    --bg-soft: #0F172A;
    --card: #111A2E;
    --text: #E2E8F0;
    --text-2: #94A3B8;
    --line: #1E293B;
    --accent-text: #2DD4BF;
    --accent-soft: #134E4A;
    --kbd-bg: #1E293B;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--kbd-bg);
  font: 600 0.85em/1.5 var(--mono);
  white-space: nowrap;
}

code { font: 0.9em var(--mono); }

.hero kbd, .trust kbd { border-color: var(--slate-1); background: var(--ink-2); color: var(--snow); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--mint);
  color: var(--ink);
  font-weight: 700;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* Header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--ink);
  border-bottom: 1px solid var(--ink-2);
  color: var(--snow);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 32px; height: 32px; }
.brand em { font-style: normal; color: var(--mint); }

.site-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; font-size: 15px; }
.site-nav a { color: var(--slate-5); text-decoration: none; }
.site-nav a:hover { color: var(--snow); }
.site-nav .lang {
  padding: 3px 10px;
  border: 1px solid var(--slate-1);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .site-nav .optional { display: none; }
}

/* Buttons --------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}
.button:hover { transform: translateY(-1px); text-decoration: none; }
.button:active { transform: translateY(0); }
.button svg { width: 20px; height: 20px; flex: none; }

.button-primary { background: var(--mint); color: var(--ink); }
.button-primary:hover { background: #5EEAD4; }

.button-ghost { border: 1px solid var(--slate-1); color: var(--snow); }
.button-ghost:hover { border-color: var(--slate-3); background: var(--ink-2); }

/* Hero ------------------------------------------------------------------ */

.hero {
  background: var(--ink);
  color: var(--snow);
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 112px);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 22px;
  color: var(--slate-4);
  font-size: 14px;
  font-weight: 600;
}
.eyebrow span { display: inline-flex; align-items: center; gap: 6px; }
.eyebrow span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
}

.hero h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.035em; }
.hero h1 em { display: block; font-style: normal; color: var(--mint); }

.lead { margin-top: 22px; color: var(--slate-5); font-size: clamp(17px, 1.6vw, 19px); max-width: 34em; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.fineprint { margin-top: 18px; color: var(--slate-4); font-size: 14px; }

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

/* The browser mock-up: a "Work" group, the tab a link came from, and the new tab gliding to the end. */

.browser {
  --gap: 4px;
  position: relative;
  border: 1px solid var(--slate-2);
  border-radius: 16px;
  background: var(--ink-2);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.7), 0 0 0 6px rgb(255 255 255 / 0.03);
}

.strip {
  position: relative;
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0, 1fr)) 28px;
  align-items: end;
  gap: var(--gap);
  padding: 14px 12px 0;
}

.chip {
  align-self: center;
  margin-bottom: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--violet);
  color: var(--violet-ink);
  font-size: 12px;
  font-weight: 700;
}

.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px;
  border-radius: 9px 9px 0 0;
  background: var(--ink-3);
  min-width: 0;
}
.tab::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--slate-4);
}
.tab::after {
  content: "";
  flex: 1;
  max-width: 64px;
  height: 6px;
  border-radius: 3px;
  background: var(--slate-3);
}
.tab.active { background: var(--slate-1); }
.tab.active::before { background: var(--slate-5); }
.tab.active::after { background: var(--slate-4); }

.group-line {
  grid-column: 2 / span 2;
  grid-row: 2;
  height: 4px;
  margin-top: -4px;
  border-radius: 2px;
  background: var(--violet);
  position: relative;
  z-index: 1;
}

.slot { grid-column: 5; grid-row: 1; height: 38px; }

.tab.new {
  grid-column: 5;
  grid-row: 1;
  background: var(--mint);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  z-index: 2;
  animation: glide 7s cubic-bezier(.65, 0, .35, 1) infinite;
}
.tab.new::before { background: var(--ink); }
.tab.new::after { display: none; }

.newtab-plus {
  grid-column: 6;
  grid-row: 1;
  align-self: center;
  margin-bottom: 6px;
  color: var(--slate-3);
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

.keys {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 3px 10px;
  border: 1px solid var(--slate-2);
  border-radius: 8px;
  background: var(--ink);
  color: var(--slate-5);
  font: 600 12px/1.4 var(--mono);
  opacity: 0;
  animation: keys 7s ease infinite;
  z-index: 3;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--slate-1);
}
.toolbar i { width: 10px; height: 10px; border-radius: 50%; background: var(--slate-3); }
.toolbar b {
  flex: 1;
  height: 28px;
  margin-left: 8px;
  border-radius: 14px;
  background: var(--ink-2);
}

.page { display: grid; gap: 12px; padding: 26px 28px 30px; background: var(--snow); }
.page i { display: block; height: 9px; border-radius: 5px; background: var(--mist); }
.page i:first-child { width: 45%; height: 16px; margin-bottom: 8px; background: var(--slate-5); }
.page i:nth-child(3) { width: 92%; }
.page i:nth-child(4) { width: 80%; }
.page .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.page .cards i { height: 72px; width: auto; margin: 0; border-radius: 10px; background: var(--mist); }

/* The tab appears next to the one it came from (one column to the left), then glides to the end. */
@keyframes glide {
  0% { opacity: 0; transform: translate(calc(-100% - var(--gap)), -55%) scale(.8); }
  8% { opacity: 1; transform: translate(calc(-100% - var(--gap)), -55%) scale(1); }
  30% { transform: translate(calc(-100% - var(--gap)), -55%); }
  52% { transform: translate(0, 0); }
  56% { transform: translate(0, 0) scale(1.04); }
  60%, 88% { opacity: 1; transform: translate(0, 0) scale(1); }
  96%, 100% { opacity: 0; transform: translate(0, 0); }
}

@keyframes keys {
  0%, 2% { opacity: 0; transform: translateY(-4px); }
  8%, 40% { opacity: 1; transform: translateY(0); }
  50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tab.new, .keys { animation: none; }
  .button { transition: none; }
}

/* Sections -------------------------------------------------------------- */

section { padding: clamp(64px, 9vw, 112px) 0; }
section.soft { background: var(--bg-soft); border-block: 1px solid var(--line); }

.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { margin-top: 16px; color: var(--text-2); font-size: 18px; }
.kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1040px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: minmax(0, 1fr); } }

.card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: 16px; }
.card .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.card .icon svg { width: 22px; height: 22px; }

/* Before and after a restart, in miniature. */

.compare .label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.compare .bad .label { background: #FEE2E2; color: #991B1B; }
.compare .good .label { background: var(--accent-soft); color: var(--accent-text); }
@media (prefers-color-scheme: dark) {
  .compare .bad .label { background: #450A0A; color: #FCA5A5; }
}

.mini {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin: 6px 0 20px;
  padding: 12px 10px 0;
  border-radius: 10px;
  background: var(--ink-2);
  overflow: hidden;
}
.mini > * { flex: 1 1 0; min-width: 0; }
.mini .c {
  flex: none;
  align-self: center;
  margin-bottom: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--violet);
  color: var(--violet-ink);
  font-size: 11px;
  font-weight: 700;
}
.mini .t { position: relative; height: 26px; border-radius: 6px 6px 0 0; background: var(--ink-3); }
.mini .t::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--slate-4);
}
.mini .g::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0;
  height: 3px;
  background: var(--violet);
}
.mini .g:first-of-type::after { left: 0; }
.mini .stray { outline: 2px dashed #F87171; outline-offset: -2px; }
.mini .stray::before { background: var(--violet); }

/* What counts as new. */

.rule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rule-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.rule-list li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F172A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.rule-list.stay li::before {
  background: var(--slate-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F8FAFC' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.rule-list small { display: block; color: var(--text-2); font-size: 14px; }

.note {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  padding: 20px 22px;
  border-left: 4px solid var(--mint);
  background: var(--card);
  color: var(--text-2);
  font-size: 16px;
}
.note strong { color: var(--text); }

/* Privacy and trust. */

.trust { background: var(--ink); color: var(--snow); border: 0; }
.trust .section-head p { color: var(--slate-4); }
.trust .kicker { color: var(--mint); }
.trust a { color: var(--mint); }

.permissions { display: grid; gap: 1px; border-radius: var(--radius); overflow: hidden; background: var(--ink-3); }
.permission { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; padding: 20px 24px; background: var(--ink-2); }
.permission code { color: var(--mint); font-size: 15px; font-weight: 700; }
.permission p { color: var(--slate-5); font-size: 16px; }
.permission p small { display: block; margin-top: 4px; color: var(--slate-4); font-size: 14px; }
@media (max-width: 600px) {
  .permission { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; margin-top: 28px; }
.promise {
  padding: 18px 20px;
  border: 1px solid var(--ink-3);
  border-radius: var(--radius);
  color: var(--slate-5);
  font-size: 15px;
}
.promise strong { display: block; margin-bottom: 4px; color: var(--snow); font-size: 16px; }

/* Install. */

.install .card { display: flex; flex-direction: column; gap: 14px; }
.install .card .button { align-self: flex-start; }
.install ol { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 16px; display: grid; gap: 8px; }
.install pre {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--slate-5);
  font: 14px/1.6 var(--mono);
  overflow-x: auto;
}

/* FAQ. */

.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-text); font-size: 22px; line-height: 1; transition: transform 150ms ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--text-2); font-size: 16px; }

/* Footer. */

.site-footer { padding: 40px 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--text-2); }
.site-footer .brand { color: var(--text); }
.site-footer .brand em { color: var(--accent-text); }

/* Long-form pages (privacy policy). */

.doc { padding: clamp(48px, 7vw, 88px) 0; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.03em; }
.doc .updated { margin-top: 10px; color: var(--text-2); font-size: 15px; }
.doc h2 { margin: 44px 0 14px; font-size: 24px; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 22px; display: grid; gap: 8px; }
.doc .summary {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}
