/* ShareText Guide Pages — Design System
 * Matches the main app's Apple-inspired visual language:
 * - SF Pro typography
 * - Blue brand (#0a66f0)
 * - Clean surfaces with subtle depth
 * - Layered dark mode (not inverted)
 * - Rounded corners (12-20px)
 * - Status colors: green/amber/red
 */

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

:root {
  /* Brand */
  --brand: #0a66f0;
  --brand-hover: #0757d5;
  --brand-light: rgba(10,102,240,.06);
  --brand-border: rgba(10,102,240,.15);
  
  /* Surface */
  --bg: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-elevated: #fafafc;
  --surface: #ffffff;
  --surface-raised: #f7f8fa;
  
  /* Text */
  --text: #1d1d1f;
  --text-secondary: #6e737b;
  --text-muted: #aeaeb2;
  
  /* Border */
  --border: #e8e8ed;
  --border-subtle: #f0f0f5;
  
  /* Status */
  --success: #34c759;
  --success-bg: rgba(52,199,89,.06);
  --warning: #ff9500;
  --warning-bg: rgba(255,149,0,.06);
  --error: #ff3b30;
  --error-bg: rgba(255,59,48,.06);
  
  /* Radius */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4d9dff;
    --brand-hover: #72b3ff;
    --brand-light: rgba(77,157,255,.08);
    --brand-border: rgba(77,157,255,.2);
    
    --bg: #080c16;
    --bg-secondary: #0c1220;
    --bg-elevated: #141c2e;
    --surface: #141c2e;
    --surface-raised: #1a2438;
    
    --text: #f0f2f5;
    --text-secondary: #8a93a6;
    --text-muted: #555d6e;
    
    --border: rgba(240,242,245,.08);
    --border-subtle: rgba(240,242,245,.04);
    
    --success: #55d18c;
    --success-bg: rgba(85,209,140,.08);
    --warning: #ffb340;
    --warning-bg: rgba(255,179,64,.08);
    --error: #ff7373;
    --error-bg: rgba(255,115,115,.08);
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header ──────────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
@media (prefers-color-scheme: dark) {
  .header { background: rgba(8,12,22,.88); }
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}
.header-brand svg { width: 18px; height: 18px; color: var(--brand); }
.header-brand span { font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.header-back {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color .15s;
}
.header-back:hover { color: var(--text); }

/* ── Layout ──────────────────────────────────────────────────────────── */
.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }
article { padding: 56px 0 96px; }

/* ── Typography ──────────────────────────────────────────────────────── */
h1 {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 10px;
}
.subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.5;
}
.overline {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--text);
  margin: 44px 0 14px;
}
h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 8px;
}
p {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
}
p strong { color: var(--text); font-weight: 600; }

/* ── Callout ─────────────────────────────────────────────────────────── */
.callout {
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 28px 0;
}
.callout p { margin: 0; font-size: 15px; color: var(--text-secondary); }
.callout strong { color: var(--text); }

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
  transition: border-color .15s;
}
.card:hover { border-color: var(--brand-border); }

/* ── Tables ──────────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
}
td { color: var(--text-secondary); }
td:first-child { color: var(--text); font-weight: 500; }

/* ── Badges ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-brand { background: var(--brand-light); color: var(--brand); }

/* ── Lists ───────────────────────────────────────────────────────────── */
ul, ol { padding-left: 22px; margin-bottom: 16px; }
li { margin-bottom: 8px; font-size: 15px; color: var(--text-secondary); line-height: 1.6; }
li strong { color: var(--text); }

/* ── Steps ───────────────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; margin: 24px 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.steps li::before {
  content: counter(step);
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.steps li h3 { margin: 0 0 4px; font-size: 15px; color: var(--text); }
.steps li p { margin: 0; font-size: 14px; color: var(--text-secondary); }

/* ── Choose boxes ────────────────────────────────────────────────────── */
.choose-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 14px 0;
  background: var(--surface);
}
.choose-box h3 { font-size: 15px; font-weight: 600; margin: 0 0 6px; color: var(--text); }
.choose-box p { margin: 0; font-size: 14px; color: var(--text-secondary); }

/* ── CTA ─────────────────────────────────────────────────────────────── */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, transform .1s;
  min-height: 48px;
}
.cta:hover { background: var(--brand-hover); }
.cta:active { transform: scale(.98); }
.cta-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--brand);
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--brand-border);
  transition: all .15s;
  min-height: 48px;
}
.cta-outline:hover { border-color: var(--brand); background: var(--brand-light); }

/* ── VS cards ────────────────────────────────────────────────────────── */
.vs-card { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0; }
.vs-card > div {
  padding: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.vs-card .tool-name { font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.vs-card .tool-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ── Related ─────────────────────────────────────────────────────────── */
.related {
  margin-top: 52px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.related h2 { margin-top: 0; font-size: 18px; }
.related-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.related-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all .15s;
}
.related-links a:hover {
  border-color: var(--brand-border);
  background: var(--brand-light);
}
.related-links a::after {
  content: "→";
  margin-left: auto;
  color: var(--text-muted);
  transition: transform .15s;
}
.related-links a:hover::after { transform: translateX(3px); color: var(--brand); }

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
}
.footer p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.footer a { color: var(--text-secondary); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 20px; }
  .vs-card { grid-template-columns: 1fr; }
  .related-links { grid-template-columns: 1fr; }
  article { padding: 40px 0 72px; }
}

/* ── Focus ───────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }
