/* =========================================================================
   Screendog — Soft Studio design system
   Cream paper, sage + clay accents, warm ink. Same token names as before
   (--bg, --surface, --accent, etc.) so every interior + SEO page retunes
   automatically without per-file edits.
   ========================================================================= */

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

:root {
  /* Paper & ink — Soft Studio palette */
  --bg:           #f7f4ee;   /* cream */
  --surface:      #ffffff;   /* card */
  --surface2:     #faf6ee;   /* pebble */
  --border:       rgba(44,41,36,0.10);
  --rule:         rgba(44,41,36,0.08);
  --text:         #2c2924;   /* warm ink */
  --muted:        #7a7569;   /* muted */
  /* Clay accent — primary actions, focus, key links */
  --accent:       #d97a4b;   /* clay */
  --accent-h:     #c86b3e;   /* clay-h */
  --accent-dim:   rgba(217,122,75,0.13);
  /* Sage as the secondary "good news" hue */
  --sage:         #94a87b;
  --sage-mist:    #bbc9b1;
  /* Status (kept distinct from accent) */
  --success:      #6b8a52;   /* deeper sage for status text contrast */
  --danger:       #b14a2a;   /* warm red */
  --warn:         #b87a1a;
  /* Shapes */
  --r:            10px;
  --r-sm:         6px;
  --shadow-paper: 0 1px 0 rgba(255,255,255,0.7) inset, 0 14px 50px -10px rgba(34,30,24,0.10), 0 1px 2px rgba(34,30,24,0.05);
}

html, body {
  min-height: 100vh;
  background-color: var(--bg);
  /* Soft aurora — drifting cream/sage clouds, matches landing page */
  background-image:
    radial-gradient(circle at 20% 10%, rgba(217,122,75,0.06) 0, transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(148,168,123,0.09) 0, transparent 45%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

::selection { background: var(--accent-dim); color: var(--text); }

/* Accessible focus ring — applies to anything keyboard-reachable on the
   light theme, where default UA outlines are nearly invisible. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible, a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Display serif for headlines / logo wordmarks */
.serif, h1.serif, h2.serif, h3.serif {
  font-family: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  font-feature-settings: "ss01", "ss02";
  letter-spacing: -0.015em;
}

/* Mono caps used for "stamps" and meta labels */
.stamp {
  font-family: 'JetBrains Mono', ui-monospace, 'Menlo', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Logo ──────────────────────────────────────────────────────────────── */
/* Matches the landing's .s-brand: image mark + "screen<b>dog</b>" wordmark. */
.logo {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.025em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo img { display: block; height: 32px; width: auto; }
.logo-word { color: var(--text); }
.logo-word b { font-weight: 700; color: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none !important;
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: 0.005em;
}
.btn-primary {
  background: var(--text); color: var(--bg);
  border-color: var(--text);
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 6px 18px -8px rgba(34,30,24,0.4);
}
.btn-primary:hover { background: #1f1d19; border-color: #1f1d19; transform: translateY(-1px); }
.btn-brass {
  background: var(--accent); color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 18px -8px rgba(217,122,75,0.5);
}
.btn-brass:hover { background: var(--accent-h); border-color: var(--accent-h); transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface); color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface2); border-color: rgba(44,41,36,0.20); }
.btn-ghost {
  background: transparent; color: var(--muted);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(44,41,36,0.20); background: rgba(44,41,36,0.03); }
.btn-danger { background: var(--danger); color: #ffffff; border-color: var(--danger); }
.btn-danger:hover { background: #8b3a1f; border-color: #8b3a1f; }
.btn-success { background: var(--success); color: #ffffff; border-color: var(--success); }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: var(--r); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* Map old --accent purple usage to brass */
.btn-primary.btn-brass-bg { background: var(--accent); }

/* ── Inputs ────────────────────────────────────────────────────────────── */
.input, input.input, textarea, select {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.input:focus, input.input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.7; }

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ── Card / Panel — mimics a paper card with a brass tab ───────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--shadow-paper);
  position: relative;
}
.card-tab::before {
  content: '';
  position: absolute;
  top: -1px; left: 24px;
  width: 56px; height: 4px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}

/* ── App bar (shared shell across dashboard/record/view/settings) ──────── */
.app-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(247,244,238,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.app-bar-left, .app-bar-right { display: flex; align-items: center; gap: 18px; }
.app-bar .ws-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}
.app-bar .ws-tag b { color: var(--text); font-weight: 700; }
.app-menu { display: flex; gap: 4px; }
.app-menu a {
  padding: 7px 14px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.15s, background 0.15s;
}
.app-menu a:hover { color: var(--text); background: rgba(44,41,36,0.04); text-decoration: none; }
.app-menu a.active { color: var(--text); background: var(--accent-dim); }

/* Legacy .nav (used by dashboard/record/view) — keep shape, retheme */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: rgba(247,244,238,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
}

/* ── Container ─────────────────────────────────────────────────────────── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 28px; }

/* ── Alerts ────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  margin-top: 12px;
  border: 1px solid;
}
.alert-error   { background: rgba(177,74,42,0.08);  border-color: rgba(177,74,42,0.3); color: #8b3a1f; }
.alert-success { background: rgba(148,168,123,0.12);  border-color: rgba(148,168,123,0.4); color: #4a6635; }
.alert-warn    { background: rgba(184,122,26,0.08);   border-color: rgba(184,122,26,0.3); color: #8c5a10; }

/* ── Tags / chips (used for pills, status labels) ──────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag-brass { background: var(--accent-dim); border-color: rgba(217,122,75,0.32); color: #a05a2e; }
.tag-rust  { background: rgba(177,74,42,0.1); border-color: rgba(177,74,42,0.32); color: #8b3a1f; }
.tag-moss  { background: rgba(148,168,123,0.14); border-color: rgba(148,168,123,0.4); color: #4a6635; }

/* ── Section divider ───────────────────────────────────────────────────── */
.case-rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 32px 0;
  position: relative;
}
.case-rule::after {
  content: ''; position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg);
}

/* ── Utilities ─────────────────────────────────────────────────────────── */
.text-muted   { color: var(--muted); font-size: 14px; }
.text-small   { font-size: 13px; }
.flex         { display: flex; }
.items-center { align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.mt-24        { margin-top: 24px; }
.mt-32        { margin-top: 32px; }
.mb-16        { margin-bottom: 16px; }

/* ── Fintech polish — tighter tabular nums in pricing ────────────────────── */
.price-num, .price-cents { font-feature-settings: "tnum", "ss01"; font-variant-numeric: tabular-nums; }
.btn { letter-spacing: -0.005em; }

/* ══════════════════════════════════════════════════════════════════════════
   Programmatic SEO landing pages (alternatives, use-cases, for, screen-recorder)
   Inherits the global theme; adds page-scoped layout + comparison-table styles.
   ══════════════════════════════════════════════════════════════════════════ */

body.seo-page { background: var(--bg); }

.seo-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--rule);
  background: rgba(247,244,238,0.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.seo-topbar nav { display: flex; gap: 28px; }
.seo-topbar nav a {
  font-size: 14px; font-weight: 500; color: var(--muted);
}
.seo-topbar nav a:hover { color: var(--text); text-decoration: none; }

.breadcrumb {
  max-width: 980px; margin: 28px auto 0; padding: 0 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb [aria-current="page"] { color: var(--text); }

.seo-article {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.seo-hero { padding: 40px 0 56px; border-bottom: 1px dashed var(--rule); margin-bottom: 56px; }
.seo-hero .stamp { display: inline-block; margin-bottom: 22px; color: var(--accent); border-color: var(--accent); }
.seo-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 24px;
  max-width: 24ch;
}
.seo-hero .seo-lede {
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 68ch;
  margin: 0 0 32px;
}
.seo-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Comparison table — fintech feature-grid feel */
.cmp-wrap { margin: 12px 0 56px; overflow-x: auto; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.cmp-table {
  width: 100%; border-collapse: collapse;
  font-size: 15px;
  font-feature-settings: "tnum"; font-variant-numeric: tabular-nums;
}
.cmp-table th, .cmp-table td {
  padding: 14px 18px; text-align: left;
  border-bottom: 1px solid var(--rule);
}
.cmp-table thead th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
  background: var(--surface2);
}
.cmp-table thead th.cmp-col { text-align: center; width: 22%; }
.cmp-table tbody tr:last-child th,
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-row-label { font-weight: 500; color: var(--text); }
.cmp-yes { text-align: center; color: #2f6b3a; font-weight: 700; font-size: 18px; }
.cmp-no  { text-align: center; color: var(--muted);  font-weight: 700; font-size: 18px; }
.cmp-text { text-align: center; color: var(--muted); font-size: 13px; }
/* Highlight the Screendog column subtly */
.cmp-table thead th:nth-child(2),
.cmp-table tbody td:nth-child(2),
.cmp-table tbody th:nth-child(2) { background: rgba(217,122,75,0.05); }
.cmp-table thead th:nth-child(2) { color: var(--accent); }

/* Body sections */
.seo-section { margin: 40px 0; }
.seo-section h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.7rem; font-weight: 600;
  letter-spacing: -0.02em; color: var(--text);
  margin: 0 0 16px;
}
.seo-section p {
  font-size: 1.05rem; line-height: 1.7; color: var(--text);
  max-width: 70ch; margin: 0;
}

/* FAQ */
.seo-faq { margin: 64px 0; padding-top: 40px; border-top: 1px dashed var(--rule); }
.seo-faq h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.7rem; font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 18px;
}
.faq-item summary {
  cursor: pointer; padding: 16px 0;
  font-weight: 600; color: var(--text);
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; color: var(--accent); font-size: 22px; line-height: 1;
  font-family: 'Inter', sans-serif; font-weight: 400;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  margin: 0 0 18px;
  color: var(--muted); line-height: 1.65;
}

/* Related links */
.seo-related { margin: 56px 0; padding-top: 32px; border-top: 1px dashed var(--rule); }
.seo-related h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
  margin: 0 0 16px;
}
.related-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px;
}
.related-list li a {
  display: block; padding: 14px 16px;
  border: 1px solid var(--rule); border-radius: 6px;
  background: var(--surface);
  color: var(--text); font-weight: 500;
  transition: border-color 0.15s, transform 0.15s;
}
.related-list li a:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateX(2px);
}

/* Final CTA panel */
.seo-final-cta {
  margin: 72px 0 0;
  padding: 48px 32px;
  background: var(--text);
  color: var(--bg);
  border-radius: 10px;
  text-align: center;
}
.seo-final-cta h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem; font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--bg);
}
.seo-final-cta p { color: rgba(247,244,238,0.75); margin: 0 0 24px; }

/* Footer with full internal-link grid (improves crawl depth) */
.seo-footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding: 56px 24px 32px;
  margin-top: 80px;
}
.footer-cols {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}
.footer-h {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
  margin-bottom: 14px;
}
.footer-cols a {
  display: block; padding: 4px 0;
  font-size: 14px; color: var(--muted);
}
.footer-cols a:hover { color: var(--text); text-decoration: none; }
.footer-base {
  max-width: 1180px; margin: 40px auto 0;
  padding-top: 24px; border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .seo-topbar { padding: 14px 18px; }
  .seo-topbar nav { display: none; }
  .seo-hero h1 { font-size: 2rem; }
  .cmp-table th, .cmp-table td { padding: 10px 12px; font-size: 13px; }
}
