/*
 * The published pages, wearing the same clothes as the extension.
 *
 * Every colour and radius below is copied from src/styles/globals.css rather than eyeballed, so
 * someone who arrives here from the store recognises the popup when they open it. If a token
 * changes there, change it here too: these two files are the only places the palette lives.
 */

:root {
  --background: #fdfcf8;
  --foreground: #1a1a1a;
  --card: #ffffff;
  --muted-foreground: #4a4a4a;
  --primary: #7a50dc;
  --primary-foreground: #ffffff;
  --accent: #f2ecfd;
  --accent-foreground: #673fc4;
  --border: #e8e6e1;
  --success: #2f8f6f;
  --radius: 1rem;
  --shadow: 0 1px 2px rgb(26 26 26 / 4%), 0 8px 24px -12px rgb(26 26 26 / 10%);
  --glow: radial-gradient(60rem 26rem at 50% -8rem, rgb(122 80 220 / 12%), transparent 70%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #141317;
    --foreground: #f5f4f2;
    --card: #1c1b21;
    --muted-foreground: #a8a5b0;
    --primary: #9a78e8;
    --primary-foreground: #17111f;
    --accent: #282533;
    --accent-foreground: #d9cdf7;
    --border: #2c2a33;
    --success: #5cc9a3;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -12px rgb(0 0 0 / 60%);
    --glow: radial-gradient(60rem 26rem at 50% -8rem, rgb(154 120 232 / 16%), transparent 70%);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* The support page is linked from the store as an anchor, so the heading must not land under
     the sticky bar. */
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--background) var(--glow) no-repeat;
  color: var(--foreground);
  font:
    16px/1.65 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

a {
  color: var(--primary);
  text-underline-offset: 2px;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.022em;
}

h2 {
  margin: 0 0 0.6rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  font-weight: 650;
}

p {
  margin: 0 0 0.75rem;
  color: var(--muted-foreground);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--foreground);
  font-weight: 650;
}

/* The bar at the top, which is the popup header with the window furniture taken off. */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--foreground);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

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

.topbar nav {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
}

.topbar nav a {
  color: var(--muted-foreground);
  text-decoration: none;
}

.topbar nav a:hover,
.topbar nav a[aria-current="page"] {
  color: var(--foreground);
}

/* Hero */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.9rem;
  color: var(--accent-foreground);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lede {
  max-width: 34rem;
  font-size: 1.0625rem;
  color: var(--muted-foreground);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 6px);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.9375rem;
  font-weight: 650;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.button:hover {
  filter: brightness(1.06);
}

.button.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--foreground);
  box-shadow: none;
}

.button.ghost:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-foreground);
  filter: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.shot {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Cards, the same white panels the popup is built from. */

.card {
  margin: 0 0 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.card.accent {
  background: var(--accent);
  border-color: transparent;
  box-shadow: none;
}

.card.accent p {
  color: var(--accent-foreground);
}

.grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.grid .card {
  margin: 0;
}

.icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.7rem;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-foreground);
}

.icon svg {
  width: 1rem;
  height: 1rem;
}

.section-title {
  margin: 2.25rem 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* Lists that carry a verdict: a tick for what it does, a cross for what it refuses to do. */

.marks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.marks li {
  position: relative;
  padding: 0 0 0 1.85rem;
  margin-bottom: 0.55rem;
  color: var(--muted-foreground);
}

.marks li:last-child {
  margin-bottom: 0;
}

.marks li::before {
  position: absolute;
  left: 0;
  top: 0.18rem;
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.marks.yes li::before {
  content: "✓";
  background: var(--accent);
  color: var(--accent-foreground);
}

.marks.no li::before {
  content: "✕";
  background: color-mix(in srgb, var(--muted-foreground) 14%, transparent);
  color: var(--muted-foreground);
}

/* Numbered steps, for the support page. */

.steps {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  counter-increment: step;
  padding: 0 0 0 2.1rem;
  margin-bottom: 0.9rem;
  color: var(--muted-foreground);
}

.steps li:last-child {
  margin-bottom: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Questions that open, so the page stays short until someone needs it. */

.qa {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.qa details + details {
  border-top: 1px solid var(--border);
}

.qa summary {
  padding: 0.85rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

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

.qa summary::after {
  content: "+";
  float: right;
  color: var(--muted-foreground);
  font-weight: 400;
}

.qa details[open] summary::after {
  content: "−";
}

.qa summary:hover {
  color: var(--accent-foreground);
}

.qa .answer {
  padding: 0 1.25rem 1rem;
}

.qa .answer p {
  font-size: 0.9375rem;
}

/* Policy pages: one card, hairlines between the sections. */

.policy section + section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.crumb {
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.summary {
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: calc(var(--radius) - 4px);
  background: var(--accent);
  color: var(--accent-foreground);
}

.effective,
.footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.footer a {
  color: var(--muted-foreground);
}
