/* Synbrains Guide — shared theme (aligned with internal document HTML standards) */

:root {
  --ink: #1a1a2e;
  --ink-soft: #2a2a4a;
  --paper: #f8f6f1;
  --paper-soft: #fbfaf6;
  --accent: #2d6a4f;
  --accent-light: #d8f3dc;
  --accent-dark: #1b4332;
  --warm: #e8e0d4;
  --border: #d4cdc2;
  --border-soft: #e8e3da;
  --muted: #6b6561;
  --highlight: #f4a261;
  --highlight-soft: #fef3e5;
  --danger: #c1121f;
  --danger-soft: #fde8ea;
  --brand-grad: linear-gradient(135deg, #8b3a9e 0%, #d63384 35%, #e85d4e 70%, #f4a261 100%);

  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  --transition-speed: 0.25s;
  --container-max: 1080px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15.5px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═════════════════════════════════════════
   COVER HEADER
═════════════════════════════════════════ */
.cover {
  background: var(--ink);
  color: var(--paper);
  padding: 70px 40px 60px;
  position: relative;
  overflow: hidden;
}

.cover--compact {
  padding: 28px 24px 32px;
}

.cover::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: var(--brand-grad);
  opacity: 0.18;
  filter: blur(8px);
}

.cover::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 8%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 38px solid rgba(244, 162, 97, 0.07);
}

.cover-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cover-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 0;
}

.cover--compact .cover-top {
  margin-bottom: 0;
}

.cover-header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark-logo {
  height: 42px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.cover--compact .brand-mark-logo {
  height: 36px;
}

.brand-mark-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.18);
}

.brand-mark-wordmark {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--paper);
  line-height: 1.05;
  letter-spacing: -0.2px;
}

.brand-mark-wordmark-sub {
  font-family: var(--font-serif);
  font-size: 18px;
  color: rgba(248, 246, 241, 0.55);
}

.doc-classification {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(248, 246, 241, 0.7);
}

.doc-classification .dot {
  width: 6px;
  height: 6px;
  background: var(--highlight);
  border-radius: 50%;
}

.header-user {
  font-size: 13px;
  color: rgba(248, 246, 241, 0.75);
  font-weight: 500;
}

.header-logout {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--highlight);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(244, 162, 97, 0.35);
  border-radius: 4px;
  transition: background var(--transition-speed) ease, color var(--transition-speed) ease;
}

.header-logout:hover {
  background: rgba(244, 162, 97, 0.15);
  color: var(--paper);
}

/* ═════════════════════════════════════════
   TYPOGRAPHY
═════════════════════════════════════════ */
.doc-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--highlight);
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(244, 162, 97, 0.3);
}

.guide-card .doc-eyebrow {
  margin-bottom: 16px;
}

.guide-card .lede {
  margin-bottom: 24px;
}

h1.guide-title,
.cover h1,
.page-intro h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.guide-card h1.guide-title {
  font-size: 2rem;
  margin-bottom: 8px;
}

.lede {
  font-size: 17px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.65;
  max-width: 640px;
}

.page-intro {
  margin-bottom: var(--spacing-xl);
  text-align: left;
}

.page-intro h1 {
  font-size: 2.25rem;
  margin-bottom: 12px;
}

/* ═════════════════════════════════════════
   LAYOUT
═════════════════════════════════════════ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px 40px 72px;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex-grow: 1;
  width: 100%;
}

/* ═════════════════════════════════════════
   AUTH PAGES
═════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  min-height: 0;
}

.auth-main .guide-card {
  width: 100%;
  max-width: 440px;
}

/* ═════════════════════════════════════════
   GUIDE CARD
═════════════════════════════════════════ */
.guide-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 40px;
  box-shadow: 0 4px 20px rgba(26, 26, 46, 0.06);
}

.guide-card--centered {
  text-align: center;
}

.guide-card--centered .guide-form {
  text-align: left;
}

.footer-note {
  margin-top: var(--spacing-lg);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.instruction {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: var(--spacing-lg);
  line-height: 1.65;
}

.email-highlight {
  font-weight: 600;
  color: var(--accent);
}

/* ═════════════════════════════════════════
   FORMS
═════════════════════════════════════════ */
.guide-form .form-group {
  margin-bottom: var(--spacing-md);
}

.guide-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: var(--ink);
}

.guide-form input[type="email"],
.guide-form input[type="text"],
.guide-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--paper-soft);
  color: var(--ink);
  transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.guide-form input[type="text"].otp-input {
  font-family: var(--font-mono);
  font-size: 24px;
  text-align: center;
  letter-spacing: 8px;
  margin-bottom: var(--spacing-md);
}

.guide-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

.btn-primary {
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.3px;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition-speed) ease, transform 0.1s ease;
  margin-top: var(--spacing-sm);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-primary:focus {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

.back-link {
  display: inline-block;
  margin-top: var(--spacing-lg);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-speed) ease;
}

.back-link:hover {
  color: var(--accent-dark);
}

/* ═════════════════════════════════════════
   ALERTS
═════════════════════════════════════════ */
.alert {
  padding: 12px 14px;
  margin-bottom: var(--spacing-md);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.alert.error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(193, 18, 31, 0.2);
}

.alert.info {
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid rgba(45, 106, 79, 0.2);
}

/* ═════════════════════════════════════════
   TOC PANEL
═════════════════════════════════════════ */
.toc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 40px;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.toc::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--brand-grad);
}

.toc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.toc h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 22px;
  color: var(--ink);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  display: flex;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border-soft);
  font-size: 14px;
  transition: padding-left 0.2s ease;
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-list li:hover {
  padding-left: 6px;
}

/* ═════════════════════════════════════════
   FOOTER
═════════════════════════════════════════ */
.site-footer {
  background: var(--paper);
  color: var(--muted);
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ═════════════════════════════════════════
   RESPONSIVE
═════════════════════════════════════════ */
@media (max-width: 768px) {
  .cover {
    padding: 48px 24px 40px;
  }

  .cover--compact {
    padding: 24px 20px 28px;
  }

  .container {
    padding: 36px 24px 56px;
  }

  .guide-card {
    padding: 28px 24px;
  }

  .toc {
    padding: 28px 24px;
  }

  .page-intro h1 {
    font-size: 1.85rem;
  }
}

@media (max-width: 480px) {
  .cover-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-user {
    display: none;
  }
}
