/* ── Shared styles for Excacloud guide / content pages ───────────────────
   Mirrors the tokens + prose system used by index.html and privacy.html.
   Linked by the pages under /guides-style content (auto-save, backup, sync). */

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  --accent:        #6965db;
  --accent-hi:     #7c79e3;
  --accent-soft:   #ecebfd;
  --accent-subtle: rgba(105,101,219,.13);
  --accent-glow:   rgba(105,101,219,.40);
  --bg:            #fcfcfc;
  --card:          #ffffff;
  --ink:           #1b1b1f;
  --muted:         #6b6c70;
  --border:        #e6e6ea;
  --nav-bg:        rgba(252,252,252,.88);
  --radius:        12px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --accent:        #8b87e8;
    --accent-hi:     #9d9aee;
    --accent-soft:   rgba(139,135,232,.14);
    --accent-subtle: rgba(139,135,232,.10);
    --accent-glow:   rgba(139,135,232,.35);
    --bg:            #111113;
    --card:          #1c1c1f;
    --ink:           #ebebf0;
    --muted:         #8e8e94;
    --border:        #2c2c30;
    --nav-bg:        rgba(17,17,19,.88);
    --shadow-sm:     0 1px 3px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.2);
  }
}
[data-theme="dark"] {
  --accent:        #8b87e8;
  --accent-hi:     #9d9aee;
  --accent-soft:   rgba(139,135,232,.14);
  --accent-subtle: rgba(139,135,232,.10);
  --accent-glow:   rgba(139,135,232,.35);
  --bg:            #111113;
  --card:          #1c1c1f;
  --ink:           #ebebf0;
  --muted:         #8e8e94;
  --border:        #2c2c30;
  --nav-bg:        rgba(17,17,19,.88);
  --shadow-sm:     0 1px 3px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.2);
}
[data-theme="light"] {
  --accent:        #6965db;
  --accent-hi:     #7c79e3;
  --accent-soft:   #ecebfd;
  --accent-subtle: rgba(105,101,219,.13);
  --accent-glow:   rgba(105,101,219,.40);
  --bg:            #fcfcfc;
  --card:          #ffffff;
  --ink:           #1b1b1f;
  --muted:         #6b6c70;
  --border:        #e6e6ea;
  --nav-bg:        rgba(252,252,252,.88);
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}

/* ── Base ───────────────────────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px;
  font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: 14px;
  text-decoration: none; border: none; cursor: pointer;
  transition: opacity .15s, transform .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { opacity: .88; transform: translateY(-1px); text-decoration: none; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 4px 14px var(--accent-glow); }
.btn-accent:hover { box-shadow: 0 6px 20px var(--accent-glow); }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 12px; }
/* Buttons can live inside .prose, whose `a` color rule would otherwise
   override the button text color (violet-on-violet). Keep button text white. */
.prose a.btn-accent, .cta-box a.btn-accent { color: #fff; }

/* ── Nav ────────────────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 62px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); transition: box-shadow .2s;
}
nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.08); }
.logo-mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark:hover { text-decoration: none; }
.logo-icon {
  width: 32px; height: 32px; border-radius: 23%; flex-shrink: 0;
  display: block; object-fit: cover; box-shadow: 0 4px 12px var(--accent-glow);
}
.logo-name { font-family: 'Caveat', cursive; font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-size: 14px; font-family: 'Inter Tight', sans-serif; font-weight: 500;
  color: var(--muted); text-decoration: none; transition: color .15s;
}
.nav-link:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 640px) { .nav-links { display: none; } }
.theme-btn {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 8px; border: 1px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s; flex-shrink: 0;
}
.theme-btn:hover { background: var(--accent-subtle); color: var(--ink); border-color: var(--accent); }

/* ── Prose content ──────────────────────────────────────────────────── */
.prose-wrap { max-width: 720px; margin: 0 auto; padding: 48px 28px 96px; }

.breadcrumb {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted); letter-spacing: .04em; margin-bottom: 28px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { margin: 0 6px; opacity: .6; }

.prose-header { margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.prose-eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--accent);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px;
}
.prose-header h1 {
  font-family: 'Inter Tight', sans-serif; font-weight: 700;
  font-size: clamp(28px, 4vw, 38px); letter-spacing: -.025em; line-height: 1.1;
  color: var(--ink); margin-bottom: 12px;
}
.prose-lede { font-size: 17px; line-height: 1.6; color: var(--muted); }
.prose-meta { font-size: 13px; color: var(--muted); margin-top: 14px; }

.prose-summary {
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 44px;
}
.prose-summary strong { font-weight: 600; }
.prose-summary p { font-size: 14px; line-height: 1.65; color: var(--ink); margin-bottom: 10px; }
.prose-summary p:last-child { margin-bottom: 0; }
.prose-summary ul { padding-left: 18px; list-style: disc; }
.prose-summary li { font-size: 14px; line-height: 1.65; color: var(--ink); margin-bottom: 4px; }
.prose-summary li:last-child { margin-bottom: 0; }

.prose h2 {
  font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 22px;
  letter-spacing: -.02em; color: var(--ink); margin: 44px 0 14px;
}
.prose h3 {
  font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: 16px;
  letter-spacing: -.01em; color: var(--ink); margin: 28px 0 10px;
}
.prose p { font-size: 15px; line-height: 1.7; color: var(--ink); margin-bottom: 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 20px; margin-bottom: 14px; }
.prose li { font-size: 15px; line-height: 1.7; color: var(--ink); margin-bottom: 6px; }
.prose strong { font-weight: 600; }
.prose code {
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
  background: var(--accent-soft); color: var(--accent);
  padding: 1px 5px; border-radius: 4px;
}
.prose a { color: var(--accent); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 36px 0; }
.prose-section { margin-bottom: 8px; }

/* numbered step list */
.steps-list { counter-reset: step; list-style: none; padding-left: 0; }
.steps-list li {
  position: relative; padding-left: 44px; margin-bottom: 16px;
  font-size: 15px; line-height: 1.7;
}
.steps-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
}

/* ── Tables ──────────────────────────────────────────────────────────── */
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0 20px; }
.prose th {
  font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); line-height: 1.6; vertical-align: top; }
.prose tr:last-child td { border-bottom: none; }

/* ── CTA box ─────────────────────────────────────────────────────────── */
.cta-box {
  background: var(--accent-soft); border: 1px solid var(--accent-subtle);
  border-radius: 14px; padding: 28px; margin: 44px 0 8px; text-align: center;
}
.cta-box h2 {
  font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 22px;
  letter-spacing: -.02em; color: var(--ink); margin: 0 0 8px;
}
.cta-box p { font-size: 14px; color: var(--muted); margin-bottom: 20px; }

/* ── Related guides ──────────────────────────────────────────────────── */
.related { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); }
.related-title {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px;
}
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  display: block; padding: 16px 18px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--card);
  color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.related-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); text-decoration: none; }
.related-card .rc-title { font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.related-card .rc-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ── Footer ─────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 28px 0; }
footer .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-copy { font-size: 13px; color: var(--muted); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--ink); text-decoration: none; }
.footer-links a[aria-current="page"] { color: var(--accent); }
