/* Mirrors the extension's own look: options.html (white, black, light headings,
   square black buttons, #f9fafb cards) and popup.css (the translation popup). */
:root {
  --page: #ffffff;
  --ink: #000000;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #f9fafb;
  --select: #b4d5fe;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

::selection { background: var(--select); }

a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

/* Header */
.site-header { border-bottom: 1px solid #f3f4f6; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 500; font-size: 18px; color: var(--ink); text-decoration: none;
}
.brand img { width: 28px; height: 28px; }

/* Buttons: same as .btn-primary / .btn-outline in options.html */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 3.5rem; padding: 0 1.75rem;
  font-family: var(--font); font-size: 1rem; font-weight: 500;
  background: var(--ink); color: #fff;
  border: 1px solid var(--ink); text-decoration: none; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { background: #374151; border-color: #374151; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-small { height: 2.5rem; padding: 0 1rem; font-size: 0.9rem; }

/* Hero */
.hero { padding: 80px 0 72px; }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.2vw, 3.75rem); font-weight: 300;
  line-height: 1.08; letter-spacing: -0.025em; color: var(--ink);
}
.hl { background: var(--select); padding: 0 0.06em; }
.hero .lede { margin-top: 1.5rem; font-size: 1.125rem; font-weight: 300; color: var(--muted); max-width: 30em; }
.hero .actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.hero .note { font-size: 0.875rem; font-weight: 300; color: var(--muted); }

/* Demo: a page fragment with the real floating icon and popup */
.demo { background: var(--card); padding: 2rem 2rem 1.5rem; }
.demo-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.75rem; }
.demo-tab {
  font-family: var(--font); font-size: 0.8125rem; font-weight: 500;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); padding: 0.35rem 0.8rem; cursor: pointer;
}
.demo-tab:hover { color: var(--ink); border-color: var(--ink); }
.demo-tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.demo-page { position: relative; font-family: Georgia, "Times New Roman", serif; font-size: 1.1875rem; line-height: 1.75; color: #1f2937; min-height: 3.5em; }
.demo-page .sel { background: var(--select); }

.globe {
  position: absolute; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.95); border: 0.5px solid #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.globe svg { width: 25px; height: 25px; color: #000; }

/* Popup: values copied from popup.css (.translation-popup) */
.popup {
  margin-top: 0.75rem; max-width: 350px;
  background: #fff; border: 1px solid #ccc; border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 12px 16px; font-size: 14px; line-height: 1.5; color: #333;
}
.popup .original { font-size: 15px; color: #333; line-height: 1.6; }
.popup .divider {
  height: 1px; margin: 12px 0; border: 0;
  background: linear-gradient(to right, rgba(0,0,0,0), #ddd, rgba(0,0,0,0));
}
.popup .translation { font-size: 15px; color: #000; line-height: 1.6; }
.demo-literal { margin-top: 1rem; font-size: 0.875rem; font-weight: 300; color: var(--muted); }
.demo-literal s { text-decoration-thickness: 1px; }

/* Sections */
section { padding: 5rem 0; border-top: 1px solid #f3f4f6; }
.label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text); margin-bottom: 0.75rem; }
h2 {
  font-size: clamp(2rem, 3.4vw, 2.5rem); font-weight: 300;
  line-height: 1.15; letter-spacing: -0.025em; color: var(--ink); max-width: 22em;
}
.section-lede { margin-top: 1rem; font-weight: 300; color: var(--muted); max-width: 36em; }

.steps { margin-top: 3rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: "Step " counter(step); display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.4rem; }
.steps h3 { font-size: 1.125rem; font-weight: 500; color: var(--ink); }
.steps p { margin-top: 0.4rem; font-weight: 300; color: var(--muted); }

/* Pricing: cards like .saved-card in options.html */
.plans { margin-top: 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.plan { background: var(--card); padding: 2rem; }
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.plan h3 { font-size: 1.5rem; font-weight: 300; color: var(--ink); }
.badge { font-size: 0.75rem; font-weight: 500; color: var(--ink); border: 1px solid var(--ink); padding: 0.15rem 0.55rem; white-space: nowrap; }
.price { margin-top: 1rem; font-size: 2.75rem; font-weight: 300; letter-spacing: -0.025em; line-height: 1.1; color: var(--ink); }
.price small { font-size: 1rem; color: var(--muted); letter-spacing: 0; }
.price-alt { margin-top: 0.35rem; font-size: 0.875rem; font-weight: 300; color: var(--muted); }
.plan ul { margin-top: 1.5rem; list-style: none; display: grid; gap: 0.6rem; }
.plan li { padding-left: 1.25rem; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 8px; height: 1px; background: var(--ink); }
.status-note { margin-top: 1.5rem; font-size: 0.9375rem; font-weight: 300; color: var(--muted); max-width: 46em; }

/* Privacy + FAQ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.faq dt { font-weight: 500; color: var(--ink); margin-top: 1.25rem; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin-top: 0.25rem; font-weight: 300; color: var(--muted); }

/* Footer: like .footer in options.html */
.site-footer { margin-top: 2rem; padding: 2rem 0 3rem; border-top: 1px solid #f3f4f6; font-size: 0.875rem; font-weight: 300; color: #9ca3af; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { color: var(--muted); font-weight: 400; }

/* Legal pages */
.legal { padding: 4rem 0 4.5rem; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: 2.5rem; font-weight: 300; line-height: 1.1; letter-spacing: -0.025em; color: var(--ink); }
.legal h2 { font-size: 1.6rem; margin-top: 2.5rem; }
.legal h3 { font-size: 1.1rem; font-weight: 500; color: var(--ink); margin-top: 1.5rem; }
.legal p, .legal ul, .legal ol { margin-top: 0.75rem; }
.legal ul, .legal ol { padding-left: 1.4rem; }
.legal li { margin-top: 0.25rem; }
.legal hr { border: 0; border-top: 1px solid #f3f4f6; margin: 2rem 0; }
.legal code { font-size: 0.9em; }
.legal-note { margin-top: 1.25rem; padding: 1rem 1.25rem; background: var(--card); font-weight: 300; color: var(--muted); }

@media (max-width: 860px) {
  .hero { padding: 48px 0 48px; }
  .hero .wrap, .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps, .plans { grid-template-columns: 1fr; }
  section { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .demo { padding: 1.25rem 1rem; }
  .btn { width: 100%; }
  .site-header .btn { width: auto; }
  .price { font-size: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
