/*
 * Shared styles for pricehistorytracker.com.
 *
 * The tokens below are lifted from the Chrome extension so the site and the product look like
 * one thing: Tailwind's blue-500/600/700 for accent, the slate ramp for text and surfaces, and
 * the extension's hairline-ring shadow rather than a soft drop shadow.
 *
 * Both pages link this file. They used to carry their own copies of the header and footer rules,
 * which had already drifted apart - the privacy page set a body colour the home page did not.
 */

:root {
  --blue-50: #eff6ff;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;

  /* The extension outlines surfaces with a 1px ring instead of a blurred shadow; it stays crisp
     at any zoom and does not muddy the edge against a light background. */
  --ring: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.05);
  --ring-strong: 0 0 0 1px rgba(15, 23, 42, 0.1), 0 4px 12px rgba(15, 23, 42, 0.06);
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.3);

  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  /* 13px/1.231 arial was the old base and is below what most people read comfortably. */
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate-700);
  background: var(--slate-50);
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  color: var(--slate-900);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  margin: 0;
  padding: 40px 16px 8px;
  font-size: clamp(30px, 6vw, 44px);
  font-weight: 800;
  color: var(--blue-700);
}

h1 > span {
  color: var(--blue-500);
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 700;
}

h3 {
  margin: 22px 0 6px;
  font-size: 17px;
  font-weight: 650;
}

p {
  margin: 10px 0;
}

a {
  color: var(--blue-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
.cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius-lg);
}

header,
section {
  margin: 0;
}

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

.hero-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 16px 56px;
}

.hero-subtitle {
  margin: 0 auto 32px;
  max-width: 40ch;
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 500;
  color: var(--slate-600);
}

.extension-link-wrap {
  margin-top: 8px;
}

/* ---------- Call to action ---------- */

@keyframes ctaPulse {
  0% {
    box-shadow: var(--ring), 0 0 0 0 rgba(37, 99, 235, 0.45);
  }
  70% {
    box-shadow: var(--ring), 0 0 0 14px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: var(--ring), 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.extension-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 28px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  /* The extension's primary button: a blue-600 -> blue-700 gradient, not a flat fill. */
  background-image: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  border-radius: 999px;
  box-shadow: var(--ring), 0 0 0 0 rgba(37, 99, 235, 0.45);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-image 0.18s ease;
  animation: ctaPulse 2.6s infinite;
}

.extension-link:hover {
  text-decoration: none;
  background-image: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  transform: translateY(-1px);
  box-shadow: var(--ring-strong), 0 8px 20px rgba(37, 99, 235, 0.28);
  animation: none;
}

.extension-link:active {
  transform: translateY(1px);
  box-shadow: var(--ring);
}

.extension-link img {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  padding: 3px;
  background: #fff;
  border-radius: 50%;
}

/* Respect a reduced-motion preference: a pulsing button is exactly what that setting is for. */
@media (prefers-reduced-motion: reduce) {
  .extension-link {
    animation: none;
    transition: none;
  }
  .extension-link:hover {
    transform: none;
  }
}

.extension-text-link {
  margin-top: 28px;
}

/* ---------- Reassurance row ---------- */

.social-proof {
  margin-top: 28px;
  font-size: 14px;
  color: var(--slate-600);
}

.social-proof .stars {
  font-size: 17px;
  margin-bottom: 4px;
}

.risk-reversal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.risk-reversal span {
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--ring);
}

/* ---------- Content blocks ---------- */

.description,
.description-pb {
  max-width: 820px;
  margin: 40px auto 0;
  padding: 28px;
  color: var(--slate-600);
  background: #fff;
  border-radius: var(--radius-2xl);
  box-shadow: var(--ring);
}

.description-pb {
  background: var(--blue-50);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
  /* Last thing before the footer, so it owns the gap: without this the card edge sits directly
     against the dark band with only the page background showing through as a seam. */
  margin-bottom: 64px;
}

/* ---------- Long-form pages ---------- */

main.prose {
  max-width: 820px;
  margin: 0 auto 56px;
  padding: 0 16px;
  text-align: left;
}

main.prose section {
  margin-top: 24px;
  padding: 28px;
  background: #fff;
  border-radius: var(--radius-2xl);
  box-shadow: var(--ring);
}

main.prose ul {
  margin: 8px 0 8px 20px;
  padding: 0;
}

main.prose li {
  margin: 4px 0;
}

.updated {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--slate-500);
}

/* ---------- Footer ---------- */

footer {
  padding: 48px 16px;
  background: var(--slate-900);
  color: var(--slate-400);
  font-size: 14px;
}

footer div {
  margin-bottom: 16px;
}

/* The footer's own padding is the bottom spacing; a trailing margin here doubles it and makes
   the block look off-centre. */
footer > div:last-child {
  margin-bottom: 0;
}

footer a {
  color: #fff;
}

/* A flex row with a real gap, rather than inline boxes spaced by line-height: line-height sizes
   the text box, not the pill, so rows ended up tight and the spacing between them did not match
   the spacing along them. */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* Row gap slightly larger than the column gap: the pills are wider than they are tall, so an
     equal gap reads as tighter vertically than it measures. */
  gap: 14px 10px;
  max-width: 900px;
  margin: 0 auto 28px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  white-space: nowrap;
  color: var(--slate-200);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.footer-links a:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links img {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

/* ---------- Utilities ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  h1 {
    padding-top: 28px;
  }

  .description,
  .description-pb,
  main.prose section {
    padding: 20px;
    border-radius: var(--radius-xl);
  }
}
