/* Shared styles for static SEO landings, guides, trust pages, leaderboard.
   Matches the Zen Focus app: soft sky light theme, Instrument Sans, pill CTAs. */

:root {
  color-scheme: light;
  --bg: #e8f4ff;
  --bg-elev: #ffffff;
  --bg-elev-2: #fff8ee;
  --line: #c5ddf5;
  --line-soft: #e3effc;
  --text: #1e2a3a;
  --muted: #5b6b7c;
  --faint: #8b9aab;
  --amber: #ff7a3c;
  --amber-dim: rgba(255, 122, 60, 0.16);
  --coral: #ff5c7a;
  --mint: #22c55e;
  --sky: #3b9eff;
  --on-amber: #ffffff;
  --radius: 18px;
  --radius-sm: 14px;
  --shadow: 0 12px 28px rgba(59, 120, 180, 0.1);
  --shadow-lift: 0 16px 36px rgba(59, 120, 180, 0.14);
  --font-ui: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 8% -8%, rgba(255, 200, 120, 0.28), transparent 55%),
    radial-gradient(800px 420px at 100% 0%, rgba(120, 190, 255, 0.32), transparent 50%),
    radial-gradient(700px 380px at 50% 110%, rgba(255, 150, 180, 0.14), transparent 50%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

.wrap {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.wrap-wide {
  width: min(820px, calc(100% - 2rem));
}

/* —— Nav —— */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(59, 120, 180, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff9a55, #ff7a3c);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  box-shadow: 0 4px 12px rgba(255, 122, 60, 0.28);
  flex-shrink: 0;
}

.brand > div {
  line-height: 1.15;
}

.brand span {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  margin-top: 0.1rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.15rem;
  font-size: 0.88rem;
}

.nav-links a {
  color: var(--muted);
  font-weight: 550;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(30, 42, 58, 0.05);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--amber);
  font-weight: 650;
  background: var(--amber-dim);
}

/* —— Type —— */
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 650;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.75rem;
  padding: 0.3rem 0.65rem;
  background: var(--amber-dim);
  border-radius: 999px;
}

h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 750;
  margin: 0 0 1rem;
  color: var(--text);
}

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 38rem;
  line-height: 1.55;
}

/* —— CTAs —— */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.78rem 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 650;
  border: 1.5px solid var(--line);
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(180deg, #ff9a55, #ff7a3c);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(255, 122, 60, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #ffaa6a, #ff8a4c);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 122, 60, 0.34);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: #fff;
}

/* —— Cards / surfaces —— */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(59, 120, 180, 0.08);
}

.card h2 {
  margin: 0 0 0.65rem;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card p,
.card li {
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.card p:last-child,
.card li:last-child {
  margin-bottom: 0;
}

.card ul,
.card ol {
  margin: 0;
  padding-left: 1.15rem;
}

.card li {
  margin-bottom: 0.4rem;
}

.card a {
  font-weight: 600;
}

.grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
}

.pill {
  font-size: 0.7rem;
  font-weight: 650;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--muted);
  border: 1px solid var(--line);
}

.related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.related h2 {
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
  color: var(--faint);
  font-weight: 650;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.related-links a {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-weight: 550;
  text-decoration: none;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}

.related-links a:hover {
  color: var(--amber);
  border-color: #ffd0b0;
  background: #fff;
  text-decoration: none;
}

.site-foot {
  margin-top: 3rem;
  padding: 1.1rem 0.25rem 0;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  align-items: center;
}

.site-foot a {
  color: var(--muted);
  font-weight: 550;
}

.site-foot a:hover {
  color: var(--amber);
}

/* Leaderboard table */
.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.board-table th,
.board-table td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line-soft);
}

.board-table th {
  color: var(--faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 650;
}

.board-table td {
  font-family: var(--font-mono);
  color: var(--text);
}

.board-table td.user {
  font-family: var(--font-ui);
  font-weight: 600;
}

.board-table .rank {
  color: var(--amber);
  width: 2.5rem;
  font-weight: 700;
}

.board-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.empty-state {
  color: var(--muted);
  padding: 1rem 0;
}

.faq details {
  border-bottom: 1px solid var(--line-soft);
  padding: 0.85rem 0;
}

.faq details:last-child {
  border-bottom: none;
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--text);
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  float: right;
  color: var(--faint);
  font-weight: 500;
}

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

.faq details p {
  margin: 0.6rem 0 0;
  color: var(--muted);
}

/* Long-form guides */
.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
}

.prose h3 {
  margin: 1.45rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text);
}

.prose p,
.prose li {
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose strong {
  color: var(--text);
  font-weight: 650;
}

.prose a {
  font-weight: 600;
}

.prose .callout {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0 1.5rem;
  box-shadow: 0 8px 20px rgba(59, 120, 180, 0.06);
}

.prose .callout p:last-child {
  margin-bottom: 0;
}

.toc {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.25rem;
  margin: 0 0 2rem;
  box-shadow: 0 8px 24px rgba(59, 120, 180, 0.08);
}

.toc h2 {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  color: var(--faint);
  font-weight: 650;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

.toc li {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.toc a {
  color: var(--muted);
  font-weight: 550;
}

.toc a:hover {
  color: var(--amber);
}

.guide-cards {
  display: grid;
  gap: 0.85rem;
  margin: 1.5rem 0 2rem;
}

.guide-card {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(59, 120, 180, 0.08);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
}

.guide-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: #ffd0b0;
}

.guide-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.guide-card .meta {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-dim);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.finger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.75rem 0 1.25rem;
  background: var(--bg-elev);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}

.finger-table th,
.finger-table td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}

.finger-table tr:last-child td {
  border-bottom: none;
}

.finger-table th {
  color: var(--faint);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 650;
  background: rgba(232, 244, 255, 0.65);
}

.finger-table td:first-child {
  font-weight: 650;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Dark preference (optional — mirrors app dark zen tokens) */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #1a1630;
    --bg-elev: #241f3d;
    --bg-elev-2: #2e2748;
    --line: #3d3560;
    --line-soft: #322a52;
    --text: #f4f0ff;
    --muted: #b4a8d4;
    --faint: #8578ad;
    --amber: #ff9a5c;
    --amber-dim: rgba(255, 154, 92, 0.16);
    --on-amber: #1a1220;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 20px 50px rgba(0, 0, 0, 0.45);
  }

  body {
    background-image:
      radial-gradient(700px 400px at 10% -10%, rgba(255, 154, 92, 0.12), transparent 55%),
      radial-gradient(600px 360px at 100% 0%, rgba(126, 192, 255, 0.1), transparent 50%);
  }

  .site-nav {
    background: rgba(36, 31, 61, 0.88);
    border-color: var(--line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  }

  .brand-mark {
    background: linear-gradient(180deg, #ffb07a, #ff9a5c);
    color: var(--on-amber);
  }

  .btn-primary {
    background: linear-gradient(180deg, #ffb07a, #ff9a5c);
    color: var(--on-amber);
    box-shadow: 0 6px 16px rgba(255, 154, 92, 0.28);
  }

  .btn-ghost {
    background: rgba(36, 31, 61, 0.7);
  }

  .card,
  .toc,
  .guide-card,
  .prose .callout {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  }

  .pill {
    background: rgba(36, 31, 61, 0.85);
    color: var(--muted);
  }

  .related-links a {
    background: rgba(36, 31, 61, 0.7);
  }

  .finger-table th {
    background: rgba(46, 39, 72, 0.65);
  }
}

@media (max-width: 640px) {
  .site-nav {
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .nav-links a {
    padding: 0.35rem 0.55rem;
    font-size: 0.82rem;
  }
}
