/* Reachable website. Plain CSS, no framework, no external fonts, mobile first.
   Palette and type follow the extension side panel
   (src/reachable-extension/public/sidepanel.css): white cards, dark blue accent, system font.
   shared/DESIGN.md is still a placeholder; replace these tokens once the house style exists.
   Contrast: all text colours below reach at least 4.5:1 on the backgrounds they are used on. */

:root {
  --bg: #ffffff;
  --surface: #f4f6f9;
  --text: #14181f;
  --muted: #545c69;
  --line: #d3d8e0;
  --accent: #1b3f73;
  --accent-hover: #15325c;
  --accent-text: #ffffff;
  --focus: #b3600c;
  --todo-bg: #fff3df;
  --radius: 6px;
  --measure: 68ch;
  --wrap: 64rem;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* Focus and skip link */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

main:focus-visible {
  outline: none;
}

.skiplink {
  position: absolute;
  top: 0;
  left: 1rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-150%);
}

.skiplink:focus {
  transform: translateY(0);
}

/* Layout */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

section {
  padding: 2.5rem 0;
}

section + section {
  border-top: 1px solid var(--line);
}

@media (min-width: 48em) {
  .wrap {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  section {
    padding: 3.5rem 0;
  }
}

/* Type */
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.75rem;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.5vw, 2.9rem);
  letter-spacing: -0.01em;
  max-width: 22ch;
}

h2 {
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem);
}

h3 {
  font-size: 1.15rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

.lede {
  font-size: 1.125rem;
  max-width: 60ch;
}

.fineprint {
  font-size: 0.9rem;
  color: var(--muted);
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
}

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

/* Editorial placeholder: visible until the editor replaces it. */
.todo {
  background: var(--todo-bg);
  border: 1px dashed var(--focus);
  border-radius: 3px;
  padding: 0 0.3em;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
}

.site-nav ul,
.lang-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  max-width: none;
}

.site-nav a,
.lang-nav a {
  display: inline-block;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
}

.site-nav a:hover,
.lang-nav a:hover {
  color: var(--accent);
  background: var(--surface);
}

.lang-nav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--line);
  background: var(--surface);
  font-weight: 600;
}

@media (min-width: 48em) {
  .site-nav {
    margin-left: auto;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-text);
}

.btn-secondary {
  background: var(--bg);
  color: var(--accent);
}

.btn-secondary:hover {
  background: var(--surface);
  color: var(--accent-hover);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}

/* Status message shown by the Pro button (filled by site.js) */
.status {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--accent);
  background: var(--bg);
  max-width: 60ch;
}

.status:empty {
  display: none;
}

/* Hero */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.hero .status {
  background: var(--bg);
}

/* Cards and grids */
.grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 48em) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--bg);
}

.card h3 {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.4rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* What it is not */
.not-list {
  list-style: none;
  padding: 0;
  max-width: none;
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 48em) {
  .not-list {
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
  }
}

.not-list li {
  border-left: 4px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1rem;
}

.not-list strong {
  display: block;
}

/* Pricing */
.price-card {
  display: flex;
  flex-direction: column;
}

.price-card.is-pro {
  border: 2px solid var(--accent);
}

.price {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.price small {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
}

.price-card ul {
  padding-left: 1.2rem;
  flex: 1;
}

.price-card li {
  margin: 0.35rem 0;
}

.price-card .btn {
  align-self: flex-start;
}

.price-card .status {
  margin-top: 0.75rem;
}

.price-card .fineprint {
  margin-top: 0.75rem;
}

/* Screenshots */
.shots {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 48em) {
  .shots {
    grid-template-columns: 1fr 1fr;
  }
}

.shots figure {
  margin: 0;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.shots figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* FAQ, native disclosure widgets */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 0.75rem;
  background: var(--bg);
  max-width: 76ch;
}

.faq summary {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  margin-top: 0.5em;
  border-left: 7px solid var(--accent);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transition: transform 0.15s;
}

.faq details[open] > summary::before {
  transform: rotate(90deg);
}

.faq .answer {
  padding: 0.75rem 1rem 1rem 2.4rem;
  border-top: 1px solid var(--line);
}

.faq .answer > :last-child {
  margin-bottom: 0;
}

/* Long-form pages (privacy, terms, refunds) */
.prose {
  padding: 2.5rem 0 3rem;
}

.prose h1 {
  max-width: none;
  margin-bottom: 0.5rem;
}

.prose .meta {
  color: var(--muted);
  margin-bottom: 2rem;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.prose ul {
  padding-left: 1.2rem;
}

.prose li {
  margin: 0.3rem 0;
}

.notice {
  max-width: none;
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
  border-left: 4px solid var(--focus);
  background: var(--todo-bg);
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 44rem;
  font-size: 0.95rem;
}

caption {
  text-align: left;
  font-weight: 600;
  padding: 0 0 0.5rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
}

th {
  background: var(--surface);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer p {
  max-width: 80ch;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  max-width: none;
}
