/* Chess Assistant — public site styles.
   Dark, restrained, chess-software feel: flat surfaces, hairline borders, one accent colour
   taken from the extension itself. System fonts only, no external resources. */

:root {
  --bg: #0f141d;
  --bg-alt: #121824;
  --surface: #161c27;
  --surface-2: #1b2230;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f1f4f8;
  --muted: #9eacbe;
  --accent: #b5f185;
  --accent-dim: #8cc95f;
  --accent-ink: #10200b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --wrap: 1120px;
  --wrap-narrow: 800px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.075rem; }

p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; color: var(--text); background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--wrap-narrow); }
.center { text-align: center; }
.muted { color: var(--muted); font-size: .95rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 20;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15, 20, 29, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-glyph { font-size: 26px; line-height: 1; color: var(--accent); }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 1rem; font-weight: 650; }
.brand-text small { color: var(--muted); font-size: .75rem; letter-spacing: .02em; }
.nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: .92rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav-cta { flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-dim); }
.btn-primary[disabled] { background: var(--surface-2); color: var(--muted); border-color: var(--line); cursor: default; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  margin: 0 0 14px; color: var(--accent); font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
}
.lead { color: var(--muted); font-size: 1.12rem; }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 26px; }
.badges li {
  font-size: .8rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { margin: 14px 0 0; color: var(--muted); font-size: .88rem; max-width: 44ch; }
.hero-shot { margin: 0; }
.hero-shot img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-shot figcaption { margin-top: 12px; color: var(--muted); font-size: .85rem; text-align: center; }

/* ---------- availability strip ---------- */
.strip { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip-inner { padding: 16px 24px; }
.strip p { margin: 0; color: var(--muted); font-size: .92rem; }
.strip strong { color: var(--text); }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 68ch; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-lead { color: var(--muted); margin: 0; font-size: 1.02rem; }

.cards { display: grid; gap: 22px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 20px;
}
.card h3 { color: var(--text); }
.card p:last-child { margin-bottom: 0; }
.compat-yes { border-color: rgba(181, 241, 133, .3); }
.compat-no { border-color: var(--line-strong); }

.ticks { list-style: none; margin: 0 0 1em; padding: 0; }
.ticks li { position: relative; padding-left: 24px; margin-bottom: 10px; color: var(--muted); font-size: .95rem; }
.ticks li::before {
  content: "\2713"; position: absolute; left: 0; top: 0; color: var(--accent); font-size: .85rem;
}
.marks { list-style: none; margin: 0 0 1em; padding: 0; }
.marks li { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; font-size: .98rem; }
.mark { font-size: .9rem; line-height: 1; }
.mark.ok { color: var(--accent); }
.mark.no { color: #e0836f; }

/* ---------- features ---------- */
.feature-grid {
  list-style: none; display: grid; gap: 18px; padding: 0; margin: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 4px;
}
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .93rem; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.plan {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 28px 24px;
}
.plan-pro { background: var(--surface-2); border-color: rgba(181, 241, 133, .38); box-shadow: var(--shadow); }
.plan-tag {
  position: absolute; top: -12px; left: 28px; margin: 0;
  background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
}
.price { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 18px; }
.amount { font-size: 2.4rem; font-weight: 700; letter-spacing: -.02em; }
.period { color: var(--muted); font-size: 1rem; }
.plan-note { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- callout / disclosure ---------- */
.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 26px 28px 12px;
}
.callout h2 { font-size: 1.25rem; }
.callout p { color: var(--muted); font-size: .97rem; }
.disclosure {
  margin: 26px 0 0; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--muted); font-size: .92rem; background: var(--surface);
}

/* ---------- gallery ---------- */
.gallery { display: grid; gap: 22px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: var(--radius); border: 1px solid var(--line); }
.gallery figcaption { margin-top: 10px; color: var(--muted); font-size: .88rem; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 20px;
}
.faq summary {
  cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 1rem;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); font-size: .95rem; margin-top: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 46px 0 38px; }
.footer-inner { display: grid; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--text); font-size: .94rem; }
.footer-links a:hover { color: var(--accent); }
.footer-note { margin: 0; color: var(--muted); font-size: .84rem; max-width: 82ch; }

/* ---------- safety against horizontal overflow ---------- */
p, li, h1, h2, h3, summary, figcaption { overflow-wrap: break-word; }
pre, code { white-space: normal; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .header-inner { flex-wrap: wrap; row-gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 16px; }
  .nav-cta { margin-left: auto; }
  .hero { padding: 48px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-shot { order: -1; }
  .section { padding: 62px 0; }
  .section-head { margin-bottom: 32px; }
  .cards.two, .plans { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 18px; }
  .section { padding: 50px 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .badges li { font-size: .76rem; }
  .amount { font-size: 2rem; }
  .card, .plan, .callout { padding-left: 20px; padding-right: 20px; }
  .cta-row { display: grid; }
  .cta-row .btn { width: 100%; }
  .footer-links { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
